SelectNoneOp Class Reference

The Clear Selection operation. More...

#include <selall.h>

Inheritance diagram for SelectNoneOp:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 SelectNoneOp ()
 Constructs a new SelectNoneOp 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 SelectNoneOp operation.

Detailed Description

The Clear Selection operation.

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

Definition at line 155 of file selall.h.


Constructor & Destructor Documentation

SelectNoneOp::SelectNoneOp  ) 
 

Constructs a new SelectNoneOp 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 236 of file selall.cpp.

00236                           : Operation()
00237 {
00238 }


Member Function Documentation

void SelectNoneOp::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 250 of file selall.cpp.

00251 {
00252     Spread* pSelSpread = Document::GetSelectedSpread();
00253 
00254     // Only deselect all if we have a selected spread
00255     if (pSelSpread != NULL)
00256     {
00257         // Get the current tool
00258         Tool* pTool = Tool::GetCurrent();
00259 
00260         NodeRenderableInk::DeselectAll(TRUE);
00261 
00262         // Get the tool to remove all its blobs before we deselect the nodes.
00263         // Only do this if the current tool dosent update itself on sel changed messages
00264         if (pTool!=NULL && !pTool->AreToolBlobsRenderedOnSelection())
00265             pTool->RenderToolBlobs(pSelSpread,NULL);
00266     }
00267 
00268     End();
00269 }

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

Find the state of the SelectNoneOp 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 282 of file selall.cpp.

00283 {
00284     INT32 NumSelObjs=GetApplication()->FindSelection()->Count();
00285 
00286     // If no objects are selected, state this as the reason why it's disabled..
00287     if (NumSelObjs==0)
00288     {
00289         *UIDescription = String_256 (_R(IDS_NO_OBJECTS_SELECTED));
00290     }
00291 
00292     // Never ticked, greyed if no selected objects
00293     return OpState(FALSE, NumSelObjs==0);
00294 }

BOOL SelectNoneOp::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 305 of file selall.cpp.

00306 {
00307     BTNOP(EDITSELECTNONE,SelectNoneOp,EDIT);
00308     return(TRUE);
00309 }


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