Bump version to 6.4-15
[LibreOffice.git] / include / tools / wintypes.hxx
blob5ac59bb0ee22b46d43f0cce97ee8faf7e0b320d8
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, // 304
30 MESSBOX = FIRST, // 0
31 INFOBOX ,
32 WARNINGBOX ,
33 ERRORBOX ,
34 QUERYBOX ,
35 WINDOW ,
36 WORKWINDOW ,
37 CONTAINER ,
38 FLOATINGWINDOW ,
39 DIALOG ,
40 MODELESSDIALOG , // 10 (314)
41 MODALDIALOG ,
42 CONTROL ,
43 PUSHBUTTON ,
44 OKBUTTON ,
45 CANCELBUTTON ,
46 HELPBUTTON ,
47 IMAGEBUTTON ,
48 MENUBUTTON ,
49 MOREBUTTON ,
50 SPINBUTTON , // 20 (324)
51 RADIOBUTTON ,
52 CHECKBOX ,
53 TRISTATEBOX ,
54 EDIT ,
55 MULTILINEEDIT ,
56 COMBOBOX ,
57 LISTBOX ,
58 MULTILISTBOX ,
59 FIXEDTEXT ,
60 FIXEDLINE , // 30 (334)
61 FIXEDBITMAP ,
62 FIXEDIMAGE ,
63 GROUPBOX ,
64 SCROLLBAR ,
65 SCROLLBARBOX ,
66 SPLITTER ,
67 SPLITWINDOW ,
68 SPINFIELD ,
69 PATTERNFIELD ,
70 NUMERICFIELD , // 40 (344)
71 METRICFIELD ,
72 FORMATTEDFIELD ,
73 CURRENCYFIELD ,
74 DATEFIELD ,
75 TIMEFIELD ,
76 PATTERNBOX ,
77 NUMERICBOX ,
78 METRICBOX ,
79 CURRENCYBOX ,
80 DATEBOX ,
81 TIMEBOX , // 50 (354)
82 LONGCURRENCYFIELD ,
83 LONGCURRENCYBOX ,
84 SCROLLWINDOW ,
85 TOOLBOX ,
86 DOCKINGWINDOW ,
87 STATUSBAR ,
88 TABPAGE ,
89 TABCONTROL ,
90 TABDIALOG ,
91 BORDERWINDOW , // 60 (364)
92 BUTTONDIALOG ,
93 SYSTEMCHILDWINDOW ,
94 SLIDER ,
95 MENUBARWINDOW ,
96 TREELISTBOX ,
97 HELPTEXTWINDOW ,
98 INTROWINDOW ,
99 LISTBOXWINDOW ,
100 DOCKINGAREA ,
101 RULER , // 70 (374)
102 CALCINPUTLINE ,
103 HEADERBAR ,
104 VERTICALTABCONTROL ,
105 LAST = VERTICALTABCONTROL,
106 // only used in vclxtoolkit.cxx
107 TOOLKIT_FRAMEWINDOW = 0x1000,
108 TOOLKIT_SYSTEMCHILDWINDOW = 0x1001,
111 // Window-Bits
113 typedef sal_Int64 WinBits;
115 // Window-Bits for Window
116 WinBits const WB_CLIPCHILDREN = 0x00000001;
117 WinBits const WB_DIALOGCONTROL = 0x00000002;
118 WinBits const WB_NODIALOGCONTROL = 0x00000004;
119 WinBits const WB_BORDER = 0x00000008;
120 WinBits const WB_NOBORDER = 0x00000010;
121 WinBits const WB_SIZEABLE = 0x00000020;
122 WinBits const WB_3DLOOK = 0x00000040;
123 WinBits const WB_ALLOWMENUBAR = 0x00000080;
125 // Window-Bits for SystemWindows
126 WinBits const WB_MOVEABLE = 0x00000100;
127 WinBits const WB_ROLLABLE = 0x00000200;
128 WinBits const WB_CLOSEABLE = 0x00000400;
129 WinBits const WB_STANDALONE = 0x00000800;
130 WinBits const WB_APP = 0x00001000;
131 WinBits const WB_SYSTEMWINDOW = SAL_CONST_INT64(0x40000000);
132 // warning: do not confuse WB_SYSTEMCHILDWINDOW with the SystemChildWindow class
134 // the SystemChildWindow class was there first and is a very specialized
135 // system child window type for plugged applications. The SystemChildWindow class
136 // explicitly should never use the WB_SYSTEMCHILDWINDOW WinBit
138 // WB_SYSTEMCHILDWINDOW on the other hand is to be used on system windows
139 // which should be created as system child windows with (more or less)
140 // normal event handling
141 WinBits const WB_SYSTEMCHILDWINDOW = SAL_CONST_INT64(0x8000000000);
142 WinBits const WB_SIZEMOVE = (WB_SIZEABLE | WB_MOVEABLE);
144 // Standard-Window-Bits for ChildWindows
145 WinBits const WB_TABSTOP = 0x00000100;
146 WinBits const WB_NOTABSTOP = 0x00000200;
147 WinBits const WB_GROUP = 0x00000400;
148 WinBits const WB_NOGROUP = 0x00000800;
149 WinBits const WB_HORZ = 0x00001000;
150 WinBits const WB_VERT = 0x00002000;
151 WinBits const WB_LEFT = 0x00004000;
152 WinBits const WB_CENTER = 0x00008000;
153 WinBits const WB_RIGHT = 0x00010000;
154 WinBits const WB_TOP = 0x00020000;
155 WinBits const WB_VCENTER = 0x00040000;
156 WinBits const WB_BOTTOM = 0x00080000;
157 WinBits const WB_DRAG = 0x00100000;
158 WinBits const WB_SPIN = 0x00200000;
159 WinBits const WB_REPEAT = 0x00400000;
160 WinBits const WB_NOPOINTERFOCUS = 0x00800000;
161 WinBits const WB_WORDBREAK = 0x01000000;
162 WinBits const WB_NOLABEL = 0x02000000;
163 WinBits const WB_SORT = 0x04000000;
164 WinBits const WB_DROPDOWN = 0x08000000;
165 WinBits const WB_HIDE = SAL_CONST_INT64(0x80000000);
166 WinBits const WB_AUTOHSCROLL = SAL_CONST_INT64(0x10000000);
167 WinBits const WB_DOCKABLE = SAL_CONST_INT64(0x20000000);
168 WinBits const WB_AUTOVSCROLL = SAL_CONST_INT64(0x40000000);
169 WinBits const WB_HYPHENATION = SAL_CONST_INT64(0x800000000) | WB_WORDBREAK;
170 // #i93011# style bit for some child windows, that want their children checked for accelerators
171 WinBits const WB_CHILDDLGCTRL = SAL_CONST_INT64(0x100000000000);
173 // system floating window
174 WinBits const WB_SYSTEMFLOATWIN = SAL_CONST_INT64(0x100000000);
175 WinBits const WB_INTROWIN = SAL_CONST_INT64(0x200000000);
176 WinBits const WB_NOSHADOW = SAL_CONST_INT64(0x400000000);
177 WinBits const WB_TOOLTIPWIN = SAL_CONST_INT64(0x800000000);
178 WinBits const WB_OWNERDRAWDECORATION = SAL_CONST_INT64(0x2000000000);
179 WinBits const WB_DEFAULTWIN = SAL_CONST_INT64(0x4000000000);
180 WinBits const WB_POPUP = SAL_CONST_INT64(0x20000000);
182 WinBits const WB_HSCROLL = WB_HORZ;
183 WinBits const WB_VSCROLL = WB_VERT;
185 // Window-Bits for PushButtons
186 WinBits const WB_DEFBUTTON = 0x10000000;
187 WinBits const WB_NOLIGHTBORDER = 0x20000000;
188 WinBits const WB_RECTSTYLE = 0x08000000;
189 WinBits const WB_SMALLSTYLE = 0x04000000;
190 WinBits const WB_TOGGLE = SAL_CONST_INT64(0x1000000000);
191 WinBits const WB_BEVELBUTTON = SAL_CONST_INT64(0x2000000000);
192 WinBits const WB_FLATBUTTON = SAL_CONST_INT64(0x4000000000);
194 // Window-Bits for FixedText
195 WinBits const WB_PATHELLIPSIS = 0x00100000;
196 WinBits const WB_EXTRAOFFSET = 0x02000000;
197 WinBits const WB_NOMULTILINE = 0x10000000;
199 // Window-Bits for Edit
200 WinBits const WB_READONLY = 0x02000000;
201 WinBits const WB_NOHIDESELECTION = SAL_CONST_INT64(0x1000000000);
203 // Window-Bits for MultiLineEdit
204 WinBits const WB_IGNORETAB = 0x20000000;
206 // Window-Bits for ListBox and MultiListBox
207 WinBits const WB_SIMPLEMODE = 0x20000000;
208 // Special case where the listbox is used as a dropdown popup (not a combobox)
209 WinBits const WB_LISTBOX_POPUP = 0x40000000;
211 // Window-Bits for FixedBitmap
212 WinBits const WB_SCALE = 0x08000000;
214 // Window-Bits for ToolBox
215 WinBits const WB_SCROLL = 0x02000000;
217 // Window-Bits for SplitWindow
218 WinBits const WB_NOSPLITDRAW = 0x01000000;
220 // Standard-WinBits
221 WinBits const WB_STDWORK = WB_SIZEMOVE | WB_CLOSEABLE;
222 WinBits const WB_STDDOCKWIN = WB_DOCKABLE | WB_MOVEABLE | WB_CLOSEABLE;
223 WinBits const WB_STDFLOATWIN = WB_SIZEMOVE | WB_CLOSEABLE | WB_ROLLABLE;
224 WinBits const WB_STDDIALOG = WB_MOVEABLE | WB_CLOSEABLE;
225 WinBits const WB_STDMODELESS = WB_STDDIALOG;
226 WinBits const WB_STDMODAL = WB_STDDIALOG;
227 WinBits const WB_STDTABCONTROL = 0;
228 WinBits const WB_STDPOPUP = WB_BORDER | WB_POPUP | WB_SYSTEMWINDOW | WB_3DLOOK | WB_DIALOGCONTROL;
230 // For TreeListBox
231 WinBits const WB_HASBUTTONS = SAL_CONST_INT64(0x000100000000);
232 WinBits const WB_HASLINES = SAL_CONST_INT64(0x000200000000);
233 WinBits const WB_HASLINESATROOT = SAL_CONST_INT64(0x000400000000);
234 WinBits const WB_HASBUTTONSATROOT = SAL_CONST_INT64(0x000800000000);
235 WinBits const WB_NOINITIALSELECTION = SAL_CONST_INT64(0x001000000000);
236 WinBits const WB_HIDESELECTION = SAL_CONST_INT64(0x002000000000);
237 // DO NOT USE: 0x008000000000, that's WB_SYSTEMCHILDWINDOW
240 enum class WindowAlign { Left, Top, Right, Bottom };
242 enum class ImageAlign { Left, Top, Right, Bottom,
243 LeftTop, LeftBottom, TopLeft,
244 TopRight, RightTop, RightBottom,
245 BottomLeft, BottomRight, Center };
247 enum class SymbolAlign { LEFT, RIGHT };
249 // ButtonDialog-Types
251 enum class StandardButtonType
253 OK = 0,
254 Cancel = 1,
255 Yes = 2,
256 No = 3,
257 Retry = 4,
258 Help = 5,
259 Close = 6,
260 More = 7,
261 Ignore = 8,
262 Abort = 9,
263 Less = 10,
264 Back = 11,
265 Next = 12,
266 Finish = 13,
267 Count = 14,
270 // prominent place for ListBox window types
272 enum class ProminentEntry { TOP, MIDDLE };
274 #endif
276 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */