QuickShapeTool Class Reference

The QuickShape tool. More...

#include <regshape.h>

Inheritance diagram for QuickShapeTool:

QuickShapeBase DragTool Tool_v1 List of all members.

Public Member Functions

 QuickShapeTool ()
 The way shapes are created by dragging. The number of sides to create shapes with Whether to create polygons (TRUE) or ellipses (FALSE) Whether to create stellated shapes or not Whether to create shapes with rounded corners Constructor for the QuickShape tool.
 ~QuickShapeTool ()
 QuickShapes tools destructor.
BOOL Init ()
 Called to initialise the QuickShape tool. Also initialases the base class.
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)
 Always returns TRUE as the QuickShape tool deals with all shapes.
INT32 GetShapesToAffect ()
INT32 GetCursorID ()
INT32 GetShapeID ()
INT32 GetShapesID ()
BOOL CanReformEdges ()

Private Member Functions

 CC_DECLARE_MEMDUMP (QuickShapeTool)

Static Private Attributes

static INT32 CreationMode = OpNewRegShape::RADIUS
static INT32 NumSides = 6
static BOOL CreatePolygons = TRUE
static BOOL CreateStellated = FALSE
static BOOL CreateCurved = FALSE
static TCHARFamilyName = _T("Shape Tools")
static TCHARToolName = _T("QuickShape Tool")
static TCHARPurpose = _T("Regular Shape manipulation")
static TCHARAuthor = _T("Peter Arnold")

Detailed Description

The QuickShape tool.

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

Definition at line 328 of file regshape.h.


Constructor & Destructor Documentation

QuickShapeTool::QuickShapeTool  ) 
 

The way shapes are created by dragging. The number of sides to create shapes with Whether to create polygons (TRUE) or ellipses (FALSE) Whether to create stellated shapes or not Whether to create shapes with rounded corners 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 3085 of file regshape.cpp.

03085                                : QuickShapeBase()
03086 {
03087 
03088 }

QuickShapeTool::~QuickShapeTool  ) 
 

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 3106 of file regshape.cpp.

03107 {
03108 
03109 }


Member Function Documentation

BOOL QuickShapeTool::CanReformEdges  )  [inline, virtual]
 

Reimplemented from QuickShapeBase.

Definition at line 367 of file regshape.h.

00367 {return TRUE;};

QuickShapeTool::CC_DECLARE_MEMDUMP QuickShapeTool   )  [private]
 

void QuickShapeTool::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 3156 of file regshape.cpp.

03157 {
03158     // Cast structure into the latest one we understand.
03159     ToolInfo_v1 *Info = (ToolInfo_v1 *) InfoPtr;
03160 
03161     Info->InfoVersion = 1;
03162     
03163     Info->InterfaceVersion = GetToolInterfaceVersion();
03164         
03165     Info->Version = 1;
03166     Info->ID      = GetID();
03167     Info->TextID  = _R(IDS_REGSHAPE_TOOL);
03168 
03169     Info->Family  = FamilyName;
03170     Info->Name    = ToolName;
03171     Info->Purpose = Purpose;
03172     Info->Author  = Author;
03173 
03174     Info->BubbleID = _R(IDBBL_REGSHAPE_TOOLBOX);
03175 }

BOOL QuickShapeTool::DoesCurvatureExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 359 of file regshape.h.

00359 {return TRUE;};

BOOL QuickShapeTool::DoesEllipseExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 357 of file regshape.h.

00357 {return TRUE;};

BOOL QuickShapeTool::DoesNumSidesExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 361 of file regshape.h.

00361 {return TRUE;};

BOOL QuickShapeTool::DoesPolygonExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 356 of file regshape.h.

00356 {return TRUE;};

BOOL QuickShapeTool::DoesReformSidesExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 360 of file regshape.h.

00360 {return TRUE;};

BOOL QuickShapeTool::DoesStellationExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 358 of file regshape.h.

00358 {return TRUE;};

BOOL QuickShapeTool::ForceCurvatureToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 354 of file regshape.h.

00354 {return FALSE;};

BOOL QuickShapeTool::ForceEllipseToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 352 of file regshape.h.

00352 {return FALSE;};

BOOL QuickShapeTool::ForceNumSidesToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 355 of file regshape.h.

00355 {return FALSE;};

BOOL QuickShapeTool::ForcePolygonToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 351 of file regshape.h.

00351 {return FALSE;};

BOOL QuickShapeTool::ForceStellationToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 353 of file regshape.h.

00353 {return FALSE;};

INT32 QuickShapeTool::GetCreationMode  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 342 of file regshape.h.

00342 {return CreationMode;};

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

Implements QuickShapeBase.

Definition at line 364 of file regshape.h.

00364 {return _R(IDC_REGSHAPETOOLCURSOR);};

BOOL QuickShapeTool::GetCurved  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 345 of file regshape.h.

00345 {return CreateCurved;};

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

Reimplemented from Tool_v1.

Definition at line 338 of file regshape.h.

00338 { return TOOLID_REGSHAPE; };

INT32 QuickShapeTool::GetNumSides  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 341 of file regshape.h.

00341 {return NumSides;};

BOOL QuickShapeTool::GetPolygon  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 343 of file regshape.h.

00343 {return CreatePolygons;};

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

Implements QuickShapeBase.

Definition at line 365 of file regshape.h.

00365 {return _R(IDS_REGSHAPE_SINGULAR);};

INT32 QuickShapeTool::GetShapesID  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 366 of file regshape.h.

00366 {return _R(IDS_REGSHAPE_PLURAL);};

INT32 QuickShapeTool::GetShapesToAffect  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 363 of file regshape.h.

BOOL QuickShapeTool::GetStellation  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 344 of file regshape.h.

00344 {return CreateStellated;};

BOOL QuickShapeTool::Init void   )  [virtual]
 

Called to initialise the QuickShape tool. Also initialases the base class.

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 3127 of file regshape.cpp.

03128 {
03129     // Rread in the preference settings from the file
03130     GetApplication()->DeclareSection(_T("RegularShapeTool"),5);
03131     GetApplication()->DeclarePref(_T("RegularShapeTool"),_T("CreationType"), &CreationMode, OpNewRegShape::RADIUS, OpNewRegShape::BOUNDS);
03132     GetApplication()->DeclarePref(_T("RegularShapeTool"),_T("NumberSides"), &NumSides, 3, 99);
03133     GetApplication()->DeclarePref(_T("RegularShapeTool"),_T("CreatePolygons"), &CreatePolygons, 0, 1);
03134     GetApplication()->DeclarePref(_T("RegularShapeTool"),_T("CreateStellated"), &CreateStellated, 0, 1);
03135     GetApplication()->DeclarePref(_T("RegularShapeTool"),_T("CreateCurved"), &CreateCurved, 0, 1);
03136 
03137     // Initialise the base class first
03138     return QuickShapeBase::Init();
03139 }

BOOL QuickShapeTool::IsInterestingShape NodeRegularShape pShape  )  [virtual]
 

Always returns TRUE as the QuickShape tool deals with all 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 shape is one processed by this tool

Implements QuickShapeBase.

Definition at line 3221 of file regshape.cpp.

03222 {
03223     return TRUE;
03224 }

void QuickShapeTool::SetCreationMode INT32  NewValue  )  [virtual]
 

Implements QuickShapeBase.

Definition at line 3184 of file regshape.cpp.

03185 {
03186     CreationMode = NewValue;
03187 }

void QuickShapeTool::SetCurved BOOL  NewValue  )  [virtual]
 

Implements QuickShapeBase.

Definition at line 3201 of file regshape.cpp.

03202 {
03203     if (!pQuickShapeBaseInfoBarOp->AreShapesSelected())
03204         CreateCurved = NewValue;
03205 }

void QuickShapeTool::SetNumSides INT32  NewValue  )  [virtual]
 

Implements QuickShapeBase.

Definition at line 3178 of file regshape.cpp.

03179 {
03180     if (!pQuickShapeBaseInfoBarOp->AreShapesSelected())
03181         NumSides = NewValue;
03182 }

void QuickShapeTool::SetPolygon BOOL  NewValue  )  [virtual]
 

Implements QuickShapeBase.

Definition at line 3189 of file regshape.cpp.

03190 {
03191     if (!pQuickShapeBaseInfoBarOp->AreShapesSelected())
03192         CreatePolygons = NewValue;
03193 }

void QuickShapeTool::SetStellation BOOL  NewValue  )  [virtual]
 

Implements QuickShapeBase.

Definition at line 3195 of file regshape.cpp.

03196 {
03197     if (!pQuickShapeBaseInfoBarOp->AreShapesSelected())
03198         CreateStellated = NewValue;
03199 }


Member Data Documentation

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

Reimplemented from DragTool.

Definition at line 383 of file regshape.h.

BOOL QuickShapeTool::CreateCurved = FALSE [static, private]
 

Definition at line 377 of file regshape.h.

BOOL QuickShapeTool::CreatePolygons = TRUE [static, private]
 

Definition at line 375 of file regshape.h.

BOOL QuickShapeTool::CreateStellated = FALSE [static, private]
 

Definition at line 376 of file regshape.h.

INT32 QuickShapeTool::CreationMode = OpNewRegShape::RADIUS [static, private]
 

Definition at line 367 of file regshape.h.

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

Reimplemented from DragTool.

Definition at line 380 of file regshape.h.

INT32 QuickShapeTool::NumSides = 6 [static, private]
 

Definition at line 374 of file regshape.h.

TCHAR * QuickShapeTool::Purpose = _T("Regular Shape manipulation") [static, private]
 

Reimplemented from DragTool.

Definition at line 382 of file regshape.h.

TCHAR * QuickShapeTool::ToolName = _T("QuickShape Tool") [static, private]
 

Reimplemented from DragTool.

Definition at line 381 of file regshape.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:16 2007 for Camelot by  doxygen 1.4.4