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
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.
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 ***** */
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
56 // These constants are reversed for the trackbar (scale) thumb
58 #define TKP_DISABLED 5
62 #define TP_SEPARATOR 5
64 // Toolbarbutton constants
66 #define TB_HOVER_CHECKED 6
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
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
106 #define TKP_TRACKVERT 2
108 #define TKP_THUMBVERT 6
114 // Progress bar constants
118 #define PP_CHUNKVERT 4
122 #define TABP_TAB_SELECTED 5
123 #define TABP_PANELS 9
124 #define TABP_PANEL 10
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
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
153 #define MB_INACTIVE 2
156 #define MS_SELECTED 2
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
177 #define MPI_DISABLED 3
178 #define MPI_DISABLEDHOT 4
181 #define MSM_DISABLED 2
183 // Theme size constants
186 // size without stretching
188 // size that theme mgr will use to draw part
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
199 #define RP_BACKGROUND 6
201 // Constants only found in new (98+, 2K+, XP+, etc.) Windows.
205 #define DFCS_HOT 0x00001000
207 #ifdef COLOR_MENUHILIGHT
208 #undef COLOR_MENUHILIGHT
210 #define COLOR_MENUHILIGHT 29
212 #ifdef SPI_GETFLATMENU
213 #undef SPI_GETFLATMENU
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
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
232 namespace themeconst
{
234 // Pulled from sdk/include/vsstyle.h
239 WP_SMALLMINCAPTION
= 4,
241 WP_SMALLMAXCAPTION
= 6,
245 WP_SMALLFRAMELEFT
= 10,
246 WP_SMALLFRAMERIGHT
= 11,
247 WP_SMALLFRAMEBOTTOM
= 12,
249 WP_MDISYSBUTTON
= 14,
251 WP_MDIMINBUTTON
= 16,
254 WP_SMALLCLOSEBUTTON
= 19,
255 WP_MDICLOSEBUTTON
= 20,
256 WP_RESTOREBUTTON
= 21,
257 WP_MDIRESTOREBUTTON
= 22,
259 WP_MDIHELPBUTTON
= 24,
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,
286 BS_INACTIVE
= 5 /* undocumented, inactive caption button */
289 }}} // mozilla::widget::themeconst