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_RSC_RSC_VCL_SHARED_TYPES_HXX
21 #define INCLUDED_RSC_RSC_VCL_SHARED_TYPES_HXX
23 #include <sal/types.h>
24 #include <o3tl/typed_flags_set.hxx>
26 enum class TimeFieldFormat
: sal_Int32
{ F_NONE
, F_SEC
, F_100TH_SEC
, F_SEC_CS
};
28 enum class KeyFuncType
: sal_Int32
{ DONTKNOW
, NEW
, OPEN
, SAVE
,
29 SAVEAS
, PRINT
, CLOSE
, QUIT
,
30 CUT
, COPY
, PASTE
, UNDO
,
31 REDO
, DELETE
, REPEAT
, FIND
,
32 FINDBACKWARD
, PROPERTIES
, FRONT
};
34 enum class MenuItemType
{ DONTKNOW
, STRING
, IMAGE
, STRINGIMAGE
, SEPARATOR
};
36 enum class MenuItemBits
: sal_Int16
45 // These have been said to be a prelimitary (sic) solution since 2007
52 template<> struct typed_flags
<MenuItemBits
> : is_typed_flags
<MenuItemBits
, 0x1ff> {};
55 enum class ToolBoxItemBits
65 DROPDOWNONLY
= 0x00a0, // 0x0080 | DROPDOWN
68 TEXTICON
= 0x0300 // TEXT_ONLY | ICON_ONLY
72 template<> struct typed_flags
<ToolBoxItemBits
> : is_typed_flags
<ToolBoxItemBits
, 0x3ff> {};
75 enum class ToolBoxItemType
{ DONTKNOW
, BUTTON
, SPACE
, SEPARATOR
, BREAK
};
77 enum class ButtonType
{ SYMBOLONLY
, TEXT
, SYMBOLTEXT
};
79 enum class SymbolType
: sal_uInt16
117 MENU
= SymbolType::SPIN_DOWN
121 // Border-Styles fuer SetBorder()
122 enum class WindowBorderStyle
: sal_Int16
130 REMOVEBORDER
= 0x2000
134 template<> struct typed_flags
<WindowBorderStyle
> : is_typed_flags
<WindowBorderStyle
, 0x3033> {};
137 #define KEY_CODE_MASK ((sal_uInt16)0x0FFF)
140 #define KEY_SHIFT ((sal_uInt16)0x1000)
141 #define KEY_MOD1 ((sal_uInt16)0x2000)
142 #define KEY_MOD2 ((sal_uInt16)0x4000)
143 #define KEY_MOD3 ((sal_uInt16)0x8000)
144 #define KEY_MODIFIERS_MASK ((sal_uInt16)0xF000)
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */