]>
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 | |
23324ae1 | 17 | These options are currently recognised by wxWidgets. |
7c913512 | 18 | |
23324ae1 FM |
19 | @library{wxbase} |
20 | @category{misc} | |
7c913512 | 21 | |
e54c96f1 | 22 | @see wxSystemOptions::SetOption, wxSystemOptions::GetOptionInt, |
23324ae1 FM |
23 | wxSystemOptions::HasOption |
24 | */ | |
25 | class wxSystemOptions : public wxObject | |
26 | { | |
27 | public: | |
28 | /** | |
29 | Default constructor. You don't need to create an instance of wxSystemOptions | |
30 | since all of its functions are static. | |
31 | */ | |
32 | wxSystemOptions(); | |
33 | ||
34 | /** | |
35 | Gets an option. The function is case-insensitive to @e name. | |
23324ae1 | 36 | Returns empty string if the option hasn't been set. |
3c4f71cc | 37 | |
4cc4bfaf FM |
38 | @see SetOption(), GetOptionInt(), |
39 | HasOption() | |
23324ae1 | 40 | */ |
adaaa686 | 41 | static wxString GetOption(const wxString& name); |
23324ae1 FM |
42 | |
43 | /** | |
44 | Gets an option as an integer. The function is case-insensitive to @e name. | |
23324ae1 | 45 | If the option hasn't been set, this function returns 0. |
3c4f71cc | 46 | |
4cc4bfaf FM |
47 | @see SetOption(), GetOption(), |
48 | HasOption() | |
23324ae1 | 49 | */ |
adaaa686 | 50 | static int GetOptionInt(const wxString& name); |
23324ae1 FM |
51 | |
52 | /** | |
53 | Returns @true if the given option is present. The function is | |
54 | case-insensitive to @e name. | |
3c4f71cc | 55 | |
4cc4bfaf FM |
56 | @see SetOption(), GetOption(), |
57 | GetOptionInt() | |
23324ae1 | 58 | */ |
adaaa686 | 59 | static bool HasOption(const wxString& name); |
23324ae1 FM |
60 | |
61 | /** | |
4cc4bfaf | 62 | Returns @true if the option with the given @a name had been set to 0 |
23324ae1 FM |
63 | value. This is mostly useful for boolean options for which you can't use |
64 | @c GetOptionInt(name) == 0 as this would also be @true if the option | |
65 | hadn't been set at all. | |
66 | */ | |
adaaa686 | 67 | static bool IsFalse(const wxString& name); |
23324ae1 FM |
68 | |
69 | //@{ | |
70 | /** | |
71 | Sets an option. The function is case-insensitive to @e name. | |
72 | */ | |
73 | void SetOption(const wxString& name, const wxString& value); | |
7c913512 | 74 | void SetOption(const wxString& name, int value); |
23324ae1 FM |
75 | //@} |
76 | }; | |
e54c96f1 | 77 |