#include <textops.h>
Inheritance diagram for ToggleAutoKerningAction:
Public Member Functions | |
ToggleAutoKerningAction () | |
Constructor for the action. | |
virtual ActionCode | Execute () |
Executes the action. Uses Init() to undo/redo the action. | |
Static Public Member Functions | |
static ActionCode | Init (Operation *pOp, ActionList *pActionList, TextStory *pStory, BOOL NewIsAutoKerning) |
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation. | |
Protected Attributes | |
TextStory * | pTextStory |
bool | OldIsAutoKerning |
Definition at line 604 of file textops.h.
|
Constructor for the action.
Definition at line 6212 of file textops.cpp. 06213 { 06214 pTextStory = 0; 06215 OldIsAutoKerning = FALSE; 06216 }
|
|
Executes the action. Uses Init() to undo/redo the action.
Reimplemented from Action. Definition at line 6285 of file textops.cpp. 06286 { 06287 ActionCode Act; 06288 06289 Act = ToggleAutoKerningAction::Init(pOperation, 06290 pOppositeActLst, 06291 pTextStory, 06292 OldIsAutoKerning); 06293 06294 return Act; 06295 }
|
|
This is the function which creates an instance of this action. If there is no room in the undo buffer (which is determined by the base class Init function called within) the function will either return AC_NO_RECORD which means the operation can continue, but no undo information needs to be stored, or AC_OK which means the operation should continue AND record undo information. If the function returns AC_FAIL, there was not enough memory to record the undo information, and the user has decided not to continue with the operation.
Definition at line 6243 of file textops.cpp. 06247 { 06248 ERROR2IF(pStory==0,AC_FAIL,"pStory was NULL"); 06249 06250 UINT32 ActSize = sizeof(ToggleAutoKerningAction); 06251 06252 ToggleAutoKerningAction* pNewAction = NULL; 06253 06254 ActionCode Ac = Action::Init( pOp, 06255 pActionList, 06256 ActSize, 06257 CC_RUNTIME_CLASS(ToggleAutoKerningAction), 06258 (Action**)&pNewAction); 06259 06260 if ((Ac != AC_FAIL) && (pNewAction != NULL)) 06261 { 06262 ERROR2IF(pStory == NULL,AC_FAIL,"TextStory pointer was NULL"); 06263 pNewAction->pTextStory = pStory; 06264 pNewAction->OldIsAutoKerning = !NewIsAutoKerning; 06265 06266 pStory->SetAutoKerning(NewIsAutoKerning); 06267 pStory->FlagNodeAndDescendantsModifiedByOpAndParentsHaveDescendantModifiedByOp(); 06268 pStory->FormatAndChildren(NULL,FALSE); 06269 } 06270 06271 return Ac; 06272 }
|
|
|
|
|