]> git.saurik.com Git - wxWidgets.git/blob - src/motif/settings.cpp
a29bffc9b2918781d82abc8b0967ecf3f94ca3ff
[wxWidgets.git] / src / motif / settings.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: motif/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
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
16 #ifdef __GNUG__
17 #pragma implementation "settings.h"
18 #endif
19
20 #include "wx/settings.h"
21 #include "wx/gdicmn.h"
22
23 wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
24 {
25 switch (index)
26 {
27 case wxSYS_COLOUR_WINDOW:
28 {
29 return *wxWHITE;
30 }
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:
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:
56 {
57 return *wxBLUE;
58 }
59 case wxSYS_COLOUR_BTNHIGHLIGHT:
60 case wxSYS_COLOUR_LISTBOX:
61 // case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT
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:
73 case wxSYS_COLOUR_BTNTEXT:
74 case wxSYS_COLOUR_INFOTEXT:
75 {
76 return *wxBLACK;
77 }
78 case wxSYS_COLOUR_HIGHLIGHTTEXT:
79 {
80 return *wxWHITE;
81 }
82 case wxSYS_COLOUR_INFOBK:
83 case wxSYS_COLOUR_APPWORKSPACE:
84 {
85 return wxColour("LIGHT GREY");
86 }
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") );
99 }
100 return *wxWHITE;
101 }
102
103 wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
104 {
105 switch (index)
106 {
107 case wxSYS_SYSTEM_FIXED_FONT:
108 {
109 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
110 break;
111 }
112 case wxSYS_DEVICE_DEFAULT_FONT:
113 case wxSYS_SYSTEM_FONT:
114 case wxSYS_DEFAULT_GUI_FONT:
115 default:
116 {
117 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
118 break;
119 }
120 }
121
122 return wxFont();
123 }
124
125 // Get a system metric, e.g. scrollbar size
126 int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
127 {
128 switch ( index)
129 {
130 case wxSYS_MOUSE_BUTTONS:
131 // TODO
132 case wxSYS_BORDER_X:
133 // TODO
134 case wxSYS_BORDER_Y:
135 // TODO
136 case wxSYS_CURSOR_X:
137 // TODO
138 case wxSYS_CURSOR_Y:
139 // TODO
140 case wxSYS_DCLICK_X:
141 // TODO
142 case wxSYS_DCLICK_Y:
143 // TODO
144 case wxSYS_DRAG_X:
145 // TODO
146 case wxSYS_DRAG_Y:
147 // TODO
148 case wxSYS_EDGE_X:
149 // TODO
150 case wxSYS_EDGE_Y:
151 // TODO
152 case wxSYS_HSCROLL_ARROW_X:
153 // TODO
154 case wxSYS_HSCROLL_ARROW_Y:
155 // TODO
156 case wxSYS_HTHUMB_X:
157 // TODO
158 case wxSYS_ICON_X:
159 // TODO
160 case wxSYS_ICON_Y:
161 // TODO
162 case wxSYS_ICONSPACING_X:
163 // TODO
164 case wxSYS_ICONSPACING_Y:
165 // TODO
166 case wxSYS_WINDOWMIN_X:
167 // TODO
168 case wxSYS_WINDOWMIN_Y:
169 // TODO
170 case wxSYS_SCREEN_X:
171 // TODO
172 case wxSYS_SCREEN_Y:
173 // TODO
174 case wxSYS_FRAMESIZE_X:
175 // TODO
176 case wxSYS_FRAMESIZE_Y:
177 // TODO
178 case wxSYS_SMALLICON_X:
179 // TODO
180 case wxSYS_SMALLICON_Y:
181 // TODO
182 case wxSYS_HSCROLL_Y:
183 // TODO
184 case wxSYS_VSCROLL_X:
185 // TODO
186 case wxSYS_VSCROLL_ARROW_X:
187 // TODO
188 case wxSYS_VSCROLL_ARROW_Y:
189 // TODO
190 case wxSYS_VTHUMB_Y:
191 // TODO
192 case wxSYS_CAPTION_Y:
193 // TODO
194 case wxSYS_MENU_Y:
195 // TODO
196 case wxSYS_NETWORK_PRESENT:
197 // TODO
198 case wxSYS_PENWINDOWS_PRESENT:
199 // TODO
200 case wxSYS_SHOW_SOUNDS:
201 // TODO
202 case wxSYS_SWAP_BUTTONS:
203 // TODO
204 default:
205 ;
206 }
207
208 return 0;
209 }
210
211 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
212 {
213 switch (index)
214 {
215 case wxSYS_CAN_ICONIZE_FRAME:
216 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
217 return TRUE;
218
219 default:
220 return FALSE;
221 }
222 }