S60 5th Edition SDK Example Applications Guide |
#include <csasyncappui.h>
Inheritance diagram for CCSAsyncAppUi:
Definition at line 34 of file csasyncappui.h.
Public Member Functions | |
CCSAsyncAppUi () | |
virtual | ~CCSAsyncAppUi () |
void | HandleCommandL (TInt aCommand) |
void | DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane) |
void | HandleTimeUpdate () |
virtual void | HandleResourceChangeL (TInt aType) |
Private Member Functions | |
void | ConstructL () |
CCSAsyncDocument * | AsyncDocument () const |
Private Attributes | |
CCSAsyncAppView * | iAppView |
|
CCSAsyncAppUi. C++ default constructor. This needs to be public due to the way the framework constructs the AppUi. Definition at line 35 of file csasyncappui.cpp.
|
|
~CCSAsyncAppUi. Destructor. Destroys the object and release all memory objects. Definition at line 59 of file csasyncappui.cpp. References iAppView. 00060 { 00061 if ( iAppView ) 00062 { 00063 iEikonEnv->RemoveFromStack( iAppView ); 00064 delete iAppView; 00065 iAppView = NULL; 00066 } 00067 }
|
|
From CAknAppUi, HandleCommandL. Handles user menu selections.
Definition at line 84 of file csasyncappui.cpp. References AsyncDocument(), CCSAsyncDocument::StopClock(), and CCSAsyncDocument::UpdateTime(). 00085 { 00086 switch( aCommand ) 00087 { 00088 case EEikCmdExit: 00089 case EAknSoftkeyExit: 00090 Exit(); 00091 break; 00092 00093 case EStartClock: 00094 AsyncDocument()->UpdateTime(); 00095 break; 00096 00097 case EStopClock: 00098 AsyncDocument()->StopClock(); 00099 break; 00100 00101 default: 00102 break; 00103 } 00104 }
|
|
From CAknAppUi, DynInitMenuPaneL. Prepares the menu prior to display.
Definition at line 123 of file csasyncappui.cpp. References AsyncDocument(). 00125 { 00126 if ( aResourceId == R_CSASYNC_MENU ) 00127 { 00128 if ( AsyncDocument()->ClockActive() ) 00129 { 00130 aMenuPane->SetItemDimmed( EStartClock, ETrue ); 00131 aMenuPane->SetItemDimmed( EStopClock, EFalse ); 00132 } 00133 else 00134 { 00135 aMenuPane->SetItemDimmed( EStartClock, EFalse ); 00136 aMenuPane->SetItemDimmed( EStopClock, ETrue ); 00137 } 00138 } 00139 }
|
|
From MAsyncTimeObserver, HandleTimeUpdate. Handles updates to the time. Implements MAsyncTimeObserver. Definition at line 111 of file csasyncappui.cpp. References iAppView. 00112 { 00113 __ASSERT_ALWAYS( iAppView, User::Panic ( KCSAsyncClient, 00114 ECSAsyncProgram ) ); 00115 iAppView->DrawNow(); 00116 }
|
|
HandleResourceChangeL() Called by framework when layout is changed.
Definition at line 146 of file csasyncappui.cpp. References iAppView. 00147 { 00148 CAknAppUi::HandleResourceChangeL( aType ); 00149 00150 if ( aType==KEikDynamicLayoutVariantSwitch ) 00151 { 00152 iAppView->SetRect( ClientRect() ); 00153 } 00154 //Controls derived from CCoeControl, handled in container class 00155 iAppView->HandleResourceChange( aType ); 00156 }
|
|
ConstructL. 2nd phase constructor. Definition at line 45 of file csasyncappui.cpp. References AsyncDocument(), iAppView, and CCSAsyncAppView::NewL(). 00046 { 00047 BaseConstructL(); 00048 00049 iAppView = CCSAsyncAppView::NewL( ClientRect(), *AsyncDocument() ); 00050 00051 AddToStackL( iAppView ); 00052 }
|
|
AsyncDocument. Casts iDocument member from CAknAppUi to CCSAsyncDocument. Definition at line 74 of file csasyncappui.cpp. Referenced by ConstructL(), DynInitMenuPaneL(), and HandleCommandL().
|
|
iAppView, the application view. Owned by CCSAsyncAppUi object. Definition at line 103 of file csasyncappui.h. Referenced by ConstructL(), HandleResourceChangeL(), HandleTimeUpdate(), and ~CCSAsyncAppUi(). |
© Nokia 2009 |