]>
Commit | Line | Data |
---|---|---|
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 | ||
a246f95e VS |
14 | // For compilers that support precompilation, includes "wx.h". |
15 | #include "wx/wxprec.h" | |
16 | ||
17 | #ifdef __BORLANDC__ | |
18 | #pragma hdrstop | |
19 | #endif | |
20 | ||
32b8ec41 | 21 | #include "wx/settings.h" |
7bdc1879 VS |
22 | #include "wx/colour.h" |
23 | #include "wx/font.h" | |
8fbdfa4f VS |
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 | ||
32b8ec41 | 49 | |
7bdc1879 VS |
50 | wxColour wxSystemSettings::GetSystemColour(int WXUNUSED(index)) |
51 | { | |
52 | // FIXME_MGL | |
ef344ff8 | 53 | return wxColour(0,0,0); |
7bdc1879 VS |
54 | } |
55 | ||
8fbdfa4f | 56 | wxFont wxSystemSettings::GetSystemFont(int index) |
7bdc1879 | 57 | { |
8fbdfa4f VS |
58 | bool isDefaultRequested = (index == wxSYS_DEFAULT_GUI_FONT); |
59 | ||
60 | if ( isDefaultRequested && gs_fontDefault ) | |
61 | { | |
62 | return *gs_fontDefault; | |
63 | } | |
64 | ||
7bdc1879 | 65 | // FIXME_MGL |
8fbdfa4f VS |
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; | |
7bdc1879 VS |
75 | } |
76 | ||
77 | int wxSystemSettings::GetSystemMetric(int WXUNUSED(index)) | |
78 | { | |
79 | // FIXME_MGL | |
80 | return 1; | |
81 | } | |
253293c1 VS |
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 | } |