]> git.saurik.com Git - wxWidgets.git/blame - include/wx/settings.h
Add some missing methods
[wxWidgets.git] / include / wx / settings.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
bad606fa
VZ
2// Name: wx/settings.h
3// Purpose: wxSystemSettingsBase 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
9// Licence: wxWindows licence
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
76enum wxSystemMetric
77{
78 wxSYS_MOUSE_BUTTONS = 1,
79 wxSYS_BORDER_X,
80 wxSYS_BORDER_Y,
81 wxSYS_CURSOR_X,
82 wxSYS_CURSOR_Y,
83 wxSYS_DCLICK_X,
84 wxSYS_DCLICK_Y,
85 wxSYS_DRAG_X,
86 wxSYS_DRAG_Y,
87 wxSYS_EDGE_X,
88 wxSYS_EDGE_Y,
89 wxSYS_HSCROLL_ARROW_X,
90 wxSYS_HSCROLL_ARROW_Y,
91 wxSYS_HTHUMB_X,
92 wxSYS_ICON_X,
93 wxSYS_ICON_Y,
94 wxSYS_ICONSPACING_X,
95 wxSYS_ICONSPACING_Y,
96 wxSYS_WINDOWMIN_X,
97 wxSYS_WINDOWMIN_Y,
98 wxSYS_SCREEN_X,
99 wxSYS_SCREEN_Y,
100 wxSYS_FRAMESIZE_X,
101 wxSYS_FRAMESIZE_Y,
102 wxSYS_SMALLICON_X,
103 wxSYS_SMALLICON_Y,
104 wxSYS_HSCROLL_Y,
105 wxSYS_VSCROLL_X,
106 wxSYS_VSCROLL_ARROW_X,
107 wxSYS_VSCROLL_ARROW_Y,
108 wxSYS_VTHUMB_Y,
109 wxSYS_CAPTION_Y,
110 wxSYS_MENU_Y,
111 wxSYS_NETWORK_PRESENT,
112 wxSYS_PENWINDOWS_PRESENT,
113 wxSYS_SHOW_SOUNDS,
114 wxSYS_SWAP_BUTTONS
115};
116
117// possible values for wxSystemSettings::HasFeature() parameter
118enum wxSystemFeature
119{
120 wxSYS_CAN_DRAW_FRAME_DECORATIONS = 1,
121 wxSYS_CAN_ICONIZE_FRAME
122};
123
124// ----------------------------------------------------------------------------
125// wxSystemSettingsBase: defines the API for wxSystemSettings class
126// ----------------------------------------------------------------------------
127
128// this is a namespace rather than a class: it has only non virtual static
129// functions
130//
131// also note that the methods are implemented in the platform-specific source
132// files (i.e. this is not a real base class as we can't override its virtual
133// functions because it doesn't have any)
134class WXDLLEXPORT wxSystemSettingsBase
135{
136public:
137 // get a standard system colour
138 static wxColour GetColour(wxSystemColour index);
139
140 // get a standard system font
141 static wxFont GetFont(wxSystemFont index);
142
143 // get a system-dependent metric
144 static int GetMetric(wxSystemMetric index);
145
146 // return true if the port has certain feature
147 static bool HasFeature(wxSystemFeature index);
148
149
150 // the backwards compatible versions, don't use these methods in the new
151 // code!
152 static wxColour GetSystemColour(int index)
153 { return GetColour((wxSystemColour)index); }
154 static wxFont GetSystemFont(int index)
155 { return GetFont((wxSystemFont)index); }
156 static int GetSystemMetric(int index)
157 { return GetMetric((wxSystemMetric)index); }
158 static bool GetCapability(int index)
159 { return HasFeature((wxSystemFeature)index); }
160};
161
162// ----------------------------------------------------------------------------
163// include the declaration of the real platform-dependent class
164// ----------------------------------------------------------------------------
253293c1 165
2049ba38 166#if defined(__WXMSW__)
bad606fa 167 #include "wx/msw/settings.h"
2049ba38 168#elif defined(__WXMOTIF__)
bad606fa 169 #include "wx/motif/settings.h"
2049ba38 170#elif defined(__WXGTK__)
bad606fa 171 #include "wx/gtk/settings.h"
b2a19d94 172#elif defined(__WXMGL__)
bad606fa 173 #include "wx/mgl/settings.h"
34138703 174#elif defined(__WXMAC__)
bad606fa 175 #include "wx/mac/settings.h"
1777b9bb 176#elif defined(__WXPM__)
bad606fa 177 #include "wx/os2/settings.h"
c801d85f
KB
178#endif
179
180#endif
34138703 181 // _WX_SETTINGS_H_BASE_
c801d85f 182