]> git.saurik.com Git - wxWidgets.git/blame - include/wx/aui/tabart.h
Force wide char environment version initialization in wxGetEnvMap().
[wxWidgets.git] / include / wx / aui / tabart.h
CommitLineData
4758baf5
VZ
1//////////////////////////////////////////////////////////////////////////////
2// Name: wx/aui/tabart.h
3// Purpose: wxaui: wx advanced user interface - notebook
4// Author: Benjamin I. Williams
5// Modified by: Jens Lody (extracted from wx/aui/auibook.h)
6// Created: 2012-03-21
7// RCS-ID: $Id:$
8// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
9// Licence: wxWindows Library Licence, Version 3.1
10///////////////////////////////////////////////////////////////////////////////
11
12
13#ifndef _WX_AUI_TABART_H_
14#define _WX_AUI_TABART_H_
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20#include "wx/defs.h"
21
22#if wxUSE_AUI
23
24#include "wx/colour.h"
25#include "wx/gdicmn.h"
26#include "wx/font.h"
27#include "wx/pen.h"
28#include "wx/brush.h"
29#include "wx/bitmap.h"
30
31
32class wxAuiNotebookPage;
33class wxAuiNotebookPageArray;
34class wxWindow;
35class wxDC;
36
37
38// tab art class
39
40class WXDLLIMPEXP_AUI wxAuiTabArt
41{
42public:
43
44 wxAuiTabArt() { }
45 virtual ~wxAuiTabArt() { }
46
47 virtual wxAuiTabArt* Clone() = 0;
48 virtual void SetFlags(unsigned int flags) = 0;
49
50 virtual void SetSizingInfo(const wxSize& tabCtrlSize,
51 size_t tabCount) = 0;
52
53 virtual void SetNormalFont(const wxFont& font) = 0;
54 virtual void SetSelectedFont(const wxFont& font) = 0;
55 virtual void SetMeasuringFont(const wxFont& font) = 0;
56 virtual void SetColour(const wxColour& colour) = 0;
57 virtual void SetActiveColour(const wxColour& colour) = 0;
58
59 virtual void DrawBackground(
60 wxDC& dc,
61 wxWindow* wnd,
62 const wxRect& rect) = 0;
63
64 virtual void DrawTab(wxDC& dc,
65 wxWindow* wnd,
66 const wxAuiNotebookPage& pane,
67 const wxRect& inRect,
68 int closeButtonState,
69 wxRect* outTabRect,
70 wxRect* outButtonRect,
71 int* xExtent) = 0;
72
73 virtual void DrawButton(
74 wxDC& dc,
75 wxWindow* wnd,
76 const wxRect& inRect,
77 int bitmapId,
78 int buttonState,
79 int orientation,
80 wxRect* outRect) = 0;
81
82 virtual wxSize GetTabSize(
83 wxDC& dc,
84 wxWindow* wnd,
85 const wxString& caption,
86 const wxBitmap& bitmap,
87 bool active,
88 int closeButtonState,
89 int* xExtent) = 0;
90
91 virtual int ShowDropDown(
92 wxWindow* wnd,
93 const wxAuiNotebookPageArray& items,
94 int activeIdx) = 0;
95
96 virtual int GetIndentSize() = 0;
97
98 virtual int GetBestTabCtrlSize(
99 wxWindow* wnd,
100 const wxAuiNotebookPageArray& pages,
101 const wxSize& requiredBmpSize) = 0;
102};
103
104
105class WXDLLIMPEXP_AUI wxAuiGenericTabArt : public wxAuiTabArt
106{
107
108public:
109
110 wxAuiGenericTabArt();
111 virtual ~wxAuiGenericTabArt();
112
113 wxAuiTabArt* Clone();
114 void SetFlags(unsigned int flags);
115 void SetSizingInfo(const wxSize& tabCtrlSize,
116 size_t tabCount);
117
118 void SetNormalFont(const wxFont& font);
119 void SetSelectedFont(const wxFont& font);
120 void SetMeasuringFont(const wxFont& font);
121 void SetColour(const wxColour& colour);
122 void SetActiveColour(const wxColour& colour);
123
124 void DrawBackground(
125 wxDC& dc,
126 wxWindow* wnd,
127 const wxRect& rect);
128
129 void DrawTab(wxDC& dc,
130 wxWindow* wnd,
131 const wxAuiNotebookPage& pane,
132 const wxRect& inRect,
133 int closeButtonState,
134 wxRect* outTabRect,
135 wxRect* outButtonRect,
136 int* xExtent);
137
138 void DrawButton(
139 wxDC& dc,
140 wxWindow* wnd,
141 const wxRect& inRect,
142 int bitmapId,
143 int buttonState,
144 int orientation,
145 wxRect* outRect);
146
147 int GetIndentSize();
148
149 wxSize GetTabSize(
150 wxDC& dc,
151 wxWindow* wnd,
152 const wxString& caption,
153 const wxBitmap& bitmap,
154 bool active,
155 int closeButtonState,
156 int* xExtent);
157
158 int ShowDropDown(
159 wxWindow* wnd,
160 const wxAuiNotebookPageArray& items,
161 int activeIdx);
162
163 int GetBestTabCtrlSize(wxWindow* wnd,
164 const wxAuiNotebookPageArray& pages,
165 const wxSize& requiredBmpSize);
166
167protected:
168
169 wxFont m_normalFont;
170 wxFont m_selectedFont;
171 wxFont m_measuringFont;
172 wxColour m_baseColour;
173 wxPen m_baseColourPen;
174 wxPen m_borderPen;
175 wxBrush m_baseColourBrush;
176 wxColour m_activeColour;
177 wxBitmap m_activeCloseBmp;
178 wxBitmap m_disabledCloseBmp;
179 wxBitmap m_activeLeftBmp;
180 wxBitmap m_disabledLeftBmp;
181 wxBitmap m_activeRightBmp;
182 wxBitmap m_disabledRightBmp;
183 wxBitmap m_activeWindowListBmp;
184 wxBitmap m_disabledWindowListBmp;
185
186 int m_fixedTabWidth;
187 int m_tabCtrlHeight;
188 unsigned int m_flags;
189};
190
191
192class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt
193{
194
195public:
196
197 wxAuiSimpleTabArt();
198 virtual ~wxAuiSimpleTabArt();
199
200 wxAuiTabArt* Clone();
201 void SetFlags(unsigned int flags);
202
203 void SetSizingInfo(const wxSize& tabCtrlSize,
204 size_t tabCount);
205
206 void SetNormalFont(const wxFont& font);
207 void SetSelectedFont(const wxFont& font);
208 void SetMeasuringFont(const wxFont& font);
209 void SetColour(const wxColour& colour);
210 void SetActiveColour(const wxColour& colour);
211
212 void DrawBackground(
213 wxDC& dc,
214 wxWindow* wnd,
215 const wxRect& rect);
216
217 void DrawTab(wxDC& dc,
218 wxWindow* wnd,
219 const wxAuiNotebookPage& pane,
220 const wxRect& inRect,
221 int closeButtonState,
222 wxRect* outTabRect,
223 wxRect* outButtonRect,
224 int* xExtent);
225
226 void DrawButton(
227 wxDC& dc,
228 wxWindow* wnd,
229 const wxRect& inRect,
230 int bitmapId,
231 int buttonState,
232 int orientation,
233 wxRect* outRect);
234
235 int GetIndentSize();
236
237 wxSize GetTabSize(
238 wxDC& dc,
239 wxWindow* wnd,
240 const wxString& caption,
241 const wxBitmap& bitmap,
242 bool active,
243 int closeButtonState,
244 int* xExtent);
245
246 int ShowDropDown(
247 wxWindow* wnd,
248 const wxAuiNotebookPageArray& items,
249 int activeIdx);
250
251 int GetBestTabCtrlSize(wxWindow* wnd,
252 const wxAuiNotebookPageArray& pages,
253 const wxSize& requiredBmpSize);
254
255protected:
256
257 wxFont m_normalFont;
258 wxFont m_selectedFont;
259 wxFont m_measuringFont;
260 wxPen m_normalBkPen;
261 wxPen m_selectedBkPen;
262 wxBrush m_normalBkBrush;
263 wxBrush m_selectedBkBrush;
264 wxBrush m_bkBrush;
265 wxBitmap m_activeCloseBmp;
266 wxBitmap m_disabledCloseBmp;
267 wxBitmap m_activeLeftBmp;
268 wxBitmap m_disabledLeftBmp;
269 wxBitmap m_activeRightBmp;
270 wxBitmap m_disabledRightBmp;
271 wxBitmap m_activeWindowListBmp;
272 wxBitmap m_disabledWindowListBmp;
273
274 int m_fixedTabWidth;
275 unsigned int m_flags;
276};
277
069358b7
VZ
278#ifndef __WXUNIVERSAL__
279 #if defined(__WXGTK20__)
280 #define wxHAS_NATIVE_TABART
281 #include "wx/aui/tabartgtk.h"
282 #define wxAuiDefaultTabArt wxAuiGtkTabArt
283 #endif
284#endif // !__WXUNIVERSAL__
285
286#ifndef wxHAS_NATIVE_TABART
287 #define wxAuiDefaultTabArt wxAuiGenericTabArt
288#endif
4758baf5
VZ
289
290#endif // wxUSE_AUI
291
292#endif // _WX_AUI_TABART_H_