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
103 MENU
= SymbolType::SPIN_DOWN
107 // Border styles for SetBorder()
108 enum class WindowBorderStyle
: sal_Int16
116 REMOVEBORDER
= 0x2000
120 template<> struct typed_flags
<WindowBorderStyle
> : is_typed_flags
<WindowBorderStyle
, 0x3033> {};
123 enum class WindowStateMask
{
133 MaximizedWidth
= 0x0400,
134 MaximizedHeight
= 0x0800,
136 All
= X
| Y
| Width
| Height
| MaximizedX
| MaximizedY
| MaximizedWidth
| MaximizedHeight
| State
| Minimized
140 template<> struct typed_flags
<WindowStateMask
> : is_typed_flags
<WindowStateMask
, 0x0f3f> {};
143 enum class TimeFormat
148 enum class ExtTimeFieldFormat
150 /** the first 4 of these are only used by base/dbaccess */
153 ShortDuration
, LongDuration
156 enum class ExtDateFieldFormat
158 SystemShort
, SystemShortYY
, SystemShortYYYY
,
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
175 FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
178 enum class HatchStyle
183 FORCE_EQUAL_SIZE
= SAL_MAX_ENUM
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
};
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
)
224 enum class VclPackType
231 // Return Values from Dialog::Execute
232 //!!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
246 enum class VclButtonsType
256 enum class VclMessageType
265 enum class VclSizeGroupMode
273 enum class VclPolicyType
280 enum class WizardButtonFlags
: sal_Int16
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
305 enum class WindowStateState
{
311 MaximizedHorz
= 0x0010,
312 MaximizedVert
= 0x0020,
318 template<> struct typed_flags
<WindowStateState
> : is_typed_flags
<WindowStateState
, 0xffff> {};
333 #endif // INCLUDED_VCL_VCLENUM_HXX
335 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */