]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: sysopt.h | |
e54c96f1 | 3 | // Purpose: interface of wxSystemOptions |
23324ae1 FM |
4 | // Author: wxWidgets team |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxSystemOptions | |
7c913512 | 11 | |
23324ae1 FM |
12 | wxSystemOptions stores option/value pairs that wxWidgets itself or |
13 | applications can use to alter behaviour at run-time. It can be | |
14 | used to optimize behaviour that doesn't deserve a distinct API, | |
15 | but is still important to be able to configure. | |
7c913512 | 16 | |
4701dc09 FM |
17 | These options are currently recognised by wxWidgets: |
18 | ||
19 | ||
20 | @section sysopt_win Windows | |
21 | ||
22 | @beginFlagTable | |
23 | @flag{no-maskblt} | |
24 | 1 to never use WIN32's MaskBlt function, 0 to allow it to be used where possible. | |
25 | Default: 0. In some circumstances the MaskBlt function can be slower than using | |
26 | the fallback code, especially if using DC cacheing. By default, MaskBlt will be | |
27 | used where it is implemented by the operating system and driver. | |
28 | @flag{msw.remap} | |
29 | If 1 (the default), wxToolBar bitmap colours will be remapped to the current | |
30 | theme's values. Set this to 0 to disable this functionality, for example if | |
31 | you're using more than 16 colours in your tool bitmaps. | |
32 | @flag{msw.window.no-clip-children} | |
33 | If 1, windows will not automatically get the WS_CLIPCHILDREN style. | |
34 | This restores the way windows are refreshed back to the method used in | |
35 | versions of wxWidgets earlier than 2.5.4, and for some complex window | |
36 | hierarchies it can reduce apparent refresh delays. | |
37 | You may still specify wxCLIP_CHILDREN for individual windows. | |
38 | @flag{msw.notebook.themed-background} | |
39 | If set to 0, globally disables themed backgrounds on notebook pages. | |
40 | Note that this won't disable the theme on the actual notebook background | |
41 | (noticeable only if there are no pages). | |
42 | @flag{msw.staticbox.optimized-paint} | |
43 | If set to 0, switches off optimized wxStaticBox painting. | |
44 | Setting this to 0 causes more flicker, but allows applications to paint | |
45 | graphics on the parent of a static box (the optimized refresh causes any | |
46 | such drawing to disappear). | |
47 | @flag{msw.display.directdraw} | |
48 | If set to 1, use DirectDraw-based implementation of wxDisplay. | |
49 | By default the standard Win32 functions are used. | |
50 | @flag{msw.font.no-proof-quality} | |
51 | If set to 1, use default fonts quality instead of proof quality when | |
52 | creating fonts. With proof quality the fonts have slightly better | |
53 | appearance but not all fonts are available in this quality, | |
54 | e.g. the Terminal font in small sizes is not and this option may be | |
55 | used if wider fonts selection is more important than higher quality. | |
56 | @endFlagTable | |
57 | ||
58 | ||
59 | @section sysopt_gtk GTK+ | |
60 | ||
61 | @beginFlagTable | |
62 | @flag{gtk.tlw.can-set-transparent} | |
63 | wxTopLevelWindow::CanSetTransparent() method normally tries to detect | |
64 | automatically whether transparency for top level windows is currently | |
65 | supported, however this may sometimes fail and this option allows to | |
66 | override the automatic detection. Setting it to 1 makes the transparency | |
67 | be always available (setting it can still fail, of course) and setting it | |
68 | to 0 makes it always unavailable. | |
69 | @flag{gtk.desktop} | |
70 | This option can be set to override the default desktop environment | |
71 | determination. Supported values are GNOME and KDE. | |
72 | @flag{gtk.window.force-background-colour} | |
73 | If 1, the backgrounds of windows with the wxBG_STYLE_COLOUR background | |
74 | style are cleared forcibly instead of relying on the underlying GTK+ | |
75 | window colour. This works around a display problem when running | |
76 | applications under KDE with the gtk-qt theme installed (0.6 and below). | |
77 | @endFlagTable | |
78 | ||
79 | ||
80 | @section sysopt_mac Mac | |
81 | ||
82 | @beginFlagTable | |
83 | @flag{mac.window-plain-transition} | |
84 | If 1, uses a plainer transition when showing a window. | |
85 | You can also use the symbol wxMAC_WINDOW_PLAIN_TRANSITION. | |
86 | @flag{window-default-variant} | |
87 | The default variant used by windows (cast to integer from the wxWindowVariant enum). | |
88 | Also known as wxWINDOW_DEFAULT_VARIANT. | |
89 | flag{mac.listctrl.always_use_generic} | |
90 | Tells wxListCtrl to use the generic control even when it is capable of | |
91 | using the native control instead. Also knwon as wxMAC_ALWAYS_USE_GENERIC_LISTCTRL. | |
6a0f372c FM |
92 | flag{mac.textcontrol-use-spell-checker} |
93 | This option only has effect for Mac OS X 10.4 and higher. | |
94 | If 1 activates the spell checking in wxTextCtrl. | |
4701dc09 FM |
95 | @endFlagTable |
96 | ||
97 | ||
98 | @section sysopt_mgl MGL | |
99 | ||
100 | @beginFlagTable | |
101 | @flag{mgl.aa-threshold} | |
102 | Set this integer option to point size below which fonts are not antialiased. Default: 10. | |
103 | @flag{mgl.screen-refresh} | |
104 | Screen refresh rate in Hz. A reasonable default is used if not specified. | |
105 | @endFlagTable | |
106 | ||
107 | ||
108 | @section sysopt_motif Motif | |
109 | ||
110 | @beginFlagTable | |
111 | @flag{motif.largebuttons} | |
112 | If 1, uses a bigger default size for wxButtons. | |
113 | @endFlagTable | |
114 | ||
115 | ||
116 | The compile-time option to include or exclude this functionality is wxUSE_SYSTEM_OPTIONS. | |
7c913512 | 117 | |
23324ae1 FM |
118 | @library{wxbase} |
119 | @category{misc} | |
7c913512 | 120 | |
e54c96f1 | 121 | @see wxSystemOptions::SetOption, wxSystemOptions::GetOptionInt, |
23324ae1 FM |
122 | wxSystemOptions::HasOption |
123 | */ | |
124 | class wxSystemOptions : public wxObject | |
125 | { | |
126 | public: | |
127 | /** | |
4701dc09 FM |
128 | Default constructor. |
129 | ||
130 | You don't need to create an instance of wxSystemOptions since all | |
131 | of its functions are static. | |
23324ae1 FM |
132 | */ |
133 | wxSystemOptions(); | |
134 | ||
135 | /** | |
4701dc09 | 136 | Gets an option. The function is case-insensitive to @a name. |
23324ae1 | 137 | Returns empty string if the option hasn't been set. |
3c4f71cc | 138 | |
4701dc09 | 139 | @see SetOption(), GetOptionInt(), HasOption() |
23324ae1 | 140 | */ |
adaaa686 | 141 | static wxString GetOption(const wxString& name); |
23324ae1 FM |
142 | |
143 | /** | |
4701dc09 | 144 | Gets an option as an integer. The function is case-insensitive to @a name. |
23324ae1 | 145 | If the option hasn't been set, this function returns 0. |
3c4f71cc | 146 | |
4701dc09 | 147 | @see SetOption(), GetOption(), HasOption() |
23324ae1 | 148 | */ |
adaaa686 | 149 | static int GetOptionInt(const wxString& name); |
23324ae1 FM |
150 | |
151 | /** | |
4701dc09 FM |
152 | Returns @true if the given option is present. |
153 | The function is case-insensitive to @a name. | |
3c4f71cc | 154 | |
4701dc09 | 155 | @see SetOption(), GetOption(), GetOptionInt() |
23324ae1 | 156 | */ |
adaaa686 | 157 | static bool HasOption(const wxString& name); |
23324ae1 FM |
158 | |
159 | /** | |
4701dc09 FM |
160 | Returns @true if the option with the given @a name had been set to 0 value. |
161 | ||
162 | This is mostly useful for boolean options for which you can't use | |
23324ae1 FM |
163 | @c GetOptionInt(name) == 0 as this would also be @true if the option |
164 | hadn't been set at all. | |
165 | */ | |
adaaa686 | 166 | static bool IsFalse(const wxString& name); |
23324ae1 FM |
167 | |
168 | //@{ | |
169 | /** | |
4701dc09 | 170 | Sets an option. The function is case-insensitive to @a name. |
23324ae1 FM |
171 | */ |
172 | void SetOption(const wxString& name, const wxString& value); | |
7c913512 | 173 | void SetOption(const wxString& name, int value); |
23324ae1 FM |
174 | //@} |
175 | }; | |
e54c96f1 | 176 |