RotateTool Class Reference

Implementation of the Rotate Tool. More...

#include <rotate.h>

Inheritance diagram for RotateTool:

Tool_v1 List of all members.

Public Member Functions

 RotateTool ()
 ~RotateTool ()
BOOL Init ()
 Called after tool's constructor to ask it whether it wants to exist or not. Each tool is asked in two passes, so that its existence can depend on another tool. If a tool does not want to exist, it should return FALSE, when it will be deleted.
void Describe (void *InfoPtr)
 Asks a tool for more information. The pointer points to a struct such as ToolInfo_v1 which the tool should fill in. All fields should be filled (NULL is OK for char* variables). The type of the pointer is not explicitly defined so the structure can evolve while keeping backward compatibility.
UINT32 GetID ()
virtual void SelectChange (BOOL)
 Used to inform a tool that it is being selected or deselected. Default behaviour is to do nothing. A real tool should update the infobar when the tool is selected - this is usually all a tool will do.
virtual void OnClick (DocCoord, ClickType, ClickModifiers, Spread *)
 This function should be overridden by any tool that wants to receive clicks on the document. When DocView receives a click event from the OIL layer it finds the current tool and calls this function.
virtual void RenderToolBlobs (Spread *, DocRect *)
 This function is called in the main drawing loop to get the tool to render its blobs (ie the centre of rotation for the rotation tool). Since this is the base class version of this function and will be called if the tool does not provide its own RenderToolBlobs function, then it can be assumed that the tool does not need to draw anything, so it does nothing.

Private Member Functions

 CC_DECLARE_MEMDUMP (RotateTool)

Private Attributes

DocCoord ClickStart
SpreadStartSpread
DocCoord CentreOfRot
DocRect SelectionBox
BOOL IsSelection
CursorpRotateCursor
RotateInfoBarOp * pInfoBarOp

Static Private Attributes

static char * FamilyName
static char * ToolName
static char * Purpose
static char * Author

Detailed Description

Implementation of the Rotate Tool.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/7/94

Definition at line 121 of file rotate.h.


Constructor & Destructor Documentation

RotateTool::RotateTool  ) 
 

RotateTool::~RotateTool  ) 
 


Member Function Documentation

RotateTool::CC_DECLARE_MEMDUMP RotateTool   )  [private]
 

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

Asks a tool for more information. The pointer points to a struct such as ToolInfo_v1 which the tool should fill in. All fields should be filled (NULL is OK for char* variables). The type of the pointer is not explicitly defined so the structure can evolve while keeping backward compatibility.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
Pointer to area to recieve info [INPUTS]
Info area is updated [OUTPUTS]
Returns:
None

Errors: None

Reimplemented from Tool_v1.

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

Reimplemented from Tool_v1.

Definition at line 131 of file rotate.h.

00131 { return TOOLID_ROTATE; };

BOOL RotateTool::Init void   )  [virtual]
 

Called after tool's constructor to ask it whether it wants to exist or not. Each tool is asked in two passes, so that its existence can depend on another tool. If a tool does not want to exist, it should return FALSE, when it will be deleted.

Author:
Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if OK, FALSE if tool doesn't want to initialise.

Errors: None

Reimplemented from Tool_v1.

virtual void RotateTool::OnClick DocCoord  ,
ClickType  ,
ClickModifiers  ,
Spread
[virtual]
 

This function should be overridden by any tool that wants to receive clicks on the document. When DocView receives a click event from the OIL layer it finds the current tool and calls this function.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
2/7/93
Parameters:
Position of click in spread coordinates [INPUTS] Click type (single, double or drag) Modifiers (adjusted, constrained, etc...) Pointer to the spread in which the click occurred
None [OUTPUTS]
Returns:
None

Errors: None.

Reimplemented from Tool_v1.

virtual void RotateTool::RenderToolBlobs Spread ,
DocRect
[virtual]
 

This function is called in the main drawing loop to get the tool to render its blobs (ie the centre of rotation for the rotation tool). Since this is the base class version of this function and will be called if the tool does not provide its own RenderToolBlobs function, then it can be assumed that the tool does not need to draw anything, so it does nothing.

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/8/93
See also:
DocView::RenderOnTop

Reimplemented from Tool_v1.

virtual void RotateTool::SelectChange BOOL   )  [virtual]
 

Used to inform a tool that it is being selected or deselected. Default behaviour is to do nothing. A real tool should update the infobar when the tool is selected - this is usually all a tool will do.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/11/93
Parameters:
IsSelected - Indicates whether tool is being selected (TRUE) or [INPUTS] deselected (FALSE).

Reimplemented from Tool_v1.


Member Data Documentation

char* RotateTool::Author [static, private]
 

Definition at line 142 of file rotate.h.

DocCoord RotateTool::CentreOfRot [private]
 

Definition at line 149 of file rotate.h.

DocCoord RotateTool::ClickStart [private]
 

Definition at line 145 of file rotate.h.

char* RotateTool::FamilyName [static, private]
 

Definition at line 139 of file rotate.h.

BOOL RotateTool::IsSelection [private]
 

Definition at line 153 of file rotate.h.

RotateInfoBarOp* RotateTool::pInfoBarOp [private]
 

Definition at line 159 of file rotate.h.

Cursor* RotateTool::pRotateCursor [private]
 

Definition at line 156 of file rotate.h.

char* RotateTool::Purpose [static, private]
 

Definition at line 141 of file rotate.h.

DocRect RotateTool::SelectionBox [private]
 

Definition at line 150 of file rotate.h.

Spread* RotateTool::StartSpread [private]
 

Definition at line 146 of file rotate.h.

char* RotateTool::ToolName [static, private]
 

Definition at line 140 of file rotate.h.


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