CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / widget / src / windows / nsUXThemeConstants.h
blob0398a6f9e5566086943b7a602413a524b42cc4f6
1 /* vim: se cin sw=2 ts=2 et : */
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
15 * License.
17 * The Original Code is the Mozilla browser.
19 * The Initial Developer of the Original Code is
20 * Netscape Communications Corporation.
21 * Portions created by the Initial Developer are Copyright (C) 1999
22 * the Initial Developer. All Rights Reserved.
24 * Contributor(s):
25 * Rob Arnold <robarnold@mozilla.com> (Original Author)
27 * Alternatively, the contents of this file may be used under the terms of
28 * either of the GNU General Public License Version 2 or later (the "GPL"),
29 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 /*
42 * The following constants are used to determine how a widget is drawn using
43 * Windows' Theme API. For more information on theme parts and states see
44 * http://msdn.microsoft.com/en-us/library/bb773210(VS.85).aspx
46 #define THEME_COLOR 204
47 #define THEME_FONT 210
49 // Generic state constants
50 #define TS_NORMAL 1
51 #define TS_HOVER 2
52 #define TS_ACTIVE 3
53 #define TS_DISABLED 4
54 #define TS_FOCUSED 5
56 // These constants are reversed for the trackbar (scale) thumb
57 #define TKP_FOCUSED 4
58 #define TKP_DISABLED 5
60 // Toolbar constants
61 #define TP_BUTTON 1
62 #define TP_SEPARATOR 5
64 // Toolbarbutton constants
65 #define TB_CHECKED 5
66 #define TB_HOVER_CHECKED 6
68 // Button constants
69 #define BP_BUTTON 1
70 #define BP_RADIO 2
71 #define BP_CHECKBOX 3
72 #define BP_GROUPBOX 4
74 // Textfield constants
75 /* This is the EP_EDITTEXT part */
76 #define TFP_TEXTFIELD 1
77 #define TFP_EDITBORDER_NOSCROLL 6
78 #define TFS_READONLY 6
80 /* These are the state constants for the EDITBORDER parts */
81 #define TFS_EDITBORDER_NORMAL 1
82 #define TFS_EDITBORDER_HOVER 2
83 #define TFS_EDITBORDER_FOCUSED 3
84 #define TFS_EDITBORDER_DISABLED 4
86 // Treeview/listbox constants
87 #define TREEVIEW_BODY 1
89 // Scrollbar constants
90 #define SP_BUTTON 1
91 #define SP_THUMBHOR 2
92 #define SP_THUMBVERT 3
93 #define SP_TRACKSTARTHOR 4
94 #define SP_TRACKENDHOR 5
95 #define SP_TRACKSTARTVERT 6
96 #define SP_TRACKENDVERT 7
97 #define SP_GRIPPERHOR 8
98 #define SP_GRIPPERVERT 9
100 // Vista only; implict hover state.
101 // BASE + 0 = UP, + 1 = DOWN, etc.
102 #define SP_BUTTON_IMPLICIT_HOVER_BASE 17
104 // Scale constants
105 #define TKP_TRACK 1
106 #define TKP_TRACKVERT 2
107 #define TKP_THUMB 3
108 #define TKP_THUMBVERT 6
110 // Spin constants
111 #define SPNP_UP 1
112 #define SPNP_DOWN 2
114 // Progress bar constants
115 #define PP_BAR 1
116 #define PP_BARVERT 2
117 #define PP_CHUNK 3
118 #define PP_CHUNKVERT 4
120 // Tab constants
121 #define TABP_TAB 4
122 #define TABP_TAB_SELECTED 5
123 #define TABP_PANELS 9
124 #define TABP_PANEL 10
126 // Tooltip constants
127 #define TTP_STANDARD 1
129 // Dropdown constants
130 #define CBP_DROPMARKER 1
131 #define CBP_DROPBORDER 4
132 /* This is actually the 'READONLY' style */
133 #define CBP_DROPFRAME 5
134 #define CBP_DROPMARKER_VISTA 6
136 // Menu Constants
137 #define MENU_BARBACKGROUND 7
138 #define MENU_BARITEM 8
139 #define MENU_POPUPBACKGROUND 9
140 #define MENU_POPUPBORDERS 10
141 #define MENU_POPUPCHECK 11
142 #define MENU_POPUPCHECKBACKGROUND 12
143 #define MENU_POPUPGUTTER 13
144 #define MENU_POPUPITEM 14
145 #define MENU_POPUPSEPARATOR 15
146 #define MENU_POPUPSUBMENU 16
147 #define MENU_SYSTEMCLOSE 17
148 #define MENU_SYSTEMMAXIMIZE 18
149 #define MENU_SYSTEMMINIMIZE 19
150 #define MENU_SYSTEMRESTORE 20
152 #define MB_ACTIVE 1
153 #define MB_INACTIVE 2
155 #define MS_NORMAL 1
156 #define MS_SELECTED 2
157 #define MS_DEMOTED 3
159 #define MBI_NORMAL 1
160 #define MBI_HOT 2
161 #define MBI_PUSHED 3
162 #define MBI_DISABLED 4
163 #define MBI_DISABLEDHOT 5
164 #define MBI_DISABLEDPUSHED 6
166 #define MC_CHECKMARKNORMAL 1
167 #define MC_CHECKMARKDISABLED 2
168 #define MC_BULLETNORMAL 3
169 #define MC_BULLETDISABLED 4
171 #define MCB_DISABLED 1
172 #define MCB_NORMAL 2
173 #define MCB_BITMAP 3
175 #define MPI_NORMAL 1
176 #define MPI_HOT 2
177 #define MPI_DISABLED 3
178 #define MPI_DISABLEDHOT 4
180 #define MSM_NORMAL 1
181 #define MSM_DISABLED 2
183 // Theme size constants
184 // minimum size
185 #define TS_MIN 0
186 // size without stretching
187 #define TS_TRUE 1
188 // size that theme mgr will use to draw part
189 #define TS_DRAW 2
191 // From tmschema.h in the Vista SDK
192 #define TMT_TEXTCOLOR 3803
193 #define TMT_SIZINGMARGINS 3601
194 #define TMT_CONTENTMARGINS 3602
195 #define TMT_CAPTIONMARGINS 3603
197 // Rebar constants
198 #define RP_BAND 3
199 #define RP_BACKGROUND 6
201 // Constants only found in new (98+, 2K+, XP+, etc.) Windows.
202 #ifdef DFCS_HOT
203 #undef DFCS_HOT
204 #endif
205 #define DFCS_HOT 0x00001000
207 #ifdef COLOR_MENUHILIGHT
208 #undef COLOR_MENUHILIGHT
209 #endif
210 #define COLOR_MENUHILIGHT 29
212 #ifdef SPI_GETFLATMENU
213 #undef SPI_GETFLATMENU
214 #endif
215 #define SPI_GETFLATMENU 0x1022
216 #ifndef SPI_GETMENUSHOWDELAY
217 #define SPI_GETMENUSHOWDELAY 106
218 #endif //SPI_GETMENUSHOWDELAY
219 #ifndef WS_EX_LAYOUTRTL
220 #define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
221 #endif
224 // Our extra constants for passing a little bit more info to the renderer.
225 #define DFCS_RTL 0x00010000
227 // Toolbar separator dimension which can't be gotten from Windows
228 #define TB_SEPARATOR_HEIGHT 2
230 namespace mozilla {
231 namespace widget {
232 namespace themeconst {
234 // Pulled from sdk/include/vsstyle.h
235 enum {
236 WP_CAPTION = 1,
237 WP_SMALLCAPTION = 2,
238 WP_MINCAPTION = 3,
239 WP_SMALLMINCAPTION = 4,
240 WP_MAXCAPTION = 5,
241 WP_SMALLMAXCAPTION = 6,
242 WP_FRAMELEFT = 7,
243 WP_FRAMERIGHT = 8,
244 WP_FRAMEBOTTOM = 9,
245 WP_SMALLFRAMELEFT = 10,
246 WP_SMALLFRAMERIGHT = 11,
247 WP_SMALLFRAMEBOTTOM = 12,
248 WP_SYSBUTTON = 13,
249 WP_MDISYSBUTTON = 14,
250 WP_MINBUTTON = 15,
251 WP_MDIMINBUTTON = 16,
252 WP_MAXBUTTON = 17,
253 WP_CLOSEBUTTON = 18,
254 WP_SMALLCLOSEBUTTON = 19,
255 WP_MDICLOSEBUTTON = 20,
256 WP_RESTOREBUTTON = 21,
257 WP_MDIRESTOREBUTTON = 22,
258 WP_HELPBUTTON = 23,
259 WP_MDIHELPBUTTON = 24,
260 WP_HORZSCROLL = 25,
261 WP_HORZTHUMB = 26,
262 WP_VERTSCROLL = 27,
263 WP_VERTTHUMB = 28,
264 WP_DIALOG = 29,
265 WP_CAPTIONSIZINGTEMPLATE = 30,
266 WP_SMALLCAPTIONSIZINGTEMPLATE = 31,
267 WP_FRAMELEFTSIZINGTEMPLATE = 32,
268 WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33,
269 WP_FRAMERIGHTSIZINGTEMPLATE = 34,
270 WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35,
271 WP_FRAMEBOTTOMSIZINGTEMPLATE = 36,
272 WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37,
273 WP_FRAME = 38
276 enum FRAMESTATES {
277 FS_ACTIVE = 1,
278 FS_INACTIVE = 2
281 enum {
282 BS_NORMAL = 1,
283 BS_HOT = 2,
284 BS_PUSHED = 3,
285 BS_DISABLED = 4,
286 BS_INACTIVE = 5 /* undocumented, inactive caption button */
289 }}} // mozilla::widget::themeconst