OpTextAutoKern Class Reference

This Operation applies autokern to the FocusStory. More...

#include <textops.h>

Inheritance diagram for OpTextAutoKern:

OpTextUndoable SelOperation UndoableOperation Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

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.

Detailed Description

This Operation applies autokern to the FocusStory.

Author:
Jonathan_Payne (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/2000

Definition at line 316 of file textops.h.


Constructor & Destructor Documentation

OpTextAutoKern::OpTextAutoKern  ) 
 

OpTextAutoKern constructor.

Author:
Jonathan_Payne (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/2000

Definition at line 1614 of file textops.cpp.

01614                               : OpTextUndoable()                                
01615 {                              
01616 }


Member Function Documentation

void OpTextAutoKern::DoWithParam OpDescriptor ,
OpParam pOpParam
[virtual]
 

Set the selected story to use/not use auto kerning.

Author:
Jonathan_Payne (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/2000
Parameters:
OpDescriptor (unused) [INPUTS] pOpParam->Param1 = Autokerning? pOpParam->Param2 = (unused)

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 }

OpState OpTextAutoKern::GetState String_256 UIDescription,
OpDescriptor
[static]
 

For finding OpTextKern's state. The Op is greyed if there is no selected caret in the focus story.

Author:
Jonathan_Payne (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/2000
Returns:
The state of the OpTextKern

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 }

BOOL OpTextAutoKern::Init void   )  [static]
 

OpTextKern initialiser method.

Author:
Jonathan_Payne (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/10/2000
Returns:
TRUE if the operation could be successfully initialised FALSE if no more memory could be allocated

Errors: ERROR will be called if there was insufficient memory to allocate the operation.

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 }               


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:59:01 2007 for Camelot by  doxygen 1.4.4