EllipseTool Class Reference

The QuickShape Ellipse tool. More...

#include <eliptool.h>

Inheritance diagram for EllipseTool:

QuickShapeBase DragTool Tool_v1 List of all members.

Public Member Functions

 EllipseTool ()
 Constructor for the QuickShape tool.
 ~EllipseTool ()
 QuickShapes tools destructor.
BOOL Init ()
 Called to initialise the ellipse tool.
void Describe (void *InfoPtr)
 Allows the tool manager to extract information about the tool.
UINT32 GetID ()
INT32 GetNumSides ()
INT32 GetCreationMode ()
BOOL GetPolygon ()
BOOL GetStellation ()
BOOL GetCurved ()
void SetNumSides (INT32 NewValue)
void SetCreationMode (INT32 NewValue)
void SetPolygon (BOOL NewValue)
void SetStellation (BOOL NewValue)
void SetCurved (BOOL NewValue)
BOOL ForcePolygonToGrey ()
BOOL ForceEllipseToGrey ()
BOOL ForceStellationToGrey ()
BOOL ForceCurvatureToGrey ()
BOOL ForceNumSidesToGrey ()
BOOL DoesPolygonExist ()
BOOL DoesEllipseExist ()
BOOL DoesStellationExist ()
BOOL DoesCurvatureExist ()
BOOL DoesReformSidesExist ()
BOOL DoesNumSidesExist ()
BOOL IsInterestingShape (NodeRegularShape *pShape)
 For saying that the ellipse tool only processed elipitical shapes.
INT32 GetShapesToAffect ()
INT32 GetCursorID ()
INT32 GetShapeID ()
INT32 GetShapesID ()
virtual BOOL IsEllipse ()

Private Member Functions

 CC_DECLARE_MEMDUMP (EllipseTool)

Private Attributes

INT32 CreationMode

Static Private Attributes

static TCHARFamilyName = _T("Shape Tools")
static TCHARToolName = _T("Ellipse Tool")
static TCHARPurpose = _T("Manipulating ellipses")
static TCHARAuthor = _T("Peter Arnold")

Detailed Description

The QuickShape Ellipse tool.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/03/95

Definition at line 117 of file eliptool.h.


Constructor & Destructor Documentation

EllipseTool::EllipseTool  ) 
 

Constructor for the QuickShape tool.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/03/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 143 of file eliptool.cpp.

00143                          : QuickShapeBase()
00144 {
00145     CreationMode = OpNewRegShape::BOUNDS;
00146 }

EllipseTool::~EllipseTool  ) 
 

QuickShapes tools destructor.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/03/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 164 of file eliptool.cpp.

00165 {
00166 
00167 }


Member Function Documentation

EllipseTool::CC_DECLARE_MEMDUMP EllipseTool   )  [private]
 

void EllipseTool::Describe void *  InfoPtr  )  [virtual]
 

Allows the tool manager to extract information about the tool.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/11/94
Parameters:
InfoPtr - A pointer to a tool info block. [INPUTS]
InfoPtr - The structure pointed to by InfoPtr will have had all the info [OUTPUTS] that this version of the Tool knows about

Reimplemented from Tool_v1.

Definition at line 184 of file eliptool.cpp.

00185 {
00186     // Cast structure into the latest one we understand.
00187     ToolInfo_v1 *Info = (ToolInfo_v1 *) InfoPtr;
00188 
00189     Info->InfoVersion = 1;
00190     
00191     Info->InterfaceVersion = GetToolInterfaceVersion();
00192         
00193     Info->Version = 1;
00194     Info->ID      = GetID();
00195     Info->TextID  = _R(IDS_ELLIPSE_TOOL);
00196 
00197     Info->Family  = FamilyName;
00198     Info->Name    = ToolName;
00199     Info->Purpose = Purpose;
00200     Info->Author  = Author;
00201 
00202     Info->BubbleID = _R(IDBBL_ELIP_TOOLBOX);
00203 }

BOOL EllipseTool::DoesCurvatureExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 148 of file eliptool.h.

00148 {return FALSE;};

BOOL EllipseTool::DoesEllipseExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 146 of file eliptool.h.

00146 {return FALSE;};

BOOL EllipseTool::DoesNumSidesExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 150 of file eliptool.h.

00150 {return FALSE;};

BOOL EllipseTool::DoesPolygonExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 145 of file eliptool.h.

00145 {return FALSE;};

BOOL EllipseTool::DoesReformSidesExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 149 of file eliptool.h.

00149 {return FALSE;};

BOOL EllipseTool::DoesStellationExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 147 of file eliptool.h.

00147 {return FALSE;};

BOOL EllipseTool::ForceCurvatureToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 143 of file eliptool.h.

00143 {return TRUE;};

BOOL EllipseTool::ForceEllipseToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 141 of file eliptool.h.

00141 {return FALSE;};

BOOL EllipseTool::ForceNumSidesToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 144 of file eliptool.h.

00144 {return TRUE;};

BOOL EllipseTool::ForcePolygonToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 140 of file eliptool.h.

00140 {return TRUE;};

BOOL EllipseTool::ForceStellationToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 142 of file eliptool.h.

00142 {return TRUE;};

INT32 EllipseTool::GetCreationMode  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 131 of file eliptool.h.

00131 {return CreationMode;};

INT32 EllipseTool::GetCursorID void   )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 153 of file eliptool.h.

00153 {return _R(IDC_ELIPTOOLCURSOR);};

BOOL EllipseTool::GetCurved  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 134 of file eliptool.h.

00134 {return FALSE;};

UINT32 EllipseTool::GetID void   )  [inline, virtual]
 

Reimplemented from Tool_v1.

Definition at line 127 of file eliptool.h.

00127 { return TOOLID_ELLIPSE; };

INT32 EllipseTool::GetNumSides  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 130 of file eliptool.h.

00130 {return 6;};                        

BOOL EllipseTool::GetPolygon  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 132 of file eliptool.h.

00132 {return FALSE;};

INT32 EllipseTool::GetShapeID void   )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 154 of file eliptool.h.

00154 {return _R(IDS_ELLIPSE_DESCRS);};

INT32 EllipseTool::GetShapesID  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 155 of file eliptool.h.

00155 {return _R(IDS_ELLIPSE_DESCRP);};

INT32 EllipseTool::GetShapesToAffect  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 152 of file eliptool.h.

BOOL EllipseTool::GetStellation  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 133 of file eliptool.h.

00133 {return FALSE;};

BOOL EllipseTool::Init void   )  [virtual]
 

Called to initialise the ellipse tool.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/03/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE/FALSE for success/failure

Errors: -

See also:
QuickShapeBase::Init

Reimplemented from QuickShapeBase.

Definition at line 221 of file eliptool.cpp.

00222 {
00223     BOOL ok = TRUE;
00224 
00225     pQuickShapeBaseInfoBarOp = new QuickShapeBaseInfoBarOp(this, _R(IDD_ELLIPSETOOLBAR));
00226     return pQuickShapeBaseInfoBarOp != NULL;
00227 
00228 PORTNOTE("dialog", "Removed Bar reading")
00229 #if 0
00230     CCResTextFile file;                                 // Resource File
00231     QuickShapeBaseInfoBarOpCreate BarCreate;            // Object that creates QuickShapeBaseInfoBarOp objects
00232 
00233             ok = file.open(_R(IDM_ELLIPSE_BAR), _R(IDT_INFO_BAR_RES));  // Open resource
00234     if (ok) ok = DialogBarOp::ReadBarsFromFile(file,BarCreate); // Read and create info bar
00235     if (ok) file.close();                                       // Close resource
00236 
00237     ERROR2IF(!ok,FALSE,"Unable to load EllipseTool.ini from resource"); 
00238 
00239     // Info bar now exists.  Now get a pointer to it
00240     String_32 str = String_32(_R(IDS_ELIPTOOL_INFOBARNAME));
00241     DialogBarOp* pDialogBarOp = DialogBarOp::FindDialogBarOp(str);
00242     
00243     ERROR2IF(pDialogBarOp==NULL, FALSE, "Ellipse infobar not found\n");
00244 
00245     ok = pDialogBarOp->IsKindOf(CC_RUNTIME_CLASS(QuickShapeBaseInfoBarOp));
00246     if (ok)
00247     {
00248         pQuickShapeBaseInfoBarOp = (QuickShapeBaseInfoBarOp*)pDialogBarOp;
00249         pQuickShapeBaseInfoBarOp->pQuickShapeBase = this;
00250     }
00251 #endif
00252     ERROR2IF(!ok,FALSE,"Error finding the Ellipse tool info bar");
00253 
00254     return (ok);
00255 }

virtual BOOL EllipseTool::IsEllipse  )  [inline, virtual]
 

Reimplemented from QuickShapeBase.

Definition at line 157 of file eliptool.h.

00157 {return TRUE;};

BOOL EllipseTool::IsInterestingShape NodeRegularShape pShape  )  [virtual]
 

For saying that the ellipse tool only processed elipitical shapes.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/03/95
Parameters:
pShape - points to a regular shape in the document [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the shapes IsCircular flag is set

Implements QuickShapeBase.

Definition at line 271 of file eliptool.cpp.

00272 {
00273     return pShape->IsCircular();
00274 }

void EllipseTool::SetCreationMode INT32  NewValue  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 136 of file eliptool.h.

00136 {CreationMode = NewValue;};

void EllipseTool::SetCurved BOOL  NewValue  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 139 of file eliptool.h.

00139 {};

void EllipseTool::SetNumSides INT32  NewValue  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 135 of file eliptool.h.

00135 {};

void EllipseTool::SetPolygon BOOL  NewValue  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 137 of file eliptool.h.

00137 {};

void EllipseTool::SetStellation BOOL  NewValue  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 138 of file eliptool.h.

00138 {};


Member Data Documentation

TCHAR * EllipseTool::Author = _T("Peter Arnold") [static, private]
 

Reimplemented from DragTool.

Definition at line 166 of file eliptool.h.

INT32 EllipseTool::CreationMode [private]
 

Definition at line 157 of file eliptool.h.

TCHAR * EllipseTool::FamilyName = _T("Shape Tools") [static, private]
 

Reimplemented from DragTool.

Definition at line 163 of file eliptool.h.

TCHAR * EllipseTool::Purpose = _T("Manipulating ellipses") [static, private]
 

Reimplemented from DragTool.

Definition at line 165 of file eliptool.h.

TCHAR * EllipseTool::ToolName = _T("Ellipse Tool") [static, private]
 

Reimplemented from DragTool.

Definition at line 164 of file eliptool.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:53:57 2007 for Camelot by  doxygen 1.4.4