#include <moldtool.h>
Inheritance diagram for OpPasteEnvelope:
Public Member Functions | |
OpPasteEnvelope () | |
Constructor for paste envelope operation. | |
void | GetOpName (String_256 *OpName) |
The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies. | |
void | Do (OpDescriptor *) |
Static Public Member Functions | |
static BOOL | Init () |
Initialise the paste mould operation so that it can be accessed from the interface. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpPasteMouldShape state. |
Definition at line 420 of file moldtool.h.
|
Constructor for paste envelope operation.
Definition at line 2257 of file moldtool.cpp.
|
|
Reimplemented from Operation. Definition at line 2393 of file moldtool.cpp. 02394 { 02395 // just call the parent class 02396 OpPasteMouldShape::Do(MOULDSPACE_ENVELOPE); 02397 }
|
|
The GetOpName fn is overridden so that we return back a description appropriate to the type of attribute that the operation applies.
Reimplemented from Operation. Definition at line 2369 of file moldtool.cpp. 02370 { 02371 *OpName = String_256(_R(IDS_UNDO_PASTEENVELOPE)); 02372 }
|
|
For finding the OpPasteMouldShape state.
Definition at line 2316 of file moldtool.cpp. 02317 { 02318 OpState OpSt; 02319 // String_256 DisableReason; 02320 // OpSt.Greyed=(!FindPasteObject(NULL)); 02321 02322 OpSt.Greyed = TRUE; 02323 02324 if (FindPasteObject(NULL)) 02325 { 02326 // Get the selection and the number of selected objects 02327 SelRange* Selected = GetApplication()->FindSelection(); 02328 INT32 Count = Selected->Count(); 02329 02330 // Are there any selected objects? 02331 if (Count > 0) 02332 { 02333 ObjChangeFlags cFlags; 02334 cFlags.DeleteNode = TRUE; 02335 OpPasteEnvelope* op = new OpPasteEnvelope (); // need an op to do correct processing 02336 ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,op); 02337 02338 Node* pNode = Selected->FindFirst(); 02339 OpSt.Greyed = FALSE; 02340 while (pNode != NULL && !OpSt.Greyed) 02341 { 02342 OpSt.Greyed = !pNode->AllowOp(&ObjChange,FALSE); 02343 pNode = Selected->FindNext(pNode); 02344 } 02345 delete (op); 02346 } 02347 } 02348 02349 return(OpSt); 02350 }
|
|
Initialise the paste mould operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 2282 of file moldtool.cpp. 02283 { 02284 return (RegisterOpDescriptor(0, // tool ID 02285 _R(IDS_PASTEENVELOPE), // string resource ID 02286 CC_RUNTIME_CLASS(OpPasteEnvelope), // runtime class for Op 02287 OPTOKEN_PASTEENVELOPE, // Ptr to token string 02288 OpPasteEnvelope::GetState, // GetState function 02289 0, // help ID 02290 _R(IDBBL_PASTEENVELOPE), // bubble help ID 02291 _R(IDD_MOULDTOOLBAR), // resource ID 02292 _R(IDC_BTN_PASTEENVELOPE), // control ID 02293 SYSTEMBAR_EDIT, // Group bar ID 02294 TRUE, // Receive messages 02295 FALSE, // Smart 02296 FALSE, // Clean 02297 0, // One open Instance ID 02298 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION) 02299 )); 02300 }
|