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 DrawBorder(
62 const wxRect
& rect
) = 0;
64 virtual void DrawBackground(
67 const wxRect
& rect
) = 0;
69 virtual void DrawTab(wxDC
& dc
,
71 const wxAuiNotebookPage
& pane
,
75 wxRect
* outButtonRect
,
78 virtual void DrawButton(
87 virtual wxSize
GetTabSize(
90 const wxString
& caption
,
91 const wxBitmap
& bitmap
,
96 virtual int ShowDropDown(
98 const wxAuiNotebookPageArray
& items
,
101 virtual int GetIndentSize() = 0;
103 virtual int GetBorderWidth(
106 virtual int GetBestTabCtrlSize(
108 const wxAuiNotebookPageArray
& pages
,
109 const wxSize
& requiredBmpSize
) = 0;
113 class WXDLLIMPEXP_AUI wxAuiGenericTabArt
: public wxAuiTabArt
118 wxAuiGenericTabArt();
119 virtual ~wxAuiGenericTabArt();
121 wxAuiTabArt
* Clone();
122 void SetFlags(unsigned int flags
);
123 void SetSizingInfo(const wxSize
& tabCtrlSize
,
126 void SetNormalFont(const wxFont
& font
);
127 void SetSelectedFont(const wxFont
& font
);
128 void SetMeasuringFont(const wxFont
& font
);
129 void SetColour(const wxColour
& colour
);
130 void SetActiveColour(const wxColour
& colour
);
142 void DrawTab(wxDC
& dc
,
144 const wxAuiNotebookPage
& pane
,
145 const wxRect
& inRect
,
146 int closeButtonState
,
148 wxRect
* outButtonRect
,
154 const wxRect
& inRect
,
168 const wxString
& caption
,
169 const wxBitmap
& bitmap
,
171 int closeButtonState
,
176 const wxAuiNotebookPageArray
& items
,
179 int GetBestTabCtrlSize(wxWindow
* wnd
,
180 const wxAuiNotebookPageArray
& pages
,
181 const wxSize
& requiredBmpSize
);
186 wxFont m_selectedFont
;
187 wxFont m_measuringFont
;
188 wxColour m_baseColour
;
189 wxPen m_baseColourPen
;
191 wxBrush m_baseColourBrush
;
192 wxColour m_activeColour
;
193 wxBitmap m_activeCloseBmp
;
194 wxBitmap m_disabledCloseBmp
;
195 wxBitmap m_activeLeftBmp
;
196 wxBitmap m_disabledLeftBmp
;
197 wxBitmap m_activeRightBmp
;
198 wxBitmap m_disabledRightBmp
;
199 wxBitmap m_activeWindowListBmp
;
200 wxBitmap m_disabledWindowListBmp
;
204 unsigned int m_flags
;
208 class WXDLLIMPEXP_AUI wxAuiSimpleTabArt
: public wxAuiTabArt
214 virtual ~wxAuiSimpleTabArt();
216 wxAuiTabArt
* Clone();
217 void SetFlags(unsigned int flags
);
219 void SetSizingInfo(const wxSize
& tabCtrlSize
,
222 void SetNormalFont(const wxFont
& font
);
223 void SetSelectedFont(const wxFont
& font
);
224 void SetMeasuringFont(const wxFont
& font
);
225 void SetColour(const wxColour
& colour
);
226 void SetActiveColour(const wxColour
& colour
);
238 void DrawTab(wxDC
& dc
,
240 const wxAuiNotebookPage
& pane
,
241 const wxRect
& inRect
,
242 int closeButtonState
,
244 wxRect
* outButtonRect
,
250 const wxRect
& inRect
,
264 const wxString
& caption
,
265 const wxBitmap
& bitmap
,
267 int closeButtonState
,
272 const wxAuiNotebookPageArray
& items
,
275 int GetBestTabCtrlSize(wxWindow
* wnd
,
276 const wxAuiNotebookPageArray
& pages
,
277 const wxSize
& requiredBmpSize
);
282 wxFont m_selectedFont
;
283 wxFont m_measuringFont
;
285 wxPen m_selectedBkPen
;
286 wxBrush m_normalBkBrush
;
287 wxBrush m_selectedBkBrush
;
289 wxBitmap m_activeCloseBmp
;
290 wxBitmap m_disabledCloseBmp
;
291 wxBitmap m_activeLeftBmp
;
292 wxBitmap m_disabledLeftBmp
;
293 wxBitmap m_activeRightBmp
;
294 wxBitmap m_disabledRightBmp
;
295 wxBitmap m_activeWindowListBmp
;
296 wxBitmap m_disabledWindowListBmp
;
299 unsigned int m_flags
;
302 #ifndef __WXUNIVERSAL__
303 #if defined(__WXGTK20__) && !defined(__WXGTK3__)
304 #define wxHAS_NATIVE_TABART
305 #include "wx/aui/tabartgtk.h"
306 #define wxAuiDefaultTabArt wxAuiGtkTabArt
308 #endif // !__WXUNIVERSAL__
310 #ifndef wxHAS_NATIVE_TABART
311 #define wxAuiDefaultTabArt wxAuiGenericTabArt
316 #endif // _WX_AUI_TABART_H_