]> git.saurik.com Git - wxWidgets.git/blame - include/wx/sysopt.h
added maxDepth parameter to WalkFromException() (patch 1759239)
[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
a8ff046b
VZ
21class
22#if wxUSE_SYSTEM_OPTIONS
23WXDLLIMPEXP_BASE
24#endif
25wxSystemOptions : public wxObject
0cbff120
JS
26{
27public:
28 wxSystemOptions() { }
29
77ffb593 30 // User-customizable hints to wxWidgets or associated libraries
0cbff120
JS
31 // These could also be used to influence GetSystem... calls, indeed
32 // to implement SetSystemColour/Font/Metric
33
1972900e 34#if wxUSE_SYSTEM_OPTIONS
0cbff120
JS
35 static void SetOption(const wxString& name, const wxString& value);
36 static void SetOption(const wxString& name, int value);
1972900e
VZ
37#endif // wxUSE_SYSTEM_OPTIONS
38 static wxString GetOption(const wxString& name);
39 static int GetOptionInt(const wxString& name);
40 static bool HasOption(const wxString& name);
8de6b9bb
VZ
41
42 static bool IsFalse(const wxString& name)
43 {
44 return HasOption(name) && GetOptionInt(name) == 0;
45 }
0cbff120
JS
46};
47
1972900e
VZ
48#if !wxUSE_SYSTEM_OPTIONS
49
50// define inline stubs for accessors to make it possible to use wxSystemOptions
51// in the library itself without checking for wxUSE_SYSTEM_OPTIONS all the time
52
53/* static */ inline
54wxString wxSystemOptions::GetOption(const wxString& WXUNUSED(name))
55{
56 return wxEmptyString;
57}
58
59/* static */ inline
60int wxSystemOptions::GetOptionInt(const wxString& WXUNUSED(name))
61{
62 return 0;
63}
64
65/* static */ inline
66bool wxSystemOptions::HasOption(const wxString& WXUNUSED(name))
67{
68 return false;
69}
0cbff120 70
1972900e 71#endif // !wxUSE_SYSTEM_OPTIONS
0cbff120
JS
72
73#endif
74 // _WX_SYSOPT_H_
75