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)
7 // Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
8 // Licence: wxWindows Library Licence, Version 3.1
9 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_AUI_TABART_H_
13 #define _WX_AUI_TABART_H_
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
23 #include "wx/colour.h"
24 #include "wx/gdicmn.h"
28 #include "wx/bitmap.h"
31 class wxAuiNotebookPage
;
32 class wxAuiNotebookPageArray
;
39 class WXDLLIMPEXP_AUI wxAuiTabArt
44 virtual ~wxAuiTabArt() { }
46 virtual wxAuiTabArt
* Clone() = 0;
47 virtual void SetFlags(unsigned int flags
) = 0;
49 virtual void SetSizingInfo(const wxSize
& tabCtrlSize
,
52 virtual void SetNormalFont(const wxFont
& font
) = 0;
53 virtual void SetSelectedFont(const wxFont
& font
) = 0;
54 virtual void SetMeasuringFont(const wxFont
& font
) = 0;
55 virtual void SetColour(const wxColour
& colour
) = 0;
56 virtual void SetActiveColour(const wxColour
& colour
) = 0;
58 virtual void DrawBorder(
61 const wxRect
& rect
) = 0;
63 virtual void DrawBackground(
66 const wxRect
& rect
) = 0;
68 virtual void DrawTab(wxDC
& dc
,
70 const wxAuiNotebookPage
& pane
,
74 wxRect
* outButtonRect
,
77 virtual void DrawButton(
86 virtual wxSize
GetTabSize(
89 const wxString
& caption
,
90 const wxBitmap
& bitmap
,
95 virtual int ShowDropDown(
97 const wxAuiNotebookPageArray
& items
,
100 virtual int GetIndentSize() = 0;
102 virtual int GetBorderWidth(
105 virtual int GetAdditionalBorderSpace(
108 virtual int GetBestTabCtrlSize(
110 const wxAuiNotebookPageArray
& pages
,
111 const wxSize
& requiredBmpSize
) = 0;
115 class WXDLLIMPEXP_AUI wxAuiGenericTabArt
: public wxAuiTabArt
120 wxAuiGenericTabArt();
121 virtual ~wxAuiGenericTabArt();
123 wxAuiTabArt
* Clone();
124 void SetFlags(unsigned int flags
);
125 void SetSizingInfo(const wxSize
& tabCtrlSize
,
128 void SetNormalFont(const wxFont
& font
);
129 void SetSelectedFont(const wxFont
& font
);
130 void SetMeasuringFont(const wxFont
& font
);
131 void SetColour(const wxColour
& colour
);
132 void SetActiveColour(const wxColour
& colour
);
144 void DrawTab(wxDC
& dc
,
146 const wxAuiNotebookPage
& pane
,
147 const wxRect
& inRect
,
148 int closeButtonState
,
150 wxRect
* outButtonRect
,
156 const wxRect
& inRect
,
167 int GetAdditionalBorderSpace(
173 const wxString
& caption
,
174 const wxBitmap
& bitmap
,
176 int closeButtonState
,
181 const wxAuiNotebookPageArray
& items
,
184 int GetBestTabCtrlSize(wxWindow
* wnd
,
185 const wxAuiNotebookPageArray
& pages
,
186 const wxSize
& requiredBmpSize
);
191 wxFont m_selectedFont
;
192 wxFont m_measuringFont
;
193 wxColour m_baseColour
;
194 wxPen m_baseColourPen
;
196 wxBrush m_baseColourBrush
;
197 wxColour m_activeColour
;
198 wxBitmap m_activeCloseBmp
;
199 wxBitmap m_disabledCloseBmp
;
200 wxBitmap m_activeLeftBmp
;
201 wxBitmap m_disabledLeftBmp
;
202 wxBitmap m_activeRightBmp
;
203 wxBitmap m_disabledRightBmp
;
204 wxBitmap m_activeWindowListBmp
;
205 wxBitmap m_disabledWindowListBmp
;
209 unsigned int m_flags
;
213 class WXDLLIMPEXP_AUI wxAuiSimpleTabArt
: public wxAuiTabArt
219 virtual ~wxAuiSimpleTabArt();
221 wxAuiTabArt
* Clone();
222 void SetFlags(unsigned int flags
);
224 void SetSizingInfo(const wxSize
& tabCtrlSize
,
227 void SetNormalFont(const wxFont
& font
);
228 void SetSelectedFont(const wxFont
& font
);
229 void SetMeasuringFont(const wxFont
& font
);
230 void SetColour(const wxColour
& colour
);
231 void SetActiveColour(const wxColour
& colour
);
243 void DrawTab(wxDC
& dc
,
245 const wxAuiNotebookPage
& pane
,
246 const wxRect
& inRect
,
247 int closeButtonState
,
249 wxRect
* outButtonRect
,
255 const wxRect
& inRect
,
266 int GetAdditionalBorderSpace(
272 const wxString
& caption
,
273 const wxBitmap
& bitmap
,
275 int closeButtonState
,
280 const wxAuiNotebookPageArray
& items
,
283 int GetBestTabCtrlSize(wxWindow
* wnd
,
284 const wxAuiNotebookPageArray
& pages
,
285 const wxSize
& requiredBmpSize
);
290 wxFont m_selectedFont
;
291 wxFont m_measuringFont
;
293 wxPen m_selectedBkPen
;
294 wxBrush m_normalBkBrush
;
295 wxBrush m_selectedBkBrush
;
297 wxBitmap m_activeCloseBmp
;
298 wxBitmap m_disabledCloseBmp
;
299 wxBitmap m_activeLeftBmp
;
300 wxBitmap m_disabledLeftBmp
;
301 wxBitmap m_activeRightBmp
;
302 wxBitmap m_disabledRightBmp
;
303 wxBitmap m_activeWindowListBmp
;
304 wxBitmap m_disabledWindowListBmp
;
307 unsigned int m_flags
;
310 #ifndef __WXUNIVERSAL__
311 #if defined(__WXGTK20__) && !defined(__WXGTK3__)
312 #define wxHAS_NATIVE_TABART
313 #include "wx/aui/tabartgtk.h"
314 #define wxAuiDefaultTabArt wxAuiGtkTabArt
316 #endif // !__WXUNIVERSAL__
318 #ifndef wxHAS_NATIVE_TABART
319 #define wxAuiDefaultTabArt wxAuiGenericTabArt
324 #endif // _WX_AUI_TABART_H_