Nokia N97 SDK
Example Applications Guide

CHsWidgetAppView Class Reference

Inheritance diagram for CHsWidgetAppView:

List of all members.

Detailed Description

Definition at line 18 of file HsWidgetAppView.h.


Public Member Functions

virtual  ~CHsWidgetAppView ()
void  Draw (const TRect &aRect) const
virtual void  SizeChanged ()

Static Public Member Functions

static CHsWidgetAppView *  NewL (const TRect &aRect)
static CHsWidgetAppView *  NewLC (const TRect &aRect)

Private Member Functions

void  ConstructL (const TRect &aRect)
  CHsWidgetAppView ()


Constructor & Destructor Documentation

CHsWidgetAppView::~CHsWidgetAppView (   )  [virtual]
 

~CHsWidgetAppView Virtual Destructor.

Definition at line 76 of file HsWidgetAppView.cpp.

00077         {
00078         // No implementation required
00079         }

CHsWidgetAppView::CHsWidgetAppView (   )  [private]
 

CHsWidgetAppView. C++ default constructor.

Definition at line 66 of file HsWidgetAppView.cpp.

00067         {
00068         // No implementation required
00069         }


Member Function Documentation

CHsWidgetAppView * CHsWidgetAppView::NewL (  const TRect &  aRect  )  [static]
 

NewL. Two-phased constructor. Creates a CHsWidgetAppView object which will draw itself to aRect.

Parameters:
aRect  The rectangle this view will be drawn to.
Returns:
a pointer to the created instance of CHsWidgetAppView.

Definition at line 24 of file HsWidgetAppView.cpp.

References NewLC().

Referenced by CHsWidgetAppUi::ConstructL().

00025         {
00026         CHsWidgetAppView* self = CHsWidgetAppView::NewLC(aRect);
00027         CleanupStack::Pop(self);
00028         return self;
00029         }

CHsWidgetAppView * CHsWidgetAppView::NewLC (  const TRect &  aRect  )  [static]
 

NewLC. Two-phased constructor. Creates a CHsWidgetAppView object which will draw itself to aRect.

Parameters:
aRect  Rectangle this view will be drawn to.
Returns:
A pointer to the created instance of CHsWidgetAppView.

Definition at line 36 of file HsWidgetAppView.cpp.

References ConstructL().

Referenced by NewL().

00037         {
00038         CHsWidgetAppView* self = new ( ELeave ) CHsWidgetAppView;
00039         CleanupStack::PushL(self);
00040         self->ConstructL(aRect);
00041         return self;
00042         }

void CHsWidgetAppView::Draw (  const TRect &  aRect  )  const
 

From CCoeControl, Draw Draw this CHsWidgetAppView to the screen.

Parameters:
aRect  the rectangle of this view that needs updating

Definition at line 86 of file HsWidgetAppView.cpp.

00087         {
00088         // Get the standard graphics context
00089         CWindowGc& gc = SystemGc();
00090         gc.SetBrushColor(KRgbGray);
00091         
00092         // Gets the control's extent
00093         TRect drawRect(Rect());
00094 
00095         // Clears the screen
00096         gc.Clear(drawRect);
00097         
00098         }

void CHsWidgetAppView::SizeChanged (   )  [virtual]
 

From CoeControl, SizeChanged. Called by framework when the view size is changed.

Definition at line 105 of file HsWidgetAppView.cpp.

00106         {
00107         DrawNow();
00108         }

void CHsWidgetAppView::ConstructL (  const TRect &  aRect  )  [private]
 

ConstructL 2nd phase constructor. Perform the second phase construction of a CHsWidgetAppView object.

Parameters:
aRect  The rectangle this view will be drawn to.

Definition at line 49 of file HsWidgetAppView.cpp.

Referenced by NewLC().

00050         {
00051         // Create a window for this application view
00052         CreateWindowL();
00053 
00054         // Set the windows size
00055         SetRect(aRect);
00056 
00057         // Activate the window which makes it ready to be drawn
00058         ActivateL();
00059         }


The documentation for this class was generated from the following files:

© Nokia 2009

Back to top