Bugfix : Zooming works correct, no more errors on screen.
[xara-cairo.git] / wxOil / galbar.h
blobeb4f28664c7a8238050cd92e95b596e64a12666d
1 // $Id: galbar.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 // Header file for the GalleryBar class
102 #ifndef INC_GALBAR
103 #define INC_GALBAR
105 //#include "dockbar.h" - in camtypes.h [AUTOMATICALLY REMOVED]
106 //#include "bars.h" - in camtypes.h [AUTOMATICALLY REMOVED]
107 #include "basebar.h"
109 #ifndef WIN32
110 #include "dlgmgr.h" // for DLGTEMPLATE etc
111 #endif
113 /********************************************************************************************
115 > class GalleryBar : public BaseBar
117 Author: Alex Bligh
118 Created: 22/6/94
119 Purpose: A subclass of BaseBar that is the oil representation of a Gallery
120 SeeAlso: GalleryBar
122 ********************************************************************************************/
124 class GalleryBar : public BaseBar
126 public:
127 DECLARE_DYNCREATE( GalleryBar )
129 GalleryBar();
130 CSize GetGallerySize(){ return GallerySize;}
131 // Generated message map functions
132 //{{AFX_MSG(GalleryBar)
133 afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
134 afx_msg void OnNcPaint();
135 // afx_msg BOOL OnNcActivate(BOOL bActive);
136 // afx_msg INT32 OnMouseActivate( CWnd* pDesktopWnd, UINT32 nHitTest, UINT32 message );
137 // afx_msg void OnActivate( UINT32 nState, CWnd* pWndOther, BOOL bMinimized );
138 // afx_msg void OnActivateApp( BOOL bActive, HTASK hTask );
139 // afx_msg void OnPaint();
140 afx_msg UINT32 OnNcHitTest(CPoint point);
141 afx_msg void OnMouseMove(UINT32 nFlags, CPoint point);
142 // afx_msg void OnNcRButtonDown(UINT32 nHitTest, CPoint point);
143 afx_msg void OnNcLButtonDown(UINT32 nHitTest, CPoint point);
144 // afx_msg void OnLButtonDown(UINT32 nFlags, CPoint point);
145 // afx_msg void OnLButtonUp(UINT32 nFlags, CPoint point);
146 // afx_msg void OnLButtonDblClk( UINT32 nFlags, CPoint point );
147 // afx_msg void OnParentNotify( UINT32 message, LPARAM lParam );
148 // afx_msg void OnDestroy();
149 afx_msg BOOL OnMouseWheel(UINT32 nFlags, short zDelta, CPoint pt);
150 // afx_msg void OnSize(UINT32 nType, INT32 cx, INT32 cy);
151 //}}AFX_MSG
153 afx_msg LRESULT GetBarSize(WPARAM DockType , LPARAM ControlSize);
154 afx_msg LRESULT SetGallerySize(WPARAM cx, LPARAM cy);
155 afx_msg LRESULT DoResize(WPARAM , LPARAM);
156 afx_msg LRESULT SetControlFocus(WPARAM , LPARAM State);
157 DECLARE_MESSAGE_MAP()
159 protected:
160 void PaintWin95BarNonClient(BOOL IsActive);
162 // Format this bar according to its dock type
163 virtual BOOL FormatBar(BOOL MoveWindows,ForceControlSize Force);
165 // Format a Horizontal bar from the kernel BarItem list
166 virtual BOOL FormatHorizontalBar(BOOL MoveWindows,ForceControlSize Force);
168 // Format a Vertical bar from the kernel BarItem list
169 virtual BOOL FormatVerticalBar(BOOL MoveWindows,ForceControlSize Force);
171 // Size the actual window
172 virtual CRect SetBarSize(DockBarType BarType,BOOL DoRedraw = TRUE);
174 // Adjust the size of a bar post format
175 virtual void AdjustFormattedBarSize(CSize* BarSize);
177 // Position and Format controls
178 virtual BOOL PositionControls(BOOL DoRedraw = TRUE);
180 // Create any extra controls
181 virtual INT32 CreateExtraControls();
183 // Position any extra controls
184 virtual void PositionExtraControls(CSize BarSize, INT32 xpos, INT32 ypos);
186 virtual BOOL SetStatusLineText();
187 virtual BOOL GetStatusText(String_256 * StatusText);
189 virtual CRect GetFormatRect(DockBarType BarType);
191 private:
192 CSize GallerySize;
193 HWND ListBoxHWND;
194 CFont * ListFont;
197 #endif