S60 5th Edition SDK Example Applications Guide |
Inheritance diagram for CHelloWorldBasicAppView:
Definition at line 23 of file helloworldbasicappview.h.
Public Member Functions | |
virtual | ~CHelloWorldBasicAppView () |
TDes & | GetText () |
void | Draw (const TRect &aRect) const |
virtual void | SizeChanged () |
Static Public Member Functions | |
static CHelloWorldBasicAppView * | NewL (const TRect &aRect) |
static CHelloWorldBasicAppView * | NewLC (const TRect &aRect) |
Private Member Functions | |
void | ConstructL (const TRect &aRect) |
CHelloWorldBasicAppView () | |
Private Attributes | |
const CFont * | iFont |
TBuf< 24 > | iText |
|
~CHelloWorldBasicAppView Virtual Destructor. Definition at line 86 of file helloworldbasicappview.cpp.
|
|
CHelloWorldBasicAppView. C++ default constructor. Definition at line 75 of file helloworldbasicappview.cpp.
|
|
NewL. Two-phased constructor. Create a CHelloWorldBasicAppView object, which will draw itself to aRect.
Definition at line 28 of file helloworldbasicappview.cpp. References NewLC(). Referenced by CHelloWorldBasicAppUi::ConstructL(). 00029 { 00030 CHelloWorldBasicAppView* self = CHelloWorldBasicAppView::NewLC( aRect ); 00031 CleanupStack::Pop( self ); 00032 return self; 00033 }
|
|
NewLC. Two-phased constructor. Create a CHelloWorldBasicAppView object, which will draw itself to aRect.
Definition at line 40 of file helloworldbasicappview.cpp. References ConstructL(). Referenced by NewL(). 00041 { 00042 CHelloWorldBasicAppView* self = new ( ELeave ) CHelloWorldBasicAppView; 00043 CleanupStack::PushL( self ); 00044 self->ConstructL( aRect ); 00045 return self; 00046 }
|
|
GetText
Definition at line 138 of file helloworldbasicappview.cpp. References iText. Referenced by CHelloWorldBasicAppUi::HandleCommandL(). 00139 { 00140 return iText; 00141 }
|
|
From CCoeControl, Draw Draw this CHelloWorldBasicAppView to the screen. If the user has given a text, it is also printed to the center of the screen.
Definition at line 97 of file helloworldbasicappview.cpp. 00098 { 00099 // note that the whole screen is drawn everytime, so aRect-parameter 00100 // is ignored 00101 00102 // Get the standard graphics context 00103 CWindowGc& gc = SystemGc(); 00104 gc.SetPenStyle( CGraphicsContext::ENullPen ); 00105 gc.SetBrushColor( KRgbWhite); 00106 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); 00107 00108 // Gets the control's extent 00109 TRect rect( Rect()); 00110 00111 // draw also text, if user has given it via dialog 00112 if (iText.Length() > 0) 00113 { 00114 gc.UseFont(iFont); 00115 gc.DrawText(iText, rect, Rect().Height()/3, CGraphicsContext::ECenter ); 00116 gc.DiscardFont(); 00117 } 00118 else 00119 { 00120 gc.Clear( rect ); 00121 } 00122 }
|
|
From CoeControl, SizeChanged. Called by framework when the view size is changed. Definition at line 129 of file helloworldbasicappview.cpp.
|
|
ConstructL 2nd phase constructor. Perform the second phase construction of a CHelloWorldBasicAppView object.
Definition at line 53 of file helloworldbasicappview.cpp. Referenced by NewLC(). 00054 { 00055 // Create a window for this application view 00056 CreateWindowL(); 00057 00058 // set the font 00059 iFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimaryFont); 00060 00061 iText.Zero(); 00062 00063 // Set the windows size 00064 SetRect( aRect ); 00065 00066 // Activate the window, which makes it ready to be drawn 00067 ActivateL(); 00068 }
|
|
font used, when printing user-given text to the screen Definition at line 98 of file helloworldbasicappview.h. Referenced by ConstructL(), and Draw(). |
|
descriptor storing the user-given text Definition at line 103 of file helloworldbasicappview.h. Referenced by ConstructL(), Draw(), and GetText(). |
© Nokia 2009 |