]> git.saurik.com Git - wxWidgets.git/blame - src/motif/settings.cpp
Support for WXPM's native font info.
[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
JS
85 return wxColour("LIGHT GREY");
86 // return *wxWHITE;
e97f20a0
JS
87 }
88 }
89 return *wxWHITE;
4bb6408c
JS
90}
91
a103111b 92wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
4bb6408c 93{
16c1f7f3
JS
94 switch (index)
95 {
16c1f7f3
JS
96 case wxSYS_SYSTEM_FIXED_FONT:
97 {
e97f20a0 98 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
16c1f7f3
JS
99 break;
100 }
e97f20a0 101 case wxSYS_DEVICE_DEFAULT_FONT:
16c1f7f3 102 case wxSYS_SYSTEM_FONT:
16c1f7f3 103 case wxSYS_DEFAULT_GUI_FONT:
e97f20a0 104 default:
16c1f7f3 105 {
e97f20a0 106 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
16c1f7f3
JS
107 break;
108 }
109 }
110
4bb6408c
JS
111 return wxFont();
112}
113
114// Get a system metric, e.g. scrollbar size
a103111b 115int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
4bb6408c
JS
116{
117 switch ( index)
118 {
119 case wxSYS_MOUSE_BUTTONS:
120 // TODO
a103111b 121 return 0;
4bb6408c
JS
122 case wxSYS_BORDER_X:
123 // TODO
a103111b 124 return 0;
4bb6408c
JS
125 case wxSYS_BORDER_Y:
126 // TODO
a103111b 127 return 0;
4bb6408c
JS
128 case wxSYS_CURSOR_X:
129 // TODO
a103111b 130 return 0;
4bb6408c
JS
131 case wxSYS_CURSOR_Y:
132 // TODO
a103111b 133 return 0;
4bb6408c
JS
134 case wxSYS_DCLICK_X:
135 // TODO
a103111b 136 return 0;
4bb6408c
JS
137 case wxSYS_DCLICK_Y:
138 // TODO
a103111b 139 return 0;
4bb6408c
JS
140 case wxSYS_DRAG_X:
141 // TODO
a103111b 142 return 0;
4bb6408c
JS
143 case wxSYS_DRAG_Y:
144 // TODO
a103111b 145 return 0;
4bb6408c
JS
146 case wxSYS_EDGE_X:
147 // TODO
a103111b 148 return 0;
4bb6408c
JS
149 case wxSYS_EDGE_Y:
150 // TODO
a103111b 151 return 0;
4bb6408c
JS
152 case wxSYS_HSCROLL_ARROW_X:
153 // TODO
a103111b 154 return 0;
4bb6408c
JS
155 case wxSYS_HSCROLL_ARROW_Y:
156 // TODO
a103111b 157 return 0;
4bb6408c
JS
158 case wxSYS_HTHUMB_X:
159 // TODO
a103111b 160 return 0;
4bb6408c
JS
161 case wxSYS_ICON_X:
162 // TODO
a103111b 163 return 0;
4bb6408c
JS
164 case wxSYS_ICON_Y:
165 // TODO
a103111b 166 return 0;
4bb6408c
JS
167 case wxSYS_ICONSPACING_X:
168 // TODO
a103111b 169 return 0;
4bb6408c
JS
170 case wxSYS_ICONSPACING_Y:
171 // TODO
a103111b 172 return 0;
4bb6408c
JS
173 case wxSYS_WINDOWMIN_X:
174 // TODO
a103111b 175 return 0;
4bb6408c
JS
176 case wxSYS_WINDOWMIN_Y:
177 // TODO
a103111b 178 return 0;
4bb6408c
JS
179 case wxSYS_SCREEN_X:
180 // TODO
a103111b 181 return 0;
4bb6408c
JS
182 case wxSYS_SCREEN_Y:
183 // TODO
a103111b 184 return 0;
4bb6408c
JS
185 case wxSYS_FRAMESIZE_X:
186 // TODO
a103111b 187 return 0;
4bb6408c
JS
188 case wxSYS_FRAMESIZE_Y:
189 // TODO
a103111b 190 return 0;
4bb6408c
JS
191 case wxSYS_SMALLICON_X:
192 // TODO
a103111b 193 return 0;
4bb6408c
JS
194 case wxSYS_SMALLICON_Y:
195 // TODO
a103111b 196 return 0;
4bb6408c
JS
197 case wxSYS_HSCROLL_Y:
198 // TODO
a103111b 199 return 0;
4bb6408c
JS
200 case wxSYS_VSCROLL_X:
201 // TODO
a103111b 202 return 0;
4bb6408c
JS
203 case wxSYS_VSCROLL_ARROW_X:
204 // TODO
a103111b 205 return 0;
4bb6408c
JS
206 case wxSYS_VSCROLL_ARROW_Y:
207 // TODO
a103111b 208 return 0;
4bb6408c
JS
209 case wxSYS_VTHUMB_Y:
210 // TODO
a103111b 211 return 0;
4bb6408c
JS
212 case wxSYS_CAPTION_Y:
213 // TODO
a103111b 214 return 0;
4bb6408c
JS
215 case wxSYS_MENU_Y:
216 // TODO
a103111b 217 return 0;
4bb6408c
JS
218 case wxSYS_NETWORK_PRESENT:
219 // TODO
a103111b 220 return 0;
4bb6408c
JS
221 case wxSYS_PENWINDOWS_PRESENT:
222 // TODO
a103111b 223 return 0;
4bb6408c
JS
224 case wxSYS_SHOW_SOUNDS:
225 // TODO
a103111b 226 return 0;
4bb6408c
JS
227 case wxSYS_SWAP_BUTTONS:
228 // TODO
a103111b
GD
229 return 0;
230 default:
231 return 0;
232 }
4bb6408c
JS
233}
234
a103111b 235bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
253293c1
VS
236{
237 switch (index)
238 {
239 case wxSYS_CAN_ICONIZE_FRAME:
240 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
a103111b
GD
241 return TRUE;
242
253293c1
VS
243 default:
244 return FALSE;
245 }
246}