Nokia N97 SDK
Example Applications Guide

tactileexamplecircle.h

00001 /*
00002 * ============================================================================
00003 *  Name        : tactileexamplecircle.h
00004 *  Part of     : Tactile Example
00005 *  Interface   : N/A
00006 *  Description : Declares the custom control
00007 *  Version     :
00008 *
00009 *  Copyright (c) 2008 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 __TACTILEEXAMPLECIRCLE_H__
00017 #define __TACTILEEXAMPLECIRCLE_H__
00018 
00019 // INCLUDE FILES
00020 #include <coecntrl.h>
00021 
00022 // CLASS DECLARATION
00023 /**
00024 * CTactileExampleCircle control class.
00025 *
00026 */
00027 class CTactileExampleCircle : public CCoeControl, MCoeControlHitTest
00028     {
00029 public:
00030 
00031     /**
00032      * First phase of two-phased constructor
00033      */
00034     static CTactileExampleCircle* NewL(
00035         const TRect& aRect, const CCoeControl* aParent );
00036 
00037     /**
00038      * Destructor.
00039      */
00040     virtual ~CTactileExampleCircle();
00041 
00042     /**
00043      * Enables/disables tactile feedback for this control
00044      * @param aEnabled Use ETrue to enable feedback and EFalse
00045      * to disable feedback
00046      */
00047     void EnableFeedback( TBool aEnabled );
00048 
00049 
00050 // from base class CCoeControl
00051 
00052     /**
00053      * From CCoeControl.
00054      * Draw this CTactileExampleCircle control to the screen.
00055      * @param aRect the rectangle of this control that needs updating
00056      */
00057     void Draw( const TRect& aRect ) const;
00058 
00059     /**
00060      * From CCoeControl.
00061      * @param aPointerEvent The pointer event.
00062      */
00063     void HandlePointerEventL( const TPointerEvent& aPointerEvent );
00064 
00065 
00066 // from base class MCoeControlHitTest
00067 
00068     /**
00069      * From MCoeControlHitTest.
00070      * Tests whether a pointer event occurred inside the control's hit region
00071      * @param aPoint The position of the pointer event
00072      * @param aControl
00073      */
00074     TBool HitRegionContains( const TPoint& aPoint, const CCoeControl& /*aControl*/ ) const;
00075 
00076 
00077 private:
00078 
00079     CTactileExampleCircle();
00080 
00081     /**
00082      * Second phase of constructor.
00083      */
00084     void ConstructL( const TRect& aRect, const CCoeControl* aParent );
00085     };
00086 
00087 #endif // __TACTILEEXAMPLECIRCLE_H__
00088 
00089 // End of File

© Nokia 2009

Back to top