#include <textops.h>
Inheritance diagram for OpTextAutoKern:
Public Member Functions | |
OpTextAutoKern () | |
OpTextAutoKern constructor. | |
virtual void | DoWithParam (OpDescriptor *, OpParam *pParam) |
Set the selected story to use/not use auto kerning. | |
Static Public Member Functions | |
static BOOL | Init () |
OpTextKern initialiser method. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
For finding OpTextKern's state. The Op is greyed if there is no selected caret in the focus story. |
Definition at line 316 of file textops.h.
|
OpTextAutoKern constructor.
Definition at line 1614 of file textops.cpp. 01614 : OpTextUndoable() 01615 { 01616 }
|
|
Set the selected story to use/not use auto kerning.
Reimplemented from Operation. Definition at line 1683 of file textops.cpp. 01684 { 01685 bool NewIsAutoKerning = pOpParam->Param1 != 0; // avoids warning casting to bool 01686 01687 TextStory *pTextStory = TextStory::GetFocusStory(); 01688 BOOL ok = pTextStory != 0; 01689 01690 // causes shadows, contours & bevels to regenerate. 01691 ObjChangeFlags ChangeFlags; 01692 ChangeFlags.RegenerateNode = TRUE; 01693 01694 // Start the TextOp - removes blobs and restores them at the end for us 01695 if (ok) ok = DoStartTextOp(pTextStory); 01696 01697 if (ok) 01698 { 01699 ObjChangeParam ObjChange(OBJCHANGE_STARTING, ChangeFlags, pTextStory, this); 01700 ok = pTextStory->AllowOp(&ObjChange); 01701 } 01702 01703 if (ok) ok = DoInvalidateNodeRegion(pTextStory, TRUE, FALSE); 01704 01705 if (ok) ok = ToggleAutoKerningAction::Init(this, &UndoActions, pTextStory, NewIsAutoKerning) != AC_FAIL; 01706 01707 if (ok) ok = DoInvalidateNodeRegion(pTextStory, TRUE, FALSE); 01708 01709 // Inform all changed nodes that we have finished 01710 // Update all the changed nodes, i.e tell all the parents of the children that have been affected 01711 if (ok) 01712 { 01713 ObjChangeParam ObjChange(OBJCHANGE_FINISHED, ChangeFlags, pTextStory, this); 01714 ok = UpdateChangedNodes(&ObjChange); 01715 } 01716 01717 if (!ok) 01718 FailAndExecute(); 01719 01720 End(); 01721 }
|
|
For finding OpTextKern's state. The Op is greyed if there is no selected caret in the focus story.
Definition at line 1660 of file textops.cpp. 01661 { 01662 OpState OpSt; 01663 01664 if (TextStory::GetFocusStory()) 01665 OpSt.Greyed = FALSE; 01666 else 01667 OpSt.Greyed = TRUE; 01668 01669 return OpSt; 01670 }
|
|
OpTextKern initialiser method.
Reimplemented from SimpleCCObject. Definition at line 1630 of file textops.cpp. 01631 { 01632 return (RegisterOpDescriptor(0, // Tool ID 01633 _R(IDS_AUTOKERNOP), // Resource ID 01634 CC_RUNTIME_CLASS(OpTextAutoKern), // Runtime class 01635 OPTOKEN_AUTOKERNTEXT, // Token string 01636 OpTextAutoKern::GetState, // Get state function 01637 0, // Help ID 01638 0, // Bubble help 01639 0, // Resource ID 01640 0, // Control ID 01641 SYSTEMBAR_ILLEGAL, // System bar group ID 01642 TRUE, // Receive messages 01643 FALSE, // Smart 01644 FALSE, // Clean 01645 0, // OneOpenInstID 01646 GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION | DONT_GREY_WHEN_SELECT_INSIDE // Auto state flags 01647 )); 01648 }
|