#include <snapops.h>
Inheritance diagram for OpSnapToGuides:
Public Member Functions | |
OpSnapToGuides () | |
Constructor for OpSnapToGuides operation. It is not undoable. | |
void | Do (OpDescriptor *) |
Toggles the "snap to guides" flag in the selected DocView. | |
Static Public Member Functions | |
static BOOL | Init () |
Declares op descriptors for snap to guides toggle op. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
This item is always available, so long as a document is visible. |
Definition at line 206 of file snapops.h.
|
Constructor for OpSnapToGuides operation. It is not undoable.
Definition at line 546 of file snapops.cpp.
|
|
Toggles the "snap to guides" flag in the selected DocView.
Reimplemented from Operation. Definition at line 564 of file snapops.cpp. 00565 { 00566 DocView *pDocView = DocView::GetSelected(); 00567 00568 if (pDocView != NULL) 00569 pDocView->SetSnapToGuidesState(!pDocView->GetSnapToGuidesState()); 00570 00571 End(); 00572 }
|
|
This item is always available, so long as a document is visible.
Definition at line 588 of file snapops.cpp. 00589 { 00590 OpState OpSt; 00591 00592 DocView *pDocView = DocView::GetSelected(); 00593 if (pDocView != NULL) 00594 OpSt.Ticked = pDocView->GetSnapToGuidesState(); 00595 00596 Spread* pSpread = Document::GetSelectedSpread(); 00597 if (pSpread != NULL) 00598 { 00599 // if we have a guide layer, then make the menu item available, if not, grey it 00600 // and give a reason. 00601 if (pSpread->FindFirstGuideLayer() != NULL) 00602 { 00603 OpSt.Greyed = FALSE; 00604 } 00605 else 00606 { 00607 OpSt.Greyed = TRUE; 00608 *pUIDescription = String_256 (_R(IDS_NO_GUIDES)); 00609 } 00610 } 00611 00612 return OpSt; 00613 }
|
|
Declares op descriptors for snap to guides toggle op.
Reimplemented from SimpleCCObject. Definition at line 510 of file snapops.cpp. 00511 { 00512 return RegisterOpDescriptor(0, // Tool ID 00513 _R(IDS_SNAPTOGUIDES), // String resource ID 00514 CC_RUNTIME_CLASS(OpSnapToGuides),// Runtime class 00515 OPTOKEN_SNAPTOGUIDES, // Token string 00516 GetState, // GetState function 00517 0, // help ID 00518 _R(IDBBL_SNAPTOGUIDES), // Bubble ID 00519 _R(IDD_BARCONTROLSTORE), // resource ID 00520 0, // control ID 00521 SYSTEMBAR_WINDOW, // Bar ID 00522 TRUE, // Recieve system messages 00523 FALSE, // Smart duplicate operation 00524 TRUE, // Clean operation 00525 0, // No vertical counterpart 00526 0, // String for one copy only error 00527 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC), // Auto state flags 00528 TRUE // fCheckable 00529 ); 00530 }
|