|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <SIPExGameView.h>
Public Member Functions | |
| ~CSIPExGameView () | |
| TUid | Id () const |
| void | HandleCommandL (TInt aCommand) |
| void | HandleViewRectChange () |
| void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
| CSIPExGameContainer * | Container () |
Static Public Member Functions | |
| static CSIPExGameView * | NewLC (CSIPExEngine &aEngine) |
Private Member Functions | |
| CSIPExGameView (CSIPExEngine &aEngine) | |
| void | ConstructL () |
| void | DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage) |
| void | DoDeactivate () |
Private Attributes | |
| CSIPExGameContainer * | iContainer |
| CSIPExEngine & | iEngine |
Definition at line 38 of file SIPExGameView.h.
|
|
Destructor. Definition at line 67 of file SIPExGameView.cpp. References iContainer. 00068 { 00069 if ( iContainer ) 00070 { 00071 AppUi()->RemoveFromViewStack( *this, iContainer ); 00072 } 00073 00074 delete iContainer; 00075 }
|
|
|
C++ default constructor
Definition at line 47 of file SIPExGameView.cpp. 00048 : iEngine( aEngine ) 00049 { 00050 }
|
|
|
First phase contruction Definition at line 34 of file SIPExGameView.cpp. References CSIPExGameView(). 00035 { 00036 CSIPExGameView* self = new ( ELeave ) CSIPExGameView( aEngine ); 00037 CleanupStack::PushL( self ); 00038 self->ConstructL(); 00039 return self; 00040 }
|
|
|
Second phase construction Definition at line 57 of file SIPExGameView.cpp.
|
|
|
Return Uid Definition at line 82 of file SIPExGameView.cpp.
|
|
|
Handle Commands Definition at line 92 of file SIPExGameView.cpp. 00093 { 00094 switch ( aCommand ) 00095 { 00096 00097 case EAknSoftkeyBack: 00098 { 00099 AppUi()->HandleCommandL( EEikCmdExit ); 00100 break; 00101 } 00102 00103 default: 00104 { 00105 AppUi()->HandleCommandL( aCommand ); 00106 break; 00107 } 00108 } 00109 }
|
|
|
Handle Size changes Definition at line 115 of file SIPExGameView.cpp. References iContainer. 00116 { 00117 if ( iContainer ) 00118 { 00119 iContainer->SetRect( ClientRect() ); 00120 } 00121 }
|
|
||||||||||||
|
Handle menu initialization event.
Definition at line 128 of file SIPExGameView.cpp. 00131 { 00132 if ( aResourceId != R_SIP_EX_MENU ) 00133 { 00134 // Not this view's menu, ignore 00135 return; 00136 } 00137 00138 switch ( static_cast< CSIPExAppUi* >( AppUi() )->EngineState() ) 00139 { 00140 case CSIPExEngine::EIdle: 00141 aMenuPane->SetItemDimmed( ECmdInviteForGame, ETrue ); 00142 aMenuPane->SetItemDimmed( ECmdEnableProfile, EFalse ); 00143 aMenuPane->SetItemDimmed( ECmdDisableProfile, ETrue ); 00144 aMenuPane->SetItemDimmed( ECmdSendIM, ETrue ); 00145 aMenuPane->SetItemDimmed( ECmdEndGame, ETrue ); 00146 break; 00147 case CSIPExEngine::EEnabled: 00148 aMenuPane->SetItemDimmed( ECmdInviteForGame, EFalse ); 00149 aMenuPane->SetItemDimmed( ECmdEnableProfile, ETrue ); 00150 aMenuPane->SetItemDimmed( ECmdDisableProfile, EFalse ); 00151 aMenuPane->SetItemDimmed( ECmdSendIM, EFalse ); 00152 aMenuPane->SetItemDimmed( ECmdEndGame, ETrue ); 00153 break; 00154 case CSIPExEngine::EActivating: 00155 aMenuPane->SetItemDimmed( ECmdInviteForGame, ETrue ); 00156 aMenuPane->SetItemDimmed( ECmdEnableProfile, ETrue ); 00157 aMenuPane->SetItemDimmed( ECmdDisableProfile, ETrue ); 00158 aMenuPane->SetItemDimmed( ECmdSendIM, EFalse ); 00159 aMenuPane->SetItemDimmed( ECmdEndGame, ETrue ); 00160 break; 00161 case CSIPExEngine::EActive: 00162 aMenuPane->SetItemDimmed( ECmdInviteForGame, ETrue ); 00163 aMenuPane->SetItemDimmed( ECmdEnableProfile, ETrue ); 00164 aMenuPane->SetItemDimmed( ECmdDisableProfile, ETrue ); 00165 aMenuPane->SetItemDimmed( ECmdSendIM, EFalse ); 00166 aMenuPane->SetItemDimmed( ECmdEndGame, EFalse ); 00167 break; 00168 default: 00169 break; 00170 } 00171 }
|
|
||||||||||||||||
|
From AknView, Activates view Definition at line 180 of file SIPExGameView.cpp. References CSIPExGameContainer::ConstructL(), iContainer, and iEngine. 00183 { 00184 if ( !iContainer ) 00185 { 00186 iContainer = new ( ELeave ) CSIPExGameContainer( iEngine ); 00187 iContainer->SetMopParent( this ); 00188 iContainer->ConstructL( ClientRect() ); 00189 AppUi()->AddToStackL( *this, iContainer ); 00190 } 00191 }
|
|
|
From AknView, Deactivates view Definition at line 199 of file SIPExGameView.cpp. References iContainer. 00200 { 00201 if ( iContainer ) 00202 { 00203 AppUi()->RemoveFromViewStack( *this, iContainer ); 00204 } 00205 00206 delete iContainer; 00207 iContainer = NULL; 00208 }
|
|
|
Return pointer to container, ownership is not transferred Definition at line 214 of file SIPExGameView.cpp. References iContainer. 00215 { 00216 return iContainer; 00217 }
|
|
© Nokia 2006 |