]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/_settings.i
Don't steal VK_RETURN for wxEVT_COMMAND_LIST_ITEM_ACTIVATED if any of
[wxWidgets.git] / wxPython / src / _settings.i
CommitLineData
d14a1e28
RD
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
25enum 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
40enum 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
86enum 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
129enum wxSystemFeature
130{
131 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
38dc1537
RD
132 wxSYS_CAN_ICONIZE_FRAME,
133 wxSYS_TABLET_PRESENT
d14a1e28
RD
134};
135
136
137
138enum wxSystemScreenType
139{
140 wxSYS_SCREEN_NONE = 0, // not yet defined
141
142 wxSYS_SCREEN_TINY, // <
143 wxSYS_SCREEN_PDA, // >= 320x240
144 wxSYS_SCREEN_SMALL, // >= 640x480
145 wxSYS_SCREEN_DESKTOP // >= 800x600
146};
147
148
149
150//---------------------------------------------------------------------------
151
ab1f7d2a
RD
152MustHaveApp(wxSystemSettings::GetColour);
153MustHaveApp(wxSystemSettings::GetFont);
154MustHaveApp(wxSystemSettings::GetMetric);
155MustHaveApp(wxSystemSettings::HasFeature);
156MustHaveApp(wxSystemSettings::GetScreenType);
157MustHaveApp(wxSystemSettings::SetScreenType);
d14a1e28
RD
158
159class wxSystemSettings
160{
161public:
162 // get a standard system colour
163 static wxColour GetColour(wxSystemColour index);
164
165 // get a standard system font
166 static wxFont GetFont(wxSystemFont index);
167
168 // get a system-dependent metric
4a065572 169 static int GetMetric(wxSystemMetric index, wxWindow* win=NULL);
d14a1e28 170
dd9f7fea 171 // return True if the port has certain feature
d14a1e28
RD
172 static bool HasFeature(wxSystemFeature index);
173
174
175 // Get system screen design (desktop, pda, ..) used for
176 // laying out various dialogs.
177 static wxSystemScreenType GetScreenType();
178
179 // Override default.
180 static void SetScreenType( wxSystemScreenType screen );
181
182};
183
61c5a8ac 184
d14a1e28
RD
185//---------------------------------------------------------------------------
186
a053624c
RD
187MAKE_CONST_WXSTRING(WINDOW_DEFAULT_VARIANT);
188
d14a1e28
RD
189class wxSystemOptions : public wxObject
190{
191public:
addd64ee 192 wxSystemOptions();
d14a1e28
RD
193
194 // User-customizable hints to wxWindows or associated libraries
195 // These could also be used to influence GetSystem... calls, indeed
196 // to implement SetSystemColour/Font/Metric
197
198 static void SetOption(const wxString& name, const wxString& value);
1b8c7ba6 199 %Rename(SetOptionInt, static void, SetOption(const wxString& name, int value));
d14a1e28
RD
200 static wxString GetOption(const wxString& name) ;
201 static int GetOptionInt(const wxString& name) ;
202 static bool HasOption(const wxString& name) ;
c8b67ceb 203 static bool IsFalse(const wxString& name);
d14a1e28
RD
204};
205
206
d14a1e28 207//---------------------------------------------------------------------------