S60 5th Edition SDK Example Applications Guide |
#include <csasyncappview.h>
Inheritance diagram for CCSAsyncAppView:
Definition at line 32 of file csasyncappview.h.
Public Member Functions | |
virtual | ~CCSAsyncAppView () |
void | Draw (const TRect &aRect) const |
Static Public Member Functions | |
static CCSAsyncAppView * | NewL (const TRect &aRect, CCSAsyncDocument &aDocument) |
static CCSAsyncAppView * | NewLC (const TRect &aRect, CCSAsyncDocument &aDocument) |
Private Member Functions | |
CCSAsyncAppView (CCSAsyncDocument &aDocument) | |
void | ConstructL (const TRect &aRect) |
Private Attributes | |
CCSAsyncDocument & | iDocument |
|
~CCSAsyncAppView. Destructor. Destroys the object and release all memory objects. Definition at line 87 of file csasyncappview.cpp.
|
|
CCSAsyncAppView. C++ default constructor. Performs the first phase of two phase construction.
Definition at line 76 of file csasyncappview.cpp. Referenced by NewLC(). 00077 : iDocument( aDocument ) 00078 { 00079 // No implementation required 00080 }
|
|
NewL. Two-phased constructor. Creates a CCSAsyncAppView object, which will draw itself to aRect.
Definition at line 32 of file csasyncappview.cpp. References NewLC(). Referenced by CCSAsyncAppUi::ConstructL(). 00034 { 00035 CCSAsyncAppView* self = CCSAsyncAppView::NewLC( aRect, aDocument ); 00036 CleanupStack::Pop( self ); 00037 return self; 00038 }
|
|
NewLC. Two-phased constructor. Creates a CCSAsyncAppView object, which will draw itself to aRect.
Definition at line 45 of file csasyncappview.cpp. References CCSAsyncAppView(). Referenced by NewL(). 00047 { 00048 CCSAsyncAppView* self = new ( ELeave ) CCSAsyncAppView( aDocument ); 00049 CleanupStack::PushL( self ); 00050 self->ConstructL( aRect ); 00051 return self; 00052 }
|
|
From CCoeControl, Draw. Draws this CCSAsyncAppView to the screen.
Definition at line 97 of file csasyncappview.cpp. References iDocument, and CCSAsyncDocument::Time(). 00098 { 00099 00100 // Clear the screen 00101 CWindowGc& gc = SystemGc(); 00102 gc.Clear( Rect() ); 00103 00104 TBuf<30> des; 00105 const TTime& time = iDocument.Time(); 00106 00107 // Read time format string from AVKON resource 00108 HBufC* timeFormatString = iEikonEnv->AllocReadResourceLC(R_QTN_TIME_LONG); 00109 // It would also be possible to define your own format string instead, 00110 // for example like this: 00111 // _LIT( KHoursMinsSecs, "%-B%:0%J%:1%T%:2%S%:3%+B" ); 00112 00113 TRAPD( err, time.FormatL( des, *timeFormatString ) ); 00114 CleanupStack::PopAndDestroy(); // timeFormatString 00115 00116 if ( err == KErrNone ) 00117 { 00118 const CFont* font = iEikonEnv->NormalFont(); 00119 gc.UseFont( font ); 00120 gc.DrawText( des, TPoint( 10,20 ) ); 00121 } 00122 }
|
|
ConstructL. Performs the second phase construction of a CCSAsyncAppView object.
Definition at line 59 of file csasyncappview.cpp. 00060 { 00061 // Create a window for this application view 00062 CreateWindowL(); 00063 00064 // Set the windows size 00065 SetRect( aRect ); 00066 00067 // Activate the window, which makes it ready to be drawn 00068 ActivateL(); 00069 }
|
|
iDocument, the application document. Definition at line 96 of file csasyncappview.h. Referenced by Draw(). |
© Nokia 2009 |