SelectAllOp Class Reference

The Select All operation. More...

#include <selall.h>

Inheritance diagram for SelectAllOp:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 SelectAllOp ()
 Constructs a new SelectAllOp object: setting default operation flags, and adding it to the Live list.
void Do (OpDescriptor *)
 Actually "DO" a select all operation.

Static Public Member Functions

static BOOL Init ()
 Create an OpDescriptor for the Select All operation.
static OpState GetState (String_256 *, OpDescriptor *)
 Find the state of the SelectAllOp operation.

Detailed Description

The Select All operation.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/5/94
See also:
Operation

Definition at line 128 of file selall.h.


Constructor & Destructor Documentation

SelectAllOp::SelectAllOp  ) 
 

Constructs a new SelectAllOp object: setting default operation flags, and adding it to the Live list.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/5/94

Definition at line 134 of file selall.cpp.

00134                         : Operation()
00135 {
00136 }


Member Function Documentation

void SelectAllOp::Do OpDescriptor  )  [virtual]
 

Actually "DO" a select all operation.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/5/94
Parameters:
An Operation Descriptor [INPUTS]

Reimplemented from Operation.

Definition at line 148 of file selall.cpp.

00149 {
00150     Spread* pSelSpread = Document::GetSelectedSpread();
00151 //  Document * pDoc = Document::GetCurrent();
00152 
00153     // Only select all if we have a selected spread
00154     if (pSelSpread != NULL)
00155     {
00156         // Get the current tool
00157         Tool* pTool = Tool::GetCurrent();
00158         BlobManager* pBlobManager = Camelot.GetBlobManager();
00159         ENSURE(pBlobManager, "Can't get BlobManager");
00160 
00161         // Render off tool blobs if the tool dosen't do it itself on SelChange messages
00162         if (pTool!=NULL && !pTool->AreToolBlobsRenderedOnSelection())
00163 //          pTool->RenderToolBlobsOff(pSelSpread,NULL);
00164             pBlobManager->RenderToolBlobsOff(pTool, pSelSpread, NULL);
00165 
00166         // ensures all blobs removed
00167         NodeRenderableInk::DeselectAll(TRUE);
00168 
00169         // get a rect encompassing the whole spread (and all objects on it)
00170         // NB just getting bounds of all objects => blob redraw probs
00171         DocRect PasteBounds = pSelSpread->GetBoundingRect();
00172         DocRect PasteRect   = pSelSpread->GetPasteboardRect();
00173         PasteBounds = PasteBounds.Union(PasteRect);
00174 
00175         // Convert those Document Coords into Spread Coords
00176         pSelSpread->DocCoordToSpreadCoord(&PasteBounds);
00177 
00178         // select all selectable objects in the spread
00179         NodeRenderableInk::SelectAllInRect(PasteBounds,pSelSpread,NodeRenderableInk::SET);
00180 
00181         // Get the current tool to put its blobs back on
00182         if (pTool!=NULL && !pTool->AreToolBlobsRenderedOnSelection())
00183 //          pTool->RenderToolBlobsOn(pSelSpread,NULL);
00184             pBlobManager->RenderToolBlobsOn(pTool, pSelSpread, NULL);
00185 
00186     }
00187     End();
00188 }

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

Find the state of the SelectAllOp operation.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/5/94
Parameters:
String - representing the operation description which may be updated [INPUTS] OpDescriptor - To help update the state

Definition at line 201 of file selall.cpp.

00202 {
00203     return OpState(FALSE,FALSE);        // Never ticked, never greyed!
00204 }

BOOL SelectAllOp::Init void   )  [static]
 

Create an OpDescriptor for the Select All operation.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/5/94

Reimplemented from SimpleCCObject.

Definition at line 215 of file selall.cpp.

00216 {
00217     BTNOP(EDITSELECTALL,SelectAllOp,EDIT);
00218     return(TRUE);
00219 }


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