RectangleTool Class Reference

The QuickShape Rectangle tool. More...

#include <rectangl.h>

Inheritance diagram for RectangleTool:

QuickShapeBase DragTool Tool_v1 List of all members.

Public Member Functions

 RectangleTool ()
 Constructor for the QuickShape tool.
 ~RectangleTool ()
 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 IsRectangle ()

Private Member Functions

 CC_DECLARE_MEMDUMP (RectangleTool)

Private Attributes

INT32 CreationMode

Static Private Attributes

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

Detailed Description

The QuickShape Rectangle tool.

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

Definition at line 119 of file rectangl.h.


Constructor & Destructor Documentation

RectangleTool::RectangleTool  ) 
 

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 144 of file rectangl.cpp.

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

RectangleTool::~RectangleTool  ) 
 

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 165 of file rectangl.cpp.

00166 {
00167 
00168 }


Member Function Documentation

RectangleTool::CC_DECLARE_MEMDUMP RectangleTool   )  [private]
 

void RectangleTool::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 185 of file rectangl.cpp.

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

BOOL RectangleTool::DoesCurvatureExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 150 of file rectangl.h.

00150 {return TRUE;};

BOOL RectangleTool::DoesEllipseExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 148 of file rectangl.h.

00148 {return FALSE;};

BOOL RectangleTool::DoesNumSidesExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 152 of file rectangl.h.

00152 {return FALSE;};

BOOL RectangleTool::DoesPolygonExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 147 of file rectangl.h.

00147 {return FALSE;};

BOOL RectangleTool::DoesReformSidesExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 151 of file rectangl.h.

00151 {return FALSE;};

BOOL RectangleTool::DoesStellationExist  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 149 of file rectangl.h.

00149 {return FALSE;};

BOOL RectangleTool::ForceCurvatureToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 145 of file rectangl.h.

00145 {return FALSE;};

BOOL RectangleTool::ForceEllipseToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 143 of file rectangl.h.

00143 {return TRUE;};

BOOL RectangleTool::ForceNumSidesToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 146 of file rectangl.h.

00146 {return TRUE;};

BOOL RectangleTool::ForcePolygonToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 142 of file rectangl.h.

00142 {return FALSE;};

BOOL RectangleTool::ForceStellationToGrey  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 144 of file rectangl.h.

00144 {return TRUE;};

INT32 RectangleTool::GetCreationMode  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 133 of file rectangl.h.

00133 {return CreationMode;};

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

Implements QuickShapeBase.

Definition at line 155 of file rectangl.h.

00155 {return _R(IDC_RECTTOOLCURSOR);};

BOOL RectangleTool::GetCurved  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 136 of file rectangl.h.

00136 {return FALSE;};

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

Reimplemented from Tool_v1.

Definition at line 129 of file rectangl.h.

00129 { return TOOLID_RECTANGLE; };

INT32 RectangleTool::GetNumSides  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 132 of file rectangl.h.

00132 {return 4;};                        

BOOL RectangleTool::GetPolygon  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 134 of file rectangl.h.

00134 {return TRUE;};

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

Implements QuickShapeBase.

Definition at line 156 of file rectangl.h.

00156 {return _R(IDS_RECTANGLE_DESCRS);};

INT32 RectangleTool::GetShapesID  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 157 of file rectangl.h.

00157 {return _R(IDS_RECTANGLE_DESCRP);};

INT32 RectangleTool::GetShapesToAffect  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 154 of file rectangl.h.

BOOL RectangleTool::GetStellation  )  [inline, virtual]
 

Implements QuickShapeBase.

Definition at line 135 of file rectangl.h.

00135 {return FALSE;};

BOOL RectangleTool::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 222 of file rectangl.cpp.

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

BOOL RectangleTool::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 273 of file rectangl.cpp.

00274 {
00275     return (pShape->IsARectangle());
00276 }

virtual BOOL RectangleTool::IsRectangle  )  [inline, virtual]
 

Reimplemented from QuickShapeBase.

Definition at line 159 of file rectangl.h.

00159 {return TRUE;};

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

Implements QuickShapeBase.

Definition at line 138 of file rectangl.h.

00138 {CreationMode = NewValue;};

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

Implements QuickShapeBase.

Definition at line 141 of file rectangl.h.

00141 {};

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

Implements QuickShapeBase.

Definition at line 137 of file rectangl.h.

00137 {};

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

Implements QuickShapeBase.

Definition at line 139 of file rectangl.h.

00139 {};

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

Implements QuickShapeBase.

Definition at line 140 of file rectangl.h.

00140 {};


Member Data Documentation

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

Reimplemented from DragTool.

Definition at line 168 of file rectangl.h.

INT32 RectangleTool::CreationMode [private]
 

Definition at line 159 of file rectangl.h.

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

Reimplemented from DragTool.

Definition at line 165 of file rectangl.h.

TCHAR * RectangleTool::Purpose = _T("Manipulating rectangles") [static, private]
 

Reimplemented from DragTool.

Definition at line 167 of file rectangl.h.

TCHAR * RectangleTool::ToolName = _T("Rectangle Tool") [static, private]
 

Reimplemented from DragTool.

Definition at line 166 of file rectangl.h.


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