OpAffectFontChange Class Reference

An operation to update all text stories in all documents. More...

#include <textops.h>

Inheritance diagram for OpAffectFontChange:

OpApplyGlobalAffect Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

void DoAffectFontChange ()
 Scans all documents, asking all text objects to reformat themselves on this font change. This is performed as a none undoable operation so that the allow op system can be used to update all parents.

Static Public Member Functions

static BOOL Init ()
 OpApplyGlobalAffect initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpApplyGlobalAffect's state.

Protected Member Functions

virtual void AffectNode (Document *, Node *, ObjChangeParam *)
 Throw away undo/redo history unless the document is known not to be affected by the font substitution (this can only be ascertained by the font gallery) Also, call AllowOp() on TextStories to let them know of the potential change.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpAffectFontChange)

Detailed Description

An operation to update all text stories in all documents.

class CCAPI OpAffectFontChange : public OpApplyGlobalAffect

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/96

Definition at line 1010 of file textops.h.


Member Function Documentation

void OpAffectFontChange::AffectNode Document pDocument,
Node pNode,
ObjChangeParam pObjChange
[protected, virtual]
 

Throw away undo/redo history unless the document is known not to be affected by the font substitution (this can only be ascertained by the font gallery) Also, call AllowOp() on TextStories to let them know of the potential change.

Author:
Ed_Cornes (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/8/96
Parameters:
pDocument = a pointer to the document currently being scanned [INPUTS] pNode = a pointer to the node the scan is at (going up the tree) pObjChange = a pointer to a user change parameter

Reimplemented from OpApplyGlobalAffect.

Definition at line 6187 of file textops.cpp.

06188 {
06189     // throw away undo for all docs
06190     if (IS_A(pNode,NodeDocument))
06191     {
06192         pDocument->GetOpHistory().DeleteUndoableOps();
06193         pDocument->GetOpHistory().DeleteRedoableOps();
06194     }
06195 
06196     if (IS_A(pNode,TextStory))
06197         ((TextStory*)pNode)->AllowOp(pObjChange);
06198 }

OpAffectFontChange::CC_DECLARE_DYNCREATE OpAffectFontChange   )  [private]
 

void OpAffectFontChange::DoAffectFontChange  ) 
 

Scans all documents, asking all text objects to reformat themselves on this font change. This is performed as a none undoable operation so that the allow op system can be used to update all parents.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/96
Parameters:
- [INPUTS]

Definition at line 6159 of file textops.cpp.

06160 {
06161     ObjChangeFlags cFlags;
06162     cFlags.Attribute = TRUE;
06163     ObjChangeParam ObjChange(OBJCHANGE_STARTING,cFlags,NULL,NULL);
06164 
06165     BeginSlowJob();
06166     DoAffectChange(&ObjChange);
06167     EndSlowJob();
06168     End();
06169 }

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

For finding the OpApplyGlobalAffect's state.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/96
Returns:
The state of the OpApplyGlobalAffect operation

Definition at line 6141 of file textops.cpp.

06142 {
06143     OpState OpSt;
06144     return (OpSt);
06145 }

BOOL OpAffectFontChange::Init void   )  [static]
 

OpApplyGlobalAffect initialiser method.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/01/96
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 6119 of file textops.cpp.

06120 {
06121     return (RegisterOpDescriptor(   0,
06122                                     0,
06123                                     CC_RUNTIME_CLASS(OpAffectFontChange),
06124                                     OPTOKEN_AFFECTFONTCHANGE,
06125                                     OpAffectFontChange::GetState,
06126                                     0,  /* help ID */
06127                                     0,
06128                                     0   /* bitmap ID */));
06129 }               


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