]> git.saurik.com Git - wxWidgets.git/blame - include/wx/sysopt.h
added missing #include "wx/buffer.h"
[wxWidgets.git] / include / wx / sysopt.h
CommitLineData
0cbff120
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: sysopt.h
3// Purpose: wxSystemOptions
4// Author: Julian Smart
5// Modified by:
6// Created: 2001-07-10
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
d775fa82 9// Licence: wxWindows licence
0cbff120
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_SYSOPT_H_
13#define _WX_SYSOPT_H_
14
15#include "wx/object.h"
16
0cbff120 17// ----------------------------------------------------------------------------
77ffb593 18// Enables an application to influence the wxWidgets implementation
0cbff120
JS
19// ----------------------------------------------------------------------------
20
bddd7a8d 21class WXDLLIMPEXP_BASE wxSystemOptions : public wxObject
0cbff120
JS
22{
23public:
24 wxSystemOptions() { }
25
77ffb593 26 // User-customizable hints to wxWidgets or associated libraries
0cbff120
JS
27 // These could also be used to influence GetSystem... calls, indeed
28 // to implement SetSystemColour/Font/Metric
29
1972900e 30#if wxUSE_SYSTEM_OPTIONS
0cbff120
JS
31 static void SetOption(const wxString& name, const wxString& value);
32 static void SetOption(const wxString& name, int value);
1972900e
VZ
33#endif // wxUSE_SYSTEM_OPTIONS
34 static wxString GetOption(const wxString& name);
35 static int GetOptionInt(const wxString& name);
36 static bool HasOption(const wxString& name);
8de6b9bb
VZ
37
38 static bool IsFalse(const wxString& name)
39 {
40 return HasOption(name) && GetOptionInt(name) == 0;
41 }
0cbff120
JS
42};
43
1972900e
VZ
44#if !wxUSE_SYSTEM_OPTIONS
45
46// define inline stubs for accessors to make it possible to use wxSystemOptions
47// in the library itself without checking for wxUSE_SYSTEM_OPTIONS all the time
48
49/* static */ inline
50wxString wxSystemOptions::GetOption(const wxString& WXUNUSED(name))
51{
52 return wxEmptyString;
53}
54
55/* static */ inline
56int wxSystemOptions::GetOptionInt(const wxString& WXUNUSED(name))
57{
58 return 0;
59}
60
61/* static */ inline
62bool wxSystemOptions::HasOption(const wxString& WXUNUSED(name))
63{
64 return false;
65}
0cbff120 66
1972900e 67#endif // !wxUSE_SYSTEM_OPTIONS
0cbff120
JS
68
69#endif
70 // _WX_SYSOPT_H_
71