#include <moldtool.h>
Inheritance diagram for OpPastePerspective:
Public Member Functions | |
OpPastePerspective () | |
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 446 of file moldtool.h.
|
Constructor for paste envelope operation.
Definition at line 2413 of file moldtool.cpp.
|
|
Reimplemented from Operation. Definition at line 2549 of file moldtool.cpp. 02550 { 02551 // just call the parent class 02552 OpPasteMouldShape::Do(MOULDSPACE_PERSPECTIVE); 02553 }
|
|
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 2525 of file moldtool.cpp. 02526 { 02527 *OpName = String_256(_R(IDS_UNDO_PASTEPERSPECTIVE)); 02528 }
|
|
For finding the OpPasteMouldShape state.
Definition at line 2472 of file moldtool.cpp. 02473 { 02474 OpState OpSt; 02475 // String_256 DisableReason; 02476 // OpSt.Greyed=(!FindPasteObject(NULL)); 02477 02478 OpSt.Greyed = TRUE; 02479 02480 if (FindPasteObject(NULL)) 02481 { 02482 // Get the selection and the number of selected objects 02483 SelRange* Selected = GetApplication()->FindSelection(); 02484 INT32 Count = Selected->Count(); 02485 02486 // Are there any selected objects? 02487 if (Count > 0) 02488 { 02489 ObjChangeFlags cFlags; 02490 cFlags.DeleteNode = TRUE; 02491 OpPasteEnvelope* op = new OpPasteEnvelope (); // need an op to do correct processing 02492 ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,op); 02493 02494 Node* pNode = Selected->FindFirst(); 02495 OpSt.Greyed = FALSE; 02496 while (pNode != NULL && !OpSt.Greyed) 02497 { 02498 OpSt.Greyed = !pNode->AllowOp(&ObjChange,FALSE); 02499 pNode = Selected->FindNext(pNode); 02500 } 02501 delete (op); 02502 } 02503 } 02504 02505 return(OpSt); 02506 }
|
|
Initialise the paste mould operation so that it can be accessed from the interface.
Reimplemented from SimpleCCObject. Definition at line 2438 of file moldtool.cpp. 02439 { 02440 return (RegisterOpDescriptor(0, // tool ID 02441 _R(IDS_PASTEPERSPECTIVE), // string resource ID 02442 CC_RUNTIME_CLASS(OpPastePerspective), // runtime class for Op 02443 OPTOKEN_PASTEPERSPECTIVE, // Ptr to token string 02444 OpPastePerspective::GetState, // GetState function 02445 0, // help ID 02446 _R(IDBBL_PASTEPERSPECTIVE), // bubble help ID 02447 _R(IDD_MOULDTOOLBAR), // resource ID 02448 _R(IDC_BTN_PASTEPERSPECTIVE), // control ID 02449 SYSTEMBAR_EDIT, // Group bar ID 02450 TRUE, // Receive messages 02451 FALSE, // Smart 02452 FALSE, // Clean 02453 0, // One open Instance ID 02454 (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION) 02455 )); 02456 }
|