]> git.saurik.com Git - wxWidgets.git/blame - include/wx/settings.h
maintaint the mouse capture stack in all ports, not just wxUniv
[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$
8// Copyright: (c) Julian Smart and Markus Holzem
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,
42 wxSYS_COLOUR_ACTIVECAPTION,
43 wxSYS_COLOUR_INACTIVECAPTION,
44 wxSYS_COLOUR_MENU,
45 wxSYS_COLOUR_WINDOW,
46 wxSYS_COLOUR_WINDOWFRAME,
47 wxSYS_COLOUR_MENUTEXT,
48 wxSYS_COLOUR_WINDOWTEXT,
49 wxSYS_COLOUR_CAPTIONTEXT,
50 wxSYS_COLOUR_ACTIVEBORDER,
51 wxSYS_COLOUR_INACTIVEBORDER,
52 wxSYS_COLOUR_APPWORKSPACE,
53 wxSYS_COLOUR_HIGHLIGHT,
54 wxSYS_COLOUR_HIGHLIGHTTEXT,
55 wxSYS_COLOUR_BTNFACE,
56 wxSYS_COLOUR_BTNSHADOW,
57 wxSYS_COLOUR_GRAYTEXT,
58 wxSYS_COLOUR_BTNTEXT,
59 wxSYS_COLOUR_INACTIVECAPTIONTEXT,
60 wxSYS_COLOUR_BTNHIGHLIGHT,
61 wxSYS_COLOUR_3DDKSHADOW,
62 wxSYS_COLOUR_3DLIGHT,
63 wxSYS_COLOUR_INFOTEXT,
64 wxSYS_COLOUR_INFOBK,
65 wxSYS_COLOUR_LISTBOX,
66
67 wxSYS_COLOUR_DESKTOP = wxSYS_COLOUR_BACKGROUND,
68 wxSYS_COLOUR_3DFACE = wxSYS_COLOUR_BTNFACE,
69 wxSYS_COLOUR_3DSHADOW = wxSYS_COLOUR_BTNSHADOW,
70 wxSYS_COLOUR_3DHIGHLIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
71 wxSYS_COLOUR_3DHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT,
72 wxSYS_COLOUR_BTNHILIGHT = wxSYS_COLOUR_BTNHIGHLIGHT
73};
74
75// possible values for wxSystemSettings::GetMetric() parameter
7516ed26
VZ
76//
77// NB: update the conversion table in msw/settings.cpp if you change the values
78// of the elements of this enum
bad606fa
VZ
79enum wxSystemMetric
80{
81 wxSYS_MOUSE_BUTTONS = 1,
82 wxSYS_BORDER_X,
83 wxSYS_BORDER_Y,
84 wxSYS_CURSOR_X,
85 wxSYS_CURSOR_Y,
86 wxSYS_DCLICK_X,
87 wxSYS_DCLICK_Y,
88 wxSYS_DRAG_X,
89 wxSYS_DRAG_Y,
90 wxSYS_EDGE_X,
91 wxSYS_EDGE_Y,
92 wxSYS_HSCROLL_ARROW_X,
93 wxSYS_HSCROLL_ARROW_Y,
94 wxSYS_HTHUMB_X,
95 wxSYS_ICON_X,
96 wxSYS_ICON_Y,
97 wxSYS_ICONSPACING_X,
98 wxSYS_ICONSPACING_Y,
99 wxSYS_WINDOWMIN_X,
100 wxSYS_WINDOWMIN_Y,
101 wxSYS_SCREEN_X,
102 wxSYS_SCREEN_Y,
103 wxSYS_FRAMESIZE_X,
104 wxSYS_FRAMESIZE_Y,
105 wxSYS_SMALLICON_X,
106 wxSYS_SMALLICON_Y,
107 wxSYS_HSCROLL_Y,
108 wxSYS_VSCROLL_X,
109 wxSYS_VSCROLL_ARROW_X,
110 wxSYS_VSCROLL_ARROW_Y,
111 wxSYS_VTHUMB_Y,
112 wxSYS_CAPTION_Y,
113 wxSYS_MENU_Y,
114 wxSYS_NETWORK_PRESENT,
115 wxSYS_PENWINDOWS_PRESENT,
116 wxSYS_SHOW_SOUNDS,
117 wxSYS_SWAP_BUTTONS
118};
119
120// possible values for wxSystemSettings::HasFeature() parameter
121enum wxSystemFeature
122{
123 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
124 wxSYS_CAN_ICONIZE_FRAME
125};
126
127// ----------------------------------------------------------------------------
7516ed26 128// wxSystemSettingsNative: defines the API for wxSystemSettings class
bad606fa
VZ
129// ----------------------------------------------------------------------------
130
131// this is a namespace rather than a class: it has only non virtual static
132// functions
133//
134// also note that the methods are implemented in the platform-specific source
135// files (i.e. this is not a real base class as we can't override its virtual
136// functions because it doesn't have any)
4f89dbc4 137
7516ed26 138class WXDLLEXPORT wxSystemSettingsNative
bad606fa
VZ
139{
140public:
141 // get a standard system colour
142 static wxColour GetColour(wxSystemColour index);
143
144 // get a standard system font
145 static wxFont GetFont(wxSystemFont index);
146
147 // get a system-dependent metric
148 static int GetMetric(wxSystemMetric index);
149
150 // return true if the port has certain feature
151 static bool HasFeature(wxSystemFeature index);
bad606fa
VZ
152};
153
154// ----------------------------------------------------------------------------
155// include the declaration of the real platform-dependent class
156// ----------------------------------------------------------------------------
253293c1 157
7516ed26
VZ
158class wxSystemSettings : public wxSystemSettingsNative
159{
160public:
161#ifdef __WXUNIVERSAL__
162 // in wxUniversal we want to use the theme standard colours instead of the
163 // system ones, otherwuse wxSystemSettings is just the same as
164 // wxSystemSettingsNative
165 static wxColour GetColour(wxSystemColour index);
166#endif // __WXUNIVERSAL__
925fe73a
VS
167
168
169 // the backwards compatible versions of wxSystemSettingsNative functions,
170 // don't use these methods in the new code!
171 static wxColour GetSystemColour(int index)
172 { return GetColour((wxSystemColour)index); }
173 static wxFont GetSystemFont(int index)
174 { return GetFont((wxSystemFont)index); }
175 static int GetSystemMetric(int index)
176 { return GetMetric((wxSystemMetric)index); }
7516ed26
VZ
177};
178
c801d85f 179#endif
34138703 180 // _WX_SETTINGS_H_BASE_
c801d85f 181