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