]>
Commit | Line | Data |
---|---|---|
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 | // RCS-ID: $Id$ | |
8 | // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. | |
9 | // Licence: wxWindows Library Licence, Version 3.1 | |
10 | /////////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_DOCKART_H_ | |
13 | #define _WX_DOCKART_H_ | |
14 | ||
15 | // ---------------------------------------------------------------------------- | |
16 | // headers | |
17 | // ---------------------------------------------------------------------------- | |
18 | ||
19 | #include "wx/defs.h" | |
20 | ||
21 | #if wxUSE_AUI | |
22 | ||
23 | #include "wx/pen.h" | |
24 | #include "wx/brush.h" | |
25 | #include "wx/bitmap.h" | |
26 | #include "wx/colour.h" | |
27 | ||
28 | // dock art provider code - a dock provider provides all drawing | |
29 | // functionality to the wxAui dock manager. This allows the dock | |
30 | // manager to have plugable look-and-feels | |
31 | ||
32 | class WXDLLIMPEXP_AUI wxAuiDockArt | |
33 | { | |
34 | public: | |
35 | ||
36 | wxAuiDockArt() { } | |
37 | virtual ~wxAuiDockArt() { } | |
38 | ||
39 | virtual int GetMetric(int id) = 0; | |
40 | virtual void SetMetric(int id, int new_val) = 0; | |
41 | virtual void SetFont(int id, const wxFont& font) = 0; | |
42 | virtual wxFont GetFont(int id) = 0; | |
43 | virtual wxColour GetColour(int id) = 0; | |
44 | virtual void SetColour(int id, const wxColor& colour) = 0; | |
45 | wxColour GetColor(int id) { return GetColour(id); } | |
46 | void SetColor(int id, const wxColour& color) { SetColour(id, color); } | |
47 | ||
48 | virtual void DrawSash(wxDC& dc, | |
49 | wxWindow* window, | |
50 | int orientation, | |
51 | const wxRect& rect) = 0; | |
52 | ||
53 | virtual void DrawBackground(wxDC& dc, | |
54 | wxWindow* window, | |
55 | int orientation, | |
56 | const wxRect& rect) = 0; | |
57 | ||
58 | virtual void DrawCaption(wxDC& dc, | |
59 | wxWindow* window, | |
60 | const wxString& text, | |
61 | const wxRect& rect, | |
62 | wxAuiPaneInfo& pane) = 0; | |
63 | ||
64 | virtual void DrawGripper(wxDC& dc, | |
65 | wxWindow* window, | |
66 | const wxRect& rect, | |
67 | wxAuiPaneInfo& pane) = 0; | |
68 | ||
69 | virtual void DrawBorder(wxDC& dc, | |
70 | wxWindow* window, | |
71 | const wxRect& rect, | |
72 | wxAuiPaneInfo& pane) = 0; | |
73 | ||
74 | virtual void DrawPaneButton(wxDC& dc, | |
75 | wxWindow* window, | |
76 | int button, | |
77 | int button_state, | |
78 | const wxRect& rect, | |
79 | wxAuiPaneInfo& pane) = 0; | |
80 | }; | |
81 | ||
82 | ||
83 | // this is the default art provider for wxAuiManager. Dock art | |
84 | // can be customized by creating a class derived from this one, | |
85 | // or replacing this class entirely | |
86 | ||
87 | class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt | |
88 | { | |
89 | public: | |
90 | ||
91 | wxAuiDefaultDockArt(); | |
92 | ||
93 | int GetMetric(int metric_id); | |
94 | void SetMetric(int metric_id, int new_val); | |
95 | wxColour GetColour(int id); | |
96 | void SetColour(int id, const wxColor& colour); | |
97 | void SetFont(int id, const wxFont& font); | |
98 | wxFont GetFont(int id); | |
99 | ||
100 | void DrawSash(wxDC& dc, | |
101 | wxWindow *window, | |
102 | int orientation, | |
103 | const wxRect& rect); | |
104 | ||
105 | void DrawBackground(wxDC& dc, | |
106 | wxWindow *window, | |
107 | int orientation, | |
108 | const wxRect& rect); | |
109 | ||
110 | void DrawCaption(wxDC& dc, | |
111 | wxWindow *window, | |
112 | const wxString& text, | |
113 | const wxRect& rect, | |
114 | wxAuiPaneInfo& pane); | |
115 | ||
116 | void DrawGripper(wxDC& dc, | |
117 | wxWindow *window, | |
118 | const wxRect& rect, | |
119 | wxAuiPaneInfo& pane); | |
120 | ||
121 | void DrawBorder(wxDC& dc, | |
122 | wxWindow *window, | |
123 | const wxRect& rect, | |
124 | wxAuiPaneInfo& pane); | |
125 | ||
126 | void DrawPaneButton(wxDC& dc, | |
127 | wxWindow *window, | |
128 | int button, | |
129 | int button_state, | |
130 | const wxRect& rect, | |
131 | wxAuiPaneInfo& pane); | |
132 | ||
133 | void DrawIcon(wxDC& dc, | |
134 | const wxRect& rect, | |
135 | wxAuiPaneInfo& pane); | |
136 | ||
137 | protected: | |
138 | ||
139 | void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active); | |
140 | ||
141 | void InitBitmaps(); | |
142 | ||
143 | protected: | |
144 | ||
145 | wxPen m_border_pen; | |
146 | wxBrush m_sash_brush; | |
147 | wxBrush m_background_brush; | |
148 | wxBrush m_gripper_brush; | |
149 | wxFont m_caption_font; | |
150 | wxBitmap m_inactive_close_bitmap; | |
151 | wxBitmap m_inactive_pin_bitmap; | |
152 | wxBitmap m_inactive_maximize_bitmap; | |
153 | wxBitmap m_inactive_restore_bitmap; | |
154 | wxBitmap m_active_close_bitmap; | |
155 | wxBitmap m_active_pin_bitmap; | |
156 | wxBitmap m_active_maximize_bitmap; | |
157 | wxBitmap m_active_restore_bitmap; | |
158 | wxPen m_gripper_pen1; | |
159 | wxPen m_gripper_pen2; | |
160 | wxPen m_gripper_pen3; | |
161 | wxColour m_base_colour; | |
162 | wxColour m_active_caption_colour; | |
163 | wxColour m_active_caption_gradient_colour; | |
164 | wxColour m_active_caption_text_colour; | |
165 | wxColour m_inactive_caption_colour; | |
166 | wxColour m_inactive_caption_gradient_colour; | |
167 | wxColour m_inactive_caption_text_colour; | |
168 | int m_border_size; | |
169 | int m_caption_size; | |
170 | int m_sash_size; | |
171 | int m_button_size; | |
172 | int m_gripper_size; | |
173 | int m_gradient_type; | |
174 | }; | |
175 | ||
176 | ||
177 | ||
178 | #endif // wxUSE_AUI | |
179 | #endif //_WX_DOCKART_H_ |