]> git.saurik.com Git - wxWidgets.git/blob - src/mgl/settings.cpp
Tries to fix wxListBox focus problems.
[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 #include "wx/settings.h"
15 #include "wx/colour.h"
16 #include "wx/font.h"
17 #include "wx/module.h"
18
19 // ----------------------------------------------------------------------------
20 // global data
21 // ----------------------------------------------------------------------------
22
23 static wxFont *gs_fontDefault = NULL;
24
25 class wxSystemSettingsModule : public wxModule
26 {
27 public:
28 virtual bool OnInit() { return TRUE; }
29 virtual void OnExit()
30 {
31 delete gs_fontDefault;
32 gs_fontDefault = NULL;
33 }
34
35 private:
36 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule)
37 };
38
39 IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule, wxModule)
40
41
42
43 wxColour wxSystemSettings::GetSystemColour(int WXUNUSED(index))
44 {
45 // FIXME_MGL
46 return wxColour(0,0,0);
47 }
48
49 wxFont wxSystemSettings::GetSystemFont(int index)
50 {
51 bool isDefaultRequested = (index == wxSYS_DEFAULT_GUI_FONT);
52
53 if ( isDefaultRequested && gs_fontDefault )
54 {
55 return *gs_fontDefault;
56 }
57
58 // FIXME_MGL
59 wxFont font(10, wxSWISS, wxNORMAL, wxNORMAL, FALSE, "Arial");
60
61 if ( isDefaultRequested )
62 {
63 // if we got here it means we hadn't cached it yet - do now
64 gs_fontDefault = new wxFont(font);
65 }
66
67 return font;
68 }
69
70 int wxSystemSettings::GetSystemMetric(int WXUNUSED(index))
71 {
72 // FIXME_MGL
73 return 1;
74 }
75
76 bool wxSystemSettings::GetCapability(int index)
77 {
78 switch (index)
79 {
80 case wxSYS_CAN_ICONIZE_FRAME:
81 return FALSE; break;
82 case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
83 return FALSE; break;
84 default:
85 return FALSE;
86 }
87 }