1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mgl/settings.cpp
3 // Author: Vaclav Slavik, Robert Roebling
5 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
9 // For compilers that support precompilation, includes "wx.h".
10 #include "wx/wxprec.h"
16 #include "wx/settings.h"
17 #include "wx/colour.h"
19 #include "wx/gdicmn.h"
20 #include "wx/module.h"
22 // ----------------------------------------------------------------------------
24 // ----------------------------------------------------------------------------
26 static wxFont
*gs_fontDefault
= NULL
;
28 class wxSystemSettingsModule
: public wxModule
31 virtual bool OnInit() { return true; }
34 delete gs_fontDefault
;
35 gs_fontDefault
= NULL
;
39 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule
)
42 IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule
, wxModule
)
46 wxColour
wxSystemSettingsNative::GetColour(wxSystemColour
WXUNUSED(index
))
48 // not implemented, the mean is in wxUniversal
49 return wxColour(0,0,0);
52 wxFont
wxSystemSettingsNative::GetFont(wxSystemFont index
)
56 case wxSYS_OEM_FIXED_FONT
:
57 case wxSYS_ANSI_FIXED_FONT
:
58 case wxSYS_SYSTEM_FIXED_FONT
:
60 return *wxNORMAL_FONT
;
62 case wxSYS_ANSI_VAR_FONT
:
63 case wxSYS_SYSTEM_FONT
:
64 case wxSYS_DEVICE_DEFAULT_FONT
:
65 case wxSYS_DEFAULT_GUI_FONT
:
67 if ( !gs_fontDefault
)
68 gs_fontDefault
= new wxFont(10, wxSWISS
, wxNORMAL
, wxNORMAL
, false, "Arial");
69 return *gs_fontDefault
;
76 int wxSystemSettingsNative::GetMetric(wxSystemMetric index
, wxWindow
* WXUNUSED(win
))
83 wxDisplaySize(&val
, NULL
);
86 wxDisplaySize(NULL
, &val
);
93 return -1; // unsupported metric
96 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index
)
100 case wxSYS_CAN_ICONIZE_FRAME
:
102 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
: