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