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
118 template<> struct typed_flags
<WindowBorderStyle
> : is_typed_flags
<WindowBorderStyle
, 0x3033> {};
121 enum class TimeFormat
126 enum class ExtTimeFieldFormat
128 /** the first 4 of these are only used by base/dbaccess */
131 ShortDuration
, LongDuration
134 enum class ExtDateFieldFormat
136 SystemShort
, SystemShortYY
, SystemShortYYYY
,
138 ShortDDMMYY
, ShortMMDDYY
, ShortYYMMDD
,
139 ShortDDMMYYYY
, ShortMMDDYYYY
, ShortYYYYMMDD
,
140 ShortYYMMDD_DIN5008
, ShortYYYYMMDD_DIN5008
,
141 FORCE_EQUAL_SIZE
=SAL_MAX_ENUM
144 enum class HatchStyle
149 FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
157 FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
160 typedef sal_uInt32 sal_UCS4
; // TODO: this should be moved to rtl
162 enum class OutDevSupportType
165 TransparentText
// if alpha in TextColor can be honored
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
)
192 enum class VclPackType
199 // Return Values from Dialog::Execute
200 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
214 enum class VclButtonsType
224 enum class VclMessageType
233 enum class VclSizeGroupMode
241 enum class VclPolicyType
248 enum class WizardButtonFlags
: sal_Int16
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
273 // available button sizes for navigation bar
274 enum class NavbarButtonSize
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
297 enum class DrawFrameStyle
308 // Flags for DrawFrame()
309 enum class DrawFrameFlags
313 WindowBorder
= 0x0020,
314 BorderWindowBorder
= 0x0040,
320 template<> struct typed_flags
<DrawFrameFlags
> : is_typed_flags
<DrawFrameFlags
, 0x9070> {};
330 enum class FloatWinPopupFlags
333 AllowTearOff
= 0x000001,
338 NoKeyClose
= 0x000020,
339 AllMouseButtonClose
= 0x000040,
340 NoAppFocusClose
= 0x000080,
342 NoMouseUpClose
= 0x000200,
343 GrabFocus
= 0x000400,
344 NoHorzPlacement
= 0x000800,
348 template<> struct typed_flags
<FloatWinPopupFlags
> : is_typed_flags
<FloatWinPopupFlags
, 0x0fff> {};
351 // Flags for Window::Show()
355 NoFocusChange
= 0x0002,
357 ForegroundTask
= 0x0008,
361 template<> struct typed_flags
<ShowFlags
> : is_typed_flags
<ShowFlags
, 0x000e> {};
364 enum class TrackingEventFlags
375 template<> struct typed_flags
<TrackingEventFlags
> : is_typed_flags
<TrackingEventFlags
, 0x1107> {};
378 enum class ScrollType
386 #endif // INCLUDED_VCL_VCLENUM_HXX
388 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */