#include <textops.h>
Inheritance diagram for OpApplyJustificationToStory:
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. |
Definition at line 430 of file textops.h.
|
Definition at line 435 of file textops.h.
|
|
Returns the greying state of the operation, greyed if there are no text stories selected.
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 }
|
|
Initialises all the justification options on the TextStory pop-up menu.
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 }
|