]> git.saurik.com Git - wxWidgets.git/blob - include/wx/sysopt.h
compilation fix for raw bitmaps (can't include wx/rawbmp.h from wx/bitmap.h as the...
[wxWidgets.git] / include / wx / sysopt.h
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
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_SYSOPT_H_
13 #define _WX_SYSOPT_H_
14
15 #include "wx/object.h"
16
17 // ----------------------------------------------------------------------------
18 // Enables an application to influence the wxWidgets implementation
19 // ----------------------------------------------------------------------------
20
21 class WXDLLIMPEXP_BASE wxSystemOptions : public wxObject
22 {
23 public:
24 wxSystemOptions() { }
25
26 // User-customizable hints to wxWidgets or associated libraries
27 // These could also be used to influence GetSystem... calls, indeed
28 // to implement SetSystemColour/Font/Metric
29
30 #if wxUSE_SYSTEM_OPTIONS
31 static void SetOption(const wxString& name, const wxString& value);
32 static void SetOption(const wxString& name, int value);
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);
37 };
38
39 #if !wxUSE_SYSTEM_OPTIONS
40
41 // define inline stubs for accessors to make it possible to use wxSystemOptions
42 // in the library itself without checking for wxUSE_SYSTEM_OPTIONS all the time
43
44 /* static */ inline
45 wxString wxSystemOptions::GetOption(const wxString& WXUNUSED(name))
46 {
47 return wxEmptyString;
48 }
49
50 /* static */ inline
51 int wxSystemOptions::GetOptionInt(const wxString& WXUNUSED(name))
52 {
53 return 0;
54 }
55
56 /* static */ inline
57 bool wxSystemOptions::HasOption(const wxString& WXUNUSED(name))
58 {
59 return false;
60 }
61
62 #endif // !wxUSE_SYSTEM_OPTIONS
63
64 #endif
65 // _WX_SYSOPT_H_
66