]> git.saurik.com Git - wxWidgets.git/blame - src/motif/settings.cpp
fixed more printf() warnings
[wxWidgets.git] / src / motif / settings.cpp
CommitLineData
4bb6408c 1/////////////////////////////////////////////////////////////////////////////
0af4b6e4 2// Name: motif/settings.cpp
4bb6408c
JS
3// Purpose: wxSettings
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
0af4b6e4 9// Licence: wxWindows licence
4bb6408c
JS
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 127{
0af4b6e4
VZ
128 switch ( index)
129 {
4bb6408c
JS
130 case wxSYS_MOUSE_BUTTONS:
131 // TODO
4bb6408c
JS
132 case wxSYS_BORDER_X:
133 // TODO
4bb6408c
JS
134 case wxSYS_BORDER_Y:
135 // TODO
4bb6408c
JS
136 case wxSYS_CURSOR_X:
137 // TODO
4bb6408c
JS
138 case wxSYS_CURSOR_Y:
139 // TODO
4bb6408c
JS
140 case wxSYS_DCLICK_X:
141 // TODO
4bb6408c
JS
142 case wxSYS_DCLICK_Y:
143 // TODO
4bb6408c
JS
144 case wxSYS_DRAG_X:
145 // TODO
4bb6408c
JS
146 case wxSYS_DRAG_Y:
147 // TODO
4bb6408c
JS
148 case wxSYS_EDGE_X:
149 // TODO
4bb6408c
JS
150 case wxSYS_EDGE_Y:
151 // TODO
4bb6408c
JS
152 case wxSYS_HSCROLL_ARROW_X:
153 // TODO
4bb6408c
JS
154 case wxSYS_HSCROLL_ARROW_Y:
155 // TODO
4bb6408c
JS
156 case wxSYS_HTHUMB_X:
157 // TODO
4bb6408c
JS
158 case wxSYS_ICON_X:
159 // TODO
4bb6408c
JS
160 case wxSYS_ICON_Y:
161 // TODO
4bb6408c
JS
162 case wxSYS_ICONSPACING_X:
163 // TODO
4bb6408c
JS
164 case wxSYS_ICONSPACING_Y:
165 // TODO
4bb6408c
JS
166 case wxSYS_WINDOWMIN_X:
167 // TODO
4bb6408c
JS
168 case wxSYS_WINDOWMIN_Y:
169 // TODO
4bb6408c
JS
170 case wxSYS_SCREEN_X:
171 // TODO
4bb6408c
JS
172 case wxSYS_SCREEN_Y:
173 // TODO
4bb6408c
JS
174 case wxSYS_FRAMESIZE_X:
175 // TODO
4bb6408c
JS
176 case wxSYS_FRAMESIZE_Y:
177 // TODO
4bb6408c
JS
178 case wxSYS_SMALLICON_X:
179 // TODO
4bb6408c
JS
180 case wxSYS_SMALLICON_Y:
181 // TODO
4bb6408c
JS
182 case wxSYS_HSCROLL_Y:
183 // TODO
4bb6408c
JS
184 case wxSYS_VSCROLL_X:
185 // TODO
4bb6408c
JS
186 case wxSYS_VSCROLL_ARROW_X:
187 // TODO
4bb6408c
JS
188 case wxSYS_VSCROLL_ARROW_Y:
189 // TODO
4bb6408c
JS
190 case wxSYS_VTHUMB_Y:
191 // TODO
4bb6408c
JS
192 case wxSYS_CAPTION_Y:
193 // TODO
4bb6408c
JS
194 case wxSYS_MENU_Y:
195 // TODO
4bb6408c
JS
196 case wxSYS_NETWORK_PRESENT:
197 // TODO
4bb6408c
JS
198 case wxSYS_PENWINDOWS_PRESENT:
199 // TODO
4bb6408c
JS
200 case wxSYS_SHOW_SOUNDS:
201 // TODO
4bb6408c
JS
202 case wxSYS_SWAP_BUTTONS:
203 // TODO
a103111b 204 default:
0af4b6e4 205 ;
a103111b 206 }
0af4b6e4
VZ
207
208 return 0;
4bb6408c
JS
209}
210
a103111b 211bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
253293c1
VS
212{
213 switch (index)
214 {
0af4b6e4 215 case wxSYS_CAN_ICONIZE_FRAME:
253293c1 216 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
a103111b 217 return TRUE;
0af4b6e4 218
253293c1
VS
219 default:
220 return FALSE;
221 }
222}