#include <snapops.h>
Inheritance diagram for OpSnapToGrid:
Public Member Functions | |
OpSnapToGrid () | |
Constructor for OpSnapToGrid operation. It is not undoable. | |
void | Do (OpDescriptor *) |
Toggles the "snap to grid" flag in the selected DocView. | |
Static Public Member Functions | |
static BOOL | Init () |
Declares op descriptors for snap to grid toggle op. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
This item is always available, so long as a document is visible. |
Definition at line 154 of file snapops.h.
|
Constructor for OpSnapToGrid operation. It is not undoable.
Definition at line 298 of file snapops.cpp.
|
|
Toggles the "snap to grid" flag in the selected DocView.
Reimplemented from Operation. Definition at line 316 of file snapops.cpp. 00317 { 00318 DocView *pDocView = DocView::GetSelected(); 00319 00320 if (pDocView != NULL) 00321 pDocView->SetSnapToGridState(!pDocView->GetSnapToGridState()); 00322 00323 End(); 00324 }
|
|
This item is always available, so long as a document is visible.
Definition at line 340 of file snapops.cpp. 00341 { 00342 OpState OpSt; 00343 00344 DocView *pDocView = DocView::GetSelected(); 00345 if (pDocView != NULL) 00346 OpSt.Ticked = pDocView->GetSnapToGridState(); 00347 00348 return OpSt; 00349 }
|
|
Declares op descriptors for snap to grid toggle op.
Reimplemented from SimpleCCObject. Definition at line 262 of file snapops.cpp. 00263 { 00264 return RegisterOpDescriptor(0, // tool id 00265 _R(IDS_SNAPTOGRID), // String resource ID 00266 CC_RUNTIME_CLASS(OpSnapToGrid),// Runtime class 00267 OPTOKEN_SNAPTOGRID, // Token string 00268 GetState, // GetState function 0, // help ID 00269 0, // help ID 00270 _R(IDBBL_SNAPTOGRIDOP), // bubble help 00271 _R(IDD_BARCONTROLSTORE), // resource ID 00272 _R(IDC_BTN_WINDOWSNAP), // control ID 00273 SYSTEMBAR_WINDOW, // Bar ID 00274 TRUE, // Recieve system messages 00275 FALSE, // Smart duplicate operation 00276 TRUE, // Clean operation 00277 0, // No vertical counterpart 00278 0, // String for one copy only error 00279 (DONT_GREY_WHEN_SELECT_INSIDE | GREY_WHEN_NO_CURRENT_DOC), // Auto state flags 00280 TRUE // fCheckable 00281 ); 00282 }
|