OpShowGrid Class Reference

Allows the user to toggle the visible state of all grids. Notes: -. More...

#include <snapops.h>

Inheritance diagram for OpShowGrid:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

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.

Detailed Description

Allows the user to toggle the visible state of all grids. Notes: -.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/2/94

Definition at line 129 of file snapops.h.


Constructor & Destructor Documentation

OpShowGrid::OpShowGrid  ) 
 

Constructor for OpShowGrid operation. It is not undoable.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/2/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: None

Definition at line 184 of file snapops.cpp.

00185 {
00186 }


Member Function Documentation

void OpShowGrid::Do OpDescriptor  )  [virtual]
 

Forces a redraw of the selected DocView and toggles the NodeGrid::RenderFlag flag.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/2/94
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
None

Errors: None

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 }

OpState OpShowGrid::GetState String_256 ,
OpDescriptor
[static]
 

This item is always available, so long as a document is visible.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/2/94
Parameters:
[INPUTS] 
[OUTPUTS] 
Returns:

Errors: None

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 }

BOOL OpShowGrid::Init void   )  [static]
 

Declares op descriptors for show grid toggle op.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/2/94
Parameters:
None [INPUTS]
None [OUTPUTS]
Returns:
TRUE if worked, FALSE if failed (out of memory)

Errors: Returns FALSE on failure. Scope: Static

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 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:58:56 2007 for Camelot by  doxygen 1.4.4