|
Nokia N97 SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : circle.h 00004 * Part of : GuiEngine 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 2004 - 2006 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 00017 #ifndef __CIRCLE_H__ 00018 #define __CIRCLE_H__ 00019 00020 00021 // INCLUDES 00022 #include <e32std.h> 00023 #include <w32std.h> 00024 #include "shape.h" 00025 00026 00027 // CLASS DECLARATION 00028 00029 // Namespace containing shape definition 00030 namespace NShapes 00031 { 00032 00033 /** 00034 * TCircle 00035 * An instance of class TCircle is a circular shape. 00036 */ 00037 class TCircle : public TShape 00038 { 00039 00040 public: // Constructors and destructor 00041 00042 /** 00043 * TCircle. 00044 * Create an instance of TCircle at a specified position, 00045 * and of a specified radius. 00046 * @param aCenter where the center of the circle is located. 00047 * @param aRadius The radius of the circle 00048 */ 00049 IMPORT_C TCircle( const TPoint& aCenter, TInt aRadius ); 00050 00051 /** 00052 * TCircle. 00053 * Create an instance of TCircle 00054 */ 00055 IMPORT_C TCircle(); 00056 00057 00058 public: // From TShape 00059 00060 /** 00061 * Draw 00062 * Virtual method that draws the shape to the specified 00063 * graphics context. 00064 * @param aActiveGraphicsContext the active context 00065 * to draw the shape into. 00066 */ 00067 IMPORT_C void Draw( CWindowGc& aActiveGraphicsContext ) const ; 00068 00069 00070 /** 00071 * GetRect 00072 * Return the smallest bounding rectangle that entirely 00073 * contains the shape. 00074 * @return The rectangle 00075 */ 00076 IMPORT_C TRect GetRect() const; 00077 00078 /** 00079 * ExternalizeL 00080 * Virtual method that writes the shape to the specified 00081 * write stream. 00082 * @param aStream the stream to write the shape to. 00083 */ 00084 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; 00085 00086 /** 00087 * InternalizeL 00088 * Virtual method that reads the shape from the specified 00089 * read stream. 00090 * @param aStream the stream to read the shape from. 00091 */ 00092 IMPORT_C void InternalizeL( RReadStream& aStream ); 00093 00094 00095 private: // Data 00096 00097 /** iRadius, The Radius of the circle **/ 00098 TInt iRadius; 00099 }; 00100 00101 } 00102 00103 #endif // __CIRCLE_H__ 00104 00105 // End of File
|
© Nokia 2009 |