|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <HWRMTestAppContainer.h>
Public Member Functions | |
| void | ConstructL (const TRect &aRect) |
| ~CHWRMTestAppContainer () | |
| void | AddMessageL (const TDesC &aMsg) const |
| TKeyResponse | OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType) |
Private Member Functions | |
| void | SizeChanged () |
| TInt | CountComponentControls () const |
| CCoeControl * | ComponentControl (TInt aIndex) const |
| void | Draw (const TRect &aRect) const |
| virtual void | HandleResourceChange (TInt aType) |
| void | HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType) |
Private Attributes | |
| CAknSingleStyleListBox * | iListBox |
| CEikLabel * | iLabel |
HWRMTestApp.exe
Definition at line 35 of file HWRMTestAppContainer.h.
|
|
Destructor. Definition at line 58 of file HWRMTestAppContainer.cpp. References iLabel, and iListBox.
|
|
|
EPOC default constructor.
Definition at line 33 of file HWRMTestAppContainer.cpp. References iLabel, and iListBox. 00034 { 00035 CreateWindowL(); 00036 00037 iListBox = new(ELeave) CAknSingleStyleListBox(); 00038 iListBox->ConstructL( this, EEikListBoxMultipleSelection ); 00039 00040 iListBox->CreateScrollBarFrameL(ETrue); 00041 iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOn, 00042 CEikScrollBarFrame::EAuto); 00043 00044 iLabel = new (ELeave) CEikLabel; 00045 iLabel->SetContainerWindowL( *this ); 00046 _LIT( KLabel, "HWRM Test:"); 00047 iLabel->SetTextL( KLabel ); 00048 00049 SetRect(aRect); 00050 ActivateL(); 00051 }
|
|
|
From CoeControl,SizeChanged. Definition at line 69 of file HWRMTestAppContainer.cpp. References iLabel, and iListBox. 00070 { 00071 // set the label position 00072 iLabel->SetExtent( TPoint(0,0), iLabel->MinimumSize() ); 00073 00074 // get the label height so we can position listbox correctly 00075 TInt labelHeight = iLabel->Rect().Height(); 00076 00077 // create a fixed border size 00078 TInt border(5); 00079 // create the listbox size taking into account the border and label size 00080 TSize listBoxSize( Rect().Width() - (2 * border), 00081 Rect().Height() - labelHeight - (2 * border)); 00082 // set the listbox position 00083 iListBox->SetExtent( TPoint(border,labelHeight + border), listBoxSize ); 00084 }
|
|
|
From CoeControl,CountComponentControls. Definition at line 91 of file HWRMTestAppContainer.cpp.
|
|
|
From CCoeControl,ComponentControl. Definition at line 101 of file HWRMTestAppContainer.cpp. References iLabel, and iListBox. 00102 { 00103 switch ( aIndex ) 00104 { 00105 case 0: 00106 return iListBox; 00107 case 1: 00108 return iLabel; 00109 default: 00110 return NULL; 00111 } 00112 }
|
|
|
From CCoeControl,Draw. Definition at line 118 of file HWRMTestAppContainer.cpp. 00119 { 00120 CWindowGc& gc = SystemGc(); 00121 gc.SetPenStyle(CGraphicsContext::ENullPen); 00122 gc.SetBrushColor(KRgbGray); 00123 gc.SetBrushStyle(CGraphicsContext::ESolidBrush); 00124 gc.DrawRect(aRect); 00125 }
|
|
|
From CoeControl, HandleResourceChange. Called by framework when the view layout is changed. Definition at line 186 of file HWRMTestAppContainer.cpp. References iListBox. 00187 { 00188 CCoeControl::HandleResourceChange(aType); 00189 00190 // ADDED FOR SCALABLE UI SUPPORT 00191 // ***************************** 00192 if ( aType==KEikDynamicLayoutVariantSwitch ) 00193 { 00194 TRect rect; 00195 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect); 00196 SetRect(rect); 00197 } 00198 00199 // Redraw the listbox 00200 iListBox->DrawNow(); 00201 }
|
|
||||||||||||
|
From MCoeControlObserver, HandleControlEventL. Handles an event from an observed control. Definition at line 131 of file HWRMTestAppContainer.cpp.
|
|
© Nokia 2006 |