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