OpZoomTo300 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 OpZoomTo300:

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

Public Member Functions

 OpZoomTo300 ()
virtual void Do (OpDescriptor *)
 Calls the base class function to zoom to 300!

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 (OpZoomTo300)

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 363 of file zoomops.h.


Constructor & Destructor Documentation

OpZoomTo300::OpZoomTo300  ) 
 

Definition at line 1306 of file zoomops.cpp.

01307 {
01308 }


Member Function Documentation

OpZoomTo300::CC_DECLARE_DYNCREATE OpZoomTo300   )  [private]
 

void OpZoomTo300::Do OpDescriptor pOpDesc  )  [virtual]
 

Calls the base class function to zoom to 300!

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 1356 of file zoomops.cpp.

01357 {
01358     // Ok! lets zoom in!
01359     DocView* pDocView = DocView::GetCurrent();
01360 
01361     if(pDocView)
01362     {
01363         const WorkRect ZoomRect = pDocView->GetViewRect();
01364         ZoomTo( ZoomRect.Centre(), 300 );
01365     }
01366     else
01367     {
01368         ERROR3IF(pDocView == 0, "No current DocView found!");
01369     }
01370 }

OpState OpZoomTo300::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 1340 of file zoomops.cpp.

01341 {
01342     OpState State;
01343     return State;
01344 }

BOOL OpZoomTo300::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 1310 of file zoomops.cpp.

01311 {
01312     BOOL ok = RegisterOpDescriptor(
01313                                     0, 
01314                                     _R(IDS_ZOOMTO300),
01315                                     CC_RUNTIME_CLASS(OpZoomTo300), 
01316                                     OPTOKEN_ZOOMTO300,
01317                                     OpZoomTo300::GetState,
01318                                     0,                  /* help ID */
01319                                     _R(IDBBL_ZOOMTO300),/* bubble ID */
01320                                     0                   /* bitmap ID */
01321                                     );
01322 
01323     return ok;
01324 }


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