1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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
40 // These have been said to be a preliminary (sic) solution since 2007
47 template<> struct typed_flags
<MenuItemBits
> : is_typed_flags
<MenuItemBits
, 0x1f7> {};
50 enum class ToolBoxItemBits
60 DROPDOWNONLY
= 0x00a0, // 0x0080 | DROPDOWN
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
101 MENU
= SymbolType::SPIN_DOWN
105 // Border styles for SetBorder()
106 enum class WindowBorderStyle
: sal_Int16
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,
121 template<> struct typed_flags
<WindowBorderStyle
> : is_typed_flags
<WindowBorderStyle
, 0x7033> {};
124 enum class TimeFormat
129 enum class ExtTimeFieldFormat
131 /** the first 4 of these are only used by base/dbaccess */
134 ShortDuration
, LongDuration
137 enum class ExtDateFieldFormat
139 SystemShort
, SystemShortYY
, SystemShortYYYY
,
141 ShortDDMMYY
, ShortMMDDYY
, ShortYYMMDD
,
142 ShortDDMMYYYY
, ShortMMDDYYYY
, ShortYYYYMMDD
,
143 ShortYYMMDD_DIN5008
, ShortYYYYMMDD_DIN5008
,
144 FORCE_EQUAL_SIZE
=SAL_MAX_ENUM
147 enum class HatchStyle
152 FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
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
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
)
194 enum class VclPackType
201 enum class VclTaskBarStates
{
202 // Default, no specifics
204 // Display some progress defined by SetTaskBarProgress
206 // Something going on, but no exact progress scale
210 // Some error did happen
215 // Return Values from Dialog::Execute
216 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
230 enum class VclButtonsType
240 enum class VclMessageType
249 enum class VclSizeGroupMode
257 enum class VclPolicyType
264 enum class WizardButtonFlags
: sal_Int16
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
289 // available button sizes for navigation bar
290 enum class NavbarButtonSize
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
313 enum class DrawFrameStyle
324 // Flags for DrawFrame()
325 enum class DrawFrameFlags
329 WindowBorder
= 0x0020,
330 BorderWindowBorder
= 0x0040,
336 template<> struct typed_flags
<DrawFrameFlags
> : is_typed_flags
<DrawFrameFlags
, 0x9070> {};
346 enum class FloatWinPopupFlags
349 AllowTearOff
= 0x000001,
354 NoKeyClose
= 0x000020,
355 AllMouseButtonClose
= 0x000040,
356 NoAppFocusClose
= 0x000080,
358 NoMouseUpClose
= 0x000200,
359 GrabFocus
= 0x000400,
360 NoHorzPlacement
= 0x000800,
364 template<> struct typed_flags
<FloatWinPopupFlags
> : is_typed_flags
<FloatWinPopupFlags
, 0x0fff> {};
367 // Flags for Window::Show()
371 NoFocusChange
= 0x0002,
373 ForegroundTask
= 0x0008,
377 template<> struct typed_flags
<ShowFlags
> : is_typed_flags
<ShowFlags
, 0x000e> {};
380 enum class TrackingEventFlags
391 template<> struct typed_flags
<TrackingEventFlags
> : is_typed_flags
<TrackingEventFlags
, 0x1107> {};
394 enum class ScrollType
402 #endif // INCLUDED_VCL_VCLENUM_HXX
404 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */