1 /* vim: se cin sw=2 ts=2 et : */
2 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef nsUXThemeConstants_h
9 #define nsUXThemeConstants_h
12 * The following constants are used to determine how a widget is drawn using
13 * Windows' Theme API. For more information on theme parts and states see
14 * http://msdn.microsoft.com/en-us/library/bb773210(VS.85).aspx
20 #define THEME_COLOR 204
21 #define THEME_FONT 210
23 // Generic state constants
30 // These constants are reversed for the trackbar (scale) thumb
32 #define TKP_DISABLED 5
34 // Toolbarbutton constants
36 #define TB_HOVER_CHECKED 6
44 // Textfield constants
45 /* This is the EP_EDITTEXT part */
46 #define TFP_TEXTFIELD 1
47 #define TFP_EDITBORDER_NOSCROLL 6
48 #define TFS_READONLY 6
50 /* These are the state constants for the EDITBORDER parts */
51 #define TFS_EDITBORDER_NORMAL 1
52 #define TFS_EDITBORDER_HOVER 2
53 #define TFS_EDITBORDER_FOCUSED 3
54 #define TFS_EDITBORDER_DISABLED 4
56 // Treeview/listbox constants
57 #define TREEVIEW_BODY 1
59 // Scrollbar constants
62 #define SP_THUMBVERT 3
63 #define SP_TRACKSTARTHOR 4
64 #define SP_TRACKENDHOR 5
65 #define SP_TRACKSTARTVERT 6
66 #define SP_TRACKENDVERT 7
67 #define SP_GRIPPERHOR 8
68 #define SP_GRIPPERVERT 9
70 // Vista only; implict hover state.
71 // BASE + 0 = UP, + 1 = DOWN, etc.
72 #define SP_BUTTON_IMPLICIT_HOVER_BASE 17
76 #define TKP_TRACKVERT 2
78 #define TKP_THUMBBOTTOM 4
79 #define TKP_THUMBTOP 5
80 #define TKP_THUMBVERT 6
81 #define TKP_THUMBLEFT 7
82 #define TKP_THUMBRIGHT 8
84 // Track state contstants
87 // Track vertical state constants
96 #define TABP_TAB_SELECTED 5
101 #define TTP_STANDARD 1
103 // Dropdown constants
104 #define CBP_DROPMARKER 1
105 #define CBP_DROPBORDER 4
106 /* This is actually the 'READONLY' style */
107 #define CBP_DROPFRAME 5
108 #define CBP_DROPMARKER_VISTA 6
111 #define MENU_BARBACKGROUND 7
112 #define MENU_BARITEM 8
113 #define MENU_POPUPBACKGROUND 9
114 #define MENU_POPUPBORDERS 10
115 #define MENU_POPUPCHECK 11
116 #define MENU_POPUPCHECKBACKGROUND 12
117 #define MENU_POPUPGUTTER 13
118 #define MENU_POPUPITEM 14
119 #define MENU_POPUPSEPARATOR 15
120 #define MENU_POPUPSUBMENU 16
121 #define MENU_SYSTEMCLOSE 17
122 #define MENU_SYSTEMMAXIMIZE 18
123 #define MENU_SYSTEMMINIMIZE 19
124 #define MENU_SYSTEMRESTORE 20
127 #define MB_INACTIVE 2
130 #define MS_SELECTED 2
136 #define MBI_DISABLED 4
137 #define MBI_DISABLEDHOT 5
138 #define MBI_DISABLEDPUSHED 6
140 #define MC_CHECKMARKNORMAL 1
141 #define MC_CHECKMARKDISABLED 2
142 #define MC_BULLETNORMAL 3
143 #define MC_BULLETDISABLED 4
145 #define MCB_DISABLED 1
151 #define MPI_DISABLED 3
152 #define MPI_DISABLEDHOT 4
155 #define MSM_DISABLED 2
159 #define RP_BACKGROUND 6
161 // Constants only found in new (98+, 2K+, XP+, etc.) Windows.
165 #define DFCS_HOT 0x00001000
167 #ifdef COLOR_MENUHILIGHT
168 #undef COLOR_MENUHILIGHT
170 #define COLOR_MENUHILIGHT 29
172 #ifdef SPI_GETFLATMENU
173 #undef SPI_GETFLATMENU
175 #define SPI_GETFLATMENU 0x1022
176 #ifndef SPI_GETMENUSHOWDELAY
177 #define SPI_GETMENUSHOWDELAY 106
178 #endif //SPI_GETMENUSHOWDELAY
179 #ifndef WS_EX_LAYOUTRTL
180 #define WS_EX_LAYOUTRTL 0x00400000L // Right to left mirroring
184 // Our extra constants for passing a little bit more info to the renderer.
185 #define DFCS_RTL 0x00010000
187 // Toolbar separator dimension which can't be gotten from Windows
188 #define TB_SEPARATOR_HEIGHT 2
192 namespace themeconst
{
194 // Pulled from sdk/include/vsstyle.h
199 WP_SMALLMINCAPTION
= 4,
201 WP_SMALLMAXCAPTION
= 6,
205 WP_SMALLFRAMELEFT
= 10,
206 WP_SMALLFRAMERIGHT
= 11,
207 WP_SMALLFRAMEBOTTOM
= 12,
209 WP_MDISYSBUTTON
= 14,
211 WP_MDIMINBUTTON
= 16,
214 WP_SMALLCLOSEBUTTON
= 19,
215 WP_MDICLOSEBUTTON
= 20,
216 WP_RESTOREBUTTON
= 21,
217 WP_MDIRESTOREBUTTON
= 22,
219 WP_MDIHELPBUTTON
= 24,
225 WP_CAPTIONSIZINGTEMPLATE
= 30,
226 WP_SMALLCAPTIONSIZINGTEMPLATE
= 31,
227 WP_FRAMELEFTSIZINGTEMPLATE
= 32,
228 WP_SMALLFRAMELEFTSIZINGTEMPLATE
= 33,
229 WP_FRAMERIGHTSIZINGTEMPLATE
= 34,
230 WP_SMALLFRAMERIGHTSIZINGTEMPLATE
= 35,
231 WP_FRAMEBOTTOMSIZINGTEMPLATE
= 36,
232 WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE
= 37,
246 BS_INACTIVE
= 5 /* undocumented, inactive caption button */
249 }}} // mozilla::widget::themeconst