]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: aui/dockart.h | |
e54c96f1 | 3 | // Purpose: interface of wxAuiDockArt |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
526954c5 | 6 | // Licence: wxWindows licence |
23324ae1 FM |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
47d602c1 FM |
9 | |
10 | /** | |
c55488df VZ |
11 | These are the possible pane dock art settings for wxAuiDefaultDockArt. |
12 | ||
13 | @library{wxaui} | |
14 | @category{aui} | |
15 | ||
47d602c1 FM |
16 | */ |
17 | enum wxAuiPaneDockArtSetting | |
18 | { | |
c55488df VZ |
19 | |
20 | /// Customizes the sash size | |
47d602c1 | 21 | wxAUI_DOCKART_SASH_SIZE = 0, |
c55488df VZ |
22 | |
23 | /// Customizes the caption size | |
47d602c1 | 24 | wxAUI_DOCKART_CAPTION_SIZE = 1, |
c55488df VZ |
25 | |
26 | /// Customizes the gripper size | |
47d602c1 | 27 | wxAUI_DOCKART_GRIPPER_SIZE = 2, |
c55488df VZ |
28 | |
29 | /// Customizes the pane border size | |
47d602c1 | 30 | wxAUI_DOCKART_PANE_BORDER_SIZE = 3, |
c55488df VZ |
31 | |
32 | /// Customizes the pane button size | |
47d602c1 | 33 | wxAUI_DOCKART_PANE_BUTTON_SIZE = 4, |
c55488df VZ |
34 | |
35 | /// Customizes the background colour, which corresponds to the client area. | |
47d602c1 | 36 | wxAUI_DOCKART_BACKGROUND_COLOUR = 5, |
c55488df VZ |
37 | |
38 | /// Customizes the sash colour | |
47d602c1 | 39 | wxAUI_DOCKART_SASH_COLOUR = 6, |
c55488df VZ |
40 | |
41 | /// Customizes the active caption colour | |
47d602c1 | 42 | wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7, |
c55488df VZ |
43 | |
44 | /// Customizes the active caption gradient colour | |
47d602c1 | 45 | wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8, |
c55488df VZ |
46 | |
47 | /// Customizes the inactive caption colour | |
47d602c1 | 48 | wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9, |
c55488df VZ |
49 | |
50 | /// Customizes the inactive gradient caption colour | |
47d602c1 | 51 | wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10, |
c55488df VZ |
52 | |
53 | /// Customizes the active caption text colour | |
47d602c1 | 54 | wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11, |
c55488df VZ |
55 | |
56 | /// Customizes the inactive caption text colour | |
47d602c1 | 57 | wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12, |
c55488df VZ |
58 | |
59 | /// Customizes the border colour | |
47d602c1 | 60 | wxAUI_DOCKART_BORDER_COLOUR = 13, |
c55488df VZ |
61 | |
62 | /// Customizes the gripper colour | |
47d602c1 | 63 | wxAUI_DOCKART_GRIPPER_COLOUR = 14, |
c55488df VZ |
64 | |
65 | /// Customizes the caption font | |
47d602c1 | 66 | wxAUI_DOCKART_CAPTION_FONT = 15, |
c55488df VZ |
67 | |
68 | /// Customizes the gradient type (no gradient, vertical or horizontal) | |
47d602c1 | 69 | wxAUI_DOCKART_GRADIENT_TYPE = 16 |
c55488df | 70 | |
47d602c1 FM |
71 | }; |
72 | ||
73 | /** | |
c55488df VZ |
74 | These are the possible gradient dock art settings for wxAuiDefaultDockArt |
75 | ||
47d602c1 FM |
76 | */ |
77 | enum wxAuiPaneDockArtGradients | |
78 | { | |
c55488df | 79 | /// No gradient on the captions, in other words a solid colour |
47d602c1 | 80 | wxAUI_GRADIENT_NONE = 0, |
c55488df VZ |
81 | |
82 | /// Vertical gradient on the captions, in other words a gradal change in colours from top to bottom | |
47d602c1 | 83 | wxAUI_GRADIENT_VERTICAL = 1, |
c55488df VZ |
84 | |
85 | /// Horizontal gradient on the captions, in other words a gradual change in colours from left to right | |
47d602c1 FM |
86 | wxAUI_GRADIENT_HORIZONTAL = 2 |
87 | }; | |
88 | ||
89 | /** | |
c55488df | 90 | These are the possible pane button / wxAuiNotebook button / wxAuiToolBar button states. |
47d602c1 FM |
91 | */ |
92 | enum wxAuiPaneButtonState | |
93 | { | |
c55488df | 94 | /// Normal button state |
47d602c1 | 95 | wxAUI_BUTTON_STATE_NORMAL = 0, |
c55488df VZ |
96 | |
97 | /// Hovered button state | |
98 | wxAUI_BUTTON_STATE_HOVER = 1 << 1, | |
99 | ||
100 | /// Pressed button state | |
101 | wxAUI_BUTTON_STATE_PRESSED = 1 << 2, | |
102 | ||
103 | /// Disabled button state | |
104 | wxAUI_BUTTON_STATE_DISABLED = 1 << 3, | |
105 | ||
106 | /// Hidden button state | |
107 | wxAUI_BUTTON_STATE_HIDDEN = 1 << 4, | |
108 | ||
109 | /// Checked button state | |
110 | wxAUI_BUTTON_STATE_CHECKED = 1 << 5 | |
47d602c1 FM |
111 | }; |
112 | ||
113 | /** | |
c55488df VZ |
114 | These are the possible pane button / wxAuiNotebook button / wxAuiToolBar button identifiers. |
115 | ||
47d602c1 FM |
116 | */ |
117 | enum wxAuiButtonId | |
118 | { | |
c55488df | 119 | /// Shows a close button on the pane |
47d602c1 | 120 | wxAUI_BUTTON_CLOSE = 101, |
c55488df VZ |
121 | |
122 | /// Shows a maximize/restore button on the pane | |
47d602c1 | 123 | wxAUI_BUTTON_MAXIMIZE_RESTORE = 102, |
c55488df VZ |
124 | |
125 | /// Shows a minimize button on the pane | |
47d602c1 | 126 | wxAUI_BUTTON_MINIMIZE = 103, |
c55488df VZ |
127 | |
128 | /** | |
129 | Shows a pin button on the pane | |
130 | */ | |
47d602c1 | 131 | wxAUI_BUTTON_PIN = 104, |
c55488df VZ |
132 | |
133 | /** | |
134 | Shows an option button on the pane (not implemented) | |
135 | */ | |
47d602c1 | 136 | wxAUI_BUTTON_OPTIONS = 105, |
c55488df VZ |
137 | |
138 | /** | |
139 | Shows a window list button on the pane (for wxAuiNotebook) | |
140 | */ | |
47d602c1 | 141 | wxAUI_BUTTON_WINDOWLIST = 106, |
c55488df VZ |
142 | |
143 | /** | |
144 | Shows a left button on the pane (for wxAuiNotebook) | |
145 | */ | |
146 | wxAUI_BUTTON_LEFT = 107, | |
147 | ||
148 | /** | |
149 | Shows a right button on the pane (for wxAuiNotebook) | |
150 | */ | |
151 | wxAUI_BUTTON_RIGHT = 108, | |
152 | ||
153 | /** | |
154 | Shows an up button on the pane (not implemented) | |
155 | */ | |
47d602c1 | 156 | wxAUI_BUTTON_UP = 109, |
c55488df VZ |
157 | |
158 | /** | |
159 | Shows a down button on the pane (not implemented) | |
160 | */ | |
47d602c1 | 161 | wxAUI_BUTTON_DOWN = 110, |
c55488df VZ |
162 | |
163 | /** | |
164 | Shows one of three possible custom buttons on the pane (not implemented) | |
165 | */ | |
47d602c1 | 166 | wxAUI_BUTTON_CUSTOM1 = 201, |
c55488df VZ |
167 | |
168 | /** | |
169 | Shows one of three possible custom buttons on the pane (not implemented) | |
170 | */ | |
47d602c1 | 171 | wxAUI_BUTTON_CUSTOM2 = 202, |
c55488df VZ |
172 | |
173 | /** | |
174 | Shows one of three possible custom buttons on the pane (not implemented) | |
175 | */ | |
47d602c1 FM |
176 | wxAUI_BUTTON_CUSTOM3 = 203 |
177 | }; | |
178 | ||
23324ae1 FM |
179 | /** |
180 | @class wxAuiDockArt | |
7c913512 | 181 | |
23324ae1 | 182 | wxAuiDockArt is part of the wxAUI class framework. |
47d602c1 | 183 | See also @ref overview_aui. |
7c913512 | 184 | |
47d602c1 FM |
185 | wxAuiDockArt is the art provider: provides all drawing functionality to the |
186 | wxAui dock manager. This allows the dock manager to have a plugable look-and-feel. | |
7c913512 | 187 | |
e4f1d811 | 188 | By default, a wxAuiManager uses an instance of this class called |
47d602c1 FM |
189 | wxAuiDefaultDockArt which provides bitmap art and a colour scheme that is |
190 | adapted to the major platforms' look. You can either derive from that class | |
191 | to alter its behaviour or write a completely new dock art class. | |
192 | Call wxAuiManager::SetArtProvider to force wxAUI to use your new dock art provider. | |
7c913512 | 193 | |
23324ae1 FM |
194 | @library{wxaui} |
195 | @category{aui} | |
7c913512 | 196 | |
e54c96f1 | 197 | @see wxAuiManager, wxAuiPaneInfo |
23324ae1 | 198 | */ |
7c913512 | 199 | class wxAuiDockArt |
23324ae1 FM |
200 | { |
201 | public: | |
202 | /** | |
203 | Constructor. | |
204 | */ | |
205 | wxAuiDockArt(); | |
206 | ||
207 | /** | |
208 | Destructor. | |
209 | */ | |
e4f1d811 | 210 | virtual ~wxAuiDockArt(); |
23324ae1 FM |
211 | |
212 | /** | |
213 | Draws a background. | |
214 | */ | |
1d497b99 FM |
215 | virtual void DrawBackground(wxDC& dc, wxWindow* window, int orientation, |
216 | const wxRect& rect) = 0; | |
23324ae1 FM |
217 | |
218 | /** | |
219 | Draws a border. | |
220 | */ | |
1d497b99 FM |
221 | virtual void DrawBorder(wxDC& dc, wxWindow* window, const wxRect& rect, |
222 | wxAuiPaneInfo& pane) = 0; | |
23324ae1 FM |
223 | |
224 | /** | |
225 | Draws a caption. | |
226 | */ | |
1d497b99 FM |
227 | virtual void DrawCaption(wxDC& dc, wxWindow* window, const wxString& text, |
228 | const wxRect& rect, wxAuiPaneInfo& pane) = 0; | |
23324ae1 FM |
229 | |
230 | /** | |
231 | Draws a gripper. | |
232 | */ | |
1d497b99 FM |
233 | virtual void DrawGripper(wxDC& dc, wxWindow* window, const wxRect& rect, |
234 | wxAuiPaneInfo& pane) = 0; | |
23324ae1 FM |
235 | |
236 | /** | |
237 | Draws a button in the pane's title bar. | |
4cc4bfaf FM |
238 | @a button can be one of the values of @b wxAuiButtonId. |
239 | @a button_state can be one of the values of @b wxAuiPaneButtonState. | |
23324ae1 | 240 | */ |
1d497b99 FM |
241 | virtual void DrawPaneButton(wxDC& dc, wxWindow* window, int button, |
242 | int button_state, const wxRect& rect, | |
243 | wxAuiPaneInfo& pane) = 0; | |
23324ae1 FM |
244 | |
245 | /** | |
246 | Draws a sash between two windows. | |
247 | */ | |
1d497b99 FM |
248 | virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation, |
249 | const wxRect& rect) = 0; | |
23324ae1 FM |
250 | /** |
251 | Get the colour of a certain setting. | |
4cc4bfaf | 252 | @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. |
23324ae1 | 253 | */ |
e4f1d811 | 254 | virtual wxColour GetColour(int id) = 0; |
23324ae1 FM |
255 | |
256 | /** | |
257 | Get a font setting. | |
258 | */ | |
d2aa927a | 259 | virtual wxFont GetFont(int id) = 0; |
23324ae1 FM |
260 | |
261 | /** | |
262 | Get the value of a certain setting. | |
4cc4bfaf | 263 | @a id can be one of the size values of @b wxAuiPaneDockArtSetting. |
23324ae1 | 264 | */ |
d2aa927a | 265 | virtual int GetMetric(int id) = 0; |
23324ae1 | 266 | |
23324ae1 FM |
267 | /** |
268 | Set a certain setting with the value @e colour. | |
4cc4bfaf | 269 | @a id can be one of the colour values of @b wxAuiPaneDockArtSetting. |
23324ae1 | 270 | */ |
d2aa927a | 271 | virtual void SetColour(int id, const wxColour& colour) = 0; |
23324ae1 FM |
272 | |
273 | /** | |
274 | Set a font setting. | |
275 | */ | |
d2aa927a | 276 | virtual void SetFont(int id, const wxFont& font) = 0; |
23324ae1 FM |
277 | |
278 | /** | |
279 | Set a certain setting with the value @e new_val. | |
4cc4bfaf | 280 | @a id can be one of the size values of @b wxAuiPaneDockArtSetting. |
23324ae1 | 281 | */ |
d2aa927a | 282 | virtual void SetMetric(int id, int new_val) = 0; |
23324ae1 | 283 | }; |
e54c96f1 | 284 |