|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <PickSelectAppUi.h>
Public Member Functions | |
| void | ConstructL () |
| virtual | ~CPickSelectAppUi () |
Private Member Functions | |
| void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
| void | HandleCommandL (TInt aCommand) |
| virtual TKeyResponse | HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
Private Attributes | |
| CPickSelectContainer * | iAppContainer |
Definition at line 36 of file PickSelectAppUi.h.
|
|
Destructor. Removes CPickSelectContainer from the control stack and destroys it. Definition at line 41 of file PickSelectAppUi.cpp. References iAppContainer. 00042 { 00043 if ( iAppContainer ) 00044 { 00045 RemoveFromStack( iAppContainer ); 00046 delete iAppContainer; 00047 } 00048 }
|
|
|
Second phase constructor. Creates the CPickSelectContainer and adds it to the control stack. Definition at line 31 of file PickSelectAppUi.cpp. References CPickSelectContainer::ConstructL(), and iAppContainer. 00032 { 00033 BaseConstructL(); 00034 iAppContainer = new (ELeave) CPickSelectContainer; 00035 iAppContainer->SetMopParent(this); 00036 iAppContainer->ConstructL( ClientRect() ); 00037 AddToStackL( iAppContainer ); 00038 }
|
|
||||||||||||
|
This method is called by the EIKON framework just before it displays a menu pane. Does nothing in this implemenation. Definition at line 58 of file PickSelectAppUi.cpp.
|
|
|
CEikAppUi method that is used to handle user commands. Handles menu commands and application exit request.
Definition at line 129 of file PickSelectAppUi.cpp. References iAppContainer, CPickSelectContainer::iPickSelect, CPickSelect::SetObjectSelection(), and CPickSelect::SetPolygonSelection(). 00130 { 00131 switch ( aCommand ) 00132 { 00133 case EAknSoftkeyBack: 00134 case EEikCmdExit: 00135 { 00136 Exit(); 00137 break; 00138 } 00139 case EPickSelectPolygon: 00140 { 00141 iAppContainer->iPickSelect->SetPolygonSelection(); 00142 break; 00143 } 00144 case EPickSelectObject: 00145 { 00146 iAppContainer->iPickSelect->SetObjectSelection(); 00147 break; 00148 } 00149 default: 00150 break; 00151 } 00152 }
|
|
||||||||||||
|
CEikAppUi method that is used to handle key events. Does nothing in this implemenation.
Definition at line 68 of file PickSelectAppUi.cpp. References iAppContainer, CPickSelectContainer::iPickSelect, CPickSelect::MoveDown(), CPickSelect::MoveLeft(), CPickSelect::MoveRight(), CPickSelect::MoveUp(), and CPickSelect::SelectObject(). 00070 { 00071 if ( aType == EEventKeyDown ) 00072 { 00073 TUint scan = aKeyEvent.iScanCode; 00074 00075 switch ( scan ) 00076 { 00077 case(EStdKeyUpArrow): 00078 iAppContainer->iPickSelect->MoveUp(ETrue); 00079 return EKeyWasConsumed; 00080 case(EStdKeyDownArrow): 00081 iAppContainer->iPickSelect->MoveDown(ETrue); 00082 return EKeyWasConsumed; 00083 case(EStdKeyLeftArrow): 00084 iAppContainer->iPickSelect->MoveLeft(ETrue); 00085 return EKeyWasConsumed; 00086 case(EStdKeyRightArrow): 00087 iAppContainer->iPickSelect->MoveRight(ETrue); 00088 return EKeyWasConsumed; 00089 case(EStdKeyDevice3): // Rocker Middle Button 00090 iAppContainer->iPickSelect->SelectObject(); 00091 return EKeyWasConsumed; 00092 default: 00093 return EKeyWasNotConsumed; 00094 } 00095 } 00096 else if ( aType == EEventKeyUp ) 00097 { 00098 TUint scan = aKeyEvent.iScanCode; 00099 00100 switch ( scan ) 00101 { 00102 case(16): 00103 iAppContainer->iPickSelect->MoveUp(EFalse); 00104 return EKeyWasConsumed; 00105 case(17): 00106 iAppContainer->iPickSelect->MoveDown(EFalse); 00107 return EKeyWasConsumed; 00108 case(14): 00109 iAppContainer->iPickSelect->MoveLeft(EFalse); 00110 return EKeyWasConsumed; 00111 case(15): 00112 iAppContainer->iPickSelect->MoveRight(EFalse); 00113 return EKeyWasConsumed; 00114 default: 00115 return EKeyWasNotConsumed; 00116 } 00117 } 00118 else 00119 { 00120 return EKeyWasNotConsumed; 00121 } 00122 }
|
|
|
GUI container that resides in this application UI. Definition at line 80 of file PickSelectAppUi.h. |
|
© Nokia 2006 |