]> git.saurik.com Git - wxWidgets.git/blob - src/qt/settings.cpp
stray #include "wincmn.cpp" removed
[wxWidgets.git] / src / qt / settings.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: settings.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifdef __GNUG__
13 #pragma implementation "settings.h"
14 #endif
15
16 #include "wx/settings.h"
17
18 /*
19 #define wxSYS_COLOUR_SCROLLBAR 0
20 #define wxSYS_COLOUR_BACKGROUND 1
21 #define wxSYS_COLOUR_ACTIVECAPTION 2
22 #define wxSYS_COLOUR_INACTIVECAPTION 3
23 #define wxSYS_COLOUR_MENU 4
24 #define wxSYS_COLOUR_WINDOW 5
25 #define wxSYS_COLOUR_WINDOWFRAME 6
26 #define wxSYS_COLOUR_MENUTEXT 7
27 #define wxSYS_COLOUR_WINDOWTEXT 8
28 #define wxSYS_COLOUR_CAPTIONTEXT 9
29 #define wxSYS_COLOUR_ACTIVEBORDER 10
30 #define wxSYS_COLOUR_INACTIVEBORDER 11
31 #define wxSYS_COLOUR_APPWORKSPACE 12
32 #define wxSYS_COLOUR_HIGHLIGHT 13
33 #define wxSYS_COLOUR_HIGHLIGHTTEXT 14
34 #define wxSYS_COLOUR_BTNFACE 15
35 #define wxSYS_COLOUR_BTNSHADOW 16
36 #define wxSYS_COLOUR_GRAYTEXT 17
37 #define wxSYS_COLOUR_BTNTEXT 18
38 #define wxSYS_COLOUR_INACTIVECAPTIONTEXT 19
39 #define wxSYS_COLOUR_BTNHIGHLIGHT 20
40
41 #define wxSYS_COLOUR_3DDKSHADOW 21
42 #define wxSYS_COLOUR_3DLIGHT 22
43 #define wxSYS_COLOUR_INFOTEXT 23
44 #define wxSYS_COLOUR_INFOBK 24
45
46 #define wxSYS_COLOUR_DESKTOP wxSYS_COLOUR_BACKGROUND
47 #define wxSYS_COLOUR_3DFACE wxSYS_COLOUR_BTNFACE
48 #define wxSYS_COLOUR_3DSHADOW wxSYS_COLOUR_BTNSHADOW
49 #define wxSYS_COLOUR_3DHIGHLIGHT wxSYS_COLOUR_BTNHIGHLIGHT
50 #define wxSYS_COLOUR_3DHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT
51 #define wxSYS_COLOUR_BTNHILIGHT wxSYS_COLOUR_BTNHIGHLIGHT
52 */
53
54 #define SHIFT (8*(sizeof(short int)-sizeof(char)))
55
56 wxColour *g_systemBtnFaceColour = NULL;
57 wxColour *g_systemBtnShadowColour = NULL;
58 wxColour *g_systemBtnHighlightColour = NULL;
59 wxColour *g_systemHighlightColour = NULL;
60
61 wxColour wxSystemSettings::GetSystemColour( int index )
62 {
63 switch (index)
64 {
65 case wxSYS_COLOUR_SCROLLBAR:
66 case wxSYS_COLOUR_BACKGROUND:
67 case wxSYS_COLOUR_ACTIVECAPTION:
68 case wxSYS_COLOUR_INACTIVECAPTION:
69 case wxSYS_COLOUR_MENU:
70 case wxSYS_COLOUR_WINDOW:
71 case wxSYS_COLOUR_WINDOWFRAME:
72 case wxSYS_COLOUR_ACTIVEBORDER:
73 case wxSYS_COLOUR_INACTIVEBORDER:
74 case wxSYS_COLOUR_BTNFACE:
75 {
76 return *g_systemBtnFaceColour;
77 };
78 case wxSYS_COLOUR_BTNSHADOW:
79 {
80 return *g_systemBtnShadowColour;
81 };
82 case wxSYS_COLOUR_GRAYTEXT:
83 case wxSYS_COLOUR_BTNHIGHLIGHT:
84 {
85 return *g_systemBtnHighlightColour;
86 };
87 case wxSYS_COLOUR_HIGHLIGHT:
88 {
89 return *g_systemHighlightColour;
90 };
91 case wxSYS_COLOUR_MENUTEXT:
92 case wxSYS_COLOUR_WINDOWTEXT:
93 case wxSYS_COLOUR_CAPTIONTEXT:
94 case wxSYS_COLOUR_INACTIVECAPTIONTEXT:
95 case wxSYS_COLOUR_INFOTEXT:
96 {
97 return *wxBLACK;
98 };
99 case wxSYS_COLOUR_HIGHLIGHTTEXT:
100 {
101 return *wxWHITE;
102 };
103 case wxSYS_COLOUR_INFOBK:
104 case wxSYS_COLOUR_APPWORKSPACE:
105 {
106 return *wxWHITE; // ?
107 };
108 };
109 return *wxWHITE;
110 };
111
112 wxFont *g_systemFont = NULL;
113
114 wxFont wxSystemSettings::GetSystemFont( int index )
115 {
116 switch (index)
117 {
118 case wxSYS_OEM_FIXED_FONT:
119 case wxSYS_ANSI_FIXED_FONT:
120 case wxSYS_SYSTEM_FIXED_FONT:
121 {
122 return *wxNORMAL_FONT;
123 };
124 case wxSYS_ANSI_VAR_FONT:
125 case wxSYS_SYSTEM_FONT:
126 case wxSYS_DEVICE_DEFAULT_FONT:
127 case wxSYS_DEFAULT_GUI_FONT:
128 {
129 return *g_systemFont;
130 };
131 };
132 return wxNullFont;
133 };
134
135 int wxSystemSettings::GetSystemMetric( int index )
136 {
137 switch (index)
138 {
139 case wxSYS_SCREEN_X: return 0;
140 case wxSYS_SCREEN_Y: return 0;
141 };
142 return 0;
143 };
144