2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: sysopt.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxSystemOptions
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxSystemOptions
|
|
|
|
@wxheader{sysopt.h}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
wxSystemOptions stores option/value pairs that wxWidgets itself or
|
|
|
|
applications can use to alter behaviour at run-time. It can be
|
|
|
|
used to optimize behaviour that doesn't deserve a distinct API,
|
|
|
|
but is still important to be able to configure.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
These options are currently recognised by wxWidgets.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
|
|
|
@category{misc}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxSystemOptions::SetOption, wxSystemOptions::GetOptionInt,
|
2008-03-08 08:52:38 -05:00
|
|
|
wxSystemOptions::HasOption
|
|
|
|
*/
|
|
|
|
class wxSystemOptions : public wxObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Default constructor. You don't need to create an instance of wxSystemOptions
|
|
|
|
since all of its functions are static.
|
|
|
|
*/
|
|
|
|
wxSystemOptions();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Gets an option. The function is case-insensitive to @e name.
|
|
|
|
Returns empty string if the option hasn't been set.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetOption(), GetOptionInt(),
|
|
|
|
HasOption()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
wxString GetOption(const wxString& name) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Gets an option as an integer. The function is case-insensitive to @e name.
|
|
|
|
If the option hasn't been set, this function returns 0.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetOption(), GetOption(),
|
|
|
|
HasOption()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
int GetOptionInt(const wxString& name) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Returns @true if the given option is present. The function is
|
|
|
|
case-insensitive to @e name.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
@see SetOption(), GetOption(),
|
|
|
|
GetOptionInt()
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
bool HasOption(const wxString& name) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Returns @true if the option with the given @a name had been set to 0
|
2008-03-08 08:52:38 -05:00
|
|
|
value. This is mostly useful for boolean options for which you can't use
|
|
|
|
@c GetOptionInt(name) == 0 as this would also be @true if the option
|
|
|
|
hadn't been set at all.
|
|
|
|
*/
|
2008-03-09 12:24:26 -04:00
|
|
|
bool IsFalse(const wxString& name) const;
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
Sets an option. The function is case-insensitive to @e name.
|
|
|
|
*/
|
|
|
|
void SetOption(const wxString& name, const wxString& value);
|
2008-03-08 09:43:31 -05:00
|
|
|
void SetOption(const wxString& name, int value);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|