]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/settings.cpp
Merge in from trunk r67662 to r64801
[wxWidgets.git] / src / palmos / settings.cpp
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/settings.cpp
ffecfa5a 3// Purpose: wxSystemSettingsNative implementation for Palm OS
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
f241653c 5// Modified by: Wlodzimierz ABX Skiba - native implementation
ffecfa5a 6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
f241653c 8// Copyright: (c) William Osborne, Wlodzimierz Skiba
ffecfa5a
JS
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20// For compilers that support precompilation, includes "wx.h".
21#include "wx/wxprec.h"
22
23#ifdef __BORLANDC__
24 #pragma hdrstop
25#endif
26
9eddec69
WS
27#include "wx/settings.h"
28
ffecfa5a
JS
29#ifndef WX_PRECOMP
30 #include "wx/utils.h"
31 #include "wx/gdicmn.h"
02761f6c 32 #include "wx/module.h"
ffecfa5a
JS
33#endif
34
ffecfa5a
JS
35#include "wx/fontutil.h"
36
20bc5ad8
WS
37#include <UIColor.h>
38
ffecfa5a
JS
39// ============================================================================
40// implementation
41// ============================================================================
42
43// ----------------------------------------------------------------------------
44// wxSystemSettingsNative
45// ----------------------------------------------------------------------------
46
47// ----------------------------------------------------------------------------
48// colours
49// ----------------------------------------------------------------------------
50
51wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
52{
4aa7ecf1
WS
53 // point to unused entry to mark lack of assignment
54 UIColorTableEntries which = UILastColorTableEntry;
55
56 switch( index )
57 {
58 case wxSYS_COLOUR_BACKGROUND:
59 case wxSYS_COLOUR_WINDOW:
60 which = UIFormFill;
61 break;
62 case wxSYS_COLOUR_WINDOWFRAME:
63 case wxSYS_COLOUR_ACTIVECAPTION:
64 which = UIFormFrame;
65 break;
66 case wxSYS_COLOUR_SCROLLBAR:
67 which = UIObjectFill;
68 break;
69/*
70 case wxSYS_COLOUR_INACTIVECAPTION:
71 case wxSYS_COLOUR_MENU:
72 case wxSYS_COLOUR_MENUTEXT:
73 case wxSYS_COLOUR_WINDOWTEXT:
74 case wxSYS_COLOUR_CAPTIONTEXT:
75 case wxSYS_COLOUR_ACTIVEBORDER:
76 case wxSYS_COLOUR_INACTIVEBORDER:
77 case wxSYS_COLOUR_APPWORKSPACE:
78 case wxSYS_COLOUR_HIGHLIGHT:
887b919b 79 case wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT:
4aa7ecf1
WS
80 case wxSYS_COLOUR_HIGHLIGHTTEXT:
81 case wxSYS_COLOUR_BTNFACE:
82 case wxSYS_COLOUR_BTNSHADOW:
83 case wxSYS_COLOUR_GRAYTEXT:
84 case wxSYS_COLOUR_BTNTEXT:
85 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
86 case wxSYS_COLOUR_BTNHIGHLIGHT:
87 case wxSYS_COLOUR_3DDKSHADOW:
88 case wxSYS_COLOUR_3DLIGHT:
89 case wxSYS_COLOUR_INFOTEXT:
90 case wxSYS_COLOUR_INFOBK:
91 case wxSYS_COLOUR_LISTBOX:
92 case wxSYS_COLOUR_HOTLIGHT:
93 case wxSYS_COLOUR_GRADIENTACTIVECAPTION:
94 case wxSYS_COLOUR_GRADIENTINACTIVECAPTION:
95 case wxSYS_COLOUR_MENUHILIGHT:
96 case wxSYS_COLOUR_MENUBAR:
97*/
98 }
99 if ( which == UILastColorTableEntry )
100 return wxNullColour;
101
102 RGBColorType rgbP;
103
104 UIColorGetTableEntryRGB (which,&rgbP);
105
106 return wxColour(rgbP.r,rgbP.g,rgbP.b);
ffecfa5a
JS
107}
108
109// ----------------------------------------------------------------------------
110// fonts
111// ----------------------------------------------------------------------------
112
113wxFont wxCreateFontFromStockObject(int index)
114{
115 wxFont font;
116 return font;
117}
118
119wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
120{
121 wxFont font;
122 return font;
123}
124
125// ----------------------------------------------------------------------------
126// system metrics/features
127// ----------------------------------------------------------------------------
128
129// Get a system metric, e.g. scrollbar size
9b0b5ba7 130int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(win))
ffecfa5a 131{
f241653c
WS
132 int metric = -1;
133 uint32_t attrP;
134
135 switch( index )
136 {
137 case wxSYS_SCREEN_X:
138 WinScreenGetAttribute(winScreenWidth, &attrP);
139 metric = attrP;
140 break;
141
142 case wxSYS_SCREEN_Y:
143 WinScreenGetAttribute(winScreenHeight, &attrP);
144 metric = attrP;
145 break;
146 }
147
148 return metric;
ffecfa5a
JS
149}
150
151bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
152{
153 return false;
154}