Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / include / vcl / vclenum.hxx
blob8e38593c047c7a80e547634bb33a64eb2f081e5a
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 .
20 #ifndef INCLUDED_VCL_VCLENUM_HXX
21 #define INCLUDED_VCL_VCLENUM_HXX
23 #include <sal/types.h>
24 #include <o3tl/typed_flags_set.hxx>
26 enum class SelectionMode { NONE, Single, Range, Multiple };
28 enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_SEC_CS };
30 enum class MenuItemType { DONTKNOW, STRING, IMAGE, STRINGIMAGE, SEPARATOR };
32 enum class MenuItemBits : sal_Int16
34 NONE = 0x0000,
35 CHECKABLE = 0x0001,
36 RADIOCHECK = 0x0002,
37 AUTOCHECK = 0x0004,
38 HELP = 0x0010,
39 POPUPSELECT = 0x0020,
40 // These have been said to be a preliminary (sic) solution since 2007
41 NOSELECT = 0x0040,
42 ICON = 0x0080,
43 TEXT = 0x0100,
45 namespace o3tl
47 template<> struct typed_flags<MenuItemBits> : is_typed_flags<MenuItemBits, 0x1f7> {};
50 enum class ToolBoxItemBits
52 NONE = 0x0000,
53 CHECKABLE = 0x0001,
54 RADIOCHECK = 0x0002,
55 AUTOCHECK = 0x0004,
56 LEFT = 0x0008,
57 AUTOSIZE = 0x0010,
58 DROPDOWN = 0x0020,
59 REPEAT = 0x0040,
60 DROPDOWNONLY = 0x00a0, // 0x0080 | DROPDOWN
61 TEXT_ONLY = 0x0100,
62 ICON_ONLY = 0x0200
64 namespace o3tl
66 template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {};
69 enum class ToolBoxItemType { DONTKNOW, BUTTON, SPACE, SEPARATOR, BREAK };
71 enum class ButtonType { SYMBOLONLY, TEXT, SYMBOLTEXT };
73 enum class SymbolType : sal_uInt16
75 DONTKNOW = 0,
76 IMAGE = 1,
77 ARROW_UP = 2,
78 ARROW_DOWN = 3,
79 ARROW_LEFT = 4,
80 ARROW_RIGHT = 5,
81 SPIN_UP = 6,
82 SPIN_DOWN = 7,
83 SPIN_LEFT = 8,
84 SPIN_RIGHT = 9,
85 FIRST = 10,
86 LAST = 11,
87 PREV = 12,
88 NEXT = 13,
89 PAGEUP = 14,
90 PAGEDOWN = 15,
91 PLAY = 16,
92 STOP = 19,
93 CLOSE = 25,
94 CHECKMARK = 28,
95 RADIOCHECKMARK = 29,
96 FLOAT = 31,
97 DOCK = 32,
98 HIDE = 33,
99 HELP = 34,
100 PLUS = 35,
101 MENU = SymbolType::SPIN_DOWN
105 // Border styles for SetBorder()
106 enum class WindowBorderStyle : sal_Int16
108 NONE = 0x0000,
109 NORMAL = 0x0001,
110 MONO = 0x0002,
111 MENU = 0x0010,
112 NWF = 0x0020,
113 NOBORDER = 0x1000,
114 REMOVEBORDER = 0x2000
116 namespace o3tl
118 template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
121 enum class TimeFormat
123 Hour12, Hour24
126 enum class ExtTimeFieldFormat
128 /** the first 4 of these are only used by base/dbaccess */
129 Short24H, Long24H,
130 Short12H, Long12H,
131 ShortDuration, LongDuration
134 enum class ExtDateFieldFormat
136 SystemShort, SystemShortYY, SystemShortYYYY,
137 SystemLong,
138 ShortDDMMYY, ShortMMDDYY, ShortYYMMDD,
139 ShortDDMMYYYY, ShortMMDDYYYY, ShortYYYYMMDD,
140 ShortYYMMDD_DIN5008, ShortYYYYMMDD_DIN5008,
141 FORCE_EQUAL_SIZE=SAL_MAX_ENUM
144 enum class HatchStyle
146 Single = 0,
147 Double = 1,
148 Triple = 2,
149 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
152 enum class LineStyle
154 NONE = 0,
155 Solid = 1,
156 Dash = 2,
157 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
160 typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
162 enum class OutDevSupportType { TransparentRect, B2DDraw };
164 struct ItalicMatrix
166 double xx, xy, yx, yy;
167 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
170 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
172 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
175 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
177 return !(a == b);
180 enum class VclAlign
182 Fill,
183 Start,
184 End,
185 Center
188 enum class VclPackType
190 Start = 0,
191 End = 1,
192 LAST = End
195 // Return Values from Dialog::Execute
196 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
198 enum VclResponseType
200 RET_CANCEL = 0,
201 RET_OK = 1,
202 RET_YES = 2,
203 RET_NO = 3,
204 RET_RETRY = 4,
205 RET_IGNORE = 5,
206 RET_CLOSE = 7,
207 RET_HELP = 10
210 enum class VclButtonsType
212 NONE,
214 Close,
215 Cancel,
216 YesNo,
217 OkCancel
220 enum class VclMessageType
222 Info,
223 Warning,
224 Question,
225 Error,
226 Other
229 enum class VclSizeGroupMode
231 NONE,
232 Horizontal,
233 Vertical,
234 Both
237 enum class VclPolicyType
239 ALWAYS,
240 AUTOMATIC,
241 NEVER
244 enum class WizardButtonFlags : sal_Int16
246 NONE = 0x0000,
247 NEXT = 0x0001,
248 PREVIOUS = 0x0002,
249 FINISH = 0x0004,
250 CANCEL = 0x0008,
251 HELP = 0x0010,
254 namespace o3tl
256 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
259 // small, large, size32 force an exact toolbox size for proper alignment
260 // DontCare will let the toolbox decide about its size
261 enum class ToolBoxButtonSize
263 DontCare,
264 Small,
265 Large,
266 Size32,
269 namespace vcl
271 // The exact sizes of the icons in each size grouping are not necessarily
272 // the exact size indicated by the name, but the upper limit of their size.
273 // e.g. many Size26 icons are often 24x24px and only some 26x26px
274 enum class ImageType
276 Size16,
277 Size26,
278 Size32,
279 Small = Size16,
280 LAST = Size32,
284 enum class DrawFrameStyle
286 NONE = 0x0000,
287 In = 0x0001,
288 Out = 0x0002,
289 Group = 0x0003,
290 DoubleIn = 0x0004,
291 DoubleOut = 0x0005,
292 NWF = 0x0006,
295 // Flags for DrawFrame()
296 enum class DrawFrameFlags
298 NONE = 0x0000,
299 Menu = 0x0010,
300 WindowBorder = 0x0020,
301 BorderWindowBorder = 0x0040,
302 Mono = 0x1000,
303 NoDraw = 0x8000,
305 namespace o3tl
307 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
310 enum class TxtAlign
312 Left,
313 Center,
314 Right
317 enum class FloatWinPopupFlags
319 NONE = 0x000000,
320 AllowTearOff = 0x000001,
321 Down = 0x000002,
322 Up = 0x000004,
323 Left = 0x000008,
324 Right = 0x000010,
325 NoKeyClose = 0x000020,
326 AllMouseButtonClose = 0x000040,
327 NoAppFocusClose = 0x000080,
328 NewLevel = 0x000100,
329 NoMouseUpClose = 0x000200,
330 GrabFocus = 0x000400,
331 NoHorzPlacement = 0x000800,
332 MakeClientWindowVisibleBeforePopup = 0x001000,
334 namespace o3tl
336 template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x1fff> {};
339 // Flags for Window::Show()
340 enum class ShowFlags
342 NONE = 0x0000,
343 NoFocusChange = 0x0002,
344 NoActivate = 0x0004,
345 ForegroundTask = 0x0008,
347 namespace o3tl
349 template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
352 enum class TrackingEventFlags
354 NONE = 0x0000,
355 Cancel = 0x0001,
356 Key = 0x0002,
357 Focus = 0x0004,
358 Repeat = 0x0100,
359 End = 0x1000,
361 namespace o3tl
363 template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {};
366 enum class ScrollType
368 DontKnow,
369 LineUp, LineDown,
370 PageUp, PageDown,
371 Drag
374 #endif // INCLUDED_VCL_VCLENUM_HXX
376 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */