Nokia N97 SDK
Example Applications Guide

openchelloglibeventexview.h

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

© Nokia 2009

Back to top