workaround segfault in compiler on macos-clang-intel
[LibreOffice.git] / include / vcl / vclenum.hxx
blobc8f27fb9da5255ed71d8933ec1a486058ba99427
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
164 TransparentRect,
165 TransparentText // if alpha in TextColor can be honored
168 struct ItalicMatrix
170 double xx, xy, yx, yy;
171 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
174 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
176 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
179 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
181 return !(a == b);
184 enum class VclAlign
186 Fill,
187 Start,
188 End,
189 Center
192 enum class VclPackType
194 Start = 0,
195 End = 1,
196 LAST = End
199 // Return Values from Dialog::Execute
200 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
202 enum VclResponseType
204 RET_CANCEL = 0,
205 RET_OK = 1,
206 RET_YES = 2,
207 RET_NO = 3,
208 RET_RETRY = 4,
209 RET_IGNORE = 5,
210 RET_CLOSE = 7,
211 RET_HELP = 10
214 enum class VclButtonsType
216 NONE,
218 Close,
219 Cancel,
220 YesNo,
221 OkCancel
224 enum class VclMessageType
226 Info,
227 Warning,
228 Question,
229 Error,
230 Other
233 enum class VclSizeGroupMode
235 NONE,
236 Horizontal,
237 Vertical,
238 Both
241 enum class VclPolicyType
243 ALWAYS,
244 AUTOMATIC,
245 NEVER
248 enum class WizardButtonFlags : sal_Int16
250 NONE = 0x0000,
251 NEXT = 0x0001,
252 PREVIOUS = 0x0002,
253 FINISH = 0x0004,
254 CANCEL = 0x0008,
255 HELP = 0x0010,
258 namespace o3tl
260 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
263 // small, large, size32 force an exact toolbox size for proper alignment
264 // DontCare will let the toolbox decide about its size
265 enum class ToolBoxButtonSize
267 DontCare,
268 Small,
269 Large,
270 Size32,
273 // available button sizes for navigation bar
274 enum class NavbarButtonSize
276 Auto,
277 Small,
278 Large,
279 XLarge,
282 namespace vcl
284 // The exact sizes of the icons in each size grouping are not necessarily
285 // the exact size indicated by the name, but the upper limit of their size.
286 // e.g. many Size26 icons are often 24x24px and only some 26x26px
287 enum class ImageType
289 Size16,
290 Size26,
291 Size32,
292 Small = Size16,
293 LAST = Size32,
297 enum class DrawFrameStyle
299 NONE = 0x0000,
300 In = 0x0001,
301 Out = 0x0002,
302 Group = 0x0003,
303 DoubleIn = 0x0004,
304 DoubleOut = 0x0005,
305 NWF = 0x0006,
308 // Flags for DrawFrame()
309 enum class DrawFrameFlags
311 NONE = 0x0000,
312 Menu = 0x0010,
313 WindowBorder = 0x0020,
314 BorderWindowBorder = 0x0040,
315 Mono = 0x1000,
316 NoDraw = 0x8000,
318 namespace o3tl
320 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
323 enum class TxtAlign
325 Left,
326 Center,
327 Right
330 enum class FloatWinPopupFlags
332 NONE = 0x000000,
333 AllowTearOff = 0x000001,
334 Down = 0x000002,
335 Up = 0x000004,
336 Left = 0x000008,
337 Right = 0x000010,
338 NoKeyClose = 0x000020,
339 AllMouseButtonClose = 0x000040,
340 NoAppFocusClose = 0x000080,
341 NewLevel = 0x000100,
342 NoMouseUpClose = 0x000200,
343 GrabFocus = 0x000400,
344 NoHorzPlacement = 0x000800,
346 namespace o3tl
348 template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x0fff> {};
351 // Flags for Window::Show()
352 enum class ShowFlags
354 NONE = 0x0000,
355 NoFocusChange = 0x0002,
356 NoActivate = 0x0004,
357 ForegroundTask = 0x0008,
359 namespace o3tl
361 template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
364 enum class TrackingEventFlags
366 NONE = 0x0000,
367 Cancel = 0x0001,
368 Key = 0x0002,
369 Focus = 0x0004,
370 Repeat = 0x0100,
371 End = 0x1000,
373 namespace o3tl
375 template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {};
378 enum class ScrollType
380 DontKnow,
381 LineUp, LineDown,
382 PageUp, PageDown,
383 Drag
386 #endif // INCLUDED_VCL_VCLENUM_HXX
388 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */