OpApplyJustificationToStory Class Reference

This operation is the base class of the operations that sit on the TextStory pop-up menu. More...

#include <textops.h>

Inheritance diagram for OpApplyJustificationToStory:

Operation MessageHandler ListItem CCObject SimpleCCObject OpApplyCentreJustifyToStory OpApplyFullJustifyToStory OpApplyLeftJustifyToStory OpApplyRightJustifyToStory List of all members.

Public Member Functions

 OpApplyJustificationToStory ()

Static Public Member Functions

static BOOL Init ()
 Initialises all the justification options on the TextStory pop-up menu.
static OpState GetState (String_256 *, OpDescriptor *)
 Returns the greying state of the operation, greyed if there are no text stories selected.

Detailed Description

This operation is the base class of the operations that sit on the TextStory pop-up menu.

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

Definition at line 430 of file textops.h.


Constructor & Destructor Documentation

OpApplyJustificationToStory::OpApplyJustificationToStory  )  [inline]
 

Definition at line 435 of file textops.h.

00435 {};                             


Member Function Documentation

OpState OpApplyJustificationToStory::GetState String_256 pUIDesc,
OpDescriptor pOpDesc
[static]
 

Returns the greying state of the operation, greyed if there are no text stories selected.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/04/95
Returns:
Tick/Grey state for the op

Definition at line 4420 of file textops.cpp.

04421 {
04422     OpState OpSt;
04423 
04424     SelRange* pSelection = GetApplication()->FindSelection();
04425     Node* pNode = pSelection->FindFirst();
04426     
04427     // Search the SelRange for a selected TextStory
04428     BOOL FoundSelStory = FALSE;
04429     while (pNode != NULL)
04430     {
04431         if (IS_A(pNode, TextStory))
04432         {
04433             FoundSelStory = TRUE;
04434             break;
04435         }
04436 
04437         pNode = pSelection->FindNext(pNode);
04438     }
04439 
04440     OpSt.Greyed = !FoundSelStory;
04441 
04442     return OpSt;
04443 }       

BOOL OpApplyJustificationToStory::Init void   )  [static]
 

Initialises all the justification options on the TextStory pop-up menu.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
27/04/95
Returns:
TRUE/FALSE for success/failure

Reimplemented from SimpleCCObject.

Definition at line 4381 of file textops.cpp.

04382 {
04383     BOOL ok = TRUE;
04384 
04385     ok = ok && RegisterOpDescriptor(0,
04386                                     _R(IDS_APPLYLEFTJUSTIFY),
04387                                     CC_RUNTIME_CLASS(OpApplyLeftJustifyToStory),
04388                                     OPTOKEN_APPLYLEFTJUSTIFY,
04389                                     OpApplyJustificationToStory::GetState);
04390     ok = ok && RegisterOpDescriptor(0,
04391                                     _R(IDS_APPLYCENTREJUSTIFY),
04392                                     CC_RUNTIME_CLASS(OpApplyCentreJustifyToStory),
04393                                     OPTOKEN_APPLYCENTREJUSTIFY,
04394                                     OpApplyJustificationToStory::GetState);
04395     ok = ok && RegisterOpDescriptor(0,
04396                                     _R(IDS_APPLYRIGHTJUSTIFY),
04397                                     CC_RUNTIME_CLASS(OpApplyRightJustifyToStory),
04398                                     OPTOKEN_APPLYRIGHTJUSTIFY,
04399                                     OpApplyJustificationToStory::GetState);
04400     ok = ok && RegisterOpDescriptor(0,
04401                                     _R(IDS_APPLYFULLJUSTIFY),
04402                                     CC_RUNTIME_CLASS(OpApplyFullJustifyToStory),
04403                                     OPTOKEN_APPLYFULLJUSTIFY,
04404                                     OpApplyJustificationToStory::GetState);
04405 
04406     return ok;
04407 }


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