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 #include "wx/settings.h"
15 #include "wx/colour.h"
17 #include "wx/module.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 static wxFont
*gs_fontDefault
= NULL
;
25 class wxSystemSettingsModule
: public wxModule
28 virtual bool OnInit() { return TRUE
; }
31 delete gs_fontDefault
;
32 gs_fontDefault
= NULL
;
36 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule
)
39 IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule
, wxModule
)
43 wxColour
wxSystemSettings::GetSystemColour(int WXUNUSED(index
))
46 return wxColour(0,0,0);
49 wxFont
wxSystemSettings::GetSystemFont(int index
)
51 bool isDefaultRequested
= (index
== wxSYS_DEFAULT_GUI_FONT
);
53 if ( isDefaultRequested
&& gs_fontDefault
)
55 return *gs_fontDefault
;
59 wxFont
font(10, wxSWISS
, wxNORMAL
, wxNORMAL
, FALSE
, "Arial");
61 if ( isDefaultRequested
)
63 // if we got here it means we hadn't cached it yet - do now
64 gs_fontDefault
= new wxFont(font
);
70 int wxSystemSettings::GetSystemMetric(int WXUNUSED(index
))
76 bool wxSystemSettings::GetCapability(int index
)
80 case wxSYS_CAN_ICONIZE_FRAME
:
82 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: