OpTogglePrintTextAsShapes Class Reference

This operation toggles the state of the "print text as shapes flag" in selected TextStories. More...

#include <textops.h>

Inheritance diagram for OpTogglePrintTextAsShapes:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpTogglePrintTextAsShapes ()
virtual void Do (OpDescriptor *)
 Toggles the state of PrintAsShapes flag of the first selected TextStory, and sets the state of the remaining selected stories to the same.

Static Public Member Functions

static BOOL Init ()
 Registers this op.
static OpState GetState (String_256 *, OpDescriptor *)
 The state of the operation.

Detailed Description

This operation toggles the state of the "print text as shapes flag" in selected TextStories.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/05/95

Definition at line 362 of file textops.h.


Constructor & Destructor Documentation

OpTogglePrintTextAsShapes::OpTogglePrintTextAsShapes  )  [inline]
 

Definition at line 367 of file textops.h.

00367 {};                             


Member Function Documentation

void OpTogglePrintTextAsShapes::Do OpDescriptor  )  [virtual]
 

Toggles the state of PrintAsShapes flag of the first selected TextStory, and sets the state of the remaining selected stories to the same.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/05/95
Parameters:
Unused [INPUTS]

Reimplemented from Operation.

Definition at line 4941 of file textops.cpp.

04942 {
04943     SelRange* pSelection = GetApplication()->FindSelection();
04944     TextStory* pStory = (TextStory*)pSelection->FindFirstObject(CC_RUNTIME_CLASS(TextStory));
04945 
04946     if (pStory != NULL)
04947     {
04948         BOOL NewState = !pStory->IsPrintingAsShapes();
04949 
04950         while (pStory != NULL)
04951         {
04952             pStory->SetPrintingAsShapes(NewState);
04953 
04954             pStory = (TextStory*)pSelection->FindNextObject(CC_RUNTIME_CLASS(TextStory), pStory);
04955         }
04956     }
04957 }

OpState OpTogglePrintTextAsShapes::GetState String_256 ,
OpDescriptor
[static]
 

The state of the operation.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
31/05/95
Parameters:
Unused [INPUTS]
Returns:
Returns the state of the operation, greying and ticking

Definition at line 4909 of file textops.cpp.

04910 {
04911     OpState os;
04912 
04913     SelRange* pSelection = GetApplication()->FindSelection();
04914     TextStory* pStory = (TextStory*)pSelection->FindFirstObject(CC_RUNTIME_CLASS(TextStory));
04915 
04916     if (pStory != NULL)
04917     {
04918         os.Greyed = FALSE;
04919         os.Ticked = pStory->IsPrintingAsShapes();
04920     }
04921     else
04922     {
04923         os.Greyed = TRUE;
04924         os.Ticked = FALSE;
04925     }
04926 
04927     return os;
04928 }

BOOL OpTogglePrintTextAsShapes::Init void   )  [static]
 

Registers this op.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
25/01/95
Returns:
TRUE if the op is correctly registered.

Reimplemented from SimpleCCObject.

Definition at line 4889 of file textops.cpp.

04890 {
04891     return RegisterOpDescriptor(0, 
04892                                 _R(IDS_OPTOGGLEPRINTTEXTASCURVES),
04893                                 CC_RUNTIME_CLASS(OpTogglePrintTextAsShapes),
04894                                 OPTOKEN_TOGGLEPRINTASSHAPES, 
04895                                 OpTogglePrintTextAsShapes::GetState);
04896 }


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