|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <IsvTelInfoAppContainer.h>
Public Member Functions | |
| CIsvTelInfoAppContainer (CIsvTelInfoAppView *aView) | |
| void | ConstructL (const TRect &aRect) |
| virtual | ~CIsvTelInfoAppContainer () |
| void | SetTextToLabelL (TInt aResourceId) |
| void | DisplayFormL (TInt aResourceId, TInt aPageId) |
| void | BringToForeGroundL () |
Private Types | |
| enum | TIsvTelInfoAppComponentControls { EIsvTelInfoAppComponentLabel } |
Private Member Functions | |
| void | CreateLabelL () |
| TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
| void | SizeChanged () |
| TInt | CountComponentControls () const |
| CCoeControl * | ComponentControl (TInt aIndex) const |
| void | Draw (const TRect &aRect) const |
Private Attributes | |
| CIsvTelInfoAppView * | iView |
| CEikLabel * | iLabel |
Definition at line 31 of file IsvTelInfoAppContainer.h.
|
|
Overload constructor.
Definition at line 43 of file IsvTelInfoAppContainer.cpp.
|
|
|
Destructor. Definition at line 72 of file IsvTelInfoAppContainer.cpp. References iLabel. 00073 { 00074 delete iLabel; 00075 }
|
|
|
EPOC constructor.
Definition at line 55 of file IsvTelInfoAppContainer.cpp. References CreateLabelL(). 00056 { 00057 // Creates window. 00058 CreateWindowL(); 00059 00060 // Creates label object. 00061 CreateLabelL(); 00062 00063 SetRect( aRect ); // Sets rectangle of frame. 00064 ActivateL(); // Activates the window. (Ready to draw) 00065 }
|
|
|
Sets text from a resource to a label
Definition at line 82 of file IsvTelInfoAppContainer.cpp. References iLabel. 00083 { 00084 TBuf<KIsvTelInfoAppMessageBufLength> messageString( NULL ); 00085 iCoeEnv->ReadResource( messageString, aResourceId ); 00086 iLabel->SetTextL( messageString ); 00087 }
|
|
||||||||||||
|
Creates and executes the form
Definition at line 94 of file IsvTelInfoAppContainer.cpp. References CIsvTelInfoAppDlg::ExecuteLD(), CIsvTelInfoAppView::GetTitlePaneL(), iView, CIsvTelInfoAppDlg::NewL(), CIsvTelInfoAppDlg::SetContainer(), CIsvTelInfoAppDlg::SetDlgPage(), and CIsvTelInfoAppDlg::SetTitlePane(). 00097 { 00098 CIsvTelInfoAppDlg* form = CIsvTelInfoAppDlg::NewL(); 00099 form->SetTitlePane(iView->GetTitlePaneL()); 00100 form->SetContainer(this); 00101 form->SetDlgPage(aPageId); 00102 form->ExecuteLD( aResourceId ); 00103 }
|
|
|
Creates the label object. Definition at line 120 of file IsvTelInfoAppContainer.cpp. References iLabel, and SetTextToLabelL(). 00121 { 00122 if ( !iLabel ) 00123 { 00124 iLabel = new( ELeave ) CEikLabel; 00125 iLabel->SetContainerWindowL( *this ); 00126 iLabel->SetAlignment( EHCenterVCenter ); 00127 #ifdef __AVKON_APAC__ 00128 iLabel->SetFont( ApacPlain16() ); 00129 #else 00130 iLabel->SetFont( LatinBold19() ); 00131 #endif 00132 } 00133 SetTextToLabelL( R_ISVTELINFOAPP_TEXT_LABEL_TITLE ); 00134 }
|
|
||||||||||||
|
From CCoeControl, OfferKeyEventL. Handles the key events.
Definition at line 142 of file IsvTelInfoAppContainer.cpp. 00145 { 00146 if ( aType != EEventKey ) // Is not key event? 00147 { 00148 return EKeyWasNotConsumed; 00149 } 00150 switch ( aKeyEvent.iCode ) // The code of key event is... 00151 { 00152 default: 00153 return EKeyWasNotConsumed; 00154 } 00155 }
|
|
|
From CCoeControl, SizeChanged. Definition at line 162 of file IsvTelInfoAppContainer.cpp. References iLabel. 00163 { 00164 iLabel->SetRect( Rect() ); 00165 }
|
|
|
From CCoeControl, CountComponentControls. Returns number of component.
Definition at line 172 of file IsvTelInfoAppContainer.cpp. 00173 { 00174 // returns nbr of controls inside this container 00175 return KIsvTelInfoAppCountComponent; 00176 }
|
|
|
From CCoeControl, ComponentControl. Returns pointer to particular component.
Definition at line 183 of file IsvTelInfoAppContainer.cpp. References iLabel. 00184 { 00185 switch ( aIndex ) // Component is... 00186 { 00187 case EIsvTelInfoAppComponentLabel: // Label object. 00188 return iLabel; 00189 default: // Exception : returns NULL value. 00190 return NULL; 00191 } 00192 }
|
|
|
From CCoeControl, Draw.
Definition at line 199 of file IsvTelInfoAppContainer.cpp. 00200 { 00201 CWindowGc& gc = SystemGc(); 00202 gc.SetPenStyle( CGraphicsContext::ENullPen ); 00203 gc.SetBrushColor( ISVINFOAPP_BACKGROUND_COLOR ); 00204 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); 00205 gc.DrawRect( aRect ); 00206 }
|
|
© Nokia 2006 |