OpPenCreateInternal Class Reference

This operation is started by the pen tool when it receives a click on the document with no previous internal or external state set. ie the pen tool is not holding a moveto element inside iteslf from a previous click and there are no selected endpoints to add to. More...

#include <penedit.h>

Inheritance diagram for OpPenCreateInternal:

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

Public Member Functions

 OpPenCreateInternal ()
 OpPenCreateInternal constructor.
void DoPenCreateInternal (DocCoord, Spread *, 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 ()
 OpDeletePoints initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpPenCreateInternal's state.

Private Attributes

ControlPtspUserHandles

Detailed Description

This operation is started by the pen tool when it receives a click on the document with no previous internal or external state set. ie the pen tool is not holding a moveto element inside iteslf from a previous click and there are no selected endpoints to add to.

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

Definition at line 308 of file penedit.h.


Constructor & Destructor Documentation

OpPenCreateInternal::OpPenCreateInternal  ) 
 

OpPenCreateInternal constructor.

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

Definition at line 743 of file penedit.cpp.

00744 {
00745 }


Member Function Documentation

void OpPenCreateInternal::DoPenCreateInternal DocCoord  Anchor,
Spread pSpread,
ControlPts pHandles
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/9/94
Parameters:
Anchor = position of first click [INPUTS] pSpread = pointer to spread where first click occured pHandles= pointer to handles block
- [OUTPUTS]
Returns:
-

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

Definition at line 828 of file penedit.cpp.

00829 {   
00830     // initialise the drag handles into the default mode.
00831 
00832     pUserHandles = pHandles;
00833     HandleFlags Flags;
00834 
00835     // Make sure we get the grid snapping involved
00836     DocCoord SnapPos = Anchor;
00837     DocView::SnapCurrent(pSpread,&SnapPos);
00838 
00839     SetDragHandles(Flags, SnapPos, SnapPos, SnapPos, pSpread);
00840 
00841     // call the base classes drag init function
00842     if (!DoPenDragBlobs())
00843     {
00844         FailAndExecute();
00845         End();
00846         return;
00847     }
00848 
00849     // Render the current drag blobs where necessary
00850     RenderHandles();
00851 }

void OpPenCreateInternal::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 872 of file penedit.cpp.

00874 {
00875     // Rub out the old EORed version of the handles
00876     RenderHandles();
00877 
00878     // inform the base class to stop dragging
00879     OpPenDragBlobs::DragFinished( PointerPos, ClickMods, pSpread, Success, bSolidDrag);
00880 
00881     // inform the pen tool that a drag has come to an end
00882     if (Success)
00883     {
00884         pUserHandles->HndClick = GetMidHandle();
00885         pUserHandles->HndDrag = GetTrackHandle();
00886         pUserHandles->pHndSpread = StartSpread;
00887     }
00888     else
00889         FailAndExecute();
00890     // End the operation
00891     End();
00892 }

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

For finding the OpPenCreateInternal's state.

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

Errors: -

See also:
-

Definition at line 797 of file penedit.cpp.

00798 {
00799     OpState OpSt;
00800     return OpSt;   
00801 }

BOOL OpPenCreateInternal::Init void   )  [static]
 

OpDeletePoints 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 767 of file penedit.cpp.

00768 {
00769     return (RegisterOpDescriptor(0,                                     // tool ID
00770                                 _R(IDS_PENCREATEINTERNALOP),                // string resource ID
00771                                 CC_RUNTIME_CLASS(OpPenCreateInternal),  // runtime class for Op
00772                                 OPTOKEN_PENCREATEINTERNAL,              // Ptr to token string
00773                                 OpPenCreateInternal::GetState,          // GetState function
00774                                 0,                                      // help ID = 0
00775                                 _R(IDBBL_PENCREATEINTERNALOP),              // bubble help ID = 0
00776                                 0                                       // resource ID = 0
00777                                 )); 
00778 
00779 }               


Member Data Documentation

ControlPts* OpPenCreateInternal::pUserHandles [private]
 

Definition at line 321 of file penedit.h.


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