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