]> git.saurik.com Git - wxWidgets.git/blame_incremental - interface/wx/sysopt.h
Add test for absence of events from wxSpinCtrlDouble ctor.
[wxWidgets.git] / interface / wx / sysopt.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: sysopt.h
3// Purpose: interface of wxSystemOptions
4// Author: wxWidgets team
5// Licence: wxWindows licence
6/////////////////////////////////////////////////////////////////////////////
7
8/**
9 @class wxSystemOptions
10
11 wxSystemOptions stores option/value pairs that wxWidgets itself or
12 applications can use to alter behaviour at run-time. It can be
13 used to optimize behaviour that doesn't deserve a distinct API,
14 but is still important to be able to configure.
15
16 System options can be set by the program itself using SetOption() method
17 and they also can be set from the program environment by defining an
18 environment variable @c wx_option to set the given option for all wxWidgets
19 applications or @c wx_appname_option to set it just for the application
20 with the given name (as returned by wxApp::GetAppName()). Notice that any
21 characters not allowed in the environment variables names, such as periods
22 and dashes, should be replaced with underscores. E.g. to define a system
23 option "foo-bar" you need to define the environment variable "wx_foo_bar".
24
25 The program may use system options for its own needs but they are mostly
26 used to control the behaviour of wxWidgets library itself.
27
28 These options are currently recognised by wxWidgets:
29
30 @section sysopt_all All platforms
31
32 @beginFlagTable
33 @flag{exit-on-assert}
34 If set to non-zero value, abort the program if an assertion fails. The
35 default behaviour in case of assertion failure depends on the build mode
36 and can be changed by overriding wxApp::OnAssertFailure() but setting
37 this option allows to change it without modifying the program code and
38 also applies to asserts which may happen before the wxApp object
39 creation or after its destruction.
40 @endFlagTable
41
42 @section sysopt_win Windows
43
44 @beginFlagTable
45 @flag{no-maskblt}
46 1 to never use WIN32's MaskBlt function, 0 to allow it to be used where possible.
47 Default: 0. In some circumstances the MaskBlt function can be slower than using
48 the fallback code, especially if using DC caching. By default, MaskBlt will be
49 used where it is implemented by the operating system and driver.
50 @flag{msw.remap}
51 If 1 (the default), wxToolBar bitmap colours will be remapped to the current
52 theme's values. Set this to 0 to disable this functionality, for example if
53 you're using more than 16 colours in your tool bitmaps.
54 @flag{msw.window.no-clip-children}
55 If 1, windows will not automatically get the WS_CLIPCHILDREN style.
56 This restores the way windows are refreshed back to the method used in
57 versions of wxWidgets earlier than 2.5.4, and for some complex window
58 hierarchies it can reduce apparent refresh delays.
59 You may still specify wxCLIP_CHILDREN for individual windows.
60 @flag{msw.notebook.themed-background}
61 If set to 0, globally disables themed backgrounds on notebook pages.
62 Note that this won't disable the theme on the actual notebook background
63 (noticeable only if there are no pages).
64 @flag{msw.staticbox.optimized-paint}
65 If set to 0, switches off optimized wxStaticBox painting.
66 Setting this to 0 causes more flicker, but allows applications to paint
67 graphics on the parent of a static box (the optimized refresh causes any
68 such drawing to disappear).
69 @flag{msw.display.directdraw}
70 If set to 1, use DirectDraw-based implementation of wxDisplay.
71 By default the standard Win32 functions are used.
72 @flag{msw.font.no-proof-quality}
73 If set to 1, use default fonts quality instead of proof quality when
74 creating fonts. With proof quality the fonts have slightly better
75 appearance but not all fonts are available in this quality,
76 e.g. the Terminal font in small sizes is not and this option may be
77 used if wider fonts selection is more important than higher quality.
78 @flag{wince.dialog.real-ok-cancel}
79 The PocketPC guidelines recommend for Ok/Cancel dialogs to use an OK button
80 located inside the caption bar and implement Cancel functionality through
81 Undo outside the dialog.
82 wxDialog::CreateButtonSizer will follow the native behaviour on WinCE but
83 it can be overridden with real wxButtons by setting the option below to 1.
84 @endFlagTable
85
86
87 @section sysopt_gtk GTK+
88
89 @beginFlagTable
90 @flag{gtk.tlw.can-set-transparent}
91 wxTopLevelWindow::CanSetTransparent() method normally tries to detect
92 automatically whether transparency for top level windows is currently
93 supported, however this may sometimes fail and this option allows to
94 override the automatic detection. Setting it to 1 makes the transparency
95 be always available (setting it can still fail, of course) and setting it
96 to 0 makes it always unavailable.
97 @flag{gtk.desktop}
98 This option can be set to override the default desktop environment
99 determination. Supported values are GNOME and KDE.
100 @flag{gtk.window.force-background-colour}
101 If 1, the backgrounds of windows with the wxBG_STYLE_COLOUR background
102 style are cleared forcibly instead of relying on the underlying GTK+
103 window colour. This works around a display problem when running
104 applications under KDE with the gtk-qt theme installed (0.6 and below).
105 @endFlagTable
106
107
108 @section sysopt_mac Mac
109
110 @beginFlagTable
111 @flag{mac.window-plain-transition}
112 If 1, uses a plainer transition when showing a window.
113 You can also use the symbol wxMAC_WINDOW_PLAIN_TRANSITION.
114 @flag{window-default-variant}
115 The default variant used by windows (cast to integer from the wxWindowVariant enum).
116 Also known as wxWINDOW_DEFAULT_VARIANT.
117 @flag{mac.listctrl.always_use_generic}
118 Tells wxListCtrl to use the generic control even when it is capable of
119 using the native control instead. Also known as wxMAC_ALWAYS_USE_GENERIC_LISTCTRL.
120 @flag{mac.textcontrol-use-spell-checker}
121 This option only has effect for Mac OS X 10.4 and higher.
122 If 1 activates the spell checking in wxTextCtrl.
123 @flag{osx.openfiledialog.always-show-types}
124 Per default a wxFileDialog with wxFD_OPEN does not show a types-popup on OSX but allows
125 the selection of files from any of the supported types. Setting this to 1 shows a wxChoice
126 for selection (if there is more than one supported filetype).
127 @endFlagTable
128
129
130 @section sysopt_motif Motif
131
132 @beginFlagTable
133 @flag{motif.largebuttons}
134 If 1, uses a bigger default size for wxButtons.
135 @endFlagTable
136
137
138 The compile-time option to include or exclude this functionality is wxUSE_SYSTEM_OPTIONS.
139
140 @library{wxbase}
141 @category{cfg}
142
143 @see wxSystemSettings
144*/
145class wxSystemOptions : public wxObject
146{
147public:
148 /**
149 Default constructor.
150
151 You don't need to create an instance of wxSystemOptions since all
152 of its functions are static.
153 */
154 wxSystemOptions();
155
156 /**
157 Gets an option. The function is case-insensitive to @a name.
158 Returns empty string if the option hasn't been set.
159
160 @see SetOption(), GetOptionInt(), HasOption()
161 */
162 static wxString GetOption(const wxString& name);
163
164 /**
165 Gets an option as an integer. The function is case-insensitive to @a name.
166 If the option hasn't been set, this function returns 0.
167
168 @see SetOption(), GetOption(), HasOption()
169 */
170 static int GetOptionInt(const wxString& name);
171
172 /**
173 Returns @true if the given option is present.
174 The function is case-insensitive to @a name.
175
176 @see SetOption(), GetOption(), GetOptionInt()
177 */
178 static bool HasOption(const wxString& name);
179
180 /**
181 Returns @true if the option with the given @a name had been set to 0 value.
182
183 This is mostly useful for boolean options for which you can't use
184 @c GetOptionInt(name) == 0 as this would also be @true if the option
185 hadn't been set at all.
186 */
187 static bool IsFalse(const wxString& name);
188
189 //@{
190 /**
191 Sets an option. The function is case-insensitive to @a name.
192 */
193 static void SetOption(const wxString& name, const wxString& value);
194 static void SetOption(const wxString& name, int value);
195 //@}
196};
197