#include <textops.h>
Inheritance diagram for StorePathIndentAction:
Public Member Functions | |
StorePathIndentAction () | |
Constructor for StorePathIndentAction. Initialises the member variables. | |
~StorePathIndentAction () | |
Destructor for StorePathIndentAction. | |
virtual ActionCode | Execute () |
This action inserts the opposite StorePathIndentAction for redo purposes, then set the indent in the TextStory to the stored value. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, TextStory *pStory, MILLIPOINT LeftIndent, MILLIPOINT RightIndent, MILLIPOINT StoryWidth) |
Sets up the action to store a text story path indent. | |
static BOOL | DoStoreIndent (Operation *pOp, ActionList *pActionList, TextStory *pStory) |
Call this function to store the current text story path indent value before changing it. | |
Protected Attributes | |
TextStory * | mpTextStory |
MILLIPOINT | mLeftIndentLength |
MILLIPOINT | mRightIndentLength |
MILLIPOINT | mStoryWidth |
Definition at line 756 of file textops.h.
|
Constructor for StorePathIndentAction. Initialises the member variables.
Definition at line 5867 of file textops.cpp. 05868 { 05869 mpTextStory = NULL; 05870 mLeftIndentLength = 0; 05871 mRightIndentLength = 0; 05872 mStoryWidth = 0; 05873 }
|
|
Destructor for StorePathIndentAction.
Definition at line 5884 of file textops.cpp.
|
|
Call this function to store the current text story path indent value before changing it.
Definition at line 5991 of file textops.cpp. 05992 { 05993 // Salary check 05994 ERROR2IF(pStory == NULL, FALSE, "The TextStory pointer is NULL"); 05995 05996 // Create an action for this 05997 ActionCode Act; 05998 Act = StorePathIndentAction::Init(pOp, pActionList, pStory, pStory->GetLeftIndent(), pStory->GetRightIndent(), pStory->GetStoryWidth()); 05999 06000 return (Act != AC_FAIL); 06001 }
|
|
This action inserts the opposite StorePathIndentAction for redo purposes, then set the indent in the TextStory to the stored value.
Reimplemented from Action. Definition at line 5900 of file textops.cpp. 05901 { 05902 // Salary checks 05903 ERROR2IF(mpTextStory == NULL, AC_FAIL, "The TextStory pointer is NULL"); 05904 05905 // Create a redo action for this action, which is also a StorePathIndentAction 05906 ActionCode Act; 05907 Act = StorePathIndentAction::Init(pOperation, 05908 pOppositeActLst, 05909 mpTextStory, 05910 mpTextStory->GetLeftIndent(), 05911 mpTextStory->GetRightIndent(), 05912 mpTextStory->GetStoryWidth()); 05913 05914 // Now undo 05915 if (Act != AC_FAIL) 05916 { 05917 mpTextStory->SetLeftIndent(mLeftIndentLength); 05918 mpTextStory->SetRightIndent(mRightIndentLength); 05919 mpTextStory->SetStoryWidth(mStoryWidth); 05920 } 05921 05922 return Act; 05923 }
|
|
Sets up the action to store a text story path indent.
Definition at line 5947 of file textops.cpp. 05953 { 05954 // Salary check 05955 ERROR2IF(pStory == NULL, AC_FAIL, "TextStory pointer was NULL"); 05956 05957 // Create the new action 05958 UINT32 ActSize = sizeof(StorePathIndentAction); 05959 StorePathIndentAction* pNewAction = NULL; 05960 ActionCode Ac = Action::Init( pOp, pActionList, ActSize, CC_RUNTIME_CLASS(StorePathIndentAction), (Action**)&pNewAction); 05961 05962 // Fill in its data 05963 if ((Ac == AC_OK) && (pNewAction != NULL)) 05964 { 05965 pNewAction->mpTextStory = pStory; 05966 pNewAction->mLeftIndentLength = LeftIndent; 05967 pNewAction->mRightIndentLength = RightIndent; 05968 pNewAction->mStoryWidth = StoryWidth; 05969 } 05970 05971 return Ac; 05972 }
|
|
|
|
|
|
|
|
|