]> git.saurik.com Git - wxWidgets.git/blame - src/x11/settings.cpp
extending calculation of visible region
[wxWidgets.git] / src / x11 / settings.cpp
CommitLineData
83df96d6
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
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
14f355c2 16#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
83df96d6
JS
17#pragma implementation "settings.h"
18#endif
19
20#include "wx/settings.h"
21#include "wx/gdicmn.h"
2b5f62a0 22#include "wx/x11/private.h"
83df96d6
JS
23
24wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
25{
c2c0dabf
RR
26 switch (index)
27 {
28 case wxSYS_COLOUR_APPWORKSPACE:
29 return wxColour( 0xc0c0c0 );
30
31 default:
32 break;
33 }
34
35 // Overridden mostly by wxSystemSettings::GetColour in wxUniversal
b28d3abf 36 return *wxWHITE;
83df96d6
JS
37}
38
39wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
40{
41 switch (index)
42 {
43 case wxSYS_SYSTEM_FIXED_FONT:
44 {
45 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
46 break;
47 }
48 case wxSYS_DEVICE_DEFAULT_FONT:
49 case wxSYS_SYSTEM_FONT:
50 case wxSYS_DEFAULT_GUI_FONT:
51 default:
52 {
ad0e4b66 53 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
83df96d6
JS
54 break;
55 }
56 }
57
58 return wxFont();
59}
60
61// Get a system metric, e.g. scrollbar size
62int wxSystemSettingsNative::GetMetric(wxSystemMetric index)
63{
64 switch ( index)
65 {
66 case wxSYS_MOUSE_BUTTONS:
67 // TODO
68 return 0;
69 case wxSYS_BORDER_X:
70 // TODO
71 return 0;
72 case wxSYS_BORDER_Y:
73 // TODO
74 return 0;
75 case wxSYS_CURSOR_X:
76 // TODO
77 return 0;
78 case wxSYS_CURSOR_Y:
79 // TODO
80 return 0;
81 case wxSYS_DCLICK_X:
82 // TODO
83 return 0;
84 case wxSYS_DCLICK_Y:
85 // TODO
86 return 0;
87 case wxSYS_DRAG_X:
88 // TODO
89 return 0;
90 case wxSYS_DRAG_Y:
91 // TODO
92 return 0;
93 case wxSYS_EDGE_X:
94 // TODO
95 return 0;
96 case wxSYS_EDGE_Y:
97 // TODO
98 return 0;
99 case wxSYS_HSCROLL_ARROW_X:
100 // TODO
101 return 0;
102 case wxSYS_HSCROLL_ARROW_Y:
103 // TODO
104 return 0;
105 case wxSYS_HTHUMB_X:
106 // TODO
107 return 0;
108 case wxSYS_ICON_X:
109 // TODO
110 return 0;
111 case wxSYS_ICON_Y:
112 // TODO
113 return 0;
114 case wxSYS_ICONSPACING_X:
115 // TODO
116 return 0;
117 case wxSYS_ICONSPACING_Y:
118 // TODO
119 return 0;
120 case wxSYS_WINDOWMIN_X:
121 // TODO
122 return 0;
123 case wxSYS_WINDOWMIN_Y:
124 // TODO
125 return 0;
126 case wxSYS_SCREEN_X:
2b5f62a0
VZ
127 return DisplayWidth( wxGlobalDisplay(), 0 );
128
83df96d6 129 case wxSYS_SCREEN_Y:
2b5f62a0
VZ
130 return DisplayHeight( wxGlobalDisplay(), 0 );
131
83df96d6
JS
132 case wxSYS_FRAMESIZE_X:
133 // TODO
134 return 0;
135 case wxSYS_FRAMESIZE_Y:
136 // TODO
137 return 0;
138 case wxSYS_SMALLICON_X:
139 // TODO
140 return 0;
141 case wxSYS_SMALLICON_Y:
142 // TODO
143 return 0;
144 case wxSYS_HSCROLL_Y:
145 // TODO
146 return 0;
147 case wxSYS_VSCROLL_X:
148 // TODO
149 return 0;
150 case wxSYS_VSCROLL_ARROW_X:
151 // TODO
152 return 0;
153 case wxSYS_VSCROLL_ARROW_Y:
154 // TODO
155 return 0;
156 case wxSYS_VTHUMB_Y:
157 // TODO
158 return 0;
159 case wxSYS_CAPTION_Y:
160 // TODO
161 return 0;
162 case wxSYS_MENU_Y:
163 // TODO
164 return 0;
165 case wxSYS_NETWORK_PRESENT:
166 // TODO
167 return 0;
168 case wxSYS_PENWINDOWS_PRESENT:
169 // TODO
170 return 0;
171 case wxSYS_SHOW_SOUNDS:
172 // TODO
173 return 0;
174 case wxSYS_SWAP_BUTTONS:
175 // TODO
176 return 0;
177 default:
178 return 0;
179 }
180}
181
182bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
183{
184 switch (index)
185 {
186 case wxSYS_CAN_ICONIZE_FRAME:
187 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
188 return TRUE;
189
190 default:
191 return FALSE;
192 }
193}