#include <guides.h>
Inheritance diagram for OpDeleteAllGuidelines:
Public Member Functions | |
OpDeleteAllGuidelines () | |
Default constructor. | |
~OpDeleteAllGuidelines () | |
Default destructor. | |
virtual void | Do (OpDescriptor *pOpDesc) |
Creates then opens the dialog. | |
Static Public Member Functions | |
static OpState | GetState (String_256 *Description, OpDescriptor *) |
Func for determining the usability of this op. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpDeleteAllGuidelines) |
Definition at line 382 of file guides.h.
|
Default constructor.
Definition at line 2456 of file guides.cpp.
|
|
Default destructor.
Definition at line 2475 of file guides.cpp.
|
|
|
|
Creates then opens the dialog.
Reimplemented from Operation. Definition at line 2494 of file guides.cpp. 02495 { 02496 BOOL ok = FALSE; 02497 02498 Spread* pSpread = Document::GetSelectedSpread(); 02499 if (pSpread != NULL) 02500 { 02501 Layer* pLayer = pSpread->FindFirstGuideLayer(); 02502 if (pLayer != NULL) 02503 { 02504 ok = TRUE; 02505 Node* pNode = pLayer->FindFirstChild(CC_RUNTIME_CLASS(NodeGuideline)); 02506 while (pNode != NULL) 02507 { 02508 Node* pNextNode = pNode->FindNext(CC_RUNTIME_CLASS(NodeGuideline)); 02509 ok = ok && DoDeleteGuideline((NodeGuideline*)pNode); 02510 pNode = pNextNode; 02511 } 02512 } 02513 } 02514 02515 if (!ok) 02516 FailAndExecute(); 02517 else 02518 BroadcastGuidelineChanges(pSpread->FindFirstGuideLayer()); 02519 02520 End(); 02521 }
|
|
Func for determining the usability of this op.
Reimplemented from OpGuideline. Definition at line 2538 of file guides.cpp. 02539 { 02540 OpState State(FALSE,TRUE); // Greyed out by default 02541 02542 Spread* pSpread = Document::GetSelectedSpread(); 02543 if (pSpread != NULL) 02544 { 02545 Layer* pLayer = pSpread->FindFirstGuideLayer(); 02546 if (pLayer != NULL) 02547 { 02548 Node* pNode = pLayer->FindFirstChild(CC_RUNTIME_CLASS(NodeGuideline)); 02549 State.Greyed = (pNode == NULL); // Ungrey if there are one or more guidelines 02550 } 02551 } 02552 02553 if (State.Greyed) 02554 Description->Load(_R(IDS_OPDELETEALLGUIDESGREY)); 02555 02556 return State; 02557 }
|