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)
8 // Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved.
9 // Licence: wxWindows Library Licence, Version 3.1
10 ///////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_AUI_TABART_H_
14 #define _WX_AUI_TABART_H_
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
24 #include "wx/colour.h"
25 #include "wx/gdicmn.h"
29 #include "wx/bitmap.h"
32 class wxAuiNotebookPage
;
33 class wxAuiNotebookPageArray
;
40 class WXDLLIMPEXP_AUI wxAuiTabArt
45 virtual ~wxAuiTabArt() { }
47 virtual wxAuiTabArt
* Clone() = 0;
48 virtual void SetFlags(unsigned int flags
) = 0;
50 virtual void SetSizingInfo(const wxSize
& tabCtrlSize
,
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;
59 virtual void DrawBackground(
62 const wxRect
& rect
) = 0;
64 virtual void DrawTab(wxDC
& dc
,
66 const wxAuiNotebookPage
& pane
,
70 wxRect
* outButtonRect
,
73 virtual void DrawButton(
82 virtual wxSize
GetTabSize(
85 const wxString
& caption
,
86 const wxBitmap
& bitmap
,
91 virtual int ShowDropDown(
93 const wxAuiNotebookPageArray
& items
,
96 virtual int GetIndentSize() = 0;
98 virtual int GetBestTabCtrlSize(
100 const wxAuiNotebookPageArray
& pages
,
101 const wxSize
& requiredBmpSize
) = 0;
105 class WXDLLIMPEXP_AUI wxAuiGenericTabArt
: public wxAuiTabArt
110 wxAuiGenericTabArt();
111 virtual ~wxAuiGenericTabArt();
113 wxAuiTabArt
* Clone();
114 void SetFlags(unsigned int flags
);
115 void SetSizingInfo(const wxSize
& tabCtrlSize
,
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
);
129 void DrawTab(wxDC
& dc
,
131 const wxAuiNotebookPage
& pane
,
132 const wxRect
& inRect
,
133 int closeButtonState
,
135 wxRect
* outButtonRect
,
141 const wxRect
& inRect
,
152 const wxString
& caption
,
153 const wxBitmap
& bitmap
,
155 int closeButtonState
,
160 const wxAuiNotebookPageArray
& items
,
163 int GetBestTabCtrlSize(wxWindow
* wnd
,
164 const wxAuiNotebookPageArray
& pages
,
165 const wxSize
& requiredBmpSize
);
170 wxFont m_selectedFont
;
171 wxFont m_measuringFont
;
172 wxColour m_baseColour
;
173 wxPen m_baseColourPen
;
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
;
188 unsigned int m_flags
;
192 class WXDLLIMPEXP_AUI wxAuiSimpleTabArt
: public wxAuiTabArt
198 virtual ~wxAuiSimpleTabArt();
200 wxAuiTabArt
* Clone();
201 void SetFlags(unsigned int flags
);
203 void SetSizingInfo(const wxSize
& tabCtrlSize
,
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
);
217 void DrawTab(wxDC
& dc
,
219 const wxAuiNotebookPage
& pane
,
220 const wxRect
& inRect
,
221 int closeButtonState
,
223 wxRect
* outButtonRect
,
229 const wxRect
& inRect
,
240 const wxString
& caption
,
241 const wxBitmap
& bitmap
,
243 int closeButtonState
,
248 const wxAuiNotebookPageArray
& items
,
251 int GetBestTabCtrlSize(wxWindow
* wnd
,
252 const wxAuiNotebookPageArray
& pages
,
253 const wxSize
& requiredBmpSize
);
258 wxFont m_selectedFont
;
259 wxFont m_measuringFont
;
261 wxPen m_selectedBkPen
;
262 wxBrush m_normalBkBrush
;
263 wxBrush m_selectedBkBrush
;
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
;
275 unsigned int m_flags
;
278 #ifndef __WXUNIVERSAL__
279 #if defined(__WXGTK20__) && !defined(__WXGTK3__)
280 #define wxHAS_NATIVE_TABART
281 #include "wx/aui/tabartgtk.h"
282 #define wxAuiDefaultTabArt wxAuiGtkTabArt
284 #endif // !__WXUNIVERSAL__
286 #ifndef wxHAS_NATIVE_TABART
287 #define wxAuiDefaultTabArt wxAuiGenericTabArt
292 #endif // _WX_AUI_TABART_H_