docview.h

Go to the documentation of this file.
00001 // $Id: docview.h 1718 2006-08-25 11:06:06Z martin $
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 //  Description file for DocView class
00100 //
00101 //  Created by Phil, 17/05/93
00102 //
00103 /*
00104  */ 
00105 
00106 
00107 #ifndef INC_DOCVIEW
00108 #define INC_DOCVIEW
00109 
00110 #include "view.h"
00111 #include "ccmaths.h"
00112 #include "rect.h"
00113 #include "doccoord.h"
00114 #include "binds.h"
00115 #include "clikmods.h"
00116 #include "ops.h"
00117 #include "monotime.h"
00118 #include "oilcoord.h"
00119 #include "quality.h"
00120 #include "docvmsg.h"
00121 #include "dragtrgt.h"
00122 #include "cursor.h"
00123 #include "snap.h"
00124 
00125 #define OPTOKEN_TOGGLESOLIDDRAG     TEXT("ToggleSolidDrag")
00126 
00127 class ImportPosition;
00128 
00129 // Declare classes so that circular references are resolved and I don't need to include
00130 // their header files...
00131 class CCamView;
00132 class ViewState;
00133 class CursorStack;
00134 class Document;
00135 class Node;
00136 class Chapter;
00137 class RenderRegion;
00138 class WorkRect;
00139 class OilRect;
00140 class CSnap;
00141 class RulerPair;
00142 class AttrUser;
00143 class NodeRenderableInk;
00144 class DragInformation;
00145 class ViewDragTarget;
00146 
00147 // Enum for the RenderOnTop function. Use one of these as a reason code to pass to it
00148 enum OnTopCode
00149 {
00150     Normal = 0,             // do normal rendering
00151     UnclippedEOR = 1,       // Do EOR rendering
00152     UnclippedXOR = 1,       // Do EOR rendering
00153     ClippedEOR = 2,         // Do EOR rendering clipped to the spread
00154     ClippedXOR = 2,         // Do EOR rendering clipped to the spread
00155     CLICKBITMAP,            // render into a colour bitmap for click detection
00156     COLOURBITMAP            // render into a colour bitmap
00157 };
00158 
00159 
00160 /********************************************************************************************
00161 
00162 >   class PendingRedraws : public List
00163 
00164     Author:     Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
00165     Created:    22/12/94
00166     Purpose:    Encapsulates a set of regions in a DocView, which must be accumulated in 
00167                 order for them to be redrawn at some point, possibly all in one go.  This 
00168                 class chooses the most efficient invalidation method, according to the number
00169                 and nature of regions added.
00170     SeeAlso:    SpreadRedraws
00171 
00172 ********************************************************************************************/
00173 
00174 class PendingRedraws : public List
00175 {
00176     CC_DECLARE_MEMDUMP(PendingRedraws);
00177 
00178 public:
00179     PendingRedraws();
00180     ~PendingRedraws();
00181 
00182     BOOL AddInvalidRegion(Spread*, DocRect, Node* pInvalidNode);
00183     void FlushRedraw(DocView*);
00184     void HandleNodeDeletion(Node* pNode);
00185 };
00186 
00187 
00188 
00189 /********************************************************************************************
00190 
00191 >   class DocView : public View
00192 
00193     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00194     Created:    12/5/1993
00195     Base Class: ListItem
00196     Friends:    CCamView
00197     Purpose:
00198 
00199         The DocView class is used to hold non-oil data about views onto a document. When a 
00200         CCamView object exists there is always a DocView object on the other side of the OIL-
00201         interface and they are linked. However, the DocView object is not destroyed when the 
00202         CCamView object is destroyed so that it records the state of views while they are 
00203         closed.
00204 
00205         Currently it contains:
00206             The rectangle of physical document space being shown by this view.
00207             The user viewing scale factor (as opposed to the PhysToWindow factor).
00208             The user WYSIWYG value for this view.
00209 
00210         When fully implemented it will also hold:
00211             Information about the viewing of separations in this view.
00212             Information about the state of "snap-to-grid" in this view.
00213             Information about the viewing of print-borders and tile boundaries.
00214 
00215         The kernel calls functions in this class to change the view, and DocView in turn, calls 
00216         CCamView.
00217         There are also functions which the OIL layer calls to inform the kernel when the OS 
00218         forcibly changes the view.
00219 
00220         If you can't find the information that you want from a DocView object then the next 
00221         place to try is it's associated CCamView (if there is one) and after that the Document 
00222         object itself. All these objects are linked to each other.
00223 
00224     SeeAlso:    View
00225 
00226 ********************************************************************************************/
00227 
00228 class CCAPI DocView : public View
00229 {
00230 friend class Document;      // Give Document access to SetSelectedInternal()
00231 
00233 //  Creation & destruction.
00234 
00235 private:
00236     CC_DECLARE_DYNAMIC(DocView);
00237 
00238 public:
00239     DocView(Document*);                         // DocView constructor
00240     virtual ~DocView();                         // DocView destructor
00241     BOOL Init();
00242     static BOOL DeclarePreferences();
00243 
00244 
00246 //  Interface to the OIL layer CCamView and the kernel Document.
00247 
00248 public:
00249     void OnNewView();                           // called by CCamView for new views!
00250     void OnLoadedView();                        // and the same for (re)loaded views!
00251 
00253 //  "Current" and "Selected" DocViews
00254 
00255 private:
00256     static DocView* Selected;                   // Global which records Selected View
00257     BOOL            IsViewDying;                // This is set to TRUE when the view starts to die
00258 
00259 public:
00260     static DocView* GetCurrent();               // Returns which DocView is current
00261     BOOL SetCurrent();                          // Make this View current
00262     static void SetNoCurrent();                 // Make NO View current
00263     virtual void SetViewPixelSize();            // Set pixel size according to this view.
00264 
00265     static DocView* GetSelected();              // Returns which DocView is selected
00266 
00267 // These 2 functions are now handled by the centralised Document::SetSelectedViewAndSpread
00268 // method, which interacts with this class via SetSelectedInternal, below
00269 //  void SetSelected();                         // Make this View selected
00270 //  static void SetNoSelected();                // Make NO View selected
00271     
00272     static  CNativeWnd *GetCurrentRenderWindow();   // Returns which render window is current
00273     virtual CNativeWnd *GetRenderWindow();          // Returns render window associated with docview
00274 
00275 protected:      // Only available to friend class Document
00276     static void SetSelectedInternal(DocView *NewSelected);
00277     static void SendSelectedMessage(DocView *OldSelected, DocView *NewSelected);
00278 
00279 
00281 //  Cursor management
00282 
00283 private:
00284     INT32 PushToolCursorID; // Matt 12/01/2001 - Current cursor ID
00285     Cursor m_PushCursor;
00286 
00288 //  Dragging
00289 
00290 private:
00291     DocCoord    StartDragPos;                   // Coord of the start of the drag box
00292     DocCoord    OldDragPos;                     // Coord of the last position of the drag box
00293     WorkCoord   LastWorkClick;                  // WorkCoord of most recent click
00294     Operation*  pCurrentDragOp;                 // not NULL if a drag is running
00295     DocCoord    DragPos;                        // Coord of mouse on last drag event
00296     BOOL        m_bSolidDragSupported;          // Flag indicating whether current drag op can do solid drags
00297 //  BOOL        m_bSolidDrag;                   // Flag indicating that current drag is solid
00298 
00299 public:
00300     BOOL StartDrag( Operation*,
00301                     DragType,
00302                     DocRect* pMoveBBox,
00303                     DocCoord* StartPos,
00304                     BOOL KeepAccuracy,
00305                     BOOL bSolidDragSupported = FALSE);
00306     BOOL EndDrag(Operation*);
00307     BOOL ChangeDragType(DragType Type);
00308 
00309     void DragPointerMove(Operation*, OilCoord, ClickModifiers);
00310     void DragPointerIdle(Operation*, OilCoord, ClickModifiers);
00311     void DragFinished(Operation*, OilCoord, ClickModifiers, BOOL);
00312 
00313     BOOL IsSingleClickReallyTriple() const;
00314     BOOL IsSingleClickReallyQuad() const;
00315 
00316     void OnMouseMove(OilCoord, ClickModifiers);
00317     void OnClick(OilCoord, ClickType, ClickModifiers);
00318     void RenderSelectBlobs(DocRect Rect, Spread *pSpread);
00319 
00320     BOOL IsMouseMoved();
00321 
00322     WorkCoord GetClickWorkCoord();              // The WorkCoord pos of the last click
00323 
00324     // This returns TRUE if the mouse is within the selected DocView, in which case
00325     // the mouse position in spread/doc coords in stored in the output parameters.
00326     static BOOL GetCurrentMousePos(Spread** ppSpread, DocCoord* pdcMousePos);
00327 
00328     ObjectDragTarget IsPointerOverNode(NodeRenderableInk** ThisNode, INT32 Range, BOOL Interrupt = TRUE,
00329         BOOL bColourDrag = FALSE);
00330 
00331     BOOL DM_DragFinished(DragInformation* DragInfo, ViewDragTarget* pDragTarget);
00332 
00333     void SetSolidDragState(BOOL bNewState) {m_bSolidDrag = bNewState;}
00334 
00335     BOOL GetCurrentSolidDragAbility() {return m_bSolidDragSupported;}
00336     BOOL GetCurrentSolidDragState() {return m_bSolidDrag;}
00337     void ClearClickState();
00338 
00339 
00341 //  Keyboard handling.
00342 
00343 public:
00344     virtual BOOL HandleKeyPress(KeyPress* pKeyPress);
00345 
00346     // DMc
00347     // resets the rendering's start time
00348     // effectively, when called after a Node::Render function disables background
00349     // rendering for the time being
00350     void ResetRenderingStartTime() { StartTime.Sample(); }
00351 
00353 //  Rendering
00354 
00355 private:
00356     struct CCAPI                                // View flags
00357     {
00358         BOOL    BackgroundRender : 1;           // TRUE if background rendering
00359         BOOL    GridShow : 1;                   // TRUE if snapping grid is shown
00360         BOOL    GridSnap : 1;                   // TRUE if snapping grid is active
00361         BOOL    ObjectsSnap : 1;                // TRUE if snapping to all objects is active
00362         BOOL    MagObjectsSnap : 1;             // TRUE if snapping to magnetic objects is active
00363         BOOL    PrintBorderShow : 1;            // TRUE if print borders are shown
00364         BOOL    LogicalView : 1;                // TRUE if chapters should be shown vert.
00365         BOOL    WorkClickCached : 1;            // TRUE if LastWorkClick is valid
00366         BOOL    Dragging : 1;                   // TRUE if Dragging something
00367         BOOL    GuidesSnap : 1;                 // TRUE if snapping to objects in guide layers
00368         BOOL    GuidesShow : 1;                 // TRUE if showing objects in guide layers
00369     } ViewFlags;
00370 
00371     // These functions want no-nonsense access to the above flags, so there.
00372 //  friend void MakeKeyFromView(HKEY, CCamView*);
00373     friend class CCamView;
00374 
00375     MonotonicTime StartTime;                    // Time at which rendering started
00376 
00377     // the normal rendering loop
00378     RenderRegion* NewRenderRegion(DocRect, Matrix&, CNativeDC*, Spread*, RenderType);
00379     
00380     void RenderView(RenderRegion* pRegion, Matrix& mxTxform, Spread* pSpread,
00381                     BOOL fRenderPaper, BOOL fDeleteRegionAfter = TRUE,
00382                     BOOL bForceImmediate = FALSE);
00383 
00384     CNativeDC* GetRenderDC();
00385 
00386 public:
00387     BOOL GetShowPrintBorders()              { return (ViewFlags.PrintBorderShow != 0); }
00388     void SetShowPrintBorders(BOOL State)    { ViewFlags.PrintBorderShow = State; }
00389 
00390 public:
00391     Spread* FindEnclosingSpread(OilCoord);
00392     Spread* OilToSpreadCoord(OilCoord, DocCoord*);
00393 
00394 public:
00395     virtual BOOL RenderPageMarks(RenderRegion*, Matrix&, DocRect&, Spread*);
00396 
00397 public:
00398     void ContinueRenderView(RenderRegion* pRegion, Spread* pSpread,
00399                             BOOL fRenderPaper = TRUE,
00400                             BOOL fDeleteRegionAfter = TRUE,
00401                             BOOL bForceImmediate = FALSE);
00402 
00403     void RenderEntireView(RenderRegion* pRender, Spread* pSpread);
00404 
00405     virtual BOOL GetForeBackMode();
00406     virtual void SetForeBackMode(BOOL);
00407 
00408     // Force the rendering of whole view
00409     void ForceRedraw(BOOL ForcePaper = FALSE);  
00410     
00411     // Force the rendering of rect in WorkCoords
00412     void ForceRedraw(WorkRect&);
00413 
00414     // Force the rendering of rect in DocCoords
00415     void ForceRedraw(Spread*, DocRect, BOOL Accumulate = FALSE, Node* pInvalidNode = NULL);
00416     void FlushRedraw();
00417 
00418     void HandleNodeDeletion(Node* pNode);
00419 
00420     static BOOL BackgroundRendering;            // Preference for bg/fg rendering.
00421     static BOOL SolidDragging;                  // Preference for solid dragging.
00422     static UINT32 IdleDragDelay;                    // Preference for time before showing extra info when dragging
00423     static UINT32 IdleDragDelay2;               // Preference for time before showing extra info when dragging
00424     static BOOL OriginOutlineShowNonOverlap;
00425     static BOOL OriginOutlineShowAlways;
00426     static UINT32 SolidDragTimeLimit;
00427     static BOOL OutlineShowBounds;
00428 
00429 private:
00430     PendingRedraws PendingRedrawList;
00431 
00433 //  Exclusive-OR Rendering
00434 
00435 private:
00436     static  OnTopCode       OnTopReason;            // Reason code passed to RenderOnTop
00437     static  Spread*         OnTopSpread;            // Spread being rendered in RenderOnTop
00438     static  RenderRegion*   OnTopRenderRegion;      // The render region used in RenderOnTop
00439     static  INT32           OnTopCount;             // Global count of the nesting level in
00440                                                     // the RenderOnTop function
00441 public:
00442     static RenderRegion* RenderOnTop(DocRect* Rect, Spread *pSpread, OnTopCode Reason);
00443     static RenderRegion* GetNextOnTop(DocRect*);
00444 
00445     RenderRegion* GetFirstRenderRegion(DocRect&, Spread*, OnTopCode Reason);
00446     RenderRegion* GetNextRenderRegion(DocRect&, Spread*, OnTopCode Reason);
00447 
00448 
00450 //  Scrolling, scaling and extents
00451 
00452 private:
00453     static UINT32 ScrollToShowMargin;
00454     void ScrollToShowAux(DocCoord* pCoord, DocCoord Margin);
00455 public:
00456     void ShowViewScrollers(BOOL fIsVisible);
00457     void ShowViewRulers(BOOL fIsVisible);
00458     BOOL AreRulersVisible();
00459     BOOL AreScrollersVisible();
00460 
00461     BOOL SetViewScale(FIXED16 NewScale);
00462     BOOL SetScrollOffsets(WorkCoord NewTopLeft, BOOL RedrawNeeded);
00463 
00464     // Scroll view so that the DocCoord, DocRect, or corner of a DocRect is in view
00465     void ScrollToShow(DocCoord* pCoord);
00466     void ScrollToShow(DocRect *RectToShow);
00467     void ScrollToShow(DocRect* pBoundingBox, DocCoord Direction);
00468     void ScrollToShowWithMargin(DocCoord* pCoord);
00469     void ScrollToShowWithMargin(DocRect *RectToShow);
00470     void ScrollToShowWithMargin(DocRect* pBoundingBox, DocCoord Direction);
00471 
00472     BOOL ViewStateChanged();                    // informs us that ViewState has changed
00473 
00474     DocRect GetDocViewRect(Spread*);
00475     void SetExtent(DocCoord, DocCoord);         // Reset the extent of the document
00476     WorkRect GetViewRect();                     // The physical rect of the view
00477 
00478 //  void GetViewParams(FIXED16*, FIXED16*, FIXED16*, WorkCoord*);                                               // (as reflected in the scroll bars)
00479 //  static DocRect ChapterClip(DocRect& DocClip, Chapter* pChapter);
00480 
00481 
00483 //  Zoom tool per-view data and functions.
00484 
00485 private:
00486     INT32           ZoomTableIndex;                 // working storage used by zoom tool
00487     INT32           PrevIndex;                      // "previous zoom" table index
00488     FIXED16     PrevScale;                      // "previous zoom" scale
00489     WorkCoord   PrevOffset;                     // "previous zoom" scroll offset
00490 
00491 public: 
00492     INT32 GetZoomTableIndex() const;                // tracks scale as entry in zoom table
00493     void SetZoomTableIndex(INT32 nIndex);           // related, sets the index
00494 
00495     INT32 GetPrevZoomIndex() const;
00496     void SetPrevZoomIndex(INT32 nIndex);
00497 
00498     FIXED16 GetPrevZoomScale() const;           // same for the scale factor of a
00499     void SetPrevZoomScale(FIXED16 fxScale);     // previous zoom
00500 
00501     WorkCoord GetPrevZoomOffset() const;        // ditto for scroll offsets
00502     void SetPrevZoomOffset(const WorkCoord& wcOffset);
00503 
00504 
00506 //  Grids and snapping
00507 
00508 public:
00509     // General snap functions of DocView.
00510     BOOL Snap(Spread* pSpread, DocCoord* pDocCoord,
00511                                 BOOL TryMagSnap = TRUE,
00512                                 BOOL TryGridSnap = TRUE);
00513     BOOL Snap(Spread* pSpread, DocRect* pDocRect, 
00514                             const DocCoord& PrevCoord, const DocCoord& CurCoord);
00515 
00516     // Easy ways of snapping to the current and selected DocViews.
00517     static BOOL SnapSelected(Spread* pSpread, DocCoord* pDocCoord,
00518                                 BOOL TryMagSnap = TRUE,
00519                                 BOOL TryGridSnap = TRUE);
00520     static BOOL SnapSelected(Spread* pSpread, DocRect* pDocRect,
00521                             const DocCoord& PrevCoord, const DocCoord& CurCoord);
00522 
00523     static BOOL SnapCurrent(Spread* pSpread, DocCoord* pDocCoord,
00524                                 BOOL TryMagSnap = TRUE,
00525                                 BOOL TryGridSnap = TRUE);
00526     static BOOL SnapCurrent(Spread* pSpread, DocRect* pDocRect,
00527                             const DocCoord& PrevCoord, const DocCoord& CurCoord);
00528 
00529     static BOOL SnapToMagneticNode(Spread* pSpread, Node* pNode, DocCoord* pDocCoord);
00530     static BOOL ForceSnapToGrid(Spread* pSpread, DocCoord* pDocCoord);
00531     static BOOL ForceSnapToGuides(Spread* pSpread, DocCoord* pDocCoord, GuidelineType Type);
00532 
00533     // Snap state functions.
00534     BOOL GetSnapToGridState();
00535     void SetSnapToGridState(BOOL SnapToGrid);
00536 
00537     BOOL GetShowGridState();
00538     void SetShowGridState(BOOL ShowGrid);
00539 
00540     BOOL GetSnapToObjectsState();
00541     void SetSnapToObjectsState(BOOL SnapToObjects);
00542 
00543     BOOL GetSnapToMagObjectsState();
00544     void SetSnapToMagObjectsState(BOOL SnapToMagObjects);
00545 
00546     BOOL GetSnapToGuidesState()             { return (ViewFlags.GuidesSnap != 0); }
00547     void SetSnapToGuidesState(BOOL State)   { ViewFlags.GuidesSnap = State; }
00548 
00549     BOOL GetShowGuidesState()               { return (ViewFlags.GuidesShow != 0); }
00550     void SetShowGuidesState(BOOL State)     { ViewFlags.GuidesShow = State; }
00551 
00552 private:
00553     CSnap* pCSnap;      // Ptr to the CSnap object that will perform all snapping in a given DocView and spread
00554 
00556 //  Constraint
00557 
00558 public:
00559     static void ConstrainToAngle(DocCoord&, DocCoord*, double Constrain=0.0);
00560     static void ConstrainToAngle(DocCoord&, double, DocCoord*);
00561     static double DefaultConstrainAngle;
00562 
00563     static void ConstrainToAspect(DocCoord& FixedPoint, FIXED16& AspectLock, DocCoord* CurCoord);
00564 
00565     
00566 
00568 //  Spreads
00569 
00570 public:
00571 
00572     Spread* GetVisibleSpread();         // returns pointer to largest spread within view
00573     Spread* GetFirstSelectedSpread();   // returns first spread with a selected object
00574 
00576 // Rulers
00577 
00578 public:
00579     RulerPair* GetpRulerPair() { return pRulerPair; }
00580 
00581 protected:
00582     RulerPair* pRulerPair;
00583 
00585 // Graham 15/7/97: Insertion positions
00586 
00587 public:
00588     DocCoord GetCentreCoord();
00589     ImportPosition GetCentreImportPosition();
00590 
00591     DocCoord GetTopLeftCoord();
00592     ImportPosition GetTopLeftImportPosition();
00593 
00595 // Karim 17/02/2000: Get the current zoom factor.
00596 
00597 public:
00598     double GetZoomFactor();
00599 
00600 private:
00601 
00603 // Diccon 10/5/2000 The devious flag that is set during brush strokes and prevents background rendering
00604 // from occurring until the stroke ends.  And yes I do know that this isn't very nice
00605 public:
00606     void SetPreventRenderView(BOOL Value);
00607     BOOL GetPreventRenderView();
00608 
00609 private:
00610     BOOL m_bPreventRenderView;
00611 
00612 
00614 public:
00615     void NotifyBoundsChanged(BOOL bNewValue = TRUE) {m_bBoundsChanged = (m_bBoundsChanged || bNewValue);}
00616 
00617 private:
00618     BOOL m_bBoundsChanged;
00619 };
00620 
00621 
00622 
00623 
00624 
00625 
00626 
00627 #define OPTOKEN_TOGGLEFORE      TEXT("ToggleForeBack")
00628 #define OPTOKEN_TOGGLESCROLL    TEXT("ToggleScrollBars")
00629 
00630 
00631 
00632 /********************************************************************************************
00633 
00634 >   class OpToggleFore : public Operation
00635 
00636     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00637     Created:    9/7/93
00638     Purpose:    This class represents the ToggleFore operation.
00639                 Creating an instance of this class and calling its "Do" function will toggle
00640                 the state of the flag controlling whether any RenderRegions created by the
00641                 current DocView will be submitted to the background rendering system or not.
00642 
00643 ********************************************************************************************/
00644 
00645 class OpToggleFore: public Operation
00646 {
00647     CC_DECLARE_DYNCREATE( OpToggleFore )
00648     
00649 public:
00650     OpToggleFore();                                         // Constructor
00651     ~OpToggleFore();                                        // Destructor
00652 
00653     static BOOL     Init();                                 // Register an OpDescriptor
00654     void            Do(OpDescriptor*);                      // "Do" function
00655     static OpState  GetState(String_256*, OpDescriptor*);   // Read the state of an operation
00656 };
00657 
00658 
00659 
00660 
00661 /********************************************************************************************
00662 
00663 >   class OpToggleScroll : public Operation
00664 
00665     Author:     Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
00666     Created:    9/7/93
00667     Purpose:    This class represents the ToggleScroll operation.
00668                 Creating an instance of this class and calling its "Do" function will change
00669                 the state of the BOOL which determines whether standard Window scroll bars or
00670                 RISCOS-like proportional scroll bars are used.
00671 
00672 ********************************************************************************************/
00673 
00674 class OpToggleScroll: public Operation
00675 {
00676     CC_DECLARE_DYNCREATE( OpToggleScroll )
00677 
00678 public:
00679     OpToggleScroll();                                       // Constructor
00680     ~OpToggleScroll();                                      // Destructor
00681 
00682     static BOOL     Init();                                 // Register an OpDescriptor
00683     void            Do(OpDescriptor*);                      // "Do" function
00684     static OpState  GetState(String_256*, OpDescriptor*);   // Read the state of an operation
00685 };
00686 
00687 
00688 /********************************************************************************************
00689 
00690 >   class OpToggleSolidDrag : public Operation
00691 
00692     Author:     Alex Bligh <alex@alex.org.uk>
00693     Created:    14 Mar 2006
00694     Purpose:    This class represents the OpToggleSolidDrag operation.
00695                 Creating an instance of this class and calling its "Do" function will toggle
00696                 the state of the flag controlling whether double buffering is used for
00697                 rendering on GTK
00698 
00699 ********************************************************************************************/
00700 
00701 class OpToggleSolidDrag: public Operation
00702 {
00703     CC_DECLARE_DYNCREATE( OpToggleSolidDrag )
00704     
00705 public:
00706     OpToggleSolidDrag();                                            // Constructor
00707     ~OpToggleSolidDrag();                                       // Destructor
00708 
00709     static BOOL     Init();                                 // Register an OpDescriptor
00710     void            Do(OpDescriptor*);                      // "Do" function
00711     static OpState  GetState(String_256*, OpDescriptor*);   // Read the state of an operation
00712 };
00713 
00714 
00715 
00716 #endif      // INC_DOCVIEW

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