OpPenEditInternal Class Reference

This operation is started by the pen tool when it receives a click over its internal moveto point. The point will be converted into a dragto if a drag occurs. More...

#include <penedit.h>

Inheritance diagram for OpPenEditInternal:

OpPenDragBlobs OpPenHandles Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpPenEditInternal ()
 OpPenEditInternal constructor.
void DoPenEditInternal (ControlPts *)
virtual void DragFinished (DocCoord Pos, ClickModifiers Mods, Spread *pSpread, BOOL Success, BOOL bSolidDrag)
 This is called when a drag operation finishes.

Static Public Member Functions

static BOOL Init ()
 OpPenEditInternal initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpPenEditInternal's state.

Private Attributes

ControlPtspUserHandles

Detailed Description

This operation is started by the pen tool when it receives a click over its internal moveto point. The point will be converted into a dragto if a drag occurs.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/9/94

Definition at line 338 of file penedit.h.


Constructor & Destructor Documentation

OpPenEditInternal::OpPenEditInternal  ) 
 

OpPenEditInternal constructor.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/9/94
See also:
-

Definition at line 908 of file penedit.cpp.

00909 {
00910 }


Member Function Documentation

void OpPenEditInternal::DoPenEditInternal ControlPts pHandles  ) 
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/9/94
Parameters:
pHandles = Pointer to a handles block containing click pos, drag pos [INPUTS] and spread ptr
- [OUTPUTS]
Returns:
-

Errors: failandexecute will be called if the operation fails in some way, most likely when no memory is available.

Definition at line 985 of file penedit.cpp.

00986 {   
00987 
00988     // Set the internal state
00989     pUserHandles = pHandles;
00990 
00991     HandleFlags Flags;
00992     DocCoord ghst = CalcGhostEnd(pHandles->HndClick, pHandles->HndDrag);
00993     SetDragHandles(Flags, pHandles->HndClick, pHandles->HndDrag, ghst, pHandles->pHndSpread);
00994 
00995     // call the base classes drag init function
00996     if (!DoPenDragBlobs())
00997     {
00998         FailAndExecute();
00999         End();
01000         return;
01001     }
01002 }

void OpPenEditInternal::DragFinished DocCoord  PointerPos,
ClickModifiers  ClickMods,
Spread pSpread,
BOOL  Success,
BOOL  bSolidDrag
[virtual]
 

This is called when a drag operation finishes.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/9/94
Parameters:
PointerPos - The position of the mouse at the end of the drag [INPUTS] ClickMods - the key modifiers being pressed Success - TRUE if the drag was terminated properly, FALSE if it was ended with the escape key being pressed
See also:
ClickModifiers

Reimplemented from OpPenDragBlobs.

Definition at line 1021 of file penedit.cpp.

01023 {
01024     // Rub out the old EORed version of the handles
01025     RenderHandles();
01026 
01027     // inform the base class to stop dragging
01028     OpPenDragBlobs::DragFinished( PointerPos, ClickMods, pSpread, Success, bSolidDrag);
01029 
01030     // inform the pen tool that a drag has come to an end
01031     if (Success)
01032     {
01033         pUserHandles->HndClick  = GetMidHandle();
01034         pUserHandles->HndDrag   = GetTrackHandle();
01035         pUserHandles->pHndSpread = StartSpread;
01036     }
01037     else
01038         FailAndExecute();
01039 
01040     // terminate the op
01041     End();      
01042 }

OpState OpPenEditInternal::GetState String_256 UIDescription,
OpDescriptor
[static]
 

For finding the OpPenEditInternal's state.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/9/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The state of the OpPenEditInternal

Errors: -

See also:
-

Definition at line 961 of file penedit.cpp.

00962 {
00963     OpState OpSt;
00964     return OpSt;   
00965 }

BOOL OpPenEditInternal::Init void   )  [static]
 

OpPenEditInternal initialiser method.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/9/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the operation could be successfully initialised FALSE if no more memory could be allocated

Errors: ERROR will be called if there was insufficient memory to allocate the operation.

See also:
-

Reimplemented from SimpleCCObject.

Definition at line 931 of file penedit.cpp.

00932 {
00933     return (RegisterOpDescriptor(0,                                     // tool ID
00934                                 _R(IDS_PENEDITINTERNALOP),                  // string resource ID
00935                                 CC_RUNTIME_CLASS(OpPenEditInternal),    // runtime class for Op
00936                                 OPTOKEN_PENEDITINTERNAL,                // Ptr to token string
00937                                 OpPenEditInternal::GetState,            // GetState function
00938                                 0,                                      // help ID = 0
00939                                 _R(IDBBL_PENEDITINTERNALOP),                // bubble help ID = 0
00940                                 0                                       // resource ID = 0
00941                                 )); 
00942 
00943 }               


Member Data Documentation

ControlPts* OpPenEditInternal::pUserHandles [private]
 

Definition at line 351 of file penedit.h.


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