]> git.saurik.com Git - wxWidgets.git/blob - include/wx/settings.h
getting rid of several graf port handling routines
[wxWidgets.git] / include / wx / settings.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/settings.h
3 // Purpose: wxSystemSettingsBase class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SETTINGS_H_BASE_
13 #define _WX_SETTINGS_H_BASE_
14
15 #include "wx/colour.h"
16 #include "wx/font.h"
17
18 // possible values for wxSystemSettings::GetFont() parameter
19 //
20 // NB: wxMSW assumes that they have the same values as the parameters of
21 // Windows GetStockObject() API, don't change the values!
22 enum wxSystemFont
23 {
24 wxSYS_OEM_FIXED_FONT = 10,
25 wxSYS_ANSI_FIXED_FONT,
26 wxSYS_ANSI_VAR_FONT,
27 wxSYS_SYSTEM_FONT,
28 wxSYS_DEVICE_DEFAULT_FONT,
29 wxSYS_DEFAULT_PALETTE,
30 wxSYS_SYSTEM_FIXED_FONT,
31 wxSYS_DEFAULT_GUI_FONT
32 };
33
34 // possible values for wxSystemSettings::GetColour() parameter
35 //
36 // NB: wxMSW assumes that they have the same values as the parameters of
37 // Windows GetSysColor() API, don't change the values!
38 enum wxSystemColour
39 {
40 wxSYS_COLOUR_SCROLLBAR,
41 wxSYS_COLOUR_BACKGROUND,
42 wxSYS_COLOUR_ACTIVECAPTION,
43 wxSYS_COLOUR_INACTIVECAPTION,
44 wxSYS_COLOUR_MENU,
45 wxSYS_COLOUR_WINDOW,
46 wxSYS_COLOUR_WINDOWFRAME,
47 wxSYS_COLOUR_MENUTEXT,
48 wxSYS_COLOUR_WINDOWTEXT,
49 wxSYS_COLOUR_CAPTIONTEXT,
50 wxSYS_COLOUR_ACTIVEBORDER,
51 wxSYS_COLOUR_INACTIVEBORDER,
52 wxSYS_COLOUR_APPWORKSPACE,
53 wxSYS_COLOUR_HIGHLIGHT,
54 wxSYS_COLOUR_HIGHLIGHTTEXT,
55 wxSYS_COLOUR_BTNFACE,
56 wxSYS_COLOUR_BTNSHADOW,
57 wxSYS_COLOUR_GRAYTEXT,
58 wxSYS_COLOUR_BTNTEXT,
59 wxSYS_COLOUR_INACTIVECAPTIONTEXT,
60 wxSYS_COLOUR_BTNHIGHLIGHT,
61 wxSYS_COLOUR_3DDKSHADOW,
62 wxSYS_COLOUR_3DLIGHT,
63 wxSYS_COLOUR_INFOTEXT,
64 wxSYS_COLOUR_INFOBK,
65 wxSYS_COLOUR_LISTBOX,
66
67 wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
68 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
69 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
70 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
71 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
72 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT
73 };
74
75 // possible values for wxSystemSettings::GetMetric() parameter
76 enum wxSystemMetric
77 {
78 wxSYS_MOUSE_BUTTONS = 1,
79 wxSYS_BORDER_X,
80 wxSYS_BORDER_Y,
81 wxSYS_CURSOR_X,
82 wxSYS_CURSOR_Y,
83 wxSYS_DCLICK_X,
84 wxSYS_DCLICK_Y,
85 wxSYS_DRAG_X,
86 wxSYS_DRAG_Y,
87 wxSYS_EDGE_X,
88 wxSYS_EDGE_Y,
89 wxSYS_HSCROLL_ARROW_X,
90 wxSYS_HSCROLL_ARROW_Y,
91 wxSYS_HTHUMB_X,
92 wxSYS_ICON_X,
93 wxSYS_ICON_Y,
94 wxSYS_ICONSPACING_X,
95 wxSYS_ICONSPACING_Y,
96 wxSYS_WINDOWMIN_X,
97 wxSYS_WINDOWMIN_Y,
98 wxSYS_SCREEN_X,
99 wxSYS_SCREEN_Y,
100 wxSYS_FRAMESIZE_X,
101 wxSYS_FRAMESIZE_Y,
102 wxSYS_SMALLICON_X,
103 wxSYS_SMALLICON_Y,
104 wxSYS_HSCROLL_Y,
105 wxSYS_VSCROLL_X,
106 wxSYS_VSCROLL_ARROW_X,
107 wxSYS_VSCROLL_ARROW_Y,
108 wxSYS_VTHUMB_Y,
109 wxSYS_CAPTION_Y,
110 wxSYS_MENU_Y,
111 wxSYS_NETWORK_PRESENT,
112 wxSYS_PENWINDOWS_PRESENT,
113 wxSYS_SHOW_SOUNDS,
114 wxSYS_SWAP_BUTTONS
115 };
116
117 // possible values for wxSystemSettings::HasFeature() parameter
118 enum wxSystemFeature
119 {
120 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
121 wxSYS_CAN_ICONIZE_FRAME
122 };
123
124 // ----------------------------------------------------------------------------
125 // wxSystemSettingsBase: defines the API for wxSystemSettings class
126 // ----------------------------------------------------------------------------
127
128 // this is a namespace rather than a class: it has only non virtual static
129 // functions
130 //
131 // also note that the methods are implemented in the platform-specific source
132 // files (i.e. this is not a real base class as we can't override its virtual
133 // functions because it doesn't have any)
134
135 #if 0
136 class WXDLLEXPORT wxSystemSettingsBase
137 {
138 public:
139 // get a standard system colour
140 static wxColour GetColour(wxSystemColour index);
141
142 // get a standard system font
143 static wxFont GetFont(wxSystemFont index);
144
145 // get a system-dependent metric
146 static int GetMetric(wxSystemMetric index);
147
148 // return true if the port has certain feature
149 static bool HasFeature(wxSystemFeature index);
150
151
152 // the backwards compatible versions, don't use these methods in the new
153 // code!
154 static wxColour GetSystemColour(int index)
155 { return GetColour((wxSystemColour)index); }
156 static wxFont GetSystemFont(int index)
157 { return GetFont((wxSystemFont)index); }
158 static int GetSystemMetric(int index)
159 { return GetMetric((wxSystemMetric)index); }
160 static bool GetCapability(int index)
161 { return HasFeature((wxSystemFeature)index); }
162 };
163 #endif
164
165 // ----------------------------------------------------------------------------
166 // include the declaration of the real platform-dependent class
167 // ----------------------------------------------------------------------------
168
169 #if defined(__WXMSW__)
170 #include "wx/msw/settings.h"
171 #elif defined(__WXMOTIF__)
172 #include "wx/motif/settings.h"
173 #elif defined(__WXGTK__)
174 #include "wx/gtk/settings.h"
175 #elif defined(__WXMGL__)
176 #include "wx/mgl/settings.h"
177 #elif defined(__WXMAC__)
178 #include "wx/mac/settings.h"
179 #elif defined(__WXPM__)
180 #include "wx/os2/settings.h"
181 #endif
182
183 #endif
184 // _WX_SETTINGS_H_BASE_
185