]> git.saurik.com Git - wxWidgets.git/blob - src/x11/settings.cpp
Fix install_name_tool calls in OS X "make install".
[wxWidgets.git] / src / x11 / settings.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/x11/settings.cpp
3 // Purpose: wxSettings
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // for compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
13
14 // TODO: these settings should probably be configurable from some central or
15 // per-user file, which can be edited using a Windows-control-panel clone.
16 // Also they should be documented better. Some are very MS Windows-ish.
17
18 #include "wx/settings.h"
19
20 #ifndef WX_PRECOMP
21 #include "wx/gdicmn.h"
22 #endif
23
24 #include "wx/x11/private.h"
25
26 wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
27 {
28 switch (index)
29 {
30 case wxSYS_COLOUR_APPWORKSPACE:
31 return wxColour( 0xc0c0c0 );
32
33 default:
34 break;
35 }
36
37 // Overridden mostly by wxSystemSettings::GetColour in wxUniversal
38 return *wxWHITE;
39 }
40
41 wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
42 {
43 switch (index)
44 {
45 case wxSYS_SYSTEM_FIXED_FONT:
46 {
47 return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
48 break;
49 }
50 case wxSYS_DEVICE_DEFAULT_FONT:
51 case wxSYS_SYSTEM_FONT:
52 case wxSYS_DEFAULT_GUI_FONT:
53 default:
54 {
55 return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
56 break;
57 }
58 }
59
60 return wxFont();
61 }
62
63 // Get a system metric, e.g. scrollbar size
64 int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(win))
65 {
66 switch ( index)
67 {
68 // TODO case wxSYS_MOUSE_BUTTONS:
69 // TODO case wxSYS_BORDER_X:
70 // TODO case wxSYS_BORDER_Y:
71 // TODO case wxSYS_CURSOR_X:
72 // TODO case wxSYS_CURSOR_Y:
73 // TODO case wxSYS_DCLICK_X:
74 // TODO case wxSYS_DCLICK_Y:
75 // TODO case wxSYS_DRAG_X:
76 // TODO case wxSYS_DRAG_Y:
77 // TODO case wxSYS_EDGE_X:
78 // TODO case wxSYS_EDGE_Y:
79 // TODO case wxSYS_HSCROLL_ARROW_X:
80 // TODO case wxSYS_HSCROLL_ARROW_Y:
81 // TODO case wxSYS_HTHUMB_X:
82 // TODO case wxSYS_ICON_X:
83 // TODO case wxSYS_ICON_Y:
84 // TODO case wxSYS_ICONSPACING_X:
85 // TODO case wxSYS_ICONSPACING_Y:
86 // TODO case wxSYS_WINDOWMIN_X:
87 // TODO case wxSYS_WINDOWMIN_Y:
88
89 case wxSYS_SCREEN_X:
90 return DisplayWidth( wxGlobalDisplay(), 0 );
91
92 case wxSYS_SCREEN_Y:
93 return DisplayHeight( wxGlobalDisplay(), 0 );
94
95 // TODO case wxSYS_FRAMESIZE_X:
96 // TODO case wxSYS_FRAMESIZE_Y:
97 // TODO case wxSYS_SMALLICON_X:
98 // TODO case wxSYS_SMALLICON_Y:
99 // TODO case wxSYS_HSCROLL_Y:
100 // TODO case wxSYS_VSCROLL_X:
101 // TODO case wxSYS_VSCROLL_ARROW_X:
102 // TODO case wxSYS_VSCROLL_ARROW_Y:
103 // TODO case wxSYS_VTHUMB_Y:
104 // TODO case wxSYS_CAPTION_Y:
105 // TODO case wxSYS_MENU_Y:
106 // TODO case wxSYS_NETWORK_PRESENT:
107 // TODO case wxSYS_PENWINDOWS_PRESENT:
108 // TODO case wxSYS_SHOW_SOUNDS:
109 // TODO case wxSYS_SWAP_BUTTONS:
110
111 default:
112 return -1; // unsupported metric
113 }
114 }
115
116 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
117 {
118 switch (index)
119 {
120 case wxSYS_CAN_ICONIZE_FRAME:
121 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
122 return true;
123
124 default:
125 return false;
126 }
127 }