zoomops.h

Go to the documentation of this file.
00001 // $Id: zoomops.h 1771 2007-06-17 20:14:43Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 //
00099 // Zoom tool Operations & OpDescriptors.
00100 
00101 #ifndef ZOOMOPS_H
00102 #define ZOOMOPS_H
00103 
00104 #include "opdragbx.h"
00105 //#include "bars.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00106 //#include "cursor.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00107 //#include "wrkcoord.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00108 
00109 
00110 // These define tokens for each operation associated with "zooming".
00111 #define OPTOKEN_ZOOMCOMBO       TEXT("ZoomCombo")
00112 #define OPTOKEN_ZOOMPREV        TEXT("ZoomPrev")
00113 #define OPTOKEN_ZOOMSPREAD      TEXT("ZoomSpread")
00114 #define OPTOKEN_ZOOMDRAWING     TEXT("ZoomDrawing")
00115 #define OPTOKEN_ZOOMSELECTED    TEXT("ZoomSelect")
00116 #define OPTOKEN_ZOOMRECT        TEXT("ZoomRect")
00117 #define OPTOKEN_ZOOMIN          TEXT("ZoomIn")
00118 #define OPTOKEN_ZOOMOUT         TEXT("ZoomOut")
00119 #define OPTOKEN_ZOOMTO100       TEXT("Zoom100")
00120 #define OPTOKEN_ZOOMTO200       TEXT("Zoom200")
00121 #define OPTOKEN_ZOOMTO300       TEXT("Zoom300")
00122 #define OPTOKEN_ZOOMTO400       TEXT("Zoom400")
00123 
00124 // Graeme (11/11/99) - Definition of the minimum size of the drag rectangle.
00125 #define ZOOM_MIN_DRAG           5000
00126 
00127 // Forward references.
00128 class StringBase;
00129 class String_256;
00130 class DocView;
00131 class Spread;
00132 class WorkRect;
00133 class DocCoord;
00134 class DocRect;
00135 class OpDescControlMsg;
00136 class List;
00137 
00138 
00139 // Preset zoom factors.
00140 const INT32 cZoomTableSize       = 13;  // how many preset scale factors (percentages)
00141 const INT32 cDefaultZoomIndex    = 8;       // the array index of the default scale, 100%
00142 
00143 const INT32 cUninitZoomIndex       = -2;    // array index not set yet by zoom tool
00144 const INT32 cFractionalZoomIndex = -1;  // scale lies between two zoom table entries
00145 
00146 const INT32 cComboDivider1     = cZoomTableSize;
00147 const INT32 cFitToSpreadIndex      = cZoomTableSize + 1;
00148 const INT32 cFitToDrawingIndex   = cZoomTableSize + 2;
00149 const INT32 cFitToSelectedIndex  = cZoomTableSize + 3;
00150 const INT32 cPreviousZoomIndex   = cZoomTableSize + 4;
00151 const INT32 cComboDivider2     = cZoomTableSize + 5;
00152 
00153 
00154 
00155 /********************************************************************************************
00156 >   class OpZoom : public Operation
00157 
00158     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00159     Created:    23/4/95
00160     Purpose:    This operation can perform zooms in and out of the current DocView, either
00161                 by an immediate call to the ZoomIn/ZoomOut/ZoomInOnRect/ZoomAtPoint
00162                 functions, or by a call to the DoDrag function, which starts a mouse drag
00163                 to define a zoom box.
00164 ********************************************************************************************/
00165 
00166 class OpZoom : public OpCentredDragBox
00167 {
00168 public:
00169     // Creation & destruction.
00170     OpZoom();
00171 
00172     // A do function (at INT32 last) so that menu and keyboard short cuts work.
00173     virtual void Do(OpDescriptor*);
00174 
00175     // Nothing causes so much grief when changing the zoom code as the correct conversion
00176     // from spread coordinates to 64-bit view coordinates.  Here are some routines that
00177     // really work.
00178     static void SpreadToWork(Spread* pspdIn, const DocCoord& dcIn, WorkCoord* pwcOut);
00179     static void SpreadToWork(Spread* pspdIn, const DocRect& drIn, WorkRect* pwrOut);
00180 
00181     // These returns the given preset zoom factor as a percentage or a scale factor.
00182     static INT32 GetPresetZoomPercent(INT32 nPreset);
00183     static FIXED16 GetPresetZoomScale(INT32 nPreset);
00184 
00185     // This starts a drag (NB. hides the base-class OpDragState::DoDrag function).
00186     BOOL DoDrag(Spread* pStartSpread, const DocCoord& dcStartPos, ClickModifiers cmods);
00187     virtual BOOL SnappingDrag()             { return FALSE; }
00188 
00189     // Zoom in or out by the next scale factor in the ZoomTable table (also zoom direct to 100%).  
00190     // These are normally called on click events by the OpZoom user.
00191     void ZoomOut(const WorkCoord& wcZoom, BOOL fEndOp = TRUE);
00192     void ZoomOut(Spread* pZoomSpread, const DocCoord& dcZoomPos, BOOL fEndOp = TRUE);
00193 
00194     void ZoomIn(const WorkCoord& wcZoom, BOOL fEndOp = TRUE);
00195     void ZoomIn(Spread* pZoomSpread, const DocCoord& dcZoomPos, BOOL fEndOp = TRUE);
00196 
00197     void ZoomTo( const WorkCoord& wcZoom, INT32 Percent, BOOL fEndOp = TRUE);
00198 
00199     // Zoom so that the given rectangle within the current view completely fills the
00200     // current view's view-port.
00201     void ZoomInOnRect(const WorkRect& wrZoom, BOOL fEndOp = TRUE);
00202     void ZoomInOnRect(Spread* pZoomSpread, const DocRect& dcZoomRect, BOOL fEndOp = TRUE);
00203         
00204     // Zoom in or out to show the given point in the current view at the given scale factor.
00205     void ZoomAtPoint(const WorkCoord& wcZoom, FIXED16 fxNewScaleFactor, BOOL fEndOp = TRUE);
00206     void ZoomAtPoint(Spread* pZoomSpread, const DocCoord& dcZoomPos, FIXED16 fxNewScaleFactor,
00207                      BOOL fEndOp = TRUE);
00208 
00209     // As ZoomAtPoint, but forces the auto-centre function off...
00210     void MouseWheelZoomAtPoint(const WorkCoord& wcZoom, FIXED16 fxNewScalePercent, BOOL fEndOp = TRUE);
00211 
00212     // This function registers all zoom operations/op-descriptors.
00213     static BOOL Declare();
00214 
00215 private:
00216     // OpDragBox implementation.
00217     BOOL OnDragStarted(Spread*, const DocCoord&, ClickModifiers);
00218     BOOL OnPointerMoved(Spread*, const DocRect&, ClickModifiers);
00219     BOOL OnDragEnded(Spread* pBoxSpread, const DocRect& drDragBox,
00220                      ClickModifiers cmods, BOOL fDragOK);
00221 
00222     // Optionally calls OpDragBox::CalcDragBox or OpCentredDragBox::CalcDragBox,
00223     // depending on the preferences.
00224     DocRect CalcDragBox(const DocCoord& dcStartPos, const DocCoord& dcMousePos) const;
00225 
00226     // Called when the status line text needs refreshing.
00227     BOOL GetStatusLineText(String_256* ptext, Spread*, DocCoord, ClickModifiers);
00228 
00229     // Data members.
00230     Cursor    m_csrZoomIn;                          // the zoom in, zoom out and zoom drag
00231     Cursor    m_csrZoomOut;                         // cursors.
00232     Cursor    m_csrZoomDrag;
00233     INT32         m_ncsrSaveDrag;                       // saved old cursor ID when dragging
00234     WorkCoord m_wcStartPos;                         // where the drag started, in workspace
00235     BOOL      m_fStatusTextShown;                   // flag to remind us to update text
00236 
00237     // Preset zoom factor percentages.
00238     static INT32 ZoomTable[cZoomTableSize];         
00239 
00240     // Preferences.
00241     static BOOL m_fRadialZoomDragBox;               // do drag from centre to corner
00242     static BOOL m_fFixZoomClickPoint;               // fix on-screen the clicked point?
00243     static UINT32 m_nfShowZoomCursors;              // whether to flash cursor on zooming
00244 
00245     // Run-time typing.
00246     CC_DECLARE_DYNCREATE(OpZoom);
00247 };
00248 
00249 /********************************************************************************************
00250 >   class OpZoomIn : public OpZoom
00251 
00252     Author:     Mark_Howitt (Xara Group Ltd) <camelotdev@xara.com>
00253     Created:    19/11/00
00254     Purpose:    This op has been written so that we can use the NumPad Plus key to fire off
00255                 a zoom in operation. We can`t use the zoom op directly as the hotkey code
00256                 calls the Do() function instead of the DoWithParam(). What this class does
00257                 is basically call the ZoomOps DoWithParam() from it`s Do() function.
00258 ********************************************************************************************/
00259 class OpZoomIn : public OpZoom
00260 {
00261 public:
00262     // Creation & destruction.
00263     OpZoomIn();
00264 
00265     // A do function (at INT32 last) so that menu and keyboard short cuts work.
00266     virtual void Do(OpDescriptor*);
00267     static BOOL Init();
00268     static OpState GetState(String_256* Description, OpDescriptor*);
00269 
00270 private:
00271     // Run-time typing.
00272     CC_DECLARE_DYNCREATE(OpZoomIn);
00273 };
00274 
00275 /********************************************************************************************
00276 >   class OpZoomOut : public OpZoom
00277 
00278     Author:     Mark_Howitt (Xara Group Ltd) <camelotdev@xara.com>
00279     Created:    19/11/00
00280     Purpose:    This op has been written so that we can use the NumPad Minus key to fire off
00281                 a zoom out operation. We can`t use the zoom op directly as the hotkey code
00282                 calls the Do() function instead of the DoWithParam(). What this class does
00283                 is basically call the ZoomOps DoWithParam() from it`s Do() function.
00284 ********************************************************************************************/
00285 class OpZoomOut : public OpZoom
00286 {
00287 public:
00288     // Creation & destruction.
00289     OpZoomOut();
00290 
00291     // A do function (at INT32 last) so that menu and keyboard short cuts work.
00292     virtual void Do(OpDescriptor*);
00293     static BOOL Init();
00294     static OpState GetState(String_256* Description, OpDescriptor*);
00295 
00296 private:
00297     // Run-time typing.
00298     CC_DECLARE_DYNCREATE(OpZoomOut);
00299 };
00300 
00301 /********************************************************************************************
00302 >   class OpZoomTo100 : public OpZoom
00303 
00304     Author:     Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
00305     Created:    15/09/06
00306     Purpose:    This op has been written so that we can use the NumPad Plus key to fire off
00307                 a zoom in operation. We can`t use the zoom op directly as the hotkey code
00308                 calls the Do() function instead of the DoWithParam(). What this class does
00309                 is basically call the ZoomOps DoWithParam() from it`s Do() function.
00310 ********************************************************************************************/
00311 class OpZoomTo100 : public OpZoom
00312 {
00313 public:
00314     // Creation & destruction.
00315     OpZoomTo100();
00316 
00317     // A do function (at long last) so that menu and keyboard short cuts work.
00318     virtual void Do(OpDescriptor*);
00319     static BOOL Init();
00320     static OpState GetState(String_256* Description, OpDescriptor*);
00321 
00322 private:
00323     // Run-time typing.
00324     CC_DECLARE_DYNCREATE(OpZoomTo100);
00325 };
00326 
00327 /********************************************************************************************
00328 >   class OpZoomTo200 : public OpZoom
00329 
00330     Author:     Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
00331     Created:    15/09/06
00332     Purpose:    This op has been written so that we can use the NumPad Plus key to fire off
00333                 a zoom in operation. We can`t use the zoom op directly as the hotkey code
00334                 calls the Do() function instead of the DoWithParam(). What this class does
00335                 is basically call the ZoomOps DoWithParam() from it`s Do() function.
00336 ********************************************************************************************/
00337 class OpZoomTo200 : public OpZoom
00338 {
00339 public:
00340     // Creation & destruction.
00341     OpZoomTo200();
00342 
00343     // A do function (at long last) so that menu and keyboard short cuts work.
00344     virtual void Do(OpDescriptor*);
00345     static BOOL Init();
00346     static OpState GetState(String_256* Description, OpDescriptor*);
00347 
00348 private:
00349     // Run-time typing.
00350     CC_DECLARE_DYNCREATE(OpZoomTo200);
00351 };
00352 
00353 /********************************************************************************************
00354 >   class OpZoomTo300 : public OpZoom
00355 
00356     Author:     Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
00357     Created:    15/09/06
00358     Purpose:    This op has been written so that we can use the NumPad Plus key to fire off
00359                 a zoom in operation. We can`t use the zoom op directly as the hotkey code
00360                 calls the Do() function instead of the DoWithParam(). What this class does
00361                 is basically call the ZoomOps DoWithParam() from it`s Do() function.
00362 ********************************************************************************************/
00363 class OpZoomTo300 : public OpZoom
00364 {
00365 public:
00366     // Creation & destruction.
00367     OpZoomTo300();
00368 
00369     // A do function (at long last) so that menu and keyboard short cuts work.
00370     virtual void Do(OpDescriptor*);
00371     static BOOL Init();
00372     static OpState GetState(String_256* Description, OpDescriptor*);
00373 
00374 private:
00375     // Run-time typing.
00376     CC_DECLARE_DYNCREATE(OpZoomTo300);
00377 };
00378 
00379 /********************************************************************************************
00380 >   class OpZoomTo400 : public OpZoom
00381 
00382     Author:     Luke_Hart (Xara Group Ltd) <camelotdev@xara.com>
00383     Created:    15/09/06
00384     Purpose:    This op has been written so that we can use the NumPad Plus key to fire off
00385                 a zoom in operation. We can`t use the zoom op directly as the hotkey code
00386                 calls the Do() function instead of the DoWithParam(). What this class does
00387                 is basically call the ZoomOps DoWithParam() from it`s Do() function.
00388 ********************************************************************************************/
00389 class OpZoomTo400 : public OpZoom
00390 {
00391 public:
00392     // Creation & destruction.
00393     OpZoomTo400();
00394 
00395     // A do function (at long last) so that menu and keyboard short cuts work.
00396     virtual void Do(OpDescriptor*);
00397     static BOOL Init();
00398     static OpState GetState(String_256* Description, OpDescriptor*);
00399 
00400 private:
00401     // Run-time typing.
00402     CC_DECLARE_DYNCREATE(OpZoomTo400);
00403 };
00404 
00405 /********************************************************************************************
00406 >   class OpZoomDescriptor : public OpDescriptor
00407 
00408     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00409     Created:    13/5/93
00410     Purpose:    Base class to the two zoom tool OpDescriptors, OpZoomComboDescriptor
00411                 and OpZoomButtonDescriptor.  Simplifies the parameters required by a
00412                 constructor call, and provides default GetState and message handlers.
00413 ********************************************************************************************/
00414 
00415 class OpZoomDescriptor : public OpDescriptor
00416 {
00417 public:
00418     OpZoomDescriptor(const TCHAR* pcszToken, UINT32 wStatusID, UINT32 wHelpID, UINT32 wBubbleID, UINT32 resourceID=0, UINT32 controlID=0);
00419     virtual MsgResult Message(Msg* pMsg);
00420     virtual BOOL IsAvailable();
00421 
00422     static void FakeInvoke(TCHAR* pszToken);
00423     static void FakeZoomToRect(const DocRect& rect);
00424 
00425     virtual BOOL DoZoom(OpZoom * pZoomOp);
00426 
00427 protected:
00428     virtual Spread* GetSpread(DocView* pDocView) const;
00429     virtual DocRect GetRect(Spread* pSpread);
00430     virtual void AdjustRect(DocRect* pRect) const;
00431 
00432     virtual MsgResult HandleButtonMsg(DialogOp* popdlgThis, CGadgetID gidThis);
00433     static OpState GetState(String_256* psName, OpDescriptor* popdCandidate);
00434 };
00435 
00436 
00437 
00438 /********************************************************************************************
00439 >   class OpZoomFitSpreadDescriptor : public OpZoomDescriptor
00440 
00441     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00442     Created:    13/5/93
00443     Purpose:    OpDescriptor for the zoom tool's "Fit to spread" button.
00444 ********************************************************************************************/
00445 
00446 class OpZoomFitSpreadDescriptor : public OpZoomDescriptor
00447 {
00448 public:
00449     OpZoomFitSpreadDescriptor();
00450 
00451 protected:
00452     virtual DocRect GetRect(Spread* pSpread);
00453     virtual void AdjustRect(DocRect* pRect) const;
00454 
00455 private:
00456     BOOL m_DontScale;
00457 };
00458 
00459 
00460 
00461 /********************************************************************************************
00462 >   class OpZoomFitDrawingDescriptor : public OpZoomDescriptor
00463 
00464     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00465     Created:    13/5/93
00466     Purpose:    OpDescriptor for the zoom tool's "Fit to drawing" button.
00467 ********************************************************************************************/
00468 
00469 class OpZoomFitDrawingDescriptor : public OpZoomDescriptor
00470 {
00471 public:
00472     OpZoomFitDrawingDescriptor();
00473 
00474 protected:
00475     virtual DocRect GetRect(Spread* pSpread);
00476 };
00477 
00478 
00479 
00480 /********************************************************************************************
00481 >   class OpZoomFitSelectedDescriptor : public OpZoomDescriptor
00482 
00483     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00484     Created:    13/5/93
00485     Purpose:    OpDescriptor for the zoom tool's "Fit to selected" button.
00486 ********************************************************************************************/
00487 
00488 class OpZoomFitSelectedDescriptor : public OpZoomDescriptor
00489 {
00490 public:
00491     OpZoomFitSelectedDescriptor();
00492 
00493 protected:
00494     virtual Spread* GetSpread(DocView* pDocView) const;
00495     virtual DocRect GetRect(Spread* pSpread);
00496     virtual void AdjustRect(DocRect* pRect) const;
00497 };
00498 
00499 
00500 /********************************************************************************************
00501 >   class OpZoomFitRectDescriptor : public OpZoomDescriptor
00502 
00503     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00504     Created:    13/5/93
00505     Purpose:    OpDescriptor used to zoom to a specific rectangle.
00506 ********************************************************************************************/
00507 
00508 class OpZoomFitRectDescriptor : public OpZoomDescriptor
00509 {
00510 public:
00511     OpZoomFitRectDescriptor();
00512     void SetZoomRect(const DocRect& rect);
00513 
00514 protected:
00515     virtual DocRect GetRect(Spread* pSpread);
00516 
00517 private:
00518     DocRect TheRect;
00519 };
00520 
00521 
00522 /********************************************************************************************
00523 >   class OpZoomPrevZoomDescriptor : public OpZoomDescriptor
00524 
00525     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00526     Created:    13/5/93
00527     Purpose:    OpDescriptor for the zoom tool's "Previous Zoom" button.
00528 ********************************************************************************************/
00529 
00530 class OpZoomPrevZoomDescriptor : public OpZoomDescriptor
00531 {
00532 public:
00533     OpZoomPrevZoomDescriptor();
00534     
00535     static void SaveZoom(DocView* pDocView);
00536 
00537     virtual BOOL DoZoom(OpZoom * pZoomOp);
00538 
00539 private:
00540     virtual BOOL IsAvailable();
00541     virtual MsgResult HandleButtonMsg(DialogOp* popdlgThis, CGadgetID gidThis);
00542 };
00543 
00544 
00545 
00546 /********************************************************************************************
00547 >   class OpZoomComboDescriptor : public OpZoomDescriptor
00548 
00549     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00550     Created:    13/5/93
00551     Purpose:    OpDescriptor for the zoom tool's combo-box containing scale factors.
00552 ********************************************************************************************/
00553 
00554 class OpZoomComboDescriptor : public OpZoomDescriptor
00555 {
00556 public:
00557     OpZoomComboDescriptor();
00558     
00559     virtual MsgResult Message(Msg* pMsg);
00560     static BOOL Update(BOOL fRefreshList = FALSE);
00561 
00562 private:
00563     MsgResult HandleCreateMsg(DialogOp* popdlgThis, CGadgetID gidThis);
00564     MsgResult HandleViewChangeMsg(DocView* pSelectedDocView);
00565     void OnSelectionChange(OpDescControlMsg* pCtrlMsg, List* pGadgetList);
00566     
00567     BOOL RefreshList();
00568     BOOL UpdateAllCombos(String_256* pStr);
00569     BOOL UpdateComboWithViewScale(DocView* pDocView);
00570 
00571     virtual BOOL IsAvailable();
00572     static BOOL StringToLong(const StringBase& pszIn, INT32* pnOut);
00573 };
00574 
00575 
00576 
00577 /********************************************************************************************
00578 >   class ZoomInfoBarOp : public InformationBarOp
00579 
00580     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00581     Created:    15/3/95
00582     Purpose:    Handles creation/destruction and message handling for the zoom tool
00583                 info-bar.
00584     SeeAlso:    -
00585 ********************************************************************************************/
00586 
00587 class ZoomInfoBarOp : public InformationBarOp
00588 {
00589     CC_DECLARE_DYNCREATE(ZoomInfoBarOp);
00590 
00591 public:
00592     ZoomInfoBarOp(ResourceID r=_R(IDD_ZOOMINFO)) {DlgResID=r;}
00593     MsgResult Message(Msg* pMsg);
00594 
00595 };
00596     
00597 
00598 /********************************************************************************************
00599 >   class ZoomInfoBarOpCreate : public BarCreate
00600 
00601     Author:     Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
00602     Created:    19/5/94
00603     Purpose:    Class for creating (dummy) InformationBarOps.
00604                 Derived classes of BarCreate are used by DialogBarOp::ReadBarsFromFile()
00605 ********************************************************************************************/
00606 
00607 class ZoomInfoBarOpCreate : public BarCreate
00608 {
00609 public:
00610     DialogBarOp* Create();
00611 };
00612 
00613 #endif  // !ZOOMOPS_H

Generated on Sat Nov 10 03:48:03 2007 for Camelot by  doxygen 1.4.4