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

Definition at line 30 of file datamobilityappmenucontainer.h.
Public Member Functions |
|
| void | ConstructL (const TRect &aRect) |
| ~CDataMobilityAppMenuContainer () | |
| TInt | GetActiveLine () const |
| void | HandleSelectedListItemL (TInt aIndex) const |
Private Member Functions |
|
| void | SizeChanged () |
| TInt | CountComponentControls () const |
| CCoeControl * | ComponentControl (TInt aIndex) const |
| void | HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType) |
| TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
| virtual void | HandleResourceChange (TInt aType) |
Private Attributes |
|
| CEikTextListBox * | iListBox |
|
|
Destructor. Definition at line 55 of file datamobilityappmenucontainer.cpp. References iListBox.
|
|
|
Symbian OS default constructor.
Definition at line 31 of file datamobilityappmenucontainer.cpp. References iListBox. Referenced by CDataMobilityAppMenuView::DoActivateL(). 00032 { 00033 CreateWindowL(); 00034 00035 iListBox = new ( ELeave ) CAknSingleStyleListBox(); 00036 iListBox->SetContainerWindowL( *this ); 00037 TResourceReader reader; 00038 iCoeEnv->CreateResourceReaderLC( reader, R_MENU_LISTBOX ); 00039 iListBox->SetListBoxObserver( this ); 00040 iListBox->ConstructFromResourceL( reader ); 00041 CleanupStack::PopAndDestroy(); // resource stuffs. 00042 iListBox->ActivateL(); // Sets control as ready to be drawn 00043 00044 SetRect( aRect ); 00045 ActivateL(); 00046 }
|
|
|
Get currently selected items index.
Definition at line 188 of file datamobilityappmenucontainer.cpp. References iListBox. Referenced by CDataMobilityAppMenuView::HandleCommandL(). 00189 { 00190 return iListBox->CurrentItemIndex(); 00191 }
|
|
|
Method HandleSelectedListItemL handles valid index.
Definition at line 127 of file datamobilityappmenucontainer.cpp. Referenced by CDataMobilityAppMenuView::HandleCommandL(), and HandleListBoxEventL(). 00128 { 00129 CEikAppUi* appUi = static_cast<CEikAppUi*>( iCoeEnv->AppUi() ); 00130 00131 // Change active view. 00132 switch ( aIndex ) 00133 { 00134 case 0: 00135 appUi->HandleCommandL( EAppUIGoToStandardApplication ); 00136 break; 00137 case 1: 00138 appUi->HandleCommandL( EAppUIGoToApplicationUsingSnap ); 00139 break; 00140 case 2: 00141 appUi->HandleCommandL( EAppUIGoToTriggeringConnectionDialog ); 00142 break; 00143 case 3: 00144 appUi->HandleCommandL( EAppUIGoToALRApplication ); 00145 break; 00146 case 4: 00147 appUi->HandleCommandL( EAppUIGoToALRApplicationUsingDefaultConnection ); 00148 break; 00149 case 5: 00150 appUi->HandleCommandL( EAppUIGoToUsingConnectionSetting ); 00151 break; 00152 default: 00153 break; 00154 } 00155 }
|
|
|
From CoeControl,SizeChanged. Called by framework when the view size is changed. Definition at line 70 of file datamobilityappmenucontainer.cpp. References iListBox. 00071 { 00072 if ( iListBox ) 00073 { 00074 iListBox->SetRect( Rect() ); // Sets rectangle of listbox. 00075 } 00076 }
|
|
|
From CoeControl,CountComponentControls.
Definition at line 84 of file datamobilityappmenucontainer.cpp.
|
|
|
From CCoeControl,ComponentControl. Gets the specified component of a compound control.
Definition at line 95 of file datamobilityappmenucontainer.cpp. References iListBox. 00096 { 00097 switch ( aIndex ) 00098 { 00099 case 0: 00100 return iListBox; 00101 default: 00102 return NULL; 00103 } 00104 }
|
|
||||||||||||
|
Handles list box events.
Definition at line 112 of file datamobilityappmenucontainer.cpp. References HandleSelectedListItemL(). 00114 { 00115 if ( aEventType == EEventEnterKeyPressed && aListBox ) 00116 { 00117 HandleSelectedListItemL( aListBox->CurrentItemIndex() ); 00118 } 00119 }
|
|
||||||||||||
|
From CCoeControl,OfferKeyEventL Handles key events.
Definition at line 163 of file datamobilityappmenucontainer.cpp. References iListBox. 00165 { 00166 if ( aType != EEventKey ) 00167 { 00168 return EKeyWasNotConsumed; 00169 } 00170 00171 // Offers key events to list box 00172 if ( iListBox ) 00173 { 00174 return iListBox->OfferKeyEventL( aKeyEvent, aType ); 00175 } 00176 else 00177 { 00178 return EKeyWasNotConsumed; 00179 } 00180 }
|
|
|
From CCoeControl,OfferKeyEventL Called by framework when the view layout is changed.
Definition at line 199 of file datamobilityappmenucontainer.cpp. 00200 { 00201 CCoeControl::HandleResourceChange( aType ); 00202 00203 // ADDED FOR SCALABLE UI SUPPORT 00204 // ***************************** 00205 if ( aType == KEikDynamicLayoutVariantSwitch ) 00206 { 00207 TRect rect; 00208 AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, rect ); 00209 SetRect( rect ); 00210 } 00211 }
|
|
© Nokia 2009 |