Version 7.5.1.1, tag libreoffice-7.5.1.1
[LibreOffice.git] / include / vcl / vclenum.hxx
blob11fa32791a5f25334f8f8d6f107bdabeaffa9350
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 // this appears to be a direct copy of css::awt::GradientStyle
145 enum class GradientStyle
147 Linear = 0,
148 Axial = 1,
149 Radial = 2,
150 Elliptical = 3,
151 Square = 4,
152 Rect = 5,
153 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
156 enum class HatchStyle
158 Single = 0,
159 Double = 1,
160 Triple = 2,
161 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
164 enum class LineStyle
166 NONE = 0,
167 Solid = 1,
168 Dash = 2,
169 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
172 typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
174 enum class OutDevSupportType { TransparentRect, B2DDraw };
176 struct ItalicMatrix
178 double xx, xy, yx, yy;
179 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
182 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
184 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
187 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
189 return !(a == b);
192 enum class VclAlign
194 Fill,
195 Start,
196 End,
197 Center
200 enum class VclPackType
202 Start = 0,
203 End = 1,
204 LAST = End
207 // Return Values from Dialog::Execute
208 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
210 enum VclResponseType
212 RET_CANCEL = 0,
213 RET_OK = 1,
214 RET_YES = 2,
215 RET_NO = 3,
216 RET_RETRY = 4,
217 RET_IGNORE = 5,
218 RET_CLOSE = 7,
219 RET_HELP = 10
222 enum class VclButtonsType
224 NONE,
226 Close,
227 Cancel,
228 YesNo,
229 OkCancel
232 enum class VclMessageType
234 Info,
235 Warning,
236 Question,
237 Error,
238 Other
241 enum class VclSizeGroupMode
243 NONE,
244 Horizontal,
245 Vertical,
246 Both
249 enum class VclPolicyType
251 ALWAYS,
252 AUTOMATIC,
253 NEVER
256 enum class WizardButtonFlags : sal_Int16
258 NONE = 0x0000,
259 NEXT = 0x0001,
260 PREVIOUS = 0x0002,
261 FINISH = 0x0004,
262 CANCEL = 0x0008,
263 HELP = 0x0010,
266 namespace o3tl
268 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
271 // small, large, size32 force an exact toolbox size for proper alignment
272 // DontCare will let the toolbox decide about its size
273 enum class ToolBoxButtonSize
275 DontCare,
276 Small,
277 Large,
278 Size32,
281 namespace vcl
283 // The exact sizes of the icons in each size grouping are not necessarily
284 // the exact size indicated by the name, but the upper limit of their size.
285 // e.g. many Size26 icons are often 24x24px and only some 26x26px
286 enum class ImageType
288 Size16,
289 Size26,
290 Size32,
291 Small = Size16,
292 LAST = Size32,
296 enum class DrawFrameStyle
298 NONE = 0x0000,
299 In = 0x0001,
300 Out = 0x0002,
301 Group = 0x0003,
302 DoubleIn = 0x0004,
303 DoubleOut = 0x0005,
304 NWF = 0x0006,
307 // Flags for DrawFrame()
308 enum class DrawFrameFlags
310 NONE = 0x0000,
311 Menu = 0x0010,
312 WindowBorder = 0x0020,
313 BorderWindowBorder = 0x0040,
314 Mono = 0x1000,
315 NoDraw = 0x8000,
317 namespace o3tl
319 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
322 enum class TxtAlign
324 Left,
325 Center,
326 Right
329 enum class FloatWinPopupFlags
331 NONE = 0x000000,
332 AllowTearOff = 0x000001,
333 Down = 0x000002,
334 Up = 0x000004,
335 Left = 0x000008,
336 Right = 0x000010,
337 NoKeyClose = 0x000020,
338 AllMouseButtonClose = 0x000040,
339 NoAppFocusClose = 0x000080,
340 NewLevel = 0x000100,
341 NoMouseUpClose = 0x000200,
342 GrabFocus = 0x000400,
343 NoHorzPlacement = 0x000800,
345 namespace o3tl
347 template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x0fff> {};
350 // Flags for Window::Show()
351 enum class ShowFlags
353 NONE = 0x0000,
354 NoFocusChange = 0x0002,
355 NoActivate = 0x0004,
356 ForegroundTask = 0x0008,
358 namespace o3tl
360 template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
363 enum class TrackingEventFlags
365 NONE = 0x0000,
366 Cancel = 0x0001,
367 Key = 0x0002,
368 Focus = 0x0004,
369 Repeat = 0x0100,
370 End = 0x1000,
372 namespace o3tl
374 template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {};
377 enum class ScrollType
379 DontKnow,
380 LineUp, LineDown,
381 PageUp, PageDown,
382 Drag
385 #endif // INCLUDED_VCL_VCLENUM_HXX
387 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */