]>
Commit | Line | Data |
---|---|---|
23324ae1 FM |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: sysopt.h | |
3 | // Purpose: documentation for wxSystemOptions class | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxSystemOptions | |
11 | @wxheader{sysopt.h} | |
7c913512 | 12 | |
23324ae1 FM |
13 | wxSystemOptions stores option/value pairs that wxWidgets itself or |
14 | applications can use to alter behaviour at run-time. It can be | |
15 | used to optimize behaviour that doesn't deserve a distinct API, | |
16 | but is still important to be able to configure. | |
7c913512 | 17 | |
23324ae1 | 18 | These options are currently recognised by wxWidgets. |
7c913512 | 19 | |
23324ae1 FM |
20 | @library{wxbase} |
21 | @category{misc} | |
7c913512 | 22 | |
23324ae1 FM |
23 | @seealso |
24 | wxSystemOptions::SetOption, wxSystemOptions::GetOptionInt, | |
25 | wxSystemOptions::HasOption | |
26 | */ | |
27 | class wxSystemOptions : public wxObject | |
28 | { | |
29 | public: | |
30 | /** | |
31 | Default constructor. You don't need to create an instance of wxSystemOptions | |
32 | since all of its functions are static. | |
33 | */ | |
34 | wxSystemOptions(); | |
35 | ||
36 | /** | |
37 | Gets an option. The function is case-insensitive to @e name. | |
23324ae1 FM |
38 | Returns empty string if the option hasn't been set. |
39 | ||
4cc4bfaf FM |
40 | @see SetOption(), GetOptionInt(), |
41 | HasOption() | |
23324ae1 | 42 | */ |
328f5751 | 43 | wxString GetOption(const wxString& name) const; |
23324ae1 FM |
44 | |
45 | /** | |
46 | Gets an option as an integer. The function is case-insensitive to @e name. | |
23324ae1 FM |
47 | If the option hasn't been set, this function returns 0. |
48 | ||
4cc4bfaf FM |
49 | @see SetOption(), GetOption(), |
50 | HasOption() | |
23324ae1 | 51 | */ |
328f5751 | 52 | int GetOptionInt(const wxString& name) const; |
23324ae1 FM |
53 | |
54 | /** | |
55 | Returns @true if the given option is present. The function is | |
56 | case-insensitive to @e name. | |
57 | ||
4cc4bfaf FM |
58 | @see SetOption(), GetOption(), |
59 | GetOptionInt() | |
23324ae1 | 60 | */ |
328f5751 | 61 | bool HasOption(const wxString& name) const; |
23324ae1 FM |
62 | |
63 | /** | |
4cc4bfaf | 64 | Returns @true if the option with the given @a name had been set to 0 |
23324ae1 FM |
65 | value. This is mostly useful for boolean options for which you can't use |
66 | @c GetOptionInt(name) == 0 as this would also be @true if the option | |
67 | hadn't been set at all. | |
68 | */ | |
328f5751 | 69 | bool IsFalse(const wxString& name) const; |
23324ae1 FM |
70 | |
71 | //@{ | |
72 | /** | |
73 | Sets an option. The function is case-insensitive to @e name. | |
74 | */ | |
75 | void SetOption(const wxString& name, const wxString& value); | |
7c913512 | 76 | void SetOption(const wxString& name, int value); |
23324ae1 FM |
77 | //@} |
78 | }; |