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