1///////////////////////////////////////////////////////////////////////////// 2// Name: src/dfb/settings.cpp 3// Purpose: wxSystemSettings implementation 4// Author: Vaclav Slavik 5// Created: 2006-08-08 6// RCS-ID: $Id: settings.cpp 40999 2006-09-04 15:23:06Z VS $ 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( _T("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#warning "FIXME this" 81#if 0 82 case wxSYS_VSCROLL_X: 83 case wxSYS_HSCROLL_Y: 84 return 15; 85#endif 86 87 default: 88 wxFAIL_MSG( _T("unsupported metric") ); 89 return -1; 90 } 91} 92 93bool wxSystemSettingsNative::HasFeature(wxSystemFeature index) 94{ 95 switch (index) 96 { 97 case wxSYS_CAN_ICONIZE_FRAME: 98 case wxSYS_CAN_DRAW_FRAME_DECORATIONS: 99 case wxSYS_TABLET_PRESENT: 100 return false; 101 102 default: 103 wxFAIL_MSG( _T("unknown feature") ); 104 return false; 105 } 106} 107