|
Nokia N97 SDK Example Applications Guide |
#include <shape.h>
Inheritance diagram for NShapes::TShape:

Definition at line 48 of file shape.h.
Public Member Functions |
|
| IMPORT_C | TShape (TShapeType aShapeType, const TPoint &aOrigin) |
| virtual void | Draw (CWindowGc &aActiveGraphicsContext) const =0 |
| virtual TRect | GetRect () const =0 |
| virtual IMPORT_C void | ExternalizeL (RWriteStream &aStream) const |
| virtual IMPORT_C void | InternalizeL (RReadStream &aStream) |
Static Public Member Functions |
|
| static IMPORT_C TShapeType | ReadShapeTypeL (RReadStream &aStream) |
Protected Attributes |
|
| const TShapeType | iShapeType |
| TPoint | iOrigin |
|
||||||||||||
|
TShape Constructor that creates the shape at a specific point.
Definition at line 31 of file shape.cpp. 00031 : 00032 iShapeType( aShapeType ), 00033 iOrigin( aOrigin ) 00034 { 00035 // Constructor that creates the shape at a specific point 00036 // No implementation required 00037 }
|
|
|
Draw Pure virtual method that draws the shape to the specified graphics context.
Implemented in NShapes::TCircle, and NShapes::TRectangle. Referenced by CGuiEngineAppView::Draw(). |
|
|
GetRect Pure virtual method that returns the smallest bounding rectangle that entirely contains the shape.
Implemented in NShapes::TCircle, and NShapes::TRectangle. |
|
|
ReadShapeTypeL Static method that reads the type of the next shape from a stream.
Definition at line 44 of file shape.cpp.
|
|
|
ExternalizeL Virtual method that writes the shape to the specified write stream.
Reimplemented in NShapes::TCircle, and NShapes::TRectangle. Definition at line 53 of file shape.cpp. References iOrigin, and iShapeType. Referenced by CShapeListManager::ExternalizeL(), NShapes::TRectangle::ExternalizeL(), and NShapes::TCircle::ExternalizeL(). 00054 { 00055 aStream.WriteInt32L( iShapeType ); 00056 aStream.WriteInt32L( iOrigin.iX ); 00057 aStream.WriteInt32L( iOrigin.iY ); 00058 }
|
|
|
InternalizeL Virtual method that reads the shape from the specified read stream.
Reimplemented in NShapes::TCircle, and NShapes::TRectangle. Definition at line 65 of file shape.cpp. References iOrigin. Referenced by CShapeListManager::InternalizeL(), NShapes::TRectangle::InternalizeL(), and NShapes::TCircle::InternalizeL(). 00066 { 00067 // iShapeType has already been read 00068 iOrigin.iX = aStream.ReadInt32L(); 00069 iOrigin.iY = aStream.ReadInt32L(); 00070 }
|
|
|
iShapeType The type of the actual shape Definition at line 110 of file shape.h. Referenced by ExternalizeL(). |
|
|
iOrigin The origin of the shape Definition at line 113 of file shape.h. Referenced by ExternalizeL(), NShapes::TRectangle::GetRect(), NShapes::TCircle::GetRect(), and InternalizeL(). |
|
© Nokia 2009 |