#include <penedit.h>
Inheritance diagram for OpAddPathToPath:
Public Member Functions | |
OpAddPathToPath () | |
OpAddPathToPath constructor. | |
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 | DoAddPathToPath (NodePath *pDestinNode, Path *pAddPath, INT32 index) |
This operation is called to update an existing path. If successful it will create a new node, copy the contents of pElement into it and apply the current attributes to it. | |
Static Public Member Functions | |
static BOOL | Init () |
OpAddPathToPath initialiser method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding the OpAddPathToPath's state. |
Definition at line 574 of file penedit.h.
|
OpAddPathToPath constructor.
Definition at line 2820 of file penedit.cpp.
|
|
This operation is called to update an existing path. If successful it will create a new node, copy the contents of pElement into it and apply the current attributes to it.
Definition at line 2924 of file penedit.cpp. 02925 { 02926 #ifndef STANDALONE 02927 02928 BeginSlowJob(); 02929 02930 DoStartSelOp(TRUE,TRUE); 02931 02932 DocView* pDocView = DocView::GetSelected(); 02933 ERROR2IF( pDocView == NULL, (void)0, "There was no selected docview when augmenting a path" ); 02934 02935 // Save the bounds of the path for undo/redo 02936 if (RecalcBoundsAction::DoRecalc(this, &UndoActions, pNode) == AC_FAIL) 02937 { 02938 FailAndExecute(); 02939 End(); 02940 return; 02941 } 02942 02943 // Go and copy the edited path to the end of the original 02944 02945 ExecuteType Exe = AugmentPathWithPath(pElement, pNode, index); 02946 if (Exe != ExeNone) 02947 { 02948 InformError( _R(IDS_OUT_OF_MEMORY), _R(IDS_OK) ); 02949 if (Exe == ExeInclusive) 02950 FailAndExecute(); 02951 if (Exe == ExeExclusive) 02952 FailAndExecuteAllButLast(); 02953 End(); 02954 return; 02955 } 02956 02957 // Recalculate the path's bounding box 02958 pNode->InvalidateBoundingRect(); 02959 02960 // tell the world that something in the selection has changed 02961 // so that selection bounds are updated 02962 GetApplication()->FindSelection()->Update(TRUE); 02963 02964 // record new bounds action undo/redo 02965 if (RecordBoundsAction::DoRecord(this, &UndoActions, pNode) == AC_FAIL) 02966 { 02967 FailAndExecute(); 02968 End(); 02969 return; 02970 } 02971 02972 #endif 02973 End(); 02974 }
|
|
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 2898 of file penedit.cpp. 02899 { 02900 *OpName = String_256(_R(IDS_UNDO_ADDPATHTOPATHOP)); 02901 }
|
|
For finding the OpAddPathToPath's state.
Definition at line 2874 of file penedit.cpp. 02875 { 02876 OpState OpSt; 02877 return OpSt; 02878 }
|
|
OpAddPathToPath initialiser method.
Reimplemented from SimpleCCObject. Definition at line 2844 of file penedit.cpp. 02845 { 02846 return (RegisterOpDescriptor(0, // tool ID 02847 _R(IDS_ADDPATHTOPATHOP), // string resource ID 02848 CC_RUNTIME_CLASS(OpAddPathToPath), // runtime class for Op 02849 OPTOKEN_ADDPATHTOPATH, // Ptr to token string 02850 OpAddPathToPath::GetState, // GetState function 02851 0, // help ID = 0 02852 _R(IDBBL_ADDPATHTOPATHOP), // bubble help ID = 0 02853 0 // resource ID = 0 02854 )); 02855 02856 }
|