]> git.saurik.com Git - wxWidgets.git/blame - include/wx/settings.h
Implement SelectAll for OSX WebKit.
[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
65571936 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
b5dbe15d 18class WXDLLIMPEXP_FWD_CORE wxWindow;
86a2f722 19
bad606fa
VZ
20// possible values for wxSystemSettings::GetFont() parameter
21//
22// NB: wxMSW assumes that they have the same values as the parameters of
23// Windows GetStockObject() API, don't change the values!
24enum wxSystemFont
25{
26 wxSYS_OEM_FIXED_FONT = 10,
27 wxSYS_ANSI_FIXED_FONT,
28 wxSYS_ANSI_VAR_FONT,
29 wxSYS_SYSTEM_FONT,
30 wxSYS_DEVICE_DEFAULT_FONT,
a4d291f0 31
6bec9d50
VZ
32 // don't use: this is here just to make the values of enum elements
33 // coincide with the corresponding MSW constants
34 wxSYS_DEFAULT_PALETTE,
35
d6e329cf 36 // don't use: MSDN says that this is a stock object provided only
a4d291f0 37 // for compatibility with 16-bit Windows versions earlier than 3.0!
bad606fa 38 wxSYS_SYSTEM_FIXED_FONT,
a4d291f0 39
3cb99894 40 wxSYS_DEFAULT_GUI_FONT,
d09dd96e
VZ
41
42 // this was just a temporary aberration, do not use it any more
43 wxSYS_ICONTITLE_FONT = wxSYS_DEFAULT_GUI_FONT
bad606fa
VZ
44};
45
46// possible values for wxSystemSettings::GetColour() parameter
47//
48// NB: wxMSW assumes that they have the same values as the parameters of
49// Windows GetSysColor() API, don't change the values!
50enum wxSystemColour
51{
52 wxSYS_COLOUR_SCROLLBAR,
a4d291f0 53 wxSYS_COLOUR_DESKTOP,
bad606fa
VZ
54 wxSYS_COLOUR_ACTIVECAPTION,
55 wxSYS_COLOUR_INACTIVECAPTION,
56 wxSYS_COLOUR_MENU,
57 wxSYS_COLOUR_WINDOW,
58 wxSYS_COLOUR_WINDOWFRAME,
59 wxSYS_COLOUR_MENUTEXT,
60 wxSYS_COLOUR_WINDOWTEXT,
61 wxSYS_COLOUR_CAPTIONTEXT,
62 wxSYS_COLOUR_ACTIVEBORDER,
63 wxSYS_COLOUR_INACTIVEBORDER,
64 wxSYS_COLOUR_APPWORKSPACE,
65 wxSYS_COLOUR_HIGHLIGHT,
66 wxSYS_COLOUR_HIGHLIGHTTEXT,
67 wxSYS_COLOUR_BTNFACE,
68 wxSYS_COLOUR_BTNSHADOW,
69 wxSYS_COLOUR_GRAYTEXT,
70 wxSYS_COLOUR_BTNTEXT,
71 wxSYS_COLOUR_INACTIVECAPTIONTEXT,
72 wxSYS_COLOUR_BTNHIGHLIGHT,
73 wxSYS_COLOUR_3DDKSHADOW,
74 wxSYS_COLOUR_3DLIGHT,
75 wxSYS_COLOUR_INFOTEXT,
76 wxSYS_COLOUR_INFOBK,
77 wxSYS_COLOUR_LISTBOX,
7d6d3bf3
VZ
78 wxSYS_COLOUR_HOTLIGHT,
79 wxSYS_COLOUR_GRADIENTACTIVECAPTION,
80 wxSYS_COLOUR_GRADIENTINACTIVECAPTION,
81 wxSYS_COLOUR_MENUHILIGHT,
82 wxSYS_COLOUR_MENUBAR,
9f2968ad 83 wxSYS_COLOUR_LISTBOXTEXT,
887b919b 84 wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT,
bad606fa 85
d6e329cf
FM
86 wxSYS_COLOUR_MAX,
87
a4d291f0
FM
88 // synonyms
89 wxSYS_COLOUR_BACKGROUND = wxSYS_COLOUR_DESKTOP,
90 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
91 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
92 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
93 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
94 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
d6e329cf 95 wxSYS_COLOUR_FRAMEBK = wxSYS_COLOUR_BTNFACE
bad606fa
VZ
96};
97
9b0b5ba7 98// possible values for wxSystemSettings::GetMetric() index parameter
7516ed26
VZ
99//
100// NB: update the conversion table in msw/settings.cpp if you change the values
101// of the elements of this enum
bad606fa
VZ
102enum wxSystemMetric
103{
104 wxSYS_MOUSE_BUTTONS = 1,
105 wxSYS_BORDER_X,
106 wxSYS_BORDER_Y,
107 wxSYS_CURSOR_X,
108 wxSYS_CURSOR_Y,
109 wxSYS_DCLICK_X,
110 wxSYS_DCLICK_Y,
111 wxSYS_DRAG_X,
112 wxSYS_DRAG_Y,
113 wxSYS_EDGE_X,
114 wxSYS_EDGE_Y,
115 wxSYS_HSCROLL_ARROW_X,
116 wxSYS_HSCROLL_ARROW_Y,
117 wxSYS_HTHUMB_X,
118 wxSYS_ICON_X,
119 wxSYS_ICON_Y,
120 wxSYS_ICONSPACING_X,
121 wxSYS_ICONSPACING_Y,
122 wxSYS_WINDOWMIN_X,
123 wxSYS_WINDOWMIN_Y,
124 wxSYS_SCREEN_X,
125 wxSYS_SCREEN_Y,
126 wxSYS_FRAMESIZE_X,
127 wxSYS_FRAMESIZE_Y,
128 wxSYS_SMALLICON_X,
129 wxSYS_SMALLICON_Y,
130 wxSYS_HSCROLL_Y,
131 wxSYS_VSCROLL_X,
132 wxSYS_VSCROLL_ARROW_X,
133 wxSYS_VSCROLL_ARROW_Y,
134 wxSYS_VTHUMB_Y,
135 wxSYS_CAPTION_Y,
136 wxSYS_MENU_Y,
137 wxSYS_NETWORK_PRESENT,
138 wxSYS_PENWINDOWS_PRESENT,
139 wxSYS_SHOW_SOUNDS,
5595181f
VZ
140 wxSYS_SWAP_BUTTONS,
141 wxSYS_DCLICK_MSEC
bad606fa
VZ
142};
143
144// possible values for wxSystemSettings::HasFeature() parameter
145enum wxSystemFeature
146{
147 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
ddec9f1e
JS
148 wxSYS_CAN_ICONIZE_FRAME,
149 wxSYS_TABLET_PRESENT
bad606fa
VZ
150};
151
c15521c6 152// values for different screen designs
41fecb44 153enum wxSystemScreenType
c15521c6
RR
154{
155 wxSYS_SCREEN_NONE = 0, // not yet defined
41fecb44
VS
156
157 wxSYS_SCREEN_TINY, // <
c15521c6 158 wxSYS_SCREEN_PDA, // >= 320x240
41fecb44
VS
159 wxSYS_SCREEN_SMALL, // >= 640x480
160 wxSYS_SCREEN_DESKTOP // >= 800x600
c15521c6
RR
161};
162
bad606fa 163// ----------------------------------------------------------------------------
7516ed26 164// wxSystemSettingsNative: defines the API for wxSystemSettings class
bad606fa
VZ
165// ----------------------------------------------------------------------------
166
167// this is a namespace rather than a class: it has only non virtual static
168// functions
169//
170// also note that the methods are implemented in the platform-specific source
171// files (i.e. this is not a real base class as we can't override its virtual
172// functions because it doesn't have any)
4f89dbc4 173
53a2db12 174class WXDLLIMPEXP_CORE wxSystemSettingsNative
bad606fa
VZ
175{
176public:
177 // get a standard system colour
178 static wxColour GetColour(wxSystemColour index);
179
180 // get a standard system font
181 static wxFont GetFont(wxSystemFont index);
182
183 // get a system-dependent metric
9b0b5ba7 184 static int GetMetric(wxSystemMetric index, wxWindow * win = NULL);
bad606fa
VZ
185
186 // return true if the port has certain feature
187 static bool HasFeature(wxSystemFeature index);
bad606fa
VZ
188};
189
190// ----------------------------------------------------------------------------
191// include the declaration of the real platform-dependent class
192// ----------------------------------------------------------------------------
253293c1 193
53a2db12 194class WXDLLIMPEXP_CORE wxSystemSettings : public wxSystemSettingsNative
7516ed26
VZ
195{
196public:
197#ifdef __WXUNIVERSAL__
198 // in wxUniversal we want to use the theme standard colours instead of the
ec157c8f 199 // system ones, otherwise wxSystemSettings is just the same as
7516ed26
VZ
200 // wxSystemSettingsNative
201 static wxColour GetColour(wxSystemColour index);
d2f3b085
VS
202
203 // some metrics are toolkit-dependent and provided by wxUniv, some are
204 // lowlevel
205 static int GetMetric(wxSystemMetric index, wxWindow *win = NULL);
7516ed26 206#endif // __WXUNIVERSAL__
925fe73a 207
c15521c6
RR
208 // Get system screen design (desktop, pda, ..) used for
209 // laying out various dialogs.
41fecb44 210 static wxSystemScreenType GetScreenType();
64bea2bf 211
c15521c6 212 // Override default.
41fecb44 213 static void SetScreenType( wxSystemScreenType screen );
64bea2bf 214
c15521c6 215 // Value
41fecb44 216 static wxSystemScreenType ms_screen;
c15521c6 217
7516ed26
VZ
218};
219
c801d85f 220#endif
34138703 221 // _WX_SETTINGS_H_BASE_
c801d85f 222