Nokia N97 SDK
Example Applications Guide

HsWidgetAppView.h

00001 /*
00002  ============================================================================
00003  Name           : HsWidgetAppView.h
00004  Author   : 
00005  Copyright   : This material, including documentation and any related computer
00006           programs, is protected by copyright controlled by Nokia Corporation.
00007  Description : Declares view class for application.
00008  ============================================================================
00009  */
00010 
00011 #ifndef __HSWIDGETAPPVIEW_H__
00012 #define __HSWIDGETAPPVIEW_H__
00013 
00014 // INCLUDES
00015 #include <coecntrl.h>
00016 
00017 // CLASS DECLARATION
00018 class CHsWidgetAppView : public CCoeControl
00019         {
00020 public:
00021         // New methods
00022 
00023         /**
00024          * NewL.
00025          * Two-phased constructor.
00026          * Creates a CHsWidgetAppView object which will draw itself to aRect.
00027          * @param aRect The rectangle this view will be drawn to.
00028          * @return a pointer to the created instance of CHsWidgetAppView.
00029          */
00030         static CHsWidgetAppView* NewL(const TRect& aRect);
00031 
00032         /**
00033          * NewLC.
00034          * Two-phased constructor.
00035          * Creates a CHsWidgetAppView object which will draw itself
00036          * to aRect.
00037          * @param aRect Rectangle this view will be drawn to.
00038          * @return A pointer to the created instance of CHsWidgetAppView.
00039          */
00040         static CHsWidgetAppView* NewLC(const TRect& aRect);
00041 
00042         /**
00043          * ~CHsWidgetAppView
00044          * Virtual Destructor.
00045          */
00046         virtual ~CHsWidgetAppView();
00047 
00048 public:
00049         // Functions from base classes
00050 
00051         /**
00052          * From CCoeControl, Draw
00053          * Draw this CHsWidgetAppView to the screen.
00054          * @param aRect the rectangle of this view that needs updating
00055          */
00056         void Draw(const TRect& aRect) const;
00057 
00058         /**
00059          * From CoeControl, SizeChanged.
00060          * Called by framework when the view size is changed.
00061          */
00062         virtual void SizeChanged();
00063 
00064 private:
00065         // Constructors
00066 
00067         /**
00068          * ConstructL
00069          * 2nd phase constructor.
00070          * Perform the second phase construction of a
00071          * CHsWidgetAppView object.
00072          * @param aRect The rectangle this view will be drawn to.
00073          */
00074         void ConstructL(const TRect& aRect);
00075 
00076         /**
00077          * CHsWidgetAppView.
00078          * C++ default constructor.
00079          */
00080         CHsWidgetAppView();
00081 
00082         };
00083 
00084 #endif // __HSWIDGETAPPVIEW_H__
00085 // End of File

© Nokia 2009

Back to top