Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / tools / wintypes.hxx
blob7c0c29a87a8275b5842c628e28e66432c5836fde
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
24 // Window-Types
26 enum class WindowType : sal_uInt16
28 NONE = 0,
29 FIRST = 0x0130,
30 MESSBOX = FIRST,
31 INFOBOX ,
32 WARNINGBOX ,
33 ERRORBOX ,
34 QUERYBOX ,
35 WINDOW ,
36 WORKWINDOW ,
37 CONTAINER ,
38 FLOATINGWINDOW ,
39 DIALOG ,
40 MODELESSDIALOG ,
41 MODALDIALOG ,
42 CONTROL ,
43 PUSHBUTTON ,
44 OKBUTTON ,
45 CANCELBUTTON ,
46 HELPBUTTON ,
47 IMAGEBUTTON ,
48 MENUBUTTON ,
49 MOREBUTTON ,
50 SPINBUTTON ,
51 RADIOBUTTON ,
52 CHECKBOX ,
53 TRISTATEBOX ,
54 EDIT ,
55 MULTILINEEDIT ,
56 COMBOBOX ,
57 LISTBOX ,
58 MULTILISTBOX ,
59 FIXEDTEXT ,
60 FIXEDLINE ,
61 FIXEDBITMAP ,
62 FIXEDIMAGE ,
63 GROUPBOX ,
64 SCROLLBAR ,
65 SCROLLBARBOX ,
66 SPLITTER ,
67 SPLITWINDOW ,
68 SPINFIELD ,
69 PATTERNFIELD ,
70 NUMERICFIELD ,
71 METRICFIELD ,
72 CURRENCYFIELD ,
73 DATEFIELD ,
74 TIMEFIELD ,
75 PATTERNBOX ,
76 NUMERICBOX ,
77 METRICBOX ,
78 CURRENCYBOX ,
79 DATEBOX ,
80 TIMEBOX ,
81 LONGCURRENCYFIELD ,
82 LONGCURRENCYBOX ,
83 SCROLLWINDOW ,
84 TOOLBOX ,
85 DOCKINGWINDOW ,
86 STATUSBAR ,
87 TABPAGE ,
88 TABCONTROL ,
89 TABDIALOG ,
90 BORDERWINDOW ,
91 BUTTONDIALOG ,
92 SYSTEMCHILDWINDOW ,
93 SLIDER ,
94 MENUBARWINDOW ,
95 TREELISTBOX ,
96 HELPTEXTWINDOW ,
97 INTROWINDOW ,
98 LISTBOXWINDOW ,
99 DOCKINGAREA ,
100 RULER ,
101 CALCINPUTLINE ,
102 LAST = CALCINPUTLINE,
103 // only used in vclxtoolkit.cxx
104 TOOLKIT_FRAMEWINDOW = 0x1000,
105 TOOLKIT_SYSTEMCHILDWINDOW = 0x1001,
108 // Window-Bits
110 typedef sal_Int64 WinBits;
112 // Window-Bits for Window
113 WinBits const WB_CLIPCHILDREN = 0x00000001;
114 WinBits const WB_DIALOGCONTROL = 0x00000002;
115 WinBits const WB_NODIALOGCONTROL = 0x00000004;
116 WinBits const WB_BORDER = 0x00000008;
117 WinBits const WB_NOBORDER = 0x00000010;
118 WinBits const WB_SIZEABLE = 0x00000020;
119 WinBits const WB_3DLOOK = 0x00000040;
120 WinBits const WB_AUTOSIZE = 0x00000080;
122 // Window-Bits for SystemWindows
123 WinBits const WB_MOVEABLE = 0x00000100;
124 WinBits const WB_ROLLABLE = 0x00000200;
125 WinBits const WB_CLOSEABLE = 0x00000400;
126 WinBits const WB_STANDALONE = 0x00000800;
127 WinBits const WB_APP = 0x00001000;
128 WinBits const WB_SYSTEMWINDOW = SAL_CONST_INT64(0x40000000);
129 // warning: do not confuse WB_SYSTEMCHILDWINDOW with the SystemChildWindow class
131 // the SystemChildWindow class was there first and is a very specialized
132 // system child window type for plugged applications. The SystemChildWindow class
133 // explicitly should never use the WB_SYSTEMCHILDWINDOW WinBit
135 // WB_SYSTEMCHILDWINDOW on the other hand is to be used on system windows
136 // which should be created as system child windows with (more or less)
137 // normal event handling
138 WinBits const WB_SYSTEMCHILDWINDOW = SAL_CONST_INT64(0x8000000000);
139 WinBits const WB_SIZEMOVE = (WB_SIZEABLE | WB_MOVEABLE);
141 // Standard-Window-Bits for ChildWindows
142 WinBits const WB_TABSTOP = 0x00000100;
143 WinBits const WB_NOTABSTOP = 0x00000200;
144 WinBits const WB_GROUP = 0x00000400;
145 WinBits const WB_NOGROUP = 0x00000800;
146 WinBits const WB_HORZ = 0x00001000;
147 WinBits const WB_VERT = 0x00002000;
148 WinBits const WB_LEFT = 0x00004000;
149 WinBits const WB_CENTER = 0x00008000;
150 WinBits const WB_RIGHT = 0x00010000;
151 WinBits const WB_TOP = 0x00020000;
152 WinBits const WB_VCENTER = 0x00040000;
153 WinBits const WB_BOTTOM = 0x00080000;
154 WinBits const WB_DRAG = 0x00100000;
155 WinBits const WB_SPIN = 0x00200000;
156 WinBits const WB_REPEAT = 0x00400000;
157 WinBits const WB_NOPOINTERFOCUS = 0x00800000;
158 WinBits const WB_WORDBREAK = 0x01000000;
159 WinBits const WB_NOLABEL = 0x02000000;
160 WinBits const WB_SORT = 0x04000000;
161 WinBits const WB_DROPDOWN = 0x08000000;
162 WinBits const WB_HIDE = SAL_CONST_INT64(0x80000000);
163 WinBits const WB_AUTOHSCROLL = SAL_CONST_INT64(0x10000000);
164 WinBits const WB_DOCKABLE = SAL_CONST_INT64(0x20000000);
165 WinBits const WB_AUTOVSCROLL = SAL_CONST_INT64(0x40000000);
166 WinBits const WB_HYPHENATION = SAL_CONST_INT64(0x800000000) | WB_WORDBREAK;
167 WinBits const WB_CHILDDLGCTRL = SAL_CONST_INT64(0x100000000000);
169 // system floating window
170 WinBits const WB_SYSTEMFLOATWIN = SAL_CONST_INT64(0x100000000);
171 WinBits const WB_INTROWIN = SAL_CONST_INT64(0x200000000);
172 WinBits const WB_NOSHADOW = SAL_CONST_INT64(0x400000000);
173 WinBits const WB_TOOLTIPWIN = SAL_CONST_INT64(0x800000000);
174 WinBits const WB_OWNERDRAWDECORATION = SAL_CONST_INT64(0x2000000000);
175 WinBits const WB_DEFAULTWIN = SAL_CONST_INT64(0x4000000000);
176 WinBits const WB_POPUP = SAL_CONST_INT64(0x20000000);
178 WinBits const WB_HSCROLL = WB_HORZ;
179 WinBits const WB_VSCROLL = WB_VERT;
180 WinBits const WB_TOPIMAGE = WB_TOP;
182 // Window-Bits for PushButtons
183 WinBits const WB_DEFBUTTON = 0x10000000;
184 WinBits const WB_NOLIGHTBORDER = 0x20000000;
185 WinBits const WB_RECTSTYLE = 0x08000000;
186 WinBits const WB_SMALLSTYLE = 0x04000000;
187 WinBits const WB_TOGGLE = SAL_CONST_INT64(0x1000000000);
188 WinBits const WB_BEVELBUTTON = SAL_CONST_INT64(0x2000000000);
189 WinBits const WB_FLATBUTTON = SAL_CONST_INT64(0x4000000000);
191 // Window-Bits for FixedText
192 WinBits const WB_PATHELLIPSIS = 0x00100000;
193 WinBits const WB_EXTRAOFFSET = 0x02000000;
194 WinBits const WB_NOMULTILINE = 0x10000000;
196 // Window-Bits for CheckBox
197 WinBits const WB_CBLINESTYLE = SAL_CONST_INT64(0x2000000000);
198 WinBits const WB_EARLYTOGGLE = SAL_CONST_INT64(0x4000000000);
200 // Window-Bits for Edit
201 WinBits const WB_PASSWORD = 0x01000000;
202 WinBits const WB_READONLY = 0x02000000;
203 WinBits const WB_NOHIDESELECTION = SAL_CONST_INT64(0x1000000000);
204 WinBits const WB_FORCECTRLBACKGROUND = 0x80000000;
206 // Window-Bits for MultiLineEdit
207 WinBits const WB_IGNORETAB = 0x20000000;
209 // Window-Bits for ListBox and MultiListBox
210 WinBits const WB_SIMPLEMODE = 0x20000000;
212 // Window-Bits for FixedBitmap
213 WinBits const WB_FAST = 0x04000000;
214 WinBits const WB_SCALE = 0x08000000;
215 WinBits const WB_TOPLEFTVISIBLE = 0x10000000;
217 // Window-Bits for ToolBox
218 WinBits const WB_LINESPACING = 0x01000000;
219 WinBits const WB_SCROLL = 0x02000000;
220 WinBits const WB_FORCETABCYCLE = 0x04000000;
222 // Window-Bits for DockingWindows
223 WinBits const WB_DOCKBORDER = 0x00001000;
225 // Window-Bits for SplitWindow
226 WinBits const WB_NOSPLITDRAW = 0x01000000;
227 WinBits const WB_FLATSPLITDRAW = 0x02000000;
229 // Window-Bits for MessageBoxen
230 WinBits const WB_OK = 0x00100000;
231 WinBits const WB_OK_CANCEL = 0x00200000;
232 WinBits const WB_YES_NO = 0x00400000;
233 WinBits const WB_YES_NO_CANCEL = 0x00800000;
234 WinBits const WB_RETRY_CANCEL = 0x01000000;
235 WinBits const WB_DEF_OK = 0x02000000;
236 WinBits const WB_DEF_CANCEL = 0x04000000;
237 WinBits const WB_DEF_RETRY = 0x08000000;
238 WinBits const WB_DEF_YES = SAL_CONST_INT64(0x10000000);
239 WinBits const WB_DEF_NO = SAL_CONST_INT64(0x20000000);
240 WinBits const WB_ABORT_RETRY_IGNORE = SAL_CONST_INT64(0x1000000000);
241 WinBits const WB_DEF_IGNORE = SAL_CONST_INT64(0x2000000000);
243 // Standard-WinBits
244 WinBits const WB_STDWORK = WB_SIZEMOVE | WB_CLOSEABLE;
245 WinBits const WB_STDDOCKWIN = WB_DOCKABLE | WB_MOVEABLE | WB_CLOSEABLE;
246 WinBits const WB_STDFLOATWIN = WB_SIZEMOVE | WB_CLOSEABLE | WB_ROLLABLE;
247 WinBits const WB_STDDIALOG = WB_MOVEABLE | WB_CLOSEABLE;
248 WinBits const WB_STDMODELESS = WB_STDDIALOG;
249 WinBits const WB_STDMODAL = WB_STDDIALOG;
250 WinBits const WB_STDTABDIALOG = WB_STDDIALOG;
251 WinBits const WB_STDTABCONTROL = 0;
252 WinBits const WB_STDPOPUP = WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_3DLOOK | WB_DIALOGCONTROL;
254 // For TreeListBox
255 WinBits const WB_HASBUTTONS = SAL_CONST_INT64(0x000100000000);
256 WinBits const WB_HASLINES = SAL_CONST_INT64(0x000200000000);
257 WinBits const WB_HASLINESATROOT = SAL_CONST_INT64(0x000400000000);
258 WinBits const WB_HASBUTTONSATROOT = SAL_CONST_INT64(0x000800000000);
259 WinBits const WB_NOINITIALSELECTION = SAL_CONST_INT64(0x001000000000);
260 WinBits const WB_HIDESELECTION = SAL_CONST_INT64(0x002000000000);
261 WinBits const WB_FORCE_MAKEVISIBLE = SAL_CONST_INT64(0x004000000000);
262 // DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW
263 WinBits const WB_QUICK_SEARCH = SAL_CONST_INT64(0x010000000000);
265 // For FileOpen Dialog
266 WinBits const WB_PATH = 0x00100000;
267 WinBits const WB_OPEN = 0x00200000;
268 WinBits const WB_SAVEAS = 0x00400000;
270 // For Slider
271 // Window-Bits for TabControl
272 WinBits const WB_SLIDERSET = 0x02000000;
274 // extended WinBits
275 WinBits const WB_EXT_DOCUMENT = 0x00000001;
276 WinBits const WB_EXT_DOCMODIFIED = 0x00000002;
278 // WindowAlign
280 enum class WindowAlign { Left, Top, Right, Bottom };
282 enum class ImageAlign { Left, Top, Right, Bottom,
283 LeftTop, LeftBottom, TopLeft,
284 TopRight, RightTop, RightBottom,
285 BottomLeft, BottomRight, Center };
287 enum class SymbolAlign { LEFT, RIGHT };
289 // ButtonDialog-Types
291 enum class StandardButtonType
293 OK = 0,
294 Cancel = 1,
295 Yes = 2,
296 No = 3,
297 Retry = 4,
298 Help = 5,
299 Close = 6,
300 More = 7,
301 Ignore = 8,
302 Abort = 9,
303 Less = 10,
304 Count = 11,
307 // prominent place for ListBox window types
309 enum class ProminentEntry { TOP, MIDDLE };
311 #endif
313 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */