]>
Commit | Line | Data |
---|---|---|
50acee04 JS |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: 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: | |
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 | ||
24 | // dock art provider code - a dock provider provides all drawing | |
25 | // functionality to the wxAui dock manager. This allows the dock | |
26 | // manager to have plugable look-and-feels | |
27 | ||
28 | class WXDLLIMPEXP_AUI wxDockArt | |
29 | { | |
30 | public: | |
31 | ||
32 | wxDockArt() { } | |
33 | virtual ~wxDockArt() { } | |
34 | ||
35 | virtual int GetMetric(int id) = 0; | |
36 | virtual void SetMetric(int id, int new_val) = 0; | |
37 | virtual void SetFont(int id, const wxFont& font) = 0; | |
38 | virtual wxFont GetFont(int id) = 0; | |
39 | virtual wxColour GetColour(int id) = 0; | |
40 | virtual void SetColour(int id, const wxColor& colour) = 0; | |
41 | wxColor GetColor(int id) { return GetColour(id); } | |
42 | void SetColor(int id, const wxColor& color) { SetColour(id, color); } | |
43 | ||
44 | virtual void DrawSash(wxDC& dc, | |
45 | int orientation, | |
46 | const wxRect& rect) = 0; | |
47 | ||
48 | virtual void DrawBackground(wxDC& dc, | |
49 | int orientation, | |
50 | const wxRect& rect) = 0; | |
51 | ||
52 | virtual void DrawCaption(wxDC& dc, | |
53 | const wxString& text, | |
54 | const wxRect& rect, | |
55 | wxPaneInfo& pane) = 0; | |
56 | ||
57 | virtual void DrawGripper(wxDC& dc, | |
58 | const wxRect& rect, | |
59 | wxPaneInfo& pane) = 0; | |
60 | ||
61 | virtual void DrawBorder(wxDC& dc, | |
62 | const wxRect& rect, | |
63 | wxPaneInfo& pane) = 0; | |
64 | ||
65 | virtual void DrawPaneButton(wxDC& dc, | |
66 | int button, | |
67 | int button_state, | |
68 | const wxRect& rect, | |
69 | wxPaneInfo& pane) = 0; | |
70 | }; | |
71 | ||
72 | ||
73 | // this is the default art provider for wxFrameManager. Dock art | |
74 | // can be customized by creating a class derived from this one, | |
75 | // or replacing this class entirely | |
76 | ||
77 | class WXDLLIMPEXP_AUI wxDefaultDockArt : public wxDockArt | |
78 | { | |
79 | public: | |
80 | ||
81 | wxDefaultDockArt(); | |
82 | ||
83 | int GetMetric(int metric_id); | |
84 | void SetMetric(int metric_id, int new_val); | |
85 | wxColour GetColour(int id); | |
86 | void SetColour(int id, const wxColor& colour); | |
87 | void SetFont(int id, const wxFont& font); | |
88 | wxFont GetFont(int id); | |
89 | ||
90 | void DrawSash(wxDC& dc, | |
91 | int orientation, | |
92 | const wxRect& rect); | |
93 | ||
94 | void DrawBackground(wxDC& dc, | |
95 | int orientation, | |
96 | const wxRect& rect); | |
97 | ||
98 | void DrawCaption(wxDC& dc, | |
99 | const wxString& text, | |
100 | const wxRect& rect, | |
101 | wxPaneInfo& pane); | |
102 | ||
103 | void DrawGripper(wxDC& dc, | |
104 | const wxRect& rect, | |
105 | wxPaneInfo& pane); | |
106 | ||
107 | void DrawBorder(wxDC& dc, | |
108 | const wxRect& rect, | |
109 | wxPaneInfo& pane); | |
110 | ||
111 | void DrawPaneButton(wxDC& dc, | |
112 | int button, | |
113 | int button_state, | |
114 | const wxRect& rect, | |
115 | wxPaneInfo& pane); | |
116 | ||
117 | protected: | |
118 | ||
119 | void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active); | |
120 | ||
121 | protected: | |
122 | ||
123 | wxPen m_border_pen; | |
124 | wxBrush m_sash_brush; | |
125 | wxBrush m_background_brush; | |
126 | wxBrush m_gripper_brush; | |
127 | wxFont m_caption_font; | |
128 | wxBitmap m_inactive_close_bitmap; | |
129 | wxBitmap m_inactive_pin_bitmap; | |
130 | wxBitmap m_active_close_bitmap; | |
131 | wxBitmap m_active_pin_bitmap; | |
132 | wxPen m_gripper_pen1; | |
133 | wxPen m_gripper_pen2; | |
134 | wxPen m_gripper_pen3; | |
135 | wxColour m_active_caption_colour; | |
136 | wxColour m_active_caption_gradient_colour; | |
137 | wxColour m_active_caption_text_colour; | |
138 | wxColour m_inactive_caption_colour; | |
139 | wxColour m_inactive_caption_gradient_colour; | |
140 | wxColour m_inactive_caption_text_colour; | |
141 | int m_border_size; | |
142 | int m_caption_size; | |
143 | int m_sash_size; | |
144 | int m_button_size; | |
145 | int m_gripper_size; | |
146 | int m_gradient_type; | |
147 | }; | |
148 | ||
149 | ||
150 | ||
151 | #endif // wxUSE_AUI | |
152 | #endif //_WX_DOCKART_H_ |