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 GetAdditionalBorderSpace(
109 virtual int GetBestTabCtrlSize(
111 const wxAuiNotebookPageArray
& pages
,
112 const wxSize
& requiredBmpSize
) = 0;
116 class WXDLLIMPEXP_AUI wxAuiGenericTabArt
: public wxAuiTabArt
121 wxAuiGenericTabArt();
122 virtual ~wxAuiGenericTabArt();
124 wxAuiTabArt
* Clone();
125 void SetFlags(unsigned int flags
);
126 void SetSizingInfo(const wxSize
& tabCtrlSize
,
129 void SetNormalFont(const wxFont
& font
);
130 void SetSelectedFont(const wxFont
& font
);
131 void SetMeasuringFont(const wxFont
& font
);
132 void SetColour(const wxColour
& colour
);
133 void SetActiveColour(const wxColour
& colour
);
145 void DrawTab(wxDC
& dc
,
147 const wxAuiNotebookPage
& pane
,
148 const wxRect
& inRect
,
149 int closeButtonState
,
151 wxRect
* outButtonRect
,
157 const wxRect
& inRect
,
168 int GetAdditionalBorderSpace(
174 const wxString
& caption
,
175 const wxBitmap
& bitmap
,
177 int closeButtonState
,
182 const wxAuiNotebookPageArray
& items
,
185 int GetBestTabCtrlSize(wxWindow
* wnd
,
186 const wxAuiNotebookPageArray
& pages
,
187 const wxSize
& requiredBmpSize
);
192 wxFont m_selectedFont
;
193 wxFont m_measuringFont
;
194 wxColour m_baseColour
;
195 wxPen m_baseColourPen
;
197 wxBrush m_baseColourBrush
;
198 wxColour m_activeColour
;
199 wxBitmap m_activeCloseBmp
;
200 wxBitmap m_disabledCloseBmp
;
201 wxBitmap m_activeLeftBmp
;
202 wxBitmap m_disabledLeftBmp
;
203 wxBitmap m_activeRightBmp
;
204 wxBitmap m_disabledRightBmp
;
205 wxBitmap m_activeWindowListBmp
;
206 wxBitmap m_disabledWindowListBmp
;
210 unsigned int m_flags
;
214 class WXDLLIMPEXP_AUI wxAuiSimpleTabArt
: public wxAuiTabArt
220 virtual ~wxAuiSimpleTabArt();
222 wxAuiTabArt
* Clone();
223 void SetFlags(unsigned int flags
);
225 void SetSizingInfo(const wxSize
& tabCtrlSize
,
228 void SetNormalFont(const wxFont
& font
);
229 void SetSelectedFont(const wxFont
& font
);
230 void SetMeasuringFont(const wxFont
& font
);
231 void SetColour(const wxColour
& colour
);
232 void SetActiveColour(const wxColour
& colour
);
244 void DrawTab(wxDC
& dc
,
246 const wxAuiNotebookPage
& pane
,
247 const wxRect
& inRect
,
248 int closeButtonState
,
250 wxRect
* outButtonRect
,
256 const wxRect
& inRect
,
267 int GetAdditionalBorderSpace(
273 const wxString
& caption
,
274 const wxBitmap
& bitmap
,
276 int closeButtonState
,
281 const wxAuiNotebookPageArray
& items
,
284 int GetBestTabCtrlSize(wxWindow
* wnd
,
285 const wxAuiNotebookPageArray
& pages
,
286 const wxSize
& requiredBmpSize
);
291 wxFont m_selectedFont
;
292 wxFont m_measuringFont
;
294 wxPen m_selectedBkPen
;
295 wxBrush m_normalBkBrush
;
296 wxBrush m_selectedBkBrush
;
298 wxBitmap m_activeCloseBmp
;
299 wxBitmap m_disabledCloseBmp
;
300 wxBitmap m_activeLeftBmp
;
301 wxBitmap m_disabledLeftBmp
;
302 wxBitmap m_activeRightBmp
;
303 wxBitmap m_disabledRightBmp
;
304 wxBitmap m_activeWindowListBmp
;
305 wxBitmap m_disabledWindowListBmp
;
308 unsigned int m_flags
;
311 #ifndef __WXUNIVERSAL__
312 #if defined(__WXGTK20__) && !defined(__WXGTK3__)
313 #define wxHAS_NATIVE_TABART
314 #include "wx/aui/tabartgtk.h"
315 #define wxAuiDefaultTabArt wxAuiGtkTabArt
317 #endif // !__WXUNIVERSAL__
319 #ifndef wxHAS_NATIVE_TABART
320 #define wxAuiDefaultTabArt wxAuiGenericTabArt
325 #endif // _WX_AUI_TABART_H_