build fix
[LibreOffice.git] / include / rsc / rsc-vcl-shared-types.hxx
blob3603cde25c76edb71732cde228e7317e8d9dc94b
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_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
38 NONE = 0x0000,
39 CHECKABLE = 0x0001,
40 RADIOCHECK = 0x0002,
41 AUTOCHECK = 0x0004,
42 ABOUT = 0x0008,
43 HELP = 0x0010,
44 POPUPSELECT = 0x0020,
45 // These have been said to be a preliminary (sic) solution since 2007
46 NOSELECT = 0x0040,
47 ICON = 0x0080,
48 TEXT = 0x0100,
50 namespace o3tl
52 template<> struct typed_flags<MenuItemBits> : is_typed_flags<MenuItemBits, 0x1ff> {};
55 enum class ToolBoxItemBits
57 NONE = 0x0000,
58 CHECKABLE = 0x0001,
59 RADIOCHECK = 0x0002,
60 AUTOCHECK = 0x0004,
61 LEFT = 0x0008,
62 AUTOSIZE = 0x0010,
63 DROPDOWN = 0x0020,
64 REPEAT = 0x0040,
65 DROPDOWNONLY = 0x00a0, // 0x0080 | DROPDOWN
66 TEXT_ONLY = 0x0100,
67 ICON_ONLY = 0x0200
69 namespace o3tl
71 template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {};
74 enum class ToolBoxItemType { DONTKNOW, BUTTON, SPACE, SEPARATOR, BREAK };
76 enum class ButtonType { SYMBOLONLY, TEXT, SYMBOLTEXT };
78 enum class SymbolType : sal_uInt16
80 DONTKNOW = 0,
81 IMAGE = 1,
82 ARROW_UP = 2,
83 ARROW_DOWN = 3,
84 ARROW_LEFT = 4,
85 ARROW_RIGHT = 5,
86 SPIN_UP = 6,
87 SPIN_DOWN = 7,
88 SPIN_LEFT = 8,
89 SPIN_RIGHT = 9,
90 FIRST = 10,
91 LAST = 11,
92 PREV = 12,
93 NEXT = 13,
94 PAGEUP = 14,
95 PAGEDOWN = 15,
96 PLAY = 16,
97 REVERSEPLAY = 17,
98 RECORD = 18,
99 STOP = 19,
100 PAUSE = 20,
101 WINDSTART = 21,
102 WINDEND = 22,
103 WINDBACKWARD = 23,
104 WINDFORWARD = 24,
105 CLOSE = 25,
106 ROLLUP = 26,
107 ROLLDOWN = 27,
108 CHECKMARK = 28,
109 RADIOCHECKMARK = 29,
110 SPIN_UPDOWN = 30,
111 FLOAT = 31,
112 DOCK = 32,
113 HIDE = 33,
114 HELP = 34,
115 PLUS = 35,
116 MENU = SymbolType::SPIN_DOWN
120 // Border-Styles fuer SetBorder()
121 enum class WindowBorderStyle : sal_Int16
123 NONE = 0x0000,
124 NORMAL = 0x0001,
125 MONO = 0x0002,
126 MENU = 0x0010,
127 NWF = 0x0020,
128 NOBORDER = 0x1000,
129 REMOVEBORDER = 0x2000
131 namespace o3tl
133 template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
136 #define KEY_CODE_MASK ((sal_uInt16)0x0FFF)
138 // Modifier-Tasten
139 #define KEY_SHIFT ((sal_uInt16)0x1000)
140 #define KEY_MOD1 ((sal_uInt16)0x2000)
141 #define KEY_MOD2 ((sal_uInt16)0x4000)
142 #define KEY_MOD3 ((sal_uInt16)0x8000)
143 #define KEY_MODIFIERS_MASK ((sal_uInt16)0xF000)
145 #endif
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */