]>
Commit | Line | Data |
---|---|---|
50acee04 | 1 | /////////////////////////////////////////////////////////////////////////////// |
be66f18e | 2 | // Name: wx/aui/dockart.h |
50acee04 JS |
3 | // Purpose: wxaui: wx advanced user interface - docking window manager |
4 | // Author: Benjamin I. Williams | |
5 | // Modified by: | |
6 | // Created: 2005-05-17 | |
be66f18e | 7 | // RCS-ID: $Id$ |
50acee04 JS |
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 | ||
08469b1f JS |
23 | #include "wx/pen.h" |
24 | #include "wx/brush.h" | |
25 | #include "wx/bitmap.h" | |
26 | #include "wx/colour.h" | |
50acee04 JS |
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 wxDockArt | |
33 | { | |
34 | public: | |
35 | ||
36 | wxDockArt() { } | |
37 | virtual ~wxDockArt() { } | |
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; | |
06d4c4d6 RD |
45 | wxColour GetColor(int id) { return GetColour(id); } |
46 | void SetColor(int id, const wxColour& color) { SetColour(id, color); } | |
be66f18e | 47 | |
50acee04 JS |
48 | virtual void DrawSash(wxDC& dc, |
49 | int orientation, | |
50 | const wxRect& rect) = 0; | |
51 | ||
52 | virtual void DrawBackground(wxDC& dc, | |
53 | int orientation, | |
54 | const wxRect& rect) = 0; | |
55 | ||
56 | virtual void DrawCaption(wxDC& dc, | |
57 | const wxString& text, | |
58 | const wxRect& rect, | |
59 | wxPaneInfo& pane) = 0; | |
60 | ||
61 | virtual void DrawGripper(wxDC& dc, | |
62 | const wxRect& rect, | |
63 | wxPaneInfo& pane) = 0; | |
64 | ||
65 | virtual void DrawBorder(wxDC& dc, | |
66 | const wxRect& rect, | |
67 | wxPaneInfo& pane) = 0; | |
68 | ||
69 | virtual void DrawPaneButton(wxDC& dc, | |
70 | int button, | |
71 | int button_state, | |
72 | const wxRect& rect, | |
73 | wxPaneInfo& pane) = 0; | |
74 | }; | |
75 | ||
76 | ||
77 | // this is the default art provider for wxFrameManager. Dock art | |
78 | // can be customized by creating a class derived from this one, | |
79 | // or replacing this class entirely | |
80 | ||
81 | class WXDLLIMPEXP_AUI wxDefaultDockArt : public wxDockArt | |
82 | { | |
83 | public: | |
84 | ||
85 | wxDefaultDockArt(); | |
86 | ||
87 | int GetMetric(int metric_id); | |
88 | void SetMetric(int metric_id, int new_val); | |
89 | wxColour GetColour(int id); | |
90 | void SetColour(int id, const wxColor& colour); | |
91 | void SetFont(int id, const wxFont& font); | |
92 | wxFont GetFont(int id); | |
93 | ||
94 | void DrawSash(wxDC& dc, | |
95 | int orientation, | |
96 | const wxRect& rect); | |
97 | ||
98 | void DrawBackground(wxDC& dc, | |
99 | int orientation, | |
100 | const wxRect& rect); | |
101 | ||
102 | void DrawCaption(wxDC& dc, | |
103 | const wxString& text, | |
104 | const wxRect& rect, | |
105 | wxPaneInfo& pane); | |
106 | ||
107 | void DrawGripper(wxDC& dc, | |
108 | const wxRect& rect, | |
109 | wxPaneInfo& pane); | |
110 | ||
111 | void DrawBorder(wxDC& dc, | |
112 | const wxRect& rect, | |
113 | wxPaneInfo& pane); | |
114 | ||
115 | void DrawPaneButton(wxDC& dc, | |
116 | int button, | |
117 | int button_state, | |
118 | const wxRect& rect, | |
119 | wxPaneInfo& pane); | |
120 | ||
121 | protected: | |
122 | ||
123 | void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active); | |
124 | ||
125 | protected: | |
126 | ||
127 | wxPen m_border_pen; | |
128 | wxBrush m_sash_brush; | |
129 | wxBrush m_background_brush; | |
130 | wxBrush m_gripper_brush; | |
131 | wxFont m_caption_font; | |
132 | wxBitmap m_inactive_close_bitmap; | |
133 | wxBitmap m_inactive_pin_bitmap; | |
134 | wxBitmap m_active_close_bitmap; | |
135 | wxBitmap m_active_pin_bitmap; | |
136 | wxPen m_gripper_pen1; | |
137 | wxPen m_gripper_pen2; | |
138 | wxPen m_gripper_pen3; | |
139 | wxColour m_active_caption_colour; | |
140 | wxColour m_active_caption_gradient_colour; | |
141 | wxColour m_active_caption_text_colour; | |
142 | wxColour m_inactive_caption_colour; | |
143 | wxColour m_inactive_caption_gradient_colour; | |
144 | wxColour m_inactive_caption_text_colour; | |
145 | int m_border_size; | |
146 | int m_caption_size; | |
147 | int m_sash_size; | |
148 | int m_button_size; | |
149 | int m_gripper_size; | |
150 | int m_gradient_type; | |
151 | }; | |
152 | ||
153 | ||
154 | ||
155 | #endif // wxUSE_AUI | |
156 | #endif //_WX_DOCKART_H_ |