]> git.saurik.com Git - wxWidgets.git/blame - src/x11/settings.cpp
clean-up and fix
[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
65571936 9// Licence: wxWindows licence
83df96d6
JS
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
83df96d6
JS
16#include "wx/settings.h"
17#include "wx/gdicmn.h"
2b5f62a0 18#include "wx/x11/private.h"
83df96d6
JS
19
20wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
21{
c2c0dabf
RR
22 switch (index)
23 {
24 case wxSYS_COLOUR_APPWORKSPACE:
25 return wxColour( 0xc0c0c0 );
26
27 default:
28 break;
29 }
30
31 // Overridden mostly by wxSystemSettings::GetColour in wxUniversal
b28d3abf 32 return *wxWHITE;
83df96d6
JS
33}
34
35wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
36{
37 switch (index)
38 {
39 case wxSYS_SYSTEM_FIXED_FONT:
40 {
41 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
42 break;
43 }
44 case wxSYS_DEVICE_DEFAULT_FONT:
45 case wxSYS_SYSTEM_FONT:
46 case wxSYS_DEFAULT_GUI_FONT:
47 default:
48 {
ad0e4b66 49 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
83df96d6
JS
50 break;
51 }
52 }
53
54 return wxFont();
55}
56
57// Get a system metric, e.g. scrollbar size
9b0b5ba7 58int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(win))
83df96d6
JS
59{
60 switch ( index)
61 {
1d451c5b
RD
62 // TODO case wxSYS_MOUSE_BUTTONS:
63 // TODO case wxSYS_BORDER_X:
64 // TODO case wxSYS_BORDER_Y:
65 // TODO case wxSYS_CURSOR_X:
66 // TODO case wxSYS_CURSOR_Y:
67 // TODO case wxSYS_DCLICK_X:
68 // TODO case wxSYS_DCLICK_Y:
69 // TODO case wxSYS_DRAG_X:
70 // TODO case wxSYS_DRAG_Y:
71 // TODO case wxSYS_EDGE_X:
72 // TODO case wxSYS_EDGE_Y:
73 // TODO case wxSYS_HSCROLL_ARROW_X:
74 // TODO case wxSYS_HSCROLL_ARROW_Y:
75 // TODO case wxSYS_HTHUMB_X:
76 // TODO case wxSYS_ICON_X:
77 // TODO case wxSYS_ICON_Y:
78 // TODO case wxSYS_ICONSPACING_X:
79 // TODO case wxSYS_ICONSPACING_Y:
80 // TODO case wxSYS_WINDOWMIN_X:
81 // TODO case wxSYS_WINDOWMIN_Y:
82
83df96d6 83 case wxSYS_SCREEN_X:
2b5f62a0
VZ
84 return DisplayWidth( wxGlobalDisplay(), 0 );
85
83df96d6 86 case wxSYS_SCREEN_Y:
2b5f62a0
VZ
87 return DisplayHeight( wxGlobalDisplay(), 0 );
88
1d451c5b
RD
89 // TODO case wxSYS_FRAMESIZE_X:
90 // TODO case wxSYS_FRAMESIZE_Y:
91 // TODO case wxSYS_SMALLICON_X:
92 // TODO case wxSYS_SMALLICON_Y:
93 // TODO case wxSYS_HSCROLL_Y:
94 // TODO case wxSYS_VSCROLL_X:
95 // TODO case wxSYS_VSCROLL_ARROW_X:
96 // TODO case wxSYS_VSCROLL_ARROW_Y:
97 // TODO case wxSYS_VTHUMB_Y:
98 // TODO case wxSYS_CAPTION_Y:
99 // TODO case wxSYS_MENU_Y:
100 // TODO case wxSYS_NETWORK_PRESENT:
101 // TODO case wxSYS_PENWINDOWS_PRESENT:
102 // TODO case wxSYS_SHOW_SOUNDS:
103 // TODO case wxSYS_SWAP_BUTTONS:
104
83df96d6 105 default:
1d451c5b 106 return -1; // unsupported metric
83df96d6
JS
107 }
108}
109
110bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
111{
112 switch (index)
113 {
114 case wxSYS_CAN_ICONIZE_FRAME:
115 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
116 return TRUE;
117
118 default:
119 return FALSE;
120 }
121}