File: dockart.h

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (283 lines) | stat: -rw-r--r-- 7,684 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
/////////////////////////////////////////////////////////////////////////////
// Name:        aui/dockart.h
// Purpose:     interface of wxAuiDockArt
// Author:      wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////


/**
    These are the possible pane dock art settings for wxAuiDefaultDockArt.

    @library{wxaui}
    @category{aui}

*/
enum wxAuiPaneDockArtSetting
{

    /// Customizes the sash size
    wxAUI_DOCKART_SASH_SIZE = 0,

    /// Customizes the caption size
    wxAUI_DOCKART_CAPTION_SIZE = 1,

    /// Customizes the gripper size
    wxAUI_DOCKART_GRIPPER_SIZE = 2,

    /// Customizes the pane border size
    wxAUI_DOCKART_PANE_BORDER_SIZE = 3,

    /// Customizes the pane button size
    wxAUI_DOCKART_PANE_BUTTON_SIZE = 4,

    /// Customizes the background colour, which corresponds to the client area.
    wxAUI_DOCKART_BACKGROUND_COLOUR = 5,

    /// Customizes the sash colour
    wxAUI_DOCKART_SASH_COLOUR = 6,

    /// Customizes the active caption colour
    wxAUI_DOCKART_ACTIVE_CAPTION_COLOUR = 7,

    /// Customizes the active caption gradient colour
    wxAUI_DOCKART_ACTIVE_CAPTION_GRADIENT_COLOUR = 8,

    /// Customizes the inactive caption colour
    wxAUI_DOCKART_INACTIVE_CAPTION_COLOUR = 9,

    /// Customizes the inactive gradient caption colour
    wxAUI_DOCKART_INACTIVE_CAPTION_GRADIENT_COLOUR = 10,

    /// Customizes the active caption text colour
    wxAUI_DOCKART_ACTIVE_CAPTION_TEXT_COLOUR = 11,

    /// Customizes the inactive caption text colour
    wxAUI_DOCKART_INACTIVE_CAPTION_TEXT_COLOUR = 12,

    /// Customizes the border colour
    wxAUI_DOCKART_BORDER_COLOUR = 13,

    /// Customizes the gripper colour
    wxAUI_DOCKART_GRIPPER_COLOUR = 14,

    /// Customizes the caption font
    wxAUI_DOCKART_CAPTION_FONT = 15,

    /// Customizes the gradient type (no gradient, vertical or horizontal)
    wxAUI_DOCKART_GRADIENT_TYPE = 16

};

/**
    These are the possible gradient dock art settings for wxAuiDefaultDockArt

*/
enum wxAuiPaneDockArtGradients
{
    /// No gradient on the captions, in other words a solid colour
    wxAUI_GRADIENT_NONE = 0,

    /// Vertical gradient on the captions, in other words a gradal change in colours from top to bottom
    wxAUI_GRADIENT_VERTICAL = 1,

    /// Horizontal gradient on the captions, in other words a gradual change in colours from left to right
    wxAUI_GRADIENT_HORIZONTAL = 2
};

/**
    These are the possible pane button / wxAuiNotebook button / wxAuiToolBar button states.
*/
enum wxAuiPaneButtonState
{
    /// Normal button state
    wxAUI_BUTTON_STATE_NORMAL = 0,

    /// Hovered button state
    wxAUI_BUTTON_STATE_HOVER = 1 << 1,

    /// Pressed button state
    wxAUI_BUTTON_STATE_PRESSED = 1 << 2,

    /// Disabled button state
    wxAUI_BUTTON_STATE_DISABLED = 1 << 3,

    /// Hidden button state
    wxAUI_BUTTON_STATE_HIDDEN   = 1 << 4,

    /// Checked button state
    wxAUI_BUTTON_STATE_CHECKED  = 1 << 5
};

/**
    These are the possible pane button / wxAuiNotebook button / wxAuiToolBar button identifiers.

*/
enum wxAuiButtonId
{
    /// Shows a close button on the pane
    wxAUI_BUTTON_CLOSE = 101,

    /// Shows a maximize/restore button on the pane
    wxAUI_BUTTON_MAXIMIZE_RESTORE = 102,

    /// Shows a minimize button on the pane
    wxAUI_BUTTON_MINIMIZE = 103,

    /**
        Shows a pin button on the pane
     */
    wxAUI_BUTTON_PIN = 104,

    /**
        Shows an option button on the pane (not implemented)
     */
    wxAUI_BUTTON_OPTIONS = 105,

    /**
        Shows a window list button on the pane (for wxAuiNotebook)
     */
    wxAUI_BUTTON_WINDOWLIST = 106,

    /**
        Shows a left button on the pane (for wxAuiNotebook)
     */
     wxAUI_BUTTON_LEFT = 107,

    /**
        Shows a right button on the pane (for wxAuiNotebook)
     */
     wxAUI_BUTTON_RIGHT = 108,

    /**
        Shows an up button on the pane (not implemented)
     */
    wxAUI_BUTTON_UP = 109,

    /**
        Shows a down button on the pane (not implemented)
     */
    wxAUI_BUTTON_DOWN = 110,

    /**
        Shows one of three possible custom buttons on the pane (not implemented)
     */
    wxAUI_BUTTON_CUSTOM1 = 201,

    /**
        Shows one of three possible custom buttons on the pane (not implemented)
     */
    wxAUI_BUTTON_CUSTOM2 = 202,

    /**
        Shows one of three possible custom buttons on the pane (not implemented)
     */
    wxAUI_BUTTON_CUSTOM3 = 203
};

/**
    @class wxAuiDockArt

    wxAuiDockArt is part of the wxAUI class framework.
    See also @ref overview_aui.

    wxAuiDockArt is the art provider: provides all drawing functionality to the
    wxAui dock manager. This allows the dock manager to have a plugable look-and-feel.

    By default, a wxAuiManager uses an instance of this class called
    wxAuiDefaultDockArt which provides bitmap art and a colour scheme that is
    adapted to the major platforms' look. You can either derive from that class
    to alter its behaviour or write a completely new dock art class.
    Call wxAuiManager::SetArtProvider to force wxAUI to use your new dock art provider.

    @library{wxaui}
    @category{aui}

    @see wxAuiManager, wxAuiPaneInfo
*/
class wxAuiDockArt
{
public:
    /**
        Constructor.
    */
    wxAuiDockArt();

    /**
        Destructor.
    */
    virtual ~wxAuiDockArt();

    /**
        Draws a background.
    */
    virtual void DrawBackground(wxDC& dc, wxWindow* window, int orientation,
                                const wxRect& rect) = 0;

    /**
        Draws a border.
    */
    virtual void DrawBorder(wxDC& dc, wxWindow* window, const wxRect& rect,
                            wxAuiPaneInfo& pane) = 0;

    /**
        Draws a caption.
    */
    virtual void DrawCaption(wxDC& dc, wxWindow* window, const wxString& text,
                             const wxRect& rect, wxAuiPaneInfo& pane) = 0;

    /**
        Draws a gripper.
    */
    virtual void DrawGripper(wxDC& dc, wxWindow* window, const wxRect& rect,
                             wxAuiPaneInfo& pane) = 0;

    /**
        Draws a button in the pane's title bar.
        @a button can be one of the values of @b wxAuiButtonId.
        @a button_state can be one of the values of @b wxAuiPaneButtonState.
    */
    virtual void DrawPaneButton(wxDC& dc, wxWindow* window, int button,
                                int button_state, const wxRect& rect,
                                wxAuiPaneInfo& pane) = 0;

    /**
        Draws a sash between two windows.
    */
    virtual void DrawSash(wxDC& dc, wxWindow* window, int orientation,
                          const wxRect& rect) = 0;
    /**
        Get the colour of a certain setting.
        @a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
    */
    virtual wxColour GetColour(int id) = 0;

    /**
        Get a font setting.
    */
    virtual wxFont GetFont(int id) = 0;

    /**
        Get the value of a certain setting.
        @a id can be one of the size values of @b wxAuiPaneDockArtSetting.
    */
    virtual int GetMetric(int id) = 0;

    /**
        Set a certain setting with the value @e colour.
        @a id can be one of the colour values of @b wxAuiPaneDockArtSetting.
    */
    virtual void SetColour(int id, const wxColour& colour) = 0;

    /**
        Set a font setting.
    */
    virtual void SetFont(int id, const wxFont& font) = 0;

    /**
        Set a certain setting with the value @e new_val.
        @a id can be one of the size values of @b wxAuiPaneDockArtSetting.
    */
    virtual void SetMetric(int id, int new_val) = 0;
};