]>
Commit | Line | Data |
---|---|---|
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 | ||
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 wxSystemSettings::GetSystemColour(int index) | |
24 | { | |
25 | switch (index) | |
26 | { | |
27 | case wxSYS_COLOUR_SCROLLBAR: | |
28 | // case wxSYS_COLOUR_DESKTOP: // Same as wxSYS_COLOUR_BACKGROUND | |
29 | case wxSYS_COLOUR_BACKGROUND: | |
30 | case wxSYS_COLOUR_ACTIVECAPTION: | |
31 | case wxSYS_COLOUR_INACTIVECAPTION: | |
32 | case wxSYS_COLOUR_MENU: | |
33 | case wxSYS_COLOUR_WINDOW: | |
34 | case wxSYS_COLOUR_WINDOWFRAME: | |
35 | case wxSYS_COLOUR_ACTIVEBORDER: | |
36 | case wxSYS_COLOUR_INACTIVEBORDER: | |
37 | case wxSYS_COLOUR_BTNFACE: | |
38 | // case wxSYS_COLOUR_3DFACE: // Same as wxSYS_COLOUR_BTNFACE | |
39 | case wxSYS_COLOUR_GRAYTEXT: | |
40 | { | |
41 | return wxColour("LIGHT GREY"); | |
42 | } | |
43 | case wxSYS_COLOUR_BTNSHADOW: | |
44 | // case wxSYS_COLOUR_3DSHADOW: // Same as wxSYS_COLOUR_BTNSHADOW | |
45 | { | |
46 | return wxColour("GREY"); | |
47 | } | |
48 | case wxSYS_COLOUR_3DDKSHADOW: | |
49 | { | |
50 | return *wxBLACK; | |
51 | } | |
52 | case wxSYS_COLOUR_HIGHLIGHT: | |
53 | case wxSYS_COLOUR_BTNHIGHLIGHT: | |
54 | // case wxSYS_COLOUR_3DHIGHLIGHT: // Same as wxSYS_COLOUR_BTNHIGHLIGHT | |
55 | { | |
56 | return *wxWHITE; | |
57 | } | |
58 | case wxSYS_COLOUR_3DLIGHT: | |
59 | { | |
60 | return wxColour("LIGHT GREY"); | |
61 | } | |
62 | case wxSYS_COLOUR_MENUTEXT: | |
63 | case wxSYS_COLOUR_WINDOWTEXT: | |
64 | case wxSYS_COLOUR_CAPTIONTEXT: | |
65 | case wxSYS_COLOUR_INACTIVECAPTIONTEXT: | |
66 | case wxSYS_COLOUR_INFOTEXT: | |
67 | { | |
68 | return *wxBLACK; | |
69 | } | |
70 | case wxSYS_COLOUR_HIGHLIGHTTEXT: | |
71 | { | |
72 | return *wxBLUE; | |
73 | } | |
74 | case wxSYS_COLOUR_INFOBK: | |
75 | case wxSYS_COLOUR_APPWORKSPACE: | |
76 | { | |
77 | return wxColour("LIGHT GREY"); | |
78 | // return *wxWHITE; | |
79 | } | |
80 | } | |
81 | return *wxWHITE; | |
82 | } | |
83 | ||
84 | wxFont wxSystemSettings::GetSystemFont(int index) | |
85 | { | |
86 | switch (index) | |
87 | { | |
88 | case wxSYS_SYSTEM_FIXED_FONT: | |
89 | { | |
90 | return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE); | |
91 | break; | |
92 | } | |
93 | case wxSYS_DEVICE_DEFAULT_FONT: | |
94 | case wxSYS_SYSTEM_FONT: | |
95 | case wxSYS_DEFAULT_GUI_FONT: | |
96 | default: | |
97 | { | |
98 | return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE); | |
99 | break; | |
100 | } | |
101 | } | |
102 | ||
103 | return wxFont(); | |
104 | } | |
105 | ||
106 | // Get a system metric, e.g. scrollbar size | |
107 | int wxSystemSettings::GetSystemMetric(int index) | |
108 | { | |
109 | switch ( index) | |
110 | { | |
111 | case wxSYS_MOUSE_BUTTONS: | |
112 | // TODO | |
113 | return 0; | |
114 | case wxSYS_BORDER_X: | |
115 | // TODO | |
116 | return 0; | |
117 | case wxSYS_BORDER_Y: | |
118 | // TODO | |
119 | return 0; | |
120 | case wxSYS_CURSOR_X: | |
121 | // TODO | |
122 | return 0; | |
123 | case wxSYS_CURSOR_Y: | |
124 | // TODO | |
125 | return 0; | |
126 | case wxSYS_DCLICK_X: | |
127 | // TODO | |
128 | return 0; | |
129 | case wxSYS_DCLICK_Y: | |
130 | // TODO | |
131 | return 0; | |
132 | case wxSYS_DRAG_X: | |
133 | // TODO | |
134 | return 0; | |
135 | case wxSYS_DRAG_Y: | |
136 | // TODO | |
137 | return 0; | |
138 | case wxSYS_EDGE_X: | |
139 | // TODO | |
140 | return 0; | |
141 | case wxSYS_EDGE_Y: | |
142 | // TODO | |
143 | return 0; | |
144 | case wxSYS_HSCROLL_ARROW_X: | |
145 | // TODO | |
146 | return 0; | |
147 | case wxSYS_HSCROLL_ARROW_Y: | |
148 | // TODO | |
149 | return 0; | |
150 | case wxSYS_HTHUMB_X: | |
151 | // TODO | |
152 | return 0; | |
153 | case wxSYS_ICON_X: | |
154 | // TODO | |
155 | return 0; | |
156 | case wxSYS_ICON_Y: | |
157 | // TODO | |
158 | return 0; | |
159 | case wxSYS_ICONSPACING_X: | |
160 | // TODO | |
161 | return 0; | |
162 | case wxSYS_ICONSPACING_Y: | |
163 | // TODO | |
164 | return 0; | |
165 | case wxSYS_WINDOWMIN_X: | |
166 | // TODO | |
167 | return 0; | |
168 | case wxSYS_WINDOWMIN_Y: | |
169 | // TODO | |
170 | return 0; | |
171 | case wxSYS_SCREEN_X: | |
172 | // TODO | |
173 | return 0; | |
174 | case wxSYS_SCREEN_Y: | |
175 | // TODO | |
176 | return 0; | |
177 | case wxSYS_FRAMESIZE_X: | |
178 | // TODO | |
179 | return 0; | |
180 | case wxSYS_FRAMESIZE_Y: | |
181 | // TODO | |
182 | return 0; | |
183 | case wxSYS_SMALLICON_X: | |
184 | // TODO | |
185 | return 0; | |
186 | case wxSYS_SMALLICON_Y: | |
187 | // TODO | |
188 | return 0; | |
189 | case wxSYS_HSCROLL_Y: | |
190 | // TODO | |
191 | return 0; | |
192 | case wxSYS_VSCROLL_X: | |
193 | // TODO | |
194 | return 0; | |
195 | case wxSYS_VSCROLL_ARROW_X: | |
196 | // TODO | |
197 | return 0; | |
198 | case wxSYS_VSCROLL_ARROW_Y: | |
199 | // TODO | |
200 | return 0; | |
201 | case wxSYS_VTHUMB_Y: | |
202 | // TODO | |
203 | return 0; | |
204 | case wxSYS_CAPTION_Y: | |
205 | // TODO | |
206 | return 0; | |
207 | case wxSYS_MENU_Y: | |
208 | // TODO | |
209 | return 0; | |
210 | case wxSYS_NETWORK_PRESENT: | |
211 | // TODO | |
212 | return 0; | |
213 | case wxSYS_PENWINDOWS_PRESENT: | |
214 | // TODO | |
215 | return 0; | |
216 | case wxSYS_SHOW_SOUNDS: | |
217 | // TODO | |
218 | return 0; | |
219 | case wxSYS_SWAP_BUTTONS: | |
220 | // TODO | |
221 | return 0; | |
222 | default: | |
223 | return 0; | |
224 | } | |
225 | return 0; | |
226 | } | |
227 |