EditSelectionOp Class Reference

The Select All operation. More...

#include <editsel.h>

Inheritance diagram for EditSelectionOp:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 EditSelectionOp ()
 Constructs a new EditSelectionOp 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 EditSelectionOp 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 127 of file editsel.h.


Constructor & Destructor Documentation

EditSelectionOp::EditSelectionOp  ) 
 

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

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/01/2004

Definition at line 134 of file editsel.cpp.

00134                                 : Operation()
00135 {
00136 }


Member Function Documentation

void EditSelectionOp::Do OpDescriptor  )  [virtual]
 

Actually "DO" a select all operation.

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

Reimplemented from Operation.

Definition at line 148 of file editsel.cpp.

00149 {
00150     Range* pSelection = GetApplication()->FindSelection();
00151 
00152     if (pSelection)
00153     {
00154         Node* pNode = pSelection->FindFirst();
00155         if (pNode)
00156         {
00157             TCHAR* pOpToken = pNode->GetDefaultOpToken();
00158             if (pOpToken)
00159             {
00160                 OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(pOpToken);
00161                 if (pOpDesc)
00162                 {
00163                     pOpDesc->Invoke();
00164                     return;
00165                 }
00166             }
00167         }
00168     }
00169 
00170     End();
00171 }

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

Find the state of the EditSelectionOp operation.

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

Definition at line 184 of file editsel.cpp.

00185 {
00186     INT32 NumSelObjs=GetApplication()->FindSelection()->Count();
00187 
00188     // If no objects are selected, state this as the reason why it's disabled..
00189     if (NumSelObjs==0)
00190     {
00191         *UIDescription = String_256(_R(IDS_NO_OBJECTS_SELECTED));
00192     }
00193 
00194     // Never ticked, greyed if no selected objects
00195     return OpState(FALSE, NumSelObjs==0);
00196 }

BOOL EditSelectionOp::Init void   )  [static]
 

Create an OpDescriptor for the Select All operation.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/01/2004

Reimplemented from SimpleCCObject.

Definition at line 207 of file editsel.cpp.

00208 {
00209     BTNOP(EDIT_EDITSELECTION,EditSelectionOp,EDIT);
00210     return(TRUE);
00211 }


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