OpZoomTo100 Class Reference

This op has been written so that we can use the NumPad Plus key to fire off a zoom in operation. We can`t use the zoom op directly as the hotkey code calls the Do() function instead of the DoWithParam(). What this class does is basically call the ZoomOps DoWithParam() from it`s Do() function. More...

#include <zoomops.h>

Inheritance diagram for OpZoomTo100:

OpZoom OpCentredDragBox OpDragBox Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpZoomTo100 ()
virtual void Do (OpDescriptor *)
 Calls the base class function to zoom to 100!

Static Public Member Functions

static BOOL Init ()
 Initialises the OpDragBox base-class drag operation. Loads preferences.
static OpState GetState (String_256 *Description, OpDescriptor *)
 Func for determining the usability of this op.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpZoomTo100)

Detailed Description

This op has been written so that we can use the NumPad Plus key to fire off a zoom in operation. We can`t use the zoom op directly as the hotkey code calls the Do() function instead of the DoWithParam(). What this class does is basically call the ZoomOps DoWithParam() from it`s Do() function.

Author:
Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/09/06

Definition at line 311 of file zoomops.h.


Constructor & Destructor Documentation

OpZoomTo100::OpZoomTo100  ) 
 

Definition at line 1172 of file zoomops.cpp.

01173 {
01174 }


Member Function Documentation

OpZoomTo100::CC_DECLARE_DYNCREATE OpZoomTo100   )  [private]
 

void OpZoomTo100::Do OpDescriptor pOpDesc  )  [virtual]
 

Calls the base class function to zoom to 100!

Author:
Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/09/06
Parameters:
pointer to the OpZoomDescriptor being invoked [INPUTS]

Reimplemented from OpZoom.

Definition at line 1221 of file zoomops.cpp.

01222 {
01223     // Ok! lets zoom in!
01224     DocView* pDocView = DocView::GetCurrent();
01225 
01226     if(pDocView)
01227     {
01228         const WorkRect ZoomRect = pDocView->GetViewRect();
01229         ZoomTo( ZoomRect.Centre(), 100 );
01230     }
01231     else
01232     {
01233         ERROR3IF(pDocView == 0, "No current DocView found!");
01234     }
01235 }

OpState OpZoomTo100::GetState String_256 Description,
OpDescriptor
[static]
 

Func for determining the usability of this op.

Author:
Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/09/06
Parameters:
Description = ptr to place description of why this op can't happen [INPUTS] pOpDesc = ptr to the Op Desc associated with this op
- [OUTPUTS]
Returns:
An OpState object
See also:
-

Definition at line 1205 of file zoomops.cpp.

01206 {
01207     OpState State;
01208     return State;
01209 }

BOOL OpZoomTo100::Init void   )  [static]
 

Initialises the OpDragBox base-class drag operation. Loads preferences.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/4/95
Returns:
TRUE if successful, FALSE if otherwise.

Reimplemented from OpDragBox.

Definition at line 1176 of file zoomops.cpp.

01177 {
01178     BOOL ok = RegisterOpDescriptor(
01179                                     0, 
01180                                     _R(IDS_ZOOMTO100),
01181                                     CC_RUNTIME_CLASS(OpZoomTo100), 
01182                                     OPTOKEN_ZOOMTO100,
01183                                     OpZoomTo100::GetState,
01184                                     0,                  /* help ID */
01185                                     _R(IDBBL_ZOOMTO100),/* bubble ID */
01186                                     0                   /* bitmap ID */
01187                                     );
01188     return ok;
01189 }


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