]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_settings.i
added a test to check how exception handling works with Win32 SEH; corrected copyright
[wxWidgets.git] / wxPython / src / _settings.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _settings.i
3 // Purpose: SWIG interface defs for wxSystemSettings and wxSystemOptions
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 3-July-1997
8 // RCS-ID: $Id$
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15
16 //---------------------------------------------------------------------------
17
18 %{
19 %}
20
21 //---------------------------------------------------------------------------
22 %newgroup;
23
24
25 enum wxSystemFont
26 {
27 wxSYS_OEM_FIXED_FONT = 10,
28 wxSYS_ANSI_FIXED_FONT,
29 wxSYS_ANSI_VAR_FONT,
30 wxSYS_SYSTEM_FONT,
31 wxSYS_DEVICE_DEFAULT_FONT,
32 wxSYS_DEFAULT_PALETTE,
33 wxSYS_SYSTEM_FIXED_FONT,
34 wxSYS_DEFAULT_GUI_FONT,
35 wxSYS_ICONTITLE_FONT
36 };
37
38
39
40 enum wxSystemColour
41 {
42 wxSYS_COLOUR_SCROLLBAR,
43 wxSYS_COLOUR_BACKGROUND,
44 wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
45 wxSYS_COLOUR_ACTIVECAPTION,
46 wxSYS_COLOUR_INACTIVECAPTION,
47 wxSYS_COLOUR_MENU,
48 wxSYS_COLOUR_WINDOW,
49 wxSYS_COLOUR_WINDOWFRAME,
50 wxSYS_COLOUR_MENUTEXT,
51 wxSYS_COLOUR_WINDOWTEXT,
52 wxSYS_COLOUR_CAPTIONTEXT,
53 wxSYS_COLOUR_ACTIVEBORDER,
54 wxSYS_COLOUR_INACTIVEBORDER,
55 wxSYS_COLOUR_APPWORKSPACE,
56 wxSYS_COLOUR_HIGHLIGHT,
57 wxSYS_COLOUR_HIGHLIGHTTEXT,
58 wxSYS_COLOUR_BTNFACE,
59 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
60 wxSYS_COLOUR_BTNSHADOW,
61 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
62 wxSYS_COLOUR_GRAYTEXT,
63 wxSYS_COLOUR_BTNTEXT,
64 wxSYS_COLOUR_INACTIVECAPTIONTEXT,
65 wxSYS_COLOUR_BTNHIGHLIGHT,
66 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
67 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
68 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
69 wxSYS_COLOUR_3DDKSHADOW,
70 wxSYS_COLOUR_3DLIGHT,
71 wxSYS_COLOUR_INFOTEXT,
72 wxSYS_COLOUR_INFOBK,
73 wxSYS_COLOUR_LISTBOX,
74 wxSYS_COLOUR_HOTLIGHT,
75 wxSYS_COLOUR_GRADIENTACTIVECAPTION,
76 wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
77 wxSYS_COLOUR_MENUHILIGHT,
78 wxSYS_COLOUR_MENUBAR,
79
80 wxSYS_COLOUR_MAX
81 };
82
83
84
85
86 enum wxSystemMetric
87 {
88 wxSYS_MOUSE_BUTTONS = 1,
89 wxSYS_BORDER_X,
90 wxSYS_BORDER_Y,
91 wxSYS_CURSOR_X,
92 wxSYS_CURSOR_Y,
93 wxSYS_DCLICK_X,
94 wxSYS_DCLICK_Y,
95 wxSYS_DRAG_X,
96 wxSYS_DRAG_Y,
97 wxSYS_EDGE_X,
98 wxSYS_EDGE_Y,
99 wxSYS_HSCROLL_ARROW_X,
100 wxSYS_HSCROLL_ARROW_Y,
101 wxSYS_HTHUMB_X,
102 wxSYS_ICON_X,
103 wxSYS_ICON_Y,
104 wxSYS_ICONSPACING_X,
105 wxSYS_ICONSPACING_Y,
106 wxSYS_WINDOWMIN_X,
107 wxSYS_WINDOWMIN_Y,
108 wxSYS_SCREEN_X,
109 wxSYS_SCREEN_Y,
110 wxSYS_FRAMESIZE_X,
111 wxSYS_FRAMESIZE_Y,
112 wxSYS_SMALLICON_X,
113 wxSYS_SMALLICON_Y,
114 wxSYS_HSCROLL_Y,
115 wxSYS_VSCROLL_X,
116 wxSYS_VSCROLL_ARROW_X,
117 wxSYS_VSCROLL_ARROW_Y,
118 wxSYS_VTHUMB_Y,
119 wxSYS_CAPTION_Y,
120 wxSYS_MENU_Y,
121 wxSYS_NETWORK_PRESENT,
122 wxSYS_PENWINDOWS_PRESENT,
123 wxSYS_SHOW_SOUNDS,
124 wxSYS_SWAP_BUTTONS
125 };
126
127
128
129 enum wxSystemFeature
130 {
131 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
132 wxSYS_CAN_ICONIZE_FRAME
133 };
134
135
136
137 enum wxSystemScreenType
138 {
139 wxSYS_SCREEN_NONE = 0, // not yet defined
140
141 wxSYS_SCREEN_TINY, // <
142 wxSYS_SCREEN_PDA, // >= 320x240
143 wxSYS_SCREEN_SMALL, // >= 640x480
144 wxSYS_SCREEN_DESKTOP // >= 800x600
145 };
146
147
148
149 //---------------------------------------------------------------------------
150
151 MustHaveApp(wxSystemSettings::GetColour);
152 MustHaveApp(wxSystemSettings::GetFont);
153 MustHaveApp(wxSystemSettings::GetMetric);
154 MustHaveApp(wxSystemSettings::HasFeature);
155 MustHaveApp(wxSystemSettings::GetScreenType);
156 MustHaveApp(wxSystemSettings::SetScreenType);
157
158 class wxSystemSettings
159 {
160 public:
161 // get a standard system colour
162 static wxColour GetColour(wxSystemColour index);
163
164 // get a standard system font
165 static wxFont GetFont(wxSystemFont index);
166
167 // get a system-dependent metric
168 static int GetMetric(wxSystemMetric index);
169
170 // return True if the port has certain feature
171 static bool HasFeature(wxSystemFeature index);
172
173
174 // Get system screen design (desktop, pda, ..) used for
175 // laying out various dialogs.
176 static wxSystemScreenType GetScreenType();
177
178 // Override default.
179 static void SetScreenType( wxSystemScreenType screen );
180
181 };
182
183
184 //---------------------------------------------------------------------------
185
186 MAKE_CONST_WXSTRING(WINDOW_DEFAULT_VARIANT);
187
188 class wxSystemOptions : public wxObject
189 {
190 public:
191 wxSystemOptions();
192
193 // User-customizable hints to wxWindows or associated libraries
194 // These could also be used to influence GetSystem... calls, indeed
195 // to implement SetSystemColour/Font/Metric
196
197 static void SetOption(const wxString& name, const wxString& value);
198 %Rename(SetOptionInt, static void, SetOption(const wxString& name, int value));
199 static wxString GetOption(const wxString& name) ;
200 static int GetOptionInt(const wxString& name) ;
201 static bool HasOption(const wxString& name) ;
202 };
203
204
205
206 //---------------------------------------------------------------------------