#include <editsel.h>
Inheritance diagram for EditSelectionOp:
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. |
Definition at line 127 of file editsel.h.
|
Constructs a new EditSelectionOp object: setting default operation flags, and adding it to the Live list.
Definition at line 134 of file editsel.cpp. 00134 : Operation() 00135 { 00136 }
|
|
Actually "DO" a select all operation.
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 }
|
|
Find the state of the EditSelectionOp operation.
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 }
|
|
Create an OpDescriptor for the Select All operation.
Reimplemented from SimpleCCObject. Definition at line 207 of file editsel.cpp. 00208 { 00209 BTNOP(EDIT_EDITSELECTION,EditSelectionOp,EDIT); 00210 return(TRUE); 00211 }
|