1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_TOOLS_WINTYPES_HXX
20 #define INCLUDED_TOOLS_WINTYPES_HXX
22 #include <sal/types.h>
26 typedef sal_uInt16 WindowType
;
27 #define WINDOW_BASE 0x0100
28 #define WINDOW_FIRST (WINDOW_BASE + 0x30)
29 #define WINDOW_MESSBOX (WINDOW_FIRST)
30 #define WINDOW_INFOBOX (WINDOW_FIRST + 0x01)
31 #define WINDOW_WARNINGBOX (WINDOW_FIRST + 0x02)
32 #define WINDOW_ERRORBOX (WINDOW_FIRST + 0x03)
33 #define WINDOW_QUERYBOX (WINDOW_FIRST + 0x04)
34 #define WINDOW_WINDOW (WINDOW_FIRST + 0x05)
35 #define WINDOW_SYSWINDOW (WINDOW_FIRST + 0x06)
36 #define WINDOW_WORKWINDOW (WINDOW_FIRST + 0x07)
37 #define WINDOW_CONTAINER (WINDOW_FIRST + 0x08)
38 #define WINDOW_FLOATINGWINDOW (WINDOW_FIRST + 0x09)
39 #define WINDOW_DIALOG (WINDOW_FIRST + 0x0a)
40 #define WINDOW_MODELESSDIALOG (WINDOW_FIRST + 0x0b)
41 #define WINDOW_MODALDIALOG (WINDOW_FIRST + 0x0c)
42 #define WINDOW_SYSTEMDIALOG (WINDOW_FIRST + 0x0d)
43 #define WINDOW_PATHDIALOG (WINDOW_FIRST + 0x0e)
44 #define WINDOW_FILEDIALOG (WINDOW_FIRST + 0x0f)
45 #define WINDOW_PRINTERSETUPDIALOG (WINDOW_FIRST + 0x10)
46 #define WINDOW_PRINTDIALOG (WINDOW_FIRST + 0x11)
47 #define WINDOW_COLORDIALOG (WINDOW_FIRST + 0x12)
48 #define WINDOW_FONTDIALOG (WINDOW_FIRST + 0x13)
49 #define WINDOW_CONTROL (WINDOW_FIRST + 0x14)
50 #define WINDOW_BUTTON (WINDOW_FIRST + 0x15)
51 #define WINDOW_PUSHBUTTON (WINDOW_FIRST + 0x16)
52 #define WINDOW_OKBUTTON (WINDOW_FIRST + 0x17)
53 #define WINDOW_CANCELBUTTON (WINDOW_FIRST + 0x18)
54 #define WINDOW_HELPBUTTON (WINDOW_FIRST + 0x19)
55 #define WINDOW_IMAGEBUTTON (WINDOW_FIRST + 0x1a)
56 #define WINDOW_MENUBUTTON (WINDOW_FIRST + 0x1b)
57 #define WINDOW_MOREBUTTON (WINDOW_FIRST + 0x1c)
58 #define WINDOW_SPINBUTTON (WINDOW_FIRST + 0x1d)
59 #define WINDOW_RADIOBUTTON (WINDOW_FIRST + 0x1e)
60 #define WINDOW_IMAGERADIOBUTTON (WINDOW_FIRST + 0x1f)
61 #define WINDOW_CHECKBOX (WINDOW_FIRST + 0x20)
62 #define WINDOW_TRISTATEBOX (WINDOW_FIRST + 0x21)
63 #define WINDOW_EDIT (WINDOW_FIRST + 0x22)
64 #define WINDOW_MULTILINEEDIT (WINDOW_FIRST + 0x23)
65 #define WINDOW_COMBOBOX (WINDOW_FIRST + 0x24)
66 #define WINDOW_LISTBOX (WINDOW_FIRST + 0x25)
67 #define WINDOW_MULTILISTBOX (WINDOW_FIRST + 0x26)
68 #define WINDOW_FIXEDTEXT (WINDOW_FIRST + 0x27)
69 #define WINDOW_FIXEDLINE (WINDOW_FIRST + 0x28)
70 #define WINDOW_FIXEDBITMAP (WINDOW_FIRST + 0x29)
71 #define WINDOW_FIXEDIMAGE (WINDOW_FIRST + 0x2a)
72 #define WINDOW_GROUPBOX (WINDOW_FIRST + 0x2c)
73 #define WINDOW_SCROLLBAR (WINDOW_FIRST + 0x2d)
74 #define WINDOW_SCROLLBARBOX (WINDOW_FIRST + 0x2e)
75 #define WINDOW_SPLITTER (WINDOW_FIRST + 0x2f)
76 #define WINDOW_SPLITWINDOW (WINDOW_FIRST + 0x30)
77 #define WINDOW_SPINFIELD (WINDOW_FIRST + 0x31)
78 #define WINDOW_PATTERNFIELD (WINDOW_FIRST + 0x32)
79 #define WINDOW_NUMERICFIELD (WINDOW_FIRST + 0x33)
80 #define WINDOW_METRICFIELD (WINDOW_FIRST + 0x34)
81 #define WINDOW_CURRENCYFIELD (WINDOW_FIRST + 0x35)
82 #define WINDOW_DATEFIELD (WINDOW_FIRST + 0x36)
83 #define WINDOW_TIMEFIELD (WINDOW_FIRST + 0x37)
84 #define WINDOW_PATTERNBOX (WINDOW_FIRST + 0x38)
85 #define WINDOW_NUMERICBOX (WINDOW_FIRST + 0x39)
86 #define WINDOW_METRICBOX (WINDOW_FIRST + 0x3a)
87 #define WINDOW_CURRENCYBOX (WINDOW_FIRST + 0x3b)
88 #define WINDOW_DATEBOX (WINDOW_FIRST + 0x3c)
89 #define WINDOW_TIMEBOX (WINDOW_FIRST + 0x3d)
90 #define WINDOW_LONGCURRENCYFIELD (WINDOW_FIRST + 0x3e)
91 #define WINDOW_LONGCURRENCYBOX (WINDOW_FIRST + 0x3f)
92 #define WINDOW_SCROLLWINDOW (WINDOW_FIRST + 0x40)
93 #define WINDOW_TOOLBOX (WINDOW_FIRST + 0x41)
94 #define WINDOW_DOCKINGWINDOW (WINDOW_FIRST + 0x42)
95 #define WINDOW_STATUSBAR (WINDOW_FIRST + 0x43)
96 #define WINDOW_TABPAGE (WINDOW_FIRST + 0x44)
97 #define WINDOW_TABCONTROL (WINDOW_FIRST + 0x45)
98 #define WINDOW_TABDIALOG (WINDOW_FIRST + 0x46)
99 #define WINDOW_BORDERWINDOW (WINDOW_FIRST + 0x47)
100 #define WINDOW_BUTTONDIALOG (WINDOW_FIRST + 0x48)
101 #define WINDOW_SYSTEMCHILDWINDOW (WINDOW_FIRST + 0x49)
102 #define WINDOW_SLIDER (WINDOW_FIRST + 0x4a)
103 #define WINDOW_MENUBARWINDOW (WINDOW_FIRST + 0x4b)
104 #define WINDOW_TREELISTBOX (WINDOW_FIRST + 0x4c)
105 #define WINDOW_HELPTEXTWINDOW (WINDOW_FIRST + 0x4d)
106 #define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4e)
107 #define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x4f)
108 #define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x50)
109 #define WINDOW_RULER (WINDOW_FIRST + 0x51)
110 #define WINDOW_CALCINPUTLINE (WINDOW_FIRST + 0x52)
111 #define WINDOW_LAST (WINDOW_CALCINPUTLINE)
115 typedef sal_Int64 WinBits
;
117 // Window-Bits for Window
118 WinBits
const WB_CLIPCHILDREN
= 0x00000001;
119 WinBits
const WB_DIALOGCONTROL
= 0x00000002;
120 WinBits
const WB_NODIALOGCONTROL
= 0x00000004;
121 WinBits
const WB_BORDER
= 0x00000008;
122 WinBits
const WB_NOBORDER
= 0x00000010;
123 WinBits
const WB_SIZEABLE
= 0x00000020;
124 WinBits
const WB_3DLOOK
= 0x00000040;
125 WinBits
const WB_AUTOSIZE
= 0x00000080;
127 // Window-Bits for SystemWindows
128 WinBits
const WB_MOVEABLE
= 0x00000100;
129 WinBits
const WB_ROLLABLE
= 0x00000200;
130 WinBits
const WB_CLOSEABLE
= 0x00000400;
131 WinBits
const WB_STANDALONE
= 0x00000800;
132 WinBits
const WB_APP
= 0x00001000;
133 WinBits
const WB_PINABLE
= 0x00002000;
134 WinBits
const WB_SYSTEMWINDOW
= SAL_CONST_INT64(0x40000000);
135 // warning: do not confuse WB_SYSTEMCHILDWINDOW with the SystemChildWindow class
137 // the SystemChildWindow class was there first and is a very specialized
138 // system child window type for plugged applications. The SystemChildWindow class
139 // explicitly should never use the WB_SYSTEMCHILDWINDOW WinBit
141 // WB_SYSTEMCHILDWINDOW on the other hand is to be used on system windows
142 // which should be created as system child windows with (more or less)
143 // normal event handling
144 WinBits
const WB_SYSTEMCHILDWINDOW
= SAL_CONST_INT64(0x8000000000);
145 WinBits
const WB_SIZEMOVE
= (WB_SIZEABLE
| WB_MOVEABLE
);
147 // Standard-Window-Bits for ChildWindows
148 WinBits
const WB_TABSTOP
= 0x00000100;
149 WinBits
const WB_NOTABSTOP
= 0x00000200;
150 WinBits
const WB_GROUP
= 0x00000400;
151 WinBits
const WB_NOGROUP
= 0x00000800;
152 WinBits
const WB_HORZ
= 0x00001000;
153 WinBits
const WB_VERT
= 0x00002000;
154 WinBits
const WB_LEFT
= 0x00004000;
155 WinBits
const WB_CENTER
= 0x00008000;
156 WinBits
const WB_RIGHT
= 0x00010000;
157 WinBits
const WB_TOP
= 0x00020000;
158 WinBits
const WB_VCENTER
= 0x00040000;
159 WinBits
const WB_BOTTOM
= 0x00080000;
160 WinBits
const WB_DRAG
= 0x00100000;
161 WinBits
const WB_SPIN
= 0x00200000;
162 WinBits
const WB_REPEAT
= 0x00400000;
163 WinBits
const WB_NOPOINTERFOCUS
= 0x00800000;
164 WinBits
const WB_WORDBREAK
= 0x01000000;
165 WinBits
const WB_NOLABEL
= 0x02000000;
166 WinBits
const WB_SORT
= 0x04000000;
167 WinBits
const WB_DROPDOWN
= 0x08000000;
168 WinBits
const WB_HIDE
= SAL_CONST_INT64(0x80000000);
169 WinBits
const WB_AUTOHSCROLL
= SAL_CONST_INT64(0x10000000);
170 WinBits
const WB_DOCKABLE
= SAL_CONST_INT64(0x20000000);
171 WinBits
const WB_AUTOVSCROLL
= SAL_CONST_INT64(0x40000000);
172 WinBits
const WB_HYPHENATION
= SAL_CONST_INT64(0x800000000) | WB_WORDBREAK
;
173 WinBits
const WB_CHILDDLGCTRL
= SAL_CONST_INT64(0x100000000000);
174 WinBits
const WB_REFMODE
= SAL_CONST_INT64(0x200000000000);
176 // system floating window
177 WinBits
const WB_SYSTEMFLOATWIN
= SAL_CONST_INT64(0x100000000);
178 WinBits
const WB_INTROWIN
= SAL_CONST_INT64(0x200000000);
179 WinBits
const WB_NOSHADOW
= SAL_CONST_INT64(0x400000000);
180 WinBits
const WB_TOOLTIPWIN
= SAL_CONST_INT64(0x800000000);
181 WinBits
const WB_OWNERDRAWDECORATION
= SAL_CONST_INT64(0x2000000000);
182 WinBits
const WB_DEFAULTWIN
= SAL_CONST_INT64(0x4000000000);
183 WinBits
const WB_NEEDSFOCUS
= SAL_CONST_INT64(0x1000000000);
184 WinBits
const WB_POPUP
= SAL_CONST_INT64(0x20000000);
186 WinBits
const WB_HSCROLL
= WB_HORZ
;
187 WinBits
const WB_VSCROLL
= WB_VERT
;
188 WinBits
const WB_TOPIMAGE
= WB_TOP
;
190 // Window-Bits for PushButtons
191 WinBits
const WB_DEFBUTTON
= 0x10000000;
192 WinBits
const WB_NOLIGHTBORDER
= 0x20000000;
193 WinBits
const WB_RECTSTYLE
= 0x08000000;
194 WinBits
const WB_SMALLSTYLE
= 0x04000000;
195 WinBits
const WB_TOGGLE
= SAL_CONST_INT64(0x1000000000);
196 WinBits
const WB_BEVELBUTTON
= SAL_CONST_INT64(0x2000000000);
197 WinBits
const WB_FLATBUTTON
= SAL_CONST_INT64(0x4000000000);
199 // Window-Bits for FixedText
200 WinBits
const WB_PATHELLIPSIS
= 0x00100000;
201 WinBits
const WB_EXTRAOFFSET
= 0x02000000;
202 WinBits
const WB_NOMULTILINE
= 0x10000000;
203 WinBits
const WB_INFO
= 0x20000000;
205 // Window-Bits for CheckBox
206 WinBits
const WB_CBLINESTYLE
= SAL_CONST_INT64(0x2000000000);
207 WinBits
const WB_EARLYTOGGLE
= SAL_CONST_INT64(0x4000000000);
209 // Window-Bits for Edit
210 WinBits
const WB_PASSWORD
= 0x01000000;
211 WinBits
const WB_READONLY
= 0x02000000;
212 WinBits
const WB_NOHIDESELECTION
= SAL_CONST_INT64(0x1000000000);
213 WinBits
const WB_FORCECTRLBACKGROUND
= 0x80000000;
215 // Window-Bits for MultiLineEdit
216 WinBits
const WB_IGNORETAB
= 0x20000000;
218 // Window-Bits for ListBox and MultiListBox
219 WinBits
const WB_SIMPLEMODE
= 0x20000000;
221 // Window-Bits for FixedBitmap
222 WinBits
const WB_FAST
= 0x04000000;
223 WinBits
const WB_SCALE
= 0x08000000;
224 WinBits
const WB_TOPLEFTVISIBLE
= 0x10000000;
226 // Window-Bits for ToolBox
227 WinBits
const WB_LINESPACING
= 0x01000000;
228 WinBits
const WB_SCROLL
= 0x02000000;
229 WinBits
const WB_FORCETABCYCLE
= 0x04000000;
231 // Window-Bits for DockingWindows
232 WinBits
const WB_DOCKBORDER
= 0x00001000;
234 // Window-Bits for SplitWindow
235 WinBits
const WB_NOSPLITDRAW
= 0x01000000;
236 WinBits
const WB_FLATSPLITDRAW
= 0x02000000;
238 // Window-Bits for MessageBoxen
239 WinBits
const WB_OK
= 0x00100000;
240 WinBits
const WB_OK_CANCEL
= 0x00200000;
241 WinBits
const WB_YES_NO
= 0x00400000;
242 WinBits
const WB_YES_NO_CANCEL
= 0x00800000;
243 WinBits
const WB_RETRY_CANCEL
= 0x01000000;
244 WinBits
const WB_DEF_OK
= 0x02000000;
245 WinBits
const WB_DEF_CANCEL
= 0x04000000;
246 WinBits
const WB_DEF_RETRY
= 0x08000000;
247 WinBits
const WB_DEF_YES
= SAL_CONST_INT64(0x10000000);
248 WinBits
const WB_DEF_NO
= SAL_CONST_INT64(0x20000000);
249 WinBits
const WB_ABORT_RETRY_IGNORE
= SAL_CONST_INT64(0x1000000000);
250 WinBits
const WB_DEF_IGNORE
= SAL_CONST_INT64(0x2000000000);
253 WinBits
const WB_STDWORK
= WB_SIZEMOVE
| WB_CLOSEABLE
;
254 WinBits
const WB_STDDOCKWIN
= WB_DOCKABLE
| WB_MOVEABLE
| WB_CLOSEABLE
;
255 WinBits
const WB_STDFLOATWIN
= WB_SIZEMOVE
| WB_CLOSEABLE
| WB_ROLLABLE
;
256 WinBits
const WB_STDDIALOG
= WB_MOVEABLE
| WB_CLOSEABLE
;
257 WinBits
const WB_STDMODELESS
= WB_STDDIALOG
;
258 WinBits
const WB_STDMODAL
= WB_STDDIALOG
;
259 WinBits
const WB_STDTABDIALOG
= WB_STDDIALOG
;
260 WinBits
const WB_STDTABCONTROL
= 0;
261 WinBits
const WB_STDPOPUP
= WB_BORDER
| WB_POPUP
| WB_SYSTEMWINDOW
| WB_3DLOOK
| WB_DIALOGCONTROL
;
264 WinBits
const WB_HASBUTTONS
= SAL_CONST_INT64(0x000100000000);
265 WinBits
const WB_HASLINES
= SAL_CONST_INT64(0x000200000000);
266 WinBits
const WB_HASLINESATROOT
= SAL_CONST_INT64(0x000400000000);
267 WinBits
const WB_HASBUTTONSATROOT
= SAL_CONST_INT64(0x000800000000);
268 WinBits
const WB_NOINITIALSELECTION
= SAL_CONST_INT64(0x001000000000);
269 WinBits
const WB_HIDESELECTION
= SAL_CONST_INT64(0x002000000000);
270 WinBits
const WB_FORCE_MAKEVISIBLE
= SAL_CONST_INT64(0x004000000000);
271 // DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW
272 WinBits
const WB_QUICK_SEARCH
= SAL_CONST_INT64(0x010000000000);
274 // For FileOpen Dialog
275 WinBits
const WB_PATH
= 0x00100000;
276 WinBits
const WB_OPEN
= 0x00200000;
277 WinBits
const WB_SAVEAS
= 0x00400000;
280 // Window-Bits for TabControl
281 WinBits
const WB_SLIDERSET
= 0x02000000;
284 WinBits
const WB_EXT_DOCUMENT
= 0x00000001;
285 WinBits
const WB_EXT_DOCMODIFIED
= 0x00000002;
289 enum WindowAlign
{ WINDOWALIGN_LEFT
, WINDOWALIGN_TOP
, WINDOWALIGN_RIGHT
, WINDOWALIGN_BOTTOM
};
290 enum ImageAlign
{ IMAGEALIGN_LEFT
, IMAGEALIGN_TOP
, IMAGEALIGN_RIGHT
, IMAGEALIGN_BOTTOM
,
291 IMAGEALIGN_LEFT_TOP
, IMAGEALIGN_LEFT_BOTTOM
, IMAGEALIGN_TOP_LEFT
,
292 IMAGEALIGN_TOP_RIGHT
, IMAGEALIGN_RIGHT_TOP
, IMAGEALIGN_RIGHT_BOTTOM
,
293 IMAGEALIGN_BOTTOM_LEFT
, IMAGEALIGN_BOTTOM_RIGHT
, IMAGEALIGN_CENTER
};
294 enum class SymbolAlign
{ LEFT
, RIGHT
};
296 // ButtonDialog-Types
298 enum class StandardButtonType
315 // prominent place for ListBox window types
317 enum class ProminentEntry
{ TOP
, MIDDLE
};
321 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */