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

Definition at line 31 of file focuseventappui.h.
Public Member Functions |
|
| CFocusEventAppUi () | |
| virtual | ~CFocusEventAppUi () |
| void | HandleForegroundEventL (TBool aForeground) |
| void | HandleCommandL (TInt aCommand) |
Private Member Functions |
|
| void | ConstructL () |
Private Attributes |
|
| CFocusEventAppView * | iAppView |
|
|
CFocusEventAppUi. C++ default constructor. This needs to be public due to the way the framework constructs the AppUi Definition at line 33 of file focuseventappui.cpp.
|
|
|
~CFocusEventAppUi. Virtual Destructor. Definition at line 57 of file focuseventappui.cpp. References iAppView. 00058 { 00059 if ( iAppView ) 00060 { 00061 iEikonEnv->RemoveFromStack( iAppView ); 00062 delete iAppView; 00063 iAppView = NULL; 00064 } 00065 }
|
|
|
From CAknAppUi, HandleForegroundEventL. Handles a change of focus.
Definition at line 91 of file focuseventappui.cpp. References iAppView, CFocusEventAppView::Print(), and CFocusEventAppView::PrintNewLineL(). 00092 { 00093 if ( !aForeground ) // Focus lost 00094 { 00095 // Load a string from the resource file. 00096 HBufC* lostFocusMessage = StringLoader::LoadLC 00097 ( R_FOCU_LOST_FOCUS_TEXT ); 00098 #ifdef __WINS__ 00099 User::InfoPrint( *lostFocusMessage ); 00100 #endif /* __WINS__ */ 00101 iAppView->Print( *lostFocusMessage ); 00102 iAppView->PrintNewLineL(); 00103 // Pop HBuf from CleanupStack and destroy it. 00104 CleanupStack::PopAndDestroy( lostFocusMessage ); 00105 } 00106 else // Focus gained 00107 { 00108 // Load a string from the resource file. 00109 HBufC* gainedFocusMessage = StringLoader::LoadLC 00110 ( R_FOCU_GAINED_FOCUS_TEXT ); 00111 #ifdef __WINS__ 00112 User::InfoPrint( *gainedFocusMessage ); 00113 #endif /* __WINS__ */ 00114 iAppView->Print( *gainedFocusMessage ); 00115 iAppView->PrintNewLineL(); 00116 // Pop HBuf from CleanupStack and Destroy it. 00117 CleanupStack::PopAndDestroy( gainedFocusMessage ); 00118 } 00119 00120 CAknAppUi::HandleForegroundEventL( aForeground ); 00121 }
|
|
|
From CEikAppUi, HandleCommandL. Takes care of command handling.
Definition at line 72 of file focuseventappui.cpp. 00073 { 00074 switch ( aCommand ) 00075 { 00076 case EEikCmdExit: 00077 case EAknSoftkeyExit: 00078 Exit(); 00079 break; 00080 00081 default: 00082 break; 00083 } 00084 }
|
|
|
ConstructL. 2nd phase constructor. Definition at line 43 of file focuseventappui.cpp. References iAppView, and CFocusEventAppView::NewL(). 00044 { 00045 BaseConstructL( EAknEnableSkin ); 00046 00047 iAppView = CFocusEventAppView::NewL( ClientRect() ); 00048 AddToStackL( iAppView ); 00049 }
|
|
|
The application view Owned by CFocusEventAppUi Definition at line 78 of file focuseventappui.h. Referenced by ConstructL(), HandleForegroundEventL(), and ~CFocusEventAppUi(). |
|
© Nokia 2009 |