CppunitTest_sc_tiledrendering2: move to tiledrendering folder
[LibreOffice.git] / include / vcl / vclenum.hxx
blobe19648515d7dedc4e07b78f02a09da95c04bbea0
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,
115 // Never use native border, used to ensure consistency of form controls
116 // inside documents across platforms and in pdf/print output
117 NONATIVEBORDER = 0x4000,
119 namespace o3tl
121 template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x7033> {};
124 enum class TimeFormat
126 Hour12, Hour24
129 enum class ExtTimeFieldFormat
131 /** the first 4 of these are only used by base/dbaccess */
132 Short24H, Long24H,
133 Short12H, Long12H,
134 ShortDuration, LongDuration
137 enum class ExtDateFieldFormat
139 SystemShort, SystemShortYY, SystemShortYYYY,
140 SystemLong,
141 ShortDDMMYY, ShortMMDDYY, ShortYYMMDD,
142 ShortDDMMYYYY, ShortMMDDYYYY, ShortYYYYMMDD,
143 ShortYYMMDD_DIN5008, ShortYYYYMMDD_DIN5008,
144 FORCE_EQUAL_SIZE=SAL_MAX_ENUM
147 enum class HatchStyle
149 Single = 0,
150 Double = 1,
151 Triple = 2,
152 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
155 enum class LineStyle
157 NONE = 0,
158 Solid = 1,
159 Dash = 2,
160 FORCE_EQUAL_SIZE = SAL_MAX_ENUM
163 typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
165 enum class OutDevSupportType
167 TransparentText // if alpha in TextColor can be honored
170 struct ItalicMatrix
172 double xx, xy, yx, yy;
173 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
176 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
178 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
181 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
183 return !(a == b);
186 enum class VclAlign
188 Fill,
189 Start,
190 End,
191 Center
194 enum class VclPackType
196 Start = 0,
197 End = 1,
198 LAST = End
201 enum class VclTaskBarStates {
202 // Default, no specifics
203 Normal,
204 // Display some progress defined by SetTaskBarProgress
205 Progress,
206 // Something going on, but no exact progress scale
207 ProgressUnknown,
208 // Process on pause
209 Paused,
210 // Some error did happen
211 Error
215 // Return Values from Dialog::Execute
216 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
218 enum VclResponseType
220 RET_CANCEL = 0,
221 RET_OK = 1,
222 RET_YES = 2,
223 RET_NO = 3,
224 RET_RETRY = 4,
225 RET_IGNORE = 5,
226 RET_CLOSE = 7,
227 RET_HELP = 10
230 enum class VclButtonsType
232 NONE,
234 Close,
235 Cancel,
236 YesNo,
237 OkCancel
240 enum class VclMessageType
242 Info,
243 Warning,
244 Question,
245 Error,
246 Other
249 enum class VclSizeGroupMode
251 NONE,
252 Horizontal,
253 Vertical,
254 Both
257 enum class VclPolicyType
259 ALWAYS,
260 AUTOMATIC,
261 NEVER
264 enum class WizardButtonFlags : sal_Int16
266 NONE = 0x0000,
267 NEXT = 0x0001,
268 PREVIOUS = 0x0002,
269 FINISH = 0x0004,
270 CANCEL = 0x0008,
271 HELP = 0x0010,
274 namespace o3tl
276 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
279 // small, large, size32 force an exact toolbox size for proper alignment
280 // DontCare will let the toolbox decide about its size
281 enum class ToolBoxButtonSize
283 DontCare,
284 Small,
285 Large,
286 Size32,
289 // available button sizes for navigation bar
290 enum class NavbarButtonSize
292 Auto,
293 Small,
294 Large,
295 XLarge,
298 namespace vcl
300 // The exact sizes of the icons in each size grouping are not necessarily
301 // the exact size indicated by the name, but the upper limit of their size.
302 // e.g. many Size26 icons are often 24x24px and only some 26x26px
303 enum class ImageType
305 Size16,
306 Size26,
307 Size32,
308 Small = Size16,
309 LAST = Size32,
313 enum class DrawFrameStyle
315 NONE = 0x0000,
316 In = 0x0001,
317 Out = 0x0002,
318 Group = 0x0003,
319 DoubleIn = 0x0004,
320 DoubleOut = 0x0005,
321 NWF = 0x0006,
324 // Flags for DrawFrame()
325 enum class DrawFrameFlags
327 NONE = 0x0000,
328 Menu = 0x0010,
329 WindowBorder = 0x0020,
330 BorderWindowBorder = 0x0040,
331 Mono = 0x1000,
332 NoDraw = 0x8000,
334 namespace o3tl
336 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
339 enum class TxtAlign
341 Left,
342 Center,
343 Right
346 enum class FloatWinPopupFlags
348 NONE = 0x000000,
349 AllowTearOff = 0x000001,
350 Down = 0x000002,
351 Up = 0x000004,
352 Left = 0x000008,
353 Right = 0x000010,
354 NoKeyClose = 0x000020,
355 AllMouseButtonClose = 0x000040,
356 NoAppFocusClose = 0x000080,
357 NewLevel = 0x000100,
358 NoMouseUpClose = 0x000200,
359 GrabFocus = 0x000400,
360 NoHorzPlacement = 0x000800,
362 namespace o3tl
364 template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x0fff> {};
367 // Flags for Window::Show()
368 enum class ShowFlags
370 NONE = 0x0000,
371 NoFocusChange = 0x0002,
372 NoActivate = 0x0004,
373 ForegroundTask = 0x0008,
375 namespace o3tl
377 template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
380 enum class TrackingEventFlags
382 NONE = 0x0000,
383 Cancel = 0x0001,
384 Key = 0x0002,
385 Focus = 0x0004,
386 Repeat = 0x0100,
387 End = 0x1000,
389 namespace o3tl
391 template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {};
394 enum class ScrollType
396 DontKnow,
397 LineUp, LineDown,
398 PageUp, PageDown,
399 Drag
402 #endif // INCLUDED_VCL_VCLENUM_HXX
404 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */