]>
Commit | Line | Data |
---|---|---|
b3c86150 VS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/dfb/settings.cpp | |
3 | // Purpose: wxSystemSettings implementation | |
4 | // Author: Vaclav Slavik | |
5 | // Created: 2006-08-08 | |
b3c86150 VS |
6 | // Copyright: (c) 2006 REA Elektronik GmbH |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | // For compilers that support precompilation, includes "wx.h". | |
11 | #include "wx/wxprec.h" | |
12 | ||
13 | #ifdef __BORLANDC__ | |
14 | #pragma hdrstop | |
15 | #endif | |
16 | ||
17 | #include "wx/settings.h" | |
18 | ||
19 | #ifndef WX_PRECOMP | |
20 | #include "wx/colour.h" | |
21 | #include "wx/font.h" | |
22 | #include "wx/gdicmn.h" | |
23 | #endif | |
24 | ||
b3c86150 VS |
25 | |
26 | wxColour wxSystemSettingsNative::GetColour(wxSystemColour WXUNUSED(index)) | |
27 | { | |
921d9418 | 28 | // overridden by wxSystemSettings::GetColour in wxUniversal |
b3c86150 VS |
29 | return wxColour(0,0,0); |
30 | } | |
31 | ||
32 | wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) | |
33 | { | |
34 | switch (index) | |
35 | { | |
36 | case wxSYS_OEM_FIXED_FONT: | |
37 | case wxSYS_ANSI_FIXED_FONT: | |
38 | case wxSYS_SYSTEM_FIXED_FONT: | |
39 | { | |
40 | // FIXME_DFB | |
41 | return wxFont(12, | |
42 | wxFONTFAMILY_TELETYPE, | |
43 | wxFONTSTYLE_NORMAL, | |
44 | wxFONTWEIGHT_NORMAL); | |
45 | } | |
46 | ||
47 | case wxSYS_ANSI_VAR_FONT: | |
48 | case wxSYS_SYSTEM_FONT: | |
49 | case wxSYS_DEVICE_DEFAULT_FONT: | |
50 | case wxSYS_DEFAULT_GUI_FONT: | |
51 | { | |
52 | // FIXME_DFB | |
53 | return wxFont(12, | |
54 | wxFONTFAMILY_DEFAULT, | |
55 | wxFONTSTYLE_NORMAL, | |
56 | wxFONTWEIGHT_NORMAL); | |
57 | } | |
58 | ||
59 | default: | |
a5001e93 | 60 | wxFAIL_MSG( "unknown font type" ); |
b3c86150 VS |
61 | return wxNullFont; |
62 | } | |
63 | } | |
64 | ||
65 | int wxSystemSettingsNative::GetMetric(wxSystemMetric index, | |
66 | wxWindow* WXUNUSED(win)) | |
67 | { | |
68 | int val; | |
69 | ||
70 | switch (index) | |
71 | { | |
72 | case wxSYS_SCREEN_X: | |
73 | wxDisplaySize(&val, NULL); | |
74 | return val; | |
75 | case wxSYS_SCREEN_Y: | |
76 | wxDisplaySize(NULL, &val); | |
77 | return val; | |
78 | ||
b3c86150 | 79 | default: |
b3c86150 VS |
80 | return -1; |
81 | } | |
82 | } | |
83 | ||
84 | bool wxSystemSettingsNative::HasFeature(wxSystemFeature index) | |
85 | { | |
86 | switch (index) | |
87 | { | |
88 | case wxSYS_CAN_ICONIZE_FRAME: | |
89 | case wxSYS_CAN_DRAW_FRAME_DECORATIONS: | |
90 | case wxSYS_TABLET_PRESENT: | |
91 | return false; | |
92 | ||
93 | default: | |
a5001e93 | 94 | wxFAIL_MSG( "unknown feature" ); |
b3c86150 VS |
95 | return false; |
96 | } | |
97 | } |