]> git.saurik.com Git - wxWidgets.git/blame - src/motif/settings.cpp
implemented menu drawing in the GTK theme
[wxWidgets.git] / src / motif / settings.cpp
CommitLineData
4bb6408c
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: settings.cpp
3// Purpose: wxSettings
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
16c1f7f3
JS
12// TODO: these settings should probably be configurable from some central or
13// per-user file, which can be edited using a Windows-control-panel clone.
14// Also they should be documented better. Some are very MS Windows-ish.
15
4bb6408c
JS
16#ifdef __GNUG__
17#pragma implementation "settings.h"
18#endif
19
20#include "wx/settings.h"
e97f20a0 21#include "wx/gdicmn.h"
4bb6408c 22
a103111b 23wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
4bb6408c 24{
e97f20a0
JS
25 switch (index)
26 {
3d1b4196
MB
27 case wxSYS_COLOUR_WINDOW:
28 {
29 return *wxWHITE;
30 }
e97f20a0
JS
31 case wxSYS_COLOUR_SCROLLBAR:
32 // case wxSYS_COLOUR_DESKTOP: // Same as wxSYS_COLOUR_BACKGROUND
33 case wxSYS_COLOUR_BACKGROUND:
34 case wxSYS_COLOUR_ACTIVECAPTION:
35 case wxSYS_COLOUR_INACTIVECAPTION:
36 case wxSYS_COLOUR_MENU:
e97f20a0
JS
37 case wxSYS_COLOUR_WINDOWFRAME:
38 case wxSYS_COLOUR_ACTIVEBORDER:
39 case wxSYS_COLOUR_INACTIVEBORDER:
40 case wxSYS_COLOUR_BTNFACE:
41 // case wxSYS_COLOUR_3DFACE: // Same as wxSYS_COLOUR_BTNFACE
42 case wxSYS_COLOUR_GRAYTEXT:
43 {
44 return wxColour("LIGHT GREY");
45 }
46 case wxSYS_COLOUR_BTNSHADOW:
47 // case wxSYS_COLOUR_3DSHADOW: // Same as wxSYS_COLOUR_BTNSHADOW
48 {
49 return wxColour("GREY");
50 }
51 case wxSYS_COLOUR_3DDKSHADOW:
52 {
53 return *wxBLACK;
54 }
55 case wxSYS_COLOUR_HIGHLIGHT:
3d1b4196
MB
56 {
57 return *wxBLUE;
58 }
e97f20a0 59 case wxSYS_COLOUR_BTNHIGHLIGHT:
a103111b
GD
60 case wxSYS_COLOUR_LISTBOX:
61 // case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT
e97f20a0
JS
62 {
63 return *wxWHITE;
64 }
65 case wxSYS_COLOUR_3DLIGHT:
66 {
67 return wxColour("LIGHT GREY");
68 }
69 case wxSYS_COLOUR_MENUTEXT:
70 case wxSYS_COLOUR_WINDOWTEXT:
71 case wxSYS_COLOUR_CAPTIONTEXT:
72 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
a103111b 73 case wxSYS_COLOUR_BTNTEXT:
e97f20a0
JS
74 case wxSYS_COLOUR_INFOTEXT:
75 {
3d1b4196 76 return *wxBLACK;
e97f20a0
JS
77 }
78 case wxSYS_COLOUR_HIGHLIGHTTEXT:
79 {
3d1b4196 80 return *wxWHITE;
e97f20a0
JS
81 }
82 case wxSYS_COLOUR_INFOBK:
83 case wxSYS_COLOUR_APPWORKSPACE:
84 {
02800301 85 return wxColour("LIGHT GREY");
e97f20a0 86 }
1abfd7f3
VZ
87
88 case wxSYS_COLOUR_HOTLIGHT:
89 case wxSYS_COLOUR_GRADIENTACTIVECAPTION:
90 case wxSYS_COLOUR_GRADIENTINACTIVECAPTION:
91 case wxSYS_COLOUR_MENUHILIGHT:
92 case wxSYS_COLOUR_MENUBAR:
93 // TODO
94 return wxColour("LIGHT GREY");
95
96 default:
97 case wxSYS_COLOUR_MAX:
98 wxFAIL_MSG( _T("unknown colour") );
e97f20a0
JS
99 }
100 return *wxWHITE;
4bb6408c
JS
101}
102
a103111b 103wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
4bb6408c 104{
16c1f7f3
JS
105 switch (index)
106 {
16c1f7f3
JS
107 case wxSYS_SYSTEM_FIXED_FONT:
108 {
e97f20a0 109 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
16c1f7f3
JS
110 break;
111 }
e97f20a0 112 case wxSYS_DEVICE_DEFAULT_FONT:
16c1f7f3 113 case wxSYS_SYSTEM_FONT:
16c1f7f3 114 case wxSYS_DEFAULT_GUI_FONT:
e97f20a0 115 default:
16c1f7f3 116 {
e97f20a0 117 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
16c1f7f3
JS
118 break;
119 }
120 }
121
4bb6408c
JS
122 return wxFont();
123}
124
125// Get a system metric, e.g. scrollbar size
a103111b 126int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
4bb6408c
JS
127{
128 switch ( index)
129 {
130 case wxSYS_MOUSE_BUTTONS:
131 // TODO
a103111b 132 return 0;
4bb6408c
JS
133 case wxSYS_BORDER_X:
134 // TODO
a103111b 135 return 0;
4bb6408c
JS
136 case wxSYS_BORDER_Y:
137 // TODO
a103111b 138 return 0;
4bb6408c
JS
139 case wxSYS_CURSOR_X:
140 // TODO
a103111b 141 return 0;
4bb6408c
JS
142 case wxSYS_CURSOR_Y:
143 // TODO
a103111b 144 return 0;
4bb6408c
JS
145 case wxSYS_DCLICK_X:
146 // TODO
a103111b 147 return 0;
4bb6408c
JS
148 case wxSYS_DCLICK_Y:
149 // TODO
a103111b 150 return 0;
4bb6408c
JS
151 case wxSYS_DRAG_X:
152 // TODO
a103111b 153 return 0;
4bb6408c
JS
154 case wxSYS_DRAG_Y:
155 // TODO
a103111b 156 return 0;
4bb6408c
JS
157 case wxSYS_EDGE_X:
158 // TODO
a103111b 159 return 0;
4bb6408c
JS
160 case wxSYS_EDGE_Y:
161 // TODO
a103111b 162 return 0;
4bb6408c
JS
163 case wxSYS_HSCROLL_ARROW_X:
164 // TODO
a103111b 165 return 0;
4bb6408c
JS
166 case wxSYS_HSCROLL_ARROW_Y:
167 // TODO
a103111b 168 return 0;
4bb6408c
JS
169 case wxSYS_HTHUMB_X:
170 // TODO
a103111b 171 return 0;
4bb6408c
JS
172 case wxSYS_ICON_X:
173 // TODO
a103111b 174 return 0;
4bb6408c
JS
175 case wxSYS_ICON_Y:
176 // TODO
a103111b 177 return 0;
4bb6408c
JS
178 case wxSYS_ICONSPACING_X:
179 // TODO
a103111b 180 return 0;
4bb6408c
JS
181 case wxSYS_ICONSPACING_Y:
182 // TODO
a103111b 183 return 0;
4bb6408c
JS
184 case wxSYS_WINDOWMIN_X:
185 // TODO
a103111b 186 return 0;
4bb6408c
JS
187 case wxSYS_WINDOWMIN_Y:
188 // TODO
a103111b 189 return 0;
4bb6408c
JS
190 case wxSYS_SCREEN_X:
191 // TODO
a103111b 192 return 0;
4bb6408c
JS
193 case wxSYS_SCREEN_Y:
194 // TODO
a103111b 195 return 0;
4bb6408c
JS
196 case wxSYS_FRAMESIZE_X:
197 // TODO
a103111b 198 return 0;
4bb6408c
JS
199 case wxSYS_FRAMESIZE_Y:
200 // TODO
a103111b 201 return 0;
4bb6408c
JS
202 case wxSYS_SMALLICON_X:
203 // TODO
a103111b 204 return 0;
4bb6408c
JS
205 case wxSYS_SMALLICON_Y:
206 // TODO
a103111b 207 return 0;
4bb6408c
JS
208 case wxSYS_HSCROLL_Y:
209 // TODO
a103111b 210 return 0;
4bb6408c
JS
211 case wxSYS_VSCROLL_X:
212 // TODO
a103111b 213 return 0;
4bb6408c
JS
214 case wxSYS_VSCROLL_ARROW_X:
215 // TODO
a103111b 216 return 0;
4bb6408c
JS
217 case wxSYS_VSCROLL_ARROW_Y:
218 // TODO
a103111b 219 return 0;
4bb6408c
JS
220 case wxSYS_VTHUMB_Y:
221 // TODO
a103111b 222 return 0;
4bb6408c
JS
223 case wxSYS_CAPTION_Y:
224 // TODO
a103111b 225 return 0;
4bb6408c
JS
226 case wxSYS_MENU_Y:
227 // TODO
a103111b 228 return 0;
4bb6408c
JS
229 case wxSYS_NETWORK_PRESENT:
230 // TODO
a103111b 231 return 0;
4bb6408c
JS
232 case wxSYS_PENWINDOWS_PRESENT:
233 // TODO
a103111b 234 return 0;
4bb6408c
JS
235 case wxSYS_SHOW_SOUNDS:
236 // TODO
a103111b 237 return 0;
4bb6408c
JS
238 case wxSYS_SWAP_BUTTONS:
239 // TODO
a103111b
GD
240 return 0;
241 default:
242 return 0;
243 }
4bb6408c
JS
244}
245
a103111b 246bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
253293c1
VS
247{
248 switch (index)
249 {
250 case wxSYS_CAN_ICONIZE_FRAME:
251 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
a103111b
GD
252 return TRUE;
253
253293c1
VS
254 default:
255 return FALSE;
256 }
257}