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"
19 #include "wx/colour.h"
21 #include "wx/gdicmn.h"
22 #include "wx/module.h"
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 static wxFont
*gs_fontDefault
= NULL
;
31 class wxSystemSettingsModule
: public wxModule
34 virtual bool OnInit() { return true; }
37 delete gs_fontDefault
;
38 gs_fontDefault
= NULL
;
42 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule
)
45 IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule
, wxModule
)
49 wxColour
wxSystemSettingsNative::GetColour(wxSystemColour
WXUNUSED(index
))
51 // overridden by wxSystemSettings::GetColour in wxUniversal
52 return wxColour(0,0,0);
55 wxFont
wxSystemSettingsNative::GetFont(wxSystemFont index
)
59 case wxSYS_OEM_FIXED_FONT
:
60 case wxSYS_ANSI_FIXED_FONT
:
61 case wxSYS_SYSTEM_FIXED_FONT
:
63 return *wxNORMAL_FONT
;
65 case wxSYS_ANSI_VAR_FONT
:
66 case wxSYS_SYSTEM_FONT
:
67 case wxSYS_DEVICE_DEFAULT_FONT
:
68 case wxSYS_DEFAULT_GUI_FONT
:
70 if ( !gs_fontDefault
)
71 gs_fontDefault
= new wxFont(10, wxSWISS
, wxNORMAL
, wxNORMAL
, false, "Arial");
72 return *gs_fontDefault
;
82 int wxSystemSettingsNative::GetMetric(wxSystemMetric index
, wxWindow
* WXUNUSED(win
))
89 wxDisplaySize(&val
, NULL
);
92 wxDisplaySize(NULL
, &val
);
102 return -1; // unsupported metric
105 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index
)
109 case wxSYS_CAN_ICONIZE_FRAME
:
110 case wxSYS_CAN_DRAW_FRAME_DECORATIONS
:
111 case wxSYS_TABLET_PRESENT
:
115 wxFAIL_MSG( _T("unknown feature") );