]> git.saurik.com Git - wxWidgets.git/blob - src/palmos/settings.cpp
make DEBUG_INFO=1 the default for VC++
[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 // ============================================================================
37 // implementation
38 // ============================================================================
39
40 // ----------------------------------------------------------------------------
41 // wxSystemSettingsNative
42 // ----------------------------------------------------------------------------
43
44 // ----------------------------------------------------------------------------
45 // colours
46 // ----------------------------------------------------------------------------
47
48 wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
49 {
50 // point to unused entry to mark lack of assignment
51 UIColorTableEntries which = UILastColorTableEntry;
52
53 switch( index )
54 {
55 case wxSYS_COLOUR_BACKGROUND:
56 case wxSYS_COLOUR_WINDOW:
57 which = UIFormFill;
58 break;
59 case wxSYS_COLOUR_WINDOWFRAME:
60 case wxSYS_COLOUR_ACTIVECAPTION:
61 which = UIFormFrame;
62 break;
63 case wxSYS_COLOUR_SCROLLBAR:
64 which = UIObjectFill;
65 break;
66 /*
67 case wxSYS_COLOUR_INACTIVECAPTION:
68 case wxSYS_COLOUR_MENU:
69 case wxSYS_COLOUR_MENUTEXT:
70 case wxSYS_COLOUR_WINDOWTEXT:
71 case wxSYS_COLOUR_CAPTIONTEXT:
72 case wxSYS_COLOUR_ACTIVEBORDER:
73 case wxSYS_COLOUR_INACTIVEBORDER:
74 case wxSYS_COLOUR_APPWORKSPACE:
75 case wxSYS_COLOUR_HIGHLIGHT:
76 case wxSYS_COLOUR_HIGHLIGHTTEXT:
77 case wxSYS_COLOUR_BTNFACE:
78 case wxSYS_COLOUR_BTNSHADOW:
79 case wxSYS_COLOUR_GRAYTEXT:
80 case wxSYS_COLOUR_BTNTEXT:
81 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
82 case wxSYS_COLOUR_BTNHIGHLIGHT:
83 case wxSYS_COLOUR_3DDKSHADOW:
84 case wxSYS_COLOUR_3DLIGHT:
85 case wxSYS_COLOUR_INFOTEXT:
86 case wxSYS_COLOUR_INFOBK:
87 case wxSYS_COLOUR_LISTBOX:
88 case wxSYS_COLOUR_HOTLIGHT:
89 case wxSYS_COLOUR_GRADIENTACTIVECAPTION:
90 case wxSYS_COLOUR_GRADIENTINACTIVECAPTION:
91 case wxSYS_COLOUR_MENUHILIGHT:
92 case wxSYS_COLOUR_MENUBAR:
93 */
94 }
95 if ( which == UILastColorTableEntry )
96 return wxNullColour;
97
98 RGBColorType rgbP;
99
100 UIColorGetTableEntryRGB (which,&rgbP);
101
102 return wxColour(rgbP.r,rgbP.g,rgbP.b);
103 }
104
105 // ----------------------------------------------------------------------------
106 // fonts
107 // ----------------------------------------------------------------------------
108
109 wxFont wxCreateFontFromStockObject(int index)
110 {
111 wxFont font;
112 return font;
113 }
114
115 wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
116 {
117 wxFont font;
118 return font;
119 }
120
121 // ----------------------------------------------------------------------------
122 // system metrics/features
123 // ----------------------------------------------------------------------------
124
125 // Get a system metric, e.g. scrollbar size
126 int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(win))
127 {
128 int metric = -1;
129 uint32_t attrP;
130
131 switch( index )
132 {
133 case wxSYS_SCREEN_X:
134 WinScreenGetAttribute(winScreenWidth, &attrP);
135 metric = attrP;
136 break;
137
138 case wxSYS_SCREEN_Y:
139 WinScreenGetAttribute(winScreenHeight, &attrP);
140 metric = attrP;
141 break;
142 }
143
144 return metric;
145 }
146
147 bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
148 {
149 return false;
150 }