]> git.saurik.com Git - wxWidgets.git/blame - include/wx/settings.h
show the taskbar icon even after Explorer restart (patch 723532) + some code cleanup
[wxWidgets.git] / include / wx / settings.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
bad606fa 2// Name: wx/settings.h
7516ed26 3// Purpose: wxSystemSettings class
c801d85f
KB
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
371a5b4e 8// Copyright: (c) Julian Smart
7516ed26 9// Licence: wxWindows licence
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_SETTINGS_H_BASE_
13#define _WX_SETTINGS_H_BASE_
c801d85f 14
bad606fa
VZ
15#include "wx/colour.h"
16#include "wx/font.h"
17
18// possible values for wxSystemSettings::GetFont() parameter
19//
20// NB: wxMSW assumes that they have the same values as the parameters of
21// Windows GetStockObject() API, don't change the values!
22enum wxSystemFont
23{
24 wxSYS_OEM_FIXED_FONT = 10,
25 wxSYS_ANSI_FIXED_FONT,
26 wxSYS_ANSI_VAR_FONT,
27 wxSYS_SYSTEM_FONT,
28 wxSYS_DEVICE_DEFAULT_FONT,
29 wxSYS_DEFAULT_PALETTE,
30 wxSYS_SYSTEM_FIXED_FONT,
31 wxSYS_DEFAULT_GUI_FONT
32};
33
34// possible values for wxSystemSettings::GetColour() parameter
35//
36// NB: wxMSW assumes that they have the same values as the parameters of
37// Windows GetSysColor() API, don't change the values!
38enum wxSystemColour
39{
40 wxSYS_COLOUR_SCROLLBAR,
41 wxSYS_COLOUR_BACKGROUND,
7d6d3bf3 42 wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
bad606fa
VZ
43 wxSYS_COLOUR_ACTIVECAPTION,
44 wxSYS_COLOUR_INACTIVECAPTION,
45 wxSYS_COLOUR_MENU,
46 wxSYS_COLOUR_WINDOW,
47 wxSYS_COLOUR_WINDOWFRAME,
48 wxSYS_COLOUR_MENUTEXT,
49 wxSYS_COLOUR_WINDOWTEXT,
50 wxSYS_COLOUR_CAPTIONTEXT,
51 wxSYS_COLOUR_ACTIVEBORDER,
52 wxSYS_COLOUR_INACTIVEBORDER,
53 wxSYS_COLOUR_APPWORKSPACE,
54 wxSYS_COLOUR_HIGHLIGHT,
55 wxSYS_COLOUR_HIGHLIGHTTEXT,
56 wxSYS_COLOUR_BTNFACE,
7d6d3bf3 57 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
bad606fa 58 wxSYS_COLOUR_BTNSHADOW,
7d6d3bf3 59 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
bad606fa
VZ
60 wxSYS_COLOUR_GRAYTEXT,
61 wxSYS_COLOUR_BTNTEXT,
62 wxSYS_COLOUR_INACTIVECAPTIONTEXT,
63 wxSYS_COLOUR_BTNHIGHLIGHT,
7d6d3bf3
VZ
64 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
65 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
66 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
bad606fa
VZ
67 wxSYS_COLOUR_3DDKSHADOW,
68 wxSYS_COLOUR_3DLIGHT,
69 wxSYS_COLOUR_INFOTEXT,
70 wxSYS_COLOUR_INFOBK,
71 wxSYS_COLOUR_LISTBOX,
7d6d3bf3
VZ
72 wxSYS_COLOUR_HOTLIGHT,
73 wxSYS_COLOUR_GRADIENTACTIVECAPTION,
74 wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
75 wxSYS_COLOUR_MENUHILIGHT,
76 wxSYS_COLOUR_MENUBAR,
bad606fa 77
7d6d3bf3 78 wxSYS_COLOUR_MAX
bad606fa
VZ
79};
80
81// possible values for wxSystemSettings::GetMetric() parameter
7516ed26
VZ
82//
83// NB: update the conversion table in msw/settings.cpp if you change the values
84// of the elements of this enum
bad606fa
VZ
85enum wxSystemMetric
86{
87 wxSYS_MOUSE_BUTTONS = 1,
88 wxSYS_BORDER_X,
89 wxSYS_BORDER_Y,
90 wxSYS_CURSOR_X,
91 wxSYS_CURSOR_Y,
92 wxSYS_DCLICK_X,
93 wxSYS_DCLICK_Y,
94 wxSYS_DRAG_X,
95 wxSYS_DRAG_Y,
96 wxSYS_EDGE_X,
97 wxSYS_EDGE_Y,
98 wxSYS_HSCROLL_ARROW_X,
99 wxSYS_HSCROLL_ARROW_Y,
100 wxSYS_HTHUMB_X,
101 wxSYS_ICON_X,
102 wxSYS_ICON_Y,
103 wxSYS_ICONSPACING_X,
104 wxSYS_ICONSPACING_Y,
105 wxSYS_WINDOWMIN_X,
106 wxSYS_WINDOWMIN_Y,
107 wxSYS_SCREEN_X,
108 wxSYS_SCREEN_Y,
109 wxSYS_FRAMESIZE_X,
110 wxSYS_FRAMESIZE_Y,
111 wxSYS_SMALLICON_X,
112 wxSYS_SMALLICON_Y,
113 wxSYS_HSCROLL_Y,
114 wxSYS_VSCROLL_X,
115 wxSYS_VSCROLL_ARROW_X,
116 wxSYS_VSCROLL_ARROW_Y,
117 wxSYS_VTHUMB_Y,
118 wxSYS_CAPTION_Y,
119 wxSYS_MENU_Y,
120 wxSYS_NETWORK_PRESENT,
121 wxSYS_PENWINDOWS_PRESENT,
122 wxSYS_SHOW_SOUNDS,
123 wxSYS_SWAP_BUTTONS
124};
125
126// possible values for wxSystemSettings::HasFeature() parameter
127enum wxSystemFeature
128{
129 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
130 wxSYS_CAN_ICONIZE_FRAME
131};
132
c15521c6 133// values for different screen designs
41fecb44 134enum wxSystemScreenType
c15521c6
RR
135{
136 wxSYS_SCREEN_NONE = 0, // not yet defined
41fecb44
VS
137
138 wxSYS_SCREEN_TINY, // <
c15521c6 139 wxSYS_SCREEN_PDA, // >= 320x240
41fecb44
VS
140 wxSYS_SCREEN_SMALL, // >= 640x480
141 wxSYS_SCREEN_DESKTOP // >= 800x600
c15521c6
RR
142};
143
bad606fa 144// ----------------------------------------------------------------------------
7516ed26 145// wxSystemSettingsNative: defines the API for wxSystemSettings class
bad606fa
VZ
146// ----------------------------------------------------------------------------
147
148// this is a namespace rather than a class: it has only non virtual static
149// functions
150//
151// also note that the methods are implemented in the platform-specific source
152// files (i.e. this is not a real base class as we can't override its virtual
153// functions because it doesn't have any)
4f89dbc4 154
7516ed26 155class WXDLLEXPORT wxSystemSettingsNative
bad606fa
VZ
156{
157public:
158 // get a standard system colour
159 static wxColour GetColour(wxSystemColour index);
160
161 // get a standard system font
162 static wxFont GetFont(wxSystemFont index);
163
164 // get a system-dependent metric
165 static int GetMetric(wxSystemMetric index);
166
167 // return true if the port has certain feature
168 static bool HasFeature(wxSystemFeature index);
bad606fa
VZ
169};
170
171// ----------------------------------------------------------------------------
172// include the declaration of the real platform-dependent class
173// ----------------------------------------------------------------------------
253293c1 174
64bea2bf 175class WXDLLEXPORT wxSystemSettings : public wxSystemSettingsNative
7516ed26
VZ
176{
177public:
178#ifdef __WXUNIVERSAL__
179 // in wxUniversal we want to use the theme standard colours instead of the
180 // system ones, otherwuse wxSystemSettings is just the same as
181 // wxSystemSettingsNative
182 static wxColour GetColour(wxSystemColour index);
183#endif // __WXUNIVERSAL__
925fe73a 184
c15521c6
RR
185 // Get system screen design (desktop, pda, ..) used for
186 // laying out various dialogs.
41fecb44 187 static wxSystemScreenType GetScreenType();
64bea2bf 188
c15521c6 189 // Override default.
41fecb44 190 static void SetScreenType( wxSystemScreenType screen );
64bea2bf 191
c15521c6 192 // Value
41fecb44 193 static wxSystemScreenType ms_screen;
c15521c6 194
925fe73a
VS
195
196 // the backwards compatible versions of wxSystemSettingsNative functions,
197 // don't use these methods in the new code!
198 static wxColour GetSystemColour(int index)
199 { return GetColour((wxSystemColour)index); }
200 static wxFont GetSystemFont(int index)
201 { return GetFont((wxSystemFont)index); }
202 static int GetSystemMetric(int index)
203 { return GetMetric((wxSystemMetric)index); }
7516ed26
VZ
204};
205
c801d85f 206#endif
34138703 207 // _WX_SETTINGS_H_BASE_
c801d85f 208