]> git.saurik.com Git - wxWidgets.git/blob - include/wx/aui/dockart.h
using Run of base class
[wxWidgets.git] / include / wx / aui / dockart.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/aui/dockart.h
3 // Purpose: wxaui: wx advanced user interface - docking window manager
4 // Author: Benjamin I. Williams
5 // Modified by:
6 // Created: 2005-05-17
7 // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
8 // Licence: wxWindows Library Licence, Version 3.1
9 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_DOCKART_H_
12 #define _WX_DOCKART_H_
13
14 // ----------------------------------------------------------------------------
15 // headers
16 // ----------------------------------------------------------------------------
17
18 #include "wx/defs.h"
19
20 #if wxUSE_AUI
21
22 #include "wx/pen.h"
23 #include "wx/brush.h"
24 #include "wx/bitmap.h"
25 #include "wx/colour.h"
26
27 // dock art provider code - a dock provider provides all drawing
28 // functionality to the wxAui dock manager. This allows the dock
29 // manager to have plugable look-and-feels
30
31 class WXDLLIMPEXP_AUI wxAuiDockArt
32 {
33 public:
34
35 wxAuiDockArt() { }
36 virtual ~wxAuiDockArt() { }
37
38 virtual int GetMetric(int id) = 0;
39 virtual void SetMetric(int id, int newVal) = 0;
40 virtual void SetFont(int id, const wxFont& font) = 0;
41 virtual wxFont GetFont(int id) = 0;
42 virtual wxColour GetColour(int id) = 0;
43 virtual void SetColour(int id, const wxColor& colour) = 0;
44 wxColour GetColor(int id) { return GetColour(id); }
45 void SetColor(int id, const wxColour& color) { SetColour(id, color); }
46
47 virtual void DrawSash(wxDC& dc,
48 wxWindow* window,
49 int orientation,
50 const wxRect& rect) = 0;
51
52 virtual void DrawBackground(wxDC& dc,
53 wxWindow* window,
54 int orientation,
55 const wxRect& rect) = 0;
56
57 virtual void DrawCaption(wxDC& dc,
58 wxWindow* window,
59 const wxString& text,
60 const wxRect& rect,
61 wxAuiPaneInfo& pane) = 0;
62
63 virtual void DrawGripper(wxDC& dc,
64 wxWindow* window,
65 const wxRect& rect,
66 wxAuiPaneInfo& pane) = 0;
67
68 virtual void DrawBorder(wxDC& dc,
69 wxWindow* window,
70 const wxRect& rect,
71 wxAuiPaneInfo& pane) = 0;
72
73 virtual void DrawPaneButton(wxDC& dc,
74 wxWindow* window,
75 int button,
76 int buttonState,
77 const wxRect& rect,
78 wxAuiPaneInfo& pane) = 0;
79 };
80
81
82 // this is the default art provider for wxAuiManager. Dock art
83 // can be customized by creating a class derived from this one,
84 // or replacing this class entirely
85
86 class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
87 {
88 public:
89
90 wxAuiDefaultDockArt();
91
92 int GetMetric(int metricId);
93 void SetMetric(int metricId, int newVal);
94 wxColour GetColour(int id);
95 void SetColour(int id, const wxColor& colour);
96 void SetFont(int id, const wxFont& font);
97 wxFont GetFont(int id);
98
99 void DrawSash(wxDC& dc,
100 wxWindow *window,
101 int orientation,
102 const wxRect& rect);
103
104 void DrawBackground(wxDC& dc,
105 wxWindow *window,
106 int orientation,
107 const wxRect& rect);
108
109 void DrawCaption(wxDC& dc,
110 wxWindow *window,
111 const wxString& text,
112 const wxRect& rect,
113 wxAuiPaneInfo& pane);
114
115 void DrawGripper(wxDC& dc,
116 wxWindow *window,
117 const wxRect& rect,
118 wxAuiPaneInfo& pane);
119
120 void DrawBorder(wxDC& dc,
121 wxWindow *window,
122 const wxRect& rect,
123 wxAuiPaneInfo& pane);
124
125 void DrawPaneButton(wxDC& dc,
126 wxWindow *window,
127 int button,
128 int buttonState,
129 const wxRect& rect,
130 wxAuiPaneInfo& pane);
131
132 void DrawIcon(wxDC& dc,
133 const wxRect& rect,
134 wxAuiPaneInfo& pane);
135
136 protected:
137
138 void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
139
140 void InitBitmaps();
141
142 protected:
143
144 wxPen m_borderPen;
145 wxBrush m_sashBrush;
146 wxBrush m_backgroundBrush;
147 wxBrush m_gripperBrush;
148 wxFont m_captionFont;
149 wxBitmap m_inactiveCloseBitmap;
150 wxBitmap m_inactivePinBitmap;
151 wxBitmap m_inactiveMaximizeBitmap;
152 wxBitmap m_inactiveRestoreBitmap;
153 wxBitmap m_activeCloseBitmap;
154 wxBitmap m_activePinBitmap;
155 wxBitmap m_activeMaximizeBitmap;
156 wxBitmap m_activeRestoreBitmap;
157 wxPen m_gripperPen1;
158 wxPen m_gripperPen2;
159 wxPen m_gripperPen3;
160 wxColour m_baseColour;
161 wxColour m_activeCaptionColour;
162 wxColour m_activeCaptionGradientColour;
163 wxColour m_activeCaptionTextColour;
164 wxColour m_inactiveCaptionColour;
165 wxColour m_inactiveCaptionGradientColour;
166 wxColour m_inactiveCaptionTextColour;
167 int m_borderSize;
168 int m_captionSize;
169 int m_sashSize;
170 int m_buttonSize;
171 int m_gripperSize;
172 int m_gradientType;
173 };
174
175
176
177 #endif // wxUSE_AUI
178 #endif //_WX_DOCKART_H_