1 /////////////////////////////////////////////////////////////////////////////
3 // Author: Vaclav Slavik
5 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
11 #pragma implementation "settings.h"
14 // For compilers that support precompilation, includes "wx.h".
15 #include "wx/wxprec.h"
21 #include "wx/settings.h"
22 #include "wx/colour.h"
24 #include "wx/module.h"
26 // ----------------------------------------------------------------------------
28 // ----------------------------------------------------------------------------
30 static wxFont
*gs_fontDefault
= NULL
;
32 class wxSystemSettingsModule
: public wxModule
35 virtual bool OnInit() { return TRUE
; }
38 delete gs_fontDefault
;
39 gs_fontDefault
= NULL
;
43 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule
)
46 IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule
, wxModule
)
50 wxColour
wxSystemSettings::GetSystemColour(int WXUNUSED(index
))
53 return wxColour(0,0,0);
56 wxFont
wxSystemSettings::GetSystemFont(int index
)
58 bool isDefaultRequested
= (index
== wxSYS_DEFAULT_GUI_FONT
);
60 if ( isDefaultRequested
&& gs_fontDefault
)
62 return *gs_fontDefault
;
66 wxFont
font(10, wxSWISS
, wxNORMAL
, wxNORMAL
, FALSE
, "Arial");
68 if ( isDefaultRequested
)
70 // if we got here it means we hadn't cached it yet - do now
71 gs_fontDefault
= new wxFont(font
);
77 int wxSystemSettings::GetSystemMetric(int WXUNUSED(index
))
83 bool wxSystemSettings::GetCapability(int index
)
87 case wxSYS_CAN_ICONIZE_FRAME
:
89 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: