Bugfix : Zooming works correct, no more errors on screen.
[xara-cairo.git] / wxOil / vstate.h
blobe5f6433a224080da34bed5cc8c99316219d71c65
1 // $Id: vstate.h 1282 2006-06-09 09:46:49Z alex $
2 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
3 ================================XARAHEADERSTART===========================
5 Xara LX, a vector drawing and manipulation program.
6 Copyright (C) 1993-2006 Xara Group Ltd.
7 Copyright on certain contributions may be held in joint with their
8 respective authors. See AUTHORS file for details.
10 LICENSE TO USE AND MODIFY SOFTWARE
11 ----------------------------------
13 This file is part of Xara LX.
15 Xara LX is free software; you can redistribute it and/or modify it
16 under the terms of the GNU General Public License version 2 as published
17 by the Free Software Foundation.
19 Xara LX and its component source files are distributed in the hope
20 that it will be useful, but WITHOUT ANY WARRANTY; without even the
21 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
22 See the GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License along
25 with Xara LX (see the file GPL in the root directory of the
26 distribution); if not, write to the Free Software Foundation, Inc., 51
27 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 ADDITIONAL RIGHTS
31 -----------------
33 Conditional upon your continuing compliance with the GNU General Public
34 License described above, Xara Group Ltd grants to you certain additional
35 rights.
37 The additional rights are to use, modify, and distribute the software
38 together with the wxWidgets library, the wxXtra library, and the "CDraw"
39 library and any other such library that any version of Xara LX relased
40 by Xara Group Ltd requires in order to compile and execute, including
41 the static linking of that library to XaraLX. In the case of the
42 "CDraw" library, you may satisfy obligation under the GNU General Public
43 License to provide source code by providing a binary copy of the library
44 concerned and a copy of the license accompanying it.
46 Nothing in this section restricts any of the rights you have under
47 the GNU General Public License.
50 SCOPE OF LICENSE
51 ----------------
53 This license applies to this program (XaraLX) and its constituent source
54 files only, and does not necessarily apply to other Xara products which may
55 in part share the same code base, and are subject to their own licensing
56 terms.
58 This license does not apply to files in the wxXtra directory, which
59 are built into a separate library, and are subject to the wxWindows
60 license contained within that directory in the file "WXXTRA-LICENSE".
62 This license does not apply to the binary libraries (if any) within
63 the "libs" directory, which are subject to a separate license contained
64 within that directory in the file "LIBS-LICENSE".
67 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
68 ----------------------------------------------
70 Subject to the terms of the GNU Public License (see above), you are
71 free to do whatever you like with your modifications. However, you may
72 (at your option) wish contribute them to Xara's source tree. You can
73 find details of how to do this at:
74 http://www.xaraxtreme.org/developers/
76 Prior to contributing your modifications, you will need to complete our
77 contributor agreement. This can be found at:
78 http://www.xaraxtreme.org/developers/contribute/
80 Please note that Xara will not accept modifications which modify any of
81 the text between the start and end of this header (marked
82 XARAHEADERSTART and XARAHEADEREND).
85 MARKS
86 -----
88 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
89 designs are registered or unregistered trademarks, design-marks, and/or
90 service marks of Xara Group Ltd. All rights in these marks are reserved.
93 Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
94 http://www.xara.com/
96 =================================XARAHEADEREND============================
100 A ViewState object contains platform-independent data describing a view onto a
101 document.
103 vstate.h
106 #ifndef VSTATE_H
107 #define VSTATE_H
109 //#include "coord.h" - in camtypes.h [AUTOMATICALLY REMOVED]
110 //#include "rect.h" - in camtypes.h [AUTOMATICALLY REMOVED]
111 //#include "wrkcoord.h" - in camtypes.h [AUTOMATICALLY REMOVED]
112 #include "wrkrect.h"
114 class View;
116 class ViewState
118 public:
120 // Construction & destruction
121 ViewState();
122 virtual ~ViewState();
124 #ifdef _DEBUG
125 void Dump() const;
126 #endif
128 public:
130 // Data members (public for easy access)
132 View* pView; // The kernel view object this describes
134 Rect ScreenRect; // screen dimensions of the platform
135 Rect ParentRect; // position of parent (MDI frame) window
136 Rect ViewRect; // position of this CCamView
138 Coord IconPoint; // position when iconised
140 WorkRect WorkAreaExtent; // the scrollable area
142 // Removed by Phil, 22/11/94, to try to rationalise the storage of pixel sizes in the system.
143 // MILLIPOINT PixelWidth; // pixel width in millipoints
144 // MILLIPOINT PixelHeight; // pixel height in millipoints
145 // FIXED16 PixelXScale; // no. of pixels per millipoint horizontally
146 // FIXED16 PixelYScale; // and vertically.
147 FIXED16 ViewScale; // this view's current scaling factor for zooms
149 BOOL IsNewView; // is this a fresh view?
150 BOOL IsMinimised; // is view currently iconised?
151 BOOL IsMaximised; // is view currently maximised?
152 BOOL AlwaysOnTop; // TRUE if window has "always on top" attribute
153 BOOL RulersVisible; // TRUE if Rulers are visible
154 BOOL ScrollersVisible; // TRUE if Scrollers are visible
155 INT32 zPos; // relative z-order of the view
157 // These are temporary storage used by LoadAppWindowState to store the values of the
158 // corresponding DocView flags until they can be written to a created DocView.
159 // See MakeViewStateFromKey and CCamView::OnInitialUpdate.
160 BOOL _GridShow : 1;
161 BOOL _GridSnap : 1;
162 BOOL _ObjectsSnap : 1;
163 BOOL _MagObjectsSnap : 1;
164 BOOL _PrintBorderShow : 1;
165 BOOL _LogicalView : 1;
166 BOOL _GuidesSnap : 1;
167 BOOL _GuidesShow : 1;
170 // Functions to access the protected scroll offset and ensure it's pixel aligned...
171 WorkCoord SetScrollPos(WorkCoord sp, BOOL fPixelise = TRUE);
172 WorkCoord GetScrollPos(BOOL Pixelise = TRUE);
174 protected:
175 WorkCoord ScrollPosition; // offset of scroll bars
180 #endif // VSTATE_H