OpPenDragBlobs Class Reference

This op class is defined as a base class only. It provides common dragging functionality which is inherited by create and edit pen classes. More...

#include <penedit.h>

Inheritance diagram for OpPenDragBlobs:

OpPenHandles Operation MessageHandler ListItem CCObject SimpleCCObject OpPenCreateInternal OpPenEditInternal List of all members.

Public Member Functions

 OpPenDragBlobs ()
 OpPenDragBlobs constructor.
BOOL DoPenDragBlobs ()
virtual void DragPointerMove (DocCoord Pos, ClickModifiers Mods, Spread *pSpread, BOOL bSolidDrag)
 This is called every time the mouse moves, during a drag.
virtual void DragFinished (DocCoord Pos, ClickModifiers Mods, Spread *pSpread, BOOL Success, BOOL bSolidDrag)
 This is called when a drag operation finishes.
virtual void RenderDragBlobs (DocRect, Spread *, BOOL bSolidDrag)
 This function is called to render our drag blobs during scrolling.

Detailed Description

This op class is defined as a base class only. It provides common dragging functionality which is inherited by create and edit pen classes.

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

Definition at line 280 of file penedit.h.


Constructor & Destructor Documentation

OpPenDragBlobs::OpPenDragBlobs  ) 
 

OpPenDragBlobs constructor.

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

Definition at line 616 of file penedit.cpp.

00617 {
00618 }


Member Function Documentation

BOOL OpPenDragBlobs::DoPenDragBlobs  ) 
 

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/9/94
Parameters:
tptr = pointer to calling tool. [INPUTS]
- [OUTPUTS]
Returns:
TRUE if able to start the drag, FALSE if not

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

Definition at line 636 of file penedit.cpp.

00637 {   
00638     // And tell the Dragging system that we need drags to happen
00639     DocRect HandlesRect = GetHandlesRect();
00640     return StartDrag(DRAGTYPE_AUTOSCROLL, &HandlesRect, &CurrentMousePos);
00641 }

void OpPenDragBlobs::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 Operation.

Reimplemented in OpPenCreateInternal, and OpPenEditInternal.

Definition at line 699 of file penedit.cpp.

00701 {
00702     // terminate the drag and operation
00703     EndDrag();      
00704 }

void OpPenDragBlobs::DragPointerMove DocCoord  PointerPos,
ClickModifiers  ClickMods,
Spread pSpread,
BOOL  bSolidDrag
[virtual]
 

This is called every time the mouse moves, during a drag.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/9/94
Parameters:
PointerPos - The current position of the mouse in Doc Coords [INPUTS] ClickMods - Which key modifiers are being pressed
See also:
ClickModifiers

Reimplemented from Operation.

Definition at line 661 of file penedit.cpp.

00665 {
00666     // If drag has moved onto a different spread, convert the coord to be relative to the
00667     // original spread.
00668     if (pSpread != StartSpread)
00669         PointerPos = MakeRelativeToSpread(StartSpread, pSpread, PointerPos);
00670 
00671     // Make sure we get the grid snapping involved
00672     DocCoord SnapPos = PointerPos;
00673     DocView::SnapCurrent(pSpread,&SnapPos);
00674 
00675     // Rub out the old EORed version of the handles, and stick some new ones on.
00676     RenderHandles();
00677     ChangeTrackHandle(SnapPos, ClickMods.Constrain);
00678     RenderHandles();
00679 }

void OpPenDragBlobs::RenderDragBlobs DocRect  Rect,
Spread pSpread,
BOOL  bSolidDrag
[virtual]
 

This function is called to render our drag blobs during scrolling.

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

Reimplemented from Operation.

Definition at line 718 of file penedit.cpp.

00719 {
00720     if (StartSpread!=pSpread) return;
00721     RenderRegion* pRegion = DocView::RenderOnTop( &Rect, pSpread, ClippedEOR );
00722     while ( pRegion )
00723     {
00724         UpdateHandles(pRegion);
00725         pRegion = DocView::GetNextOnTop(NULL);
00726     }
00727 }


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