]> git.saurik.com Git - wxWidgets.git/blob - src/mgl/settings.cpp
'Y' positioning fixes for OS/2 controls
[wxWidgets.git] / src / mgl / settings.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: settings.h
3 // Author: Vaclav Slavik
4 // Id: $Id$
5 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9
10 #ifdef __GNUG__
11 #pragma implementation "settings.h"
12 #endif
13
14 // For compilers that support precompilation, includes "wx.h".
15 #include "wx/wxprec.h"
16
17 #ifdef __BORLANDC__
18 #pragma hdrstop
19 #endif
20
21 #include "wx/settings.h"
22 #include "wx/colour.h"
23 #include "wx/font.h"
24 #include "wx/module.h"
25
26 // ----------------------------------------------------------------------------
27 // global data
28 // ----------------------------------------------------------------------------
29
30 static wxFont *gs_fontDefault = NULL;
31
32 class wxSystemSettingsModule : public wxModule
33 {
34 public:
35 virtual bool OnInit() { return TRUE; }
36 virtual void OnExit()
37 {
38 delete gs_fontDefault;
39 gs_fontDefault = NULL;
40 }
41
42 private:
43 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule)
44 };
45
46 IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule, wxModule)
47
48
49
50 wxColour wxSystemSettings::GetSystemColour(int WXUNUSED(index))
51 {
52 // FIXME_MGL
53 return wxColour(0,0,0);
54 }
55
56 wxFont wxSystemSettings::GetSystemFont(int index)
57 {
58 bool isDefaultRequested = (index == wxSYS_DEFAULT_GUI_FONT);
59
60 if ( isDefaultRequested && gs_fontDefault )
61 {
62 return *gs_fontDefault;
63 }
64
65 // FIXME_MGL
66 wxFont font(10, wxSWISS, wxNORMAL, wxNORMAL, FALSE, "Arial");
67
68 if ( isDefaultRequested )
69 {
70 // if we got here it means we hadn't cached it yet - do now
71 gs_fontDefault = new wxFont(font);
72 }
73
74 return font;
75 }
76
77 int wxSystemSettings::GetSystemMetric(int WXUNUSED(index))
78 {
79 // FIXME_MGL
80 return 1;
81 }
82
83 bool wxSystemSettings::GetCapability(int index)
84 {
85 switch (index)
86 {
87 case wxSYS_CAN_ICONIZE_FRAME:
88 return FALSE; break;
89 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
90 return FALSE; break;
91 default:
92 return FALSE;
93 }
94 }