|
Nokia N97 SDK Example Applications Guide |
#include <tactileexamplesquare.h>
Inheritance diagram for CTactileExampleSquare:

Definition at line 32 of file tactileexamplesquare.h.
Public Member Functions |
|
| virtual | ~CTactileExampleSquare () |
| void | EnableFeedback (TBool aEnabled) |
| TBool | HitRegionContains (const TPoint &aPoint, const CCoeControl &) const |
Static Public Member Functions |
|
| static CTactileExampleSquare * | NewL (const TRect &aRect, const CCoeControl *aParent) |
Protected Member Functions |
|
| void | Draw (const TRect &aRect) const |
| void | PositionChanged () |
| void | SizeChanged () |
Private Member Functions |
|
| CTactileExampleSquare () | |
| void | ConstructL (const TRect &aRect, const CCoeControl *aParent) |
Private Attributes |
|
| MTouchFeedback * | iFeedback |
|
|
Destructor. Definition at line 44 of file tactileexamplesquare.cpp. References iFeedback. 00045 { 00046 if ( iFeedback ) 00047 { 00048 iFeedback->RemoveFeedbackForControl( this ); 00049 } 00050 }
|
|
||||||||||||
|
First phase of two-phased constructor return the created CTactileExampleSquare object Definition at line 29 of file tactileexamplesquare.cpp. References ConstructL(). Referenced by CTactileExampleAppView::ConstructL(). 00031 { 00032 CTactileExampleSquare* self = new ( ELeave ) CTactileExampleSquare; 00033 CleanupStack::PushL( self ); 00034 self->ConstructL( aRect, aParent ); 00035 CleanupStack::Pop( self ); 00036 return self; 00037 }
|
|
|
Enables/disables tactile feedback for this control
Definition at line 57 of file tactileexamplesquare.cpp. References iFeedback. Referenced by CTactileExampleAppView::HandleControlEventL(), and CTactileExampleAppView::HandleResourceChange(). 00058 { 00059 iFeedback->EnableFeedbackForControl( this, aEnabled ); 00060 }
|
|
||||||||||||
|
From MCoeControlHitTest. Tests whether a pointer event occurred inside the control's hit region
Definition at line 68 of file tactileexamplesquare.cpp.
|
|
|
From CCoeControl. Draw this CTactileExampleSquare custom control to the screen.
Definition at line 80 of file tactileexamplesquare.cpp. 00081 { 00082 CWindowGc& gc = SystemGc(); 00083 gc.SetPenStyle( CGraphicsContext::ENullPen ); 00084 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); 00085 gc.SetBrushColor( KRgbRed ); 00086 gc.DrawRect( Rect() ); 00087 }
|
|
|
From CCoeControl. Called by framework whenever the application calls SetPosition() on the control. Definition at line 95 of file tactileexamplesquare.cpp. References iFeedback. 00096 { 00097 iFeedback->ChangeFeedbackArea( this, 0, Rect() ); 00098 }
|
|
|
From CCoeControl. Called by framework whenever the application calls SizeChanged() on the control. Definition at line 106 of file tactileexamplesquare.cpp. References iFeedback. 00107 { 00108 iFeedback->SetFeedbackArea( this, 0, Rect(), 00109 ETouchFeedbackBasic, ETouchEventStylusDown ); 00110 }
|
|
||||||||||||
|
Second phase of constructor. Definition at line 127 of file tactileexamplesquare.cpp. References iFeedback. Referenced by NewL(). 00129 { 00130 // Get a pointer to touch feedback instance 00131 iFeedback = MTouchFeedback::Instance(); 00132 User::LeaveIfNull( iFeedback ); 00133 00134 SetContainerWindowL( *aParent ); 00135 SetRect( aRect ); 00136 00137 // Set hit tester to be object itself 00138 SetHitTest( this ); 00139 00140 // Set feedback area for this control 00141 iFeedback->SetFeedbackArea( this, 0, Rect(), 00142 ETouchFeedbackBasic, ETouchEventStylusDown ); 00143 00144 ActivateL(); 00145 }
|
|
|
Pointer to touch feedback instance Not own. Definition at line 110 of file tactileexamplesquare.h. Referenced by ConstructL(), EnableFeedback(), PositionChanged(), SizeChanged(), and ~CTactileExampleSquare(). |
|
© Nokia 2009 |