Bump version to 6.4-15
[LibreOffice.git] / include / vcl / vclenum.hxx
blob9d4091be23c94e0092a4b1fbb0f8bfa2f2974789
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 ROLLUP = 26,
95 ROLLDOWN = 27,
96 CHECKMARK = 28,
97 RADIOCHECKMARK = 29,
98 FLOAT = 31,
99 DOCK = 32,
100 HIDE = 33,
101 HELP = 34,
102 PLUS = 35,
103 MENU = SymbolType::SPIN_DOWN
107 // Border styles for SetBorder()
108 enum class WindowBorderStyle : sal_Int16
110 NONE = 0x0000,
111 NORMAL = 0x0001,
112 MONO = 0x0002,
113 MENU = 0x0010,
114 NWF = 0x0020,
115 NOBORDER = 0x1000,
116 REMOVEBORDER = 0x2000
118 namespace o3tl
120 template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
123 enum class WindowStateMask {
124 NONE = 0x0000,
125 X = 0x0001,
126 Y = 0x0002,
127 Width = 0x0004,
128 Height = 0x0008,
129 State = 0x0010,
130 Minimized = 0x0020,
131 MaximizedX = 0x0100,
132 MaximizedY = 0x0200,
133 MaximizedWidth = 0x0400,
134 MaximizedHeight = 0x0800,
135 Pos = X | Y,
136 All = X | Y | Width | Height | MaximizedX | MaximizedY | MaximizedWidth | MaximizedHeight | State | Minimized
138 namespace o3tl
140 template<> struct typed_flags<WindowStateMask> : is_typed_flags<WindowStateMask, 0x0f3f> {};
143 enum class TimeFormat
145 Hour12, Hour24
148 enum class ExtTimeFieldFormat
150 /** the first 4 of these are only used by base/dbaccess */
151 Short24H, Long24H,
152 Short12H, Long12H,
153 ShortDuration, LongDuration
156 enum class ExtDateFieldFormat
158 SystemShort, SystemShortYY, SystemShortYYYY,
159 SystemLong,
160 ShortDDMMYY, ShortMMDDYY, ShortYYMMDD,
161 ShortDDMMYYYY, ShortMMDDYYYY, ShortYYYYMMDD,
162 ShortYYMMDD_DIN5008, ShortYYYYMMDD_DIN5008,
163 FORCE_EQUAL_SIZE=SAL_MAX_ENUM
166 // this appears to be a direct copy of css::awt::GradientStyle
167 enum class GradientStyle
169 Linear = 0,
170 Axial = 1,
171 Radial = 2,
172 Elliptical = 3,
173 Square = 4,
174 Rect = 5,
175 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
178 enum class HatchStyle
180 Single = 0,
181 Double = 1,
182 Triple = 2,
183 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
186 enum class LineStyle
188 NONE = 0,
189 Solid = 1,
190 Dash = 2,
191 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
194 enum class RasterOp { OverPaint, Xor, N0, N1, Invert };
196 typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
198 enum class OutDevSupportType { TransparentRect, B2DDraw };
200 struct ItalicMatrix
202 double xx, xy, yx, yy;
203 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
206 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
208 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
211 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
213 return !(a == b);
216 enum class VclAlign
218 Fill,
219 Start,
220 End,
221 Center
224 enum class VclPackType
226 Start = 0,
227 End = 1,
228 LAST = End
231 // Return Values from Dialog::Execute
232 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
234 enum VclResponseType
236 RET_CANCEL = 0,
237 RET_OK = 1,
238 RET_YES = 2,
239 RET_NO = 3,
240 RET_RETRY = 4,
241 RET_IGNORE = 5,
242 RET_CLOSE = 7,
243 RET_HELP = 10
246 enum class VclButtonsType
248 NONE,
250 Close,
251 Cancel,
252 YesNo,
253 OkCancel
256 enum class VclMessageType
258 Info,
259 Warning,
260 Question,
261 Error,
262 Other
265 enum class VclSizeGroupMode
267 NONE,
268 Horizontal,
269 Vertical,
270 Both
273 enum class VclPolicyType
275 ALWAYS,
276 AUTOMATIC,
277 NEVER
280 enum class WizardButtonFlags : sal_Int16
282 NONE = 0x0000,
283 NEXT = 0x0001,
284 PREVIOUS = 0x0002,
285 FINISH = 0x0004,
286 CANCEL = 0x0008,
287 HELP = 0x0010,
290 namespace o3tl
292 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
295 // small, large, size32 force an exact toolbox size for proper alignment
296 // DontCare will let the toolbox decide about its size
297 enum class ToolBoxButtonSize
299 DontCare,
300 Small,
301 Large,
302 Size32,
305 enum class WindowStateState {
306 NONE = 0x0000,
307 Normal = 0x0001,
308 Minimized = 0x0002,
309 Maximized = 0x0004,
310 Rollup = 0x0008,
311 MaximizedHorz = 0x0010,
312 MaximizedVert = 0x0020,
313 FullScreen = 0x0040,
314 SystemMask = 0xffff
316 namespace o3tl
318 template<> struct typed_flags<WindowStateState> : is_typed_flags<WindowStateState, 0xffff> {};
321 namespace vcl
323 enum class ImageType
325 Size16,
326 Size26,
327 Size32,
328 Small = Size16,
329 LAST = Size32,
333 #endif // INCLUDED_VCL_VCLENUM_HXX
335 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */