]> git.saurik.com Git - wxWidgets.git/blame - src/mgl/settings.cpp
compilation fix
[wxWidgets.git] / src / mgl / settings.cpp
CommitLineData
32b8ec41 1/////////////////////////////////////////////////////////////////////////////
7bdc1879
VS
2// Name: settings.h
3// Author: Vaclav Slavik
32b8ec41 4// Id: $Id$
7bdc1879 5// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
32b8ec41
VZ
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9
10#ifdef __GNUG__
11#pragma implementation "settings.h"
12#endif
13
14#include "wx/settings.h"
7bdc1879
VS
15#include "wx/colour.h"
16#include "wx/font.h"
8fbdfa4f
VS
17#include "wx/module.h"
18
19// ----------------------------------------------------------------------------
20// global data
21// ----------------------------------------------------------------------------
22
23static wxFont *gs_fontDefault = NULL;
24
25class wxSystemSettingsModule : public wxModule
26{
27public:
28 virtual bool OnInit() { return TRUE; }
29 virtual void OnExit()
30 {
31 delete gs_fontDefault;
32 gs_fontDefault = NULL;
33 }
34
35private:
36 DECLARE_DYNAMIC_CLASS(wxSystemSettingsModule)
37};
38
39IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule, wxModule)
40
41
32b8ec41 42
7bdc1879
VS
43wxColour wxSystemSettings::GetSystemColour(int WXUNUSED(index))
44{
45 // FIXME_MGL
ef344ff8 46 return wxColour(0,0,0);
7bdc1879
VS
47}
48
8fbdfa4f 49wxFont wxSystemSettings::GetSystemFont(int index)
7bdc1879 50{
8fbdfa4f
VS
51 bool isDefaultRequested = (index == wxSYS_DEFAULT_GUI_FONT);
52
53 if ( isDefaultRequested && gs_fontDefault )
54 {
55 return *gs_fontDefault;
56 }
57
7bdc1879 58 // FIXME_MGL
8fbdfa4f
VS
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;
7bdc1879
VS
68}
69
70int wxSystemSettings::GetSystemMetric(int WXUNUSED(index))
71{
72 // FIXME_MGL
73 return 1;
74}
253293c1
VS
75
76bool 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}