|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <BillboardAppUi.h>
Public Member Functions | |
| void | ConstructL () |
| virtual | ~CBillboardAppUi () |
Private Member Functions | |
| void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
| void | HandleCommandL (TInt aCommand) |
| virtual TKeyResponse | HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
Private Attributes | |
| CBillboardContainer * | iAppContainer |
Definition at line 35 of file BillboardAppUi.h.
|
|
Destructor. Removes CBillboardContainer from the control stack and destroys it. Definition at line 46 of file BillboardAppUi.cpp. References iAppContainer. 00047 { 00048 if ( iAppContainer ) 00049 { 00050 RemoveFromStack( iAppContainer ); 00051 delete iAppContainer; 00052 } 00053 }
|
|
|
Second phase constructor. Creates the CBillboardContainer and adds it to the control stack. Definition at line 31 of file BillboardAppUi.cpp. References CBillboardContainer::ConstructL(), and iAppContainer. 00032 { 00033 BaseConstructL(); 00034 iAppContainer = new (ELeave) CBillboardContainer; 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. Builds the dynamic menuitems for toggling the various options in the example. Definition at line 63 of file BillboardAppUi.cpp.
|
|
|
CEikAppUi method that is used to handle user commands. Handles menu commands and application exit request.
Definition at line 132 of file BillboardAppUi.cpp. 00133 { 00134 switch ( aCommand ) 00135 { 00136 case EAknSoftkeyBack: 00137 case EEikCmdExit: 00138 { 00139 Exit(); 00140 break; 00141 } 00142 default: 00143 break; 00144 } 00145 }
|
|
||||||||||||
|
CEikAppUi method that is used to handle key events. Does nothing in this implemenation.
Definition at line 74 of file BillboardAppUi.cpp. References iAppContainer, CBillboardContainer::iBillboard, CBillboard::iDirection, and CBillboard::MoveCamera(). 00076 { 00077 if ( iAppContainer->iBillboard->GetState() == CBillboard::ERunning ) 00078 { 00079 if ( aType == EEventKey ) 00080 { 00081 switch ( aKeyEvent.iScanCode ) 00082 { 00083 case EStdKeyLeftArrow: 00084 { 00085 GLbyte &direction = iAppContainer->iBillboard->iDirection; 00086 00087 if ( direction != 0 ) 00088 { 00089 direction = 0; 00090 } 00091 else 00092 { 00093 direction = -1; 00094 } 00095 } 00096 00097 return EKeyWasConsumed; 00098 case EStdKeyRightArrow: 00099 { 00100 GLbyte &direction = iAppContainer->iBillboard->iDirection; 00101 00102 if ( direction != 0 ) 00103 { 00104 direction = 0; 00105 } 00106 else 00107 { 00108 direction = +1; 00109 } 00110 } 00111 00112 return EKeyWasConsumed; 00113 case EStdKeyUpArrow: 00114 iAppContainer->iBillboard->MoveCamera(-1, FIXED_ONE); 00115 return EKeyWasConsumed; 00116 case EStdKeyDownArrow: 00117 iAppContainer->iBillboard->MoveCamera(+1, FIXED_ONE); 00118 return EKeyWasConsumed; 00119 default: 00120 return EKeyWasNotConsumed; 00121 } 00122 } 00123 } 00124 return EKeyWasNotConsumed; 00125 }
|
|
|
GUI container that resides in this application UI. Definition at line 82 of file BillboardAppUi.h. |
|
© Nokia 2006 |