#include <snapops.h>
Inheritance diagram for OpShowGrid:
Public Member Functions | |
OpShowGrid () | |
Constructor for OpShowGrid operation. It is not undoable. | |
void | Do (OpDescriptor *) |
Forces a redraw of the selected DocView and toggles the NodeGrid::RenderFlag flag. | |
Static Public Member Functions | |
static BOOL | Init () |
Declares op descriptors for show grid toggle op. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
This item is always available, so long as a document is visible. |
Definition at line 129 of file snapops.h.
|
Constructor for OpShowGrid operation. It is not undoable.
Definition at line 184 of file snapops.cpp.
|
|
Forces a redraw of the selected DocView and toggles the NodeGrid::RenderFlag flag.
Reimplemented from Operation. Definition at line 202 of file snapops.cpp. 00203 { 00204 DocView *pDocView = DocView::GetSelected(); 00205 00206 if (pDocView != NULL) 00207 { 00208 if (Tool::GetCurrentID() != TOOLID_GRID) 00209 NodeGrid::ForceRedrawAllGrids(); 00210 00211 pDocView->SetShowGridState(!pDocView->GetShowGridState()); 00212 } 00213 00214 End(); 00215 }
|
|
This item is always available, so long as a document is visible.
Definition at line 231 of file snapops.cpp. 00232 { 00233 OpState OpSt; 00234 00235 DocView *pDocView = DocView::GetSelected(); 00236 if (pDocView != NULL) 00237 OpSt.Ticked = pDocView->GetShowGridState(); 00238 00239 return OpSt; 00240 }
|
|
Declares op descriptors for show grid toggle op.
Reimplemented from SimpleCCObject. Definition at line 148 of file snapops.cpp. 00149 { 00150 return RegisterOpDescriptor( 0, // Tool ID 00151 _R(IDS_SHOWGRID), // String resource ID 00152 CC_RUNTIME_CLASS(OpShowGrid),// Runtime class 00153 OPTOKEN_SHOWGRID, // Token string 00154 GetState, // GetState function 0, // help ID 00155 0, // help ID 00156 _R(IDBBL_SHOWGRIDOP), // bubble help 00157 _R(IDD_BARCONTROLSTORE), // resource ID 00158 _R(IDC_BTN_WINDOWGRID), // control ID 00159 SYSTEMBAR_WINDOW, // Bar ID 00160 TRUE, // Recieve system messages 00161 FALSE, // Smart duplicate operation 00162 TRUE, // Clean operation 00163 0, // No vertical counterpart 00164 0, // String for one copy only error 00165 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC), // Auto state flags 00166 TRUE // fCheckable 00167 ); 00168 }
|