#include <dragtool.h>
Inheritance diagram for DragTool:
Public Member Functions | |
virtual void | DragMove (TransformBoundingData *pBoundingData) |
Placeholder for base-class implementations. Does nothing here. | |
virtual void | OnClick (DocCoord PointerPos, ClickType cType, ClickModifiers cMods, Spread *pSpread) |
Call this function (for derived classes) when you don't want to process the message yourself (or you don't want to handle it). This function locates the selector tool - and allows it to handle the message. | |
Static Public Member Functions | |
static BOOL | BeyondFixedRange (double fpFixedVal) |
Checks for under/overflow in fixed-point calculations. | |
Private Member Functions | |
CC_DECLARE_MEMDUMP (DragTool) | |
Static Private Attributes | |
static TCHAR * | FamilyName = _T("Drag Tools") |
static TCHAR * | ToolName = _T("Drag Tool") |
static TCHAR * | Purpose = _T("The parent tool of Selector and Slice tools") |
static TCHAR * | Author = _T("Karim MacDonald") |
CGS:
The DragTool is also the base class for all tools which require selection ability. A single interface is provided for this pupose: OnClick (). OnClick () actually serves as a wrapper for our selection tool - thereby allowing all derived tools to harness the power of our selection tool.
Definition at line 131 of file dragtool.h.
|
Checks for under/overflow in fixed-point calculations.
Reimplemented in SelectorTool. Definition at line 156 of file dragtool.cpp. 00157 { 00158 const double fpMinFixPt = 1.0 / (INT32(SHRT_MAX) + 1); // 1/32768 00159 const double fpMaxFixPt = SHRT_MAX; // 32767 00160 double fp = fabs(fpFixedVal); 00161 return fp < fpMinFixPt || fp > fpMaxFixPt; 00162 }
|
|
|
|
Placeholder for base-class implementations. Does nothing here.
Reimplemented in SelectorTool. Definition at line 130 of file dragtool.cpp.
|
|
Call this function (for derived classes) when you don't want to process the message yourself (or you don't want to handle it). This function locates the selector tool - and allows it to handle the message.
Reimplemented from Tool_v1. Reimplemented in BlendTool, ContourTool, GradFillTool, TranspTool, FreeHandTool, LiveEffectsTool, MouldTool, QuickShapeBase, SelectorTool, and SliceTool. Definition at line 178 of file dragtool.cpp. 00179 { 00180 if ((cType == CLICKTYPE_SINGLE) || (cType == CLICKTYPE_UP)) 00181 { 00182 ToolListItem* pSelectorItem = Tool::Find(TOOLID_SELECTOR); 00183 ERROR3IF(pSelectorItem == NULL, "ARGH! No Selector when we got a click!"); 00184 ERROR3IF(pSelectorItem->m_pTool == NULL, "ARGH! No Selector when we got a click!"); 00185 Tool* pSelector = pSelectorItem->m_pTool; 00186 00187 if (pSelector) 00188 { 00189 SelectorTool::AllowGuidelineScan (FALSE); 00190 pSelector->OnClick(PointerPos, cType, cMods, pSpread); 00191 SelectorTool::AllowGuidelineScan (TRUE); 00192 } 00193 } 00194 }
|
|
Reimplemented in BlendTool, ContourTool, EllipseTool, GradFillTool, TranspTool, FreeHandTool, LiveEffectsTool, MouldTool, RectangleTool, QuickShapeTool, SelectorTool, and SliceTool. Definition at line 156 of file dragtool.h. |
|
Reimplemented in BlendTool, ContourTool, EllipseTool, GradFillTool, TranspTool, FreeHandTool, LiveEffectsTool, MouldTool, RectangleTool, QuickShapeTool, SelectorTool, and SliceTool. Definition at line 153 of file dragtool.h. |
|
Reimplemented in BlendTool, ContourTool, EllipseTool, GradFillTool, TranspTool, FreeHandTool, LiveEffectsTool, MouldTool, RectangleTool, QuickShapeTool, SelectorTool, and SliceTool. Definition at line 155 of file dragtool.h. |
|
Reimplemented in BlendTool, ContourTool, EllipseTool, GradFillTool, TranspTool, FreeHandTool, LiveEffectsTool, MouldTool, RectangleTool, QuickShapeTool, SelectorTool, and SliceTool. Definition at line 154 of file dragtool.h. |