Branch libreoffice-5-0-4
[LibreOffice.git] / include / rsc / rsc-vcl-shared-types.hxx
blob73f702b62caa027c9c09dd254e545dfdee8bd768
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 prelimitary (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,
68 TEXTICON = 0x0300 // TEXT_ONLY | ICON_ONLY
70 namespace o3tl
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
81 DONTKNOW = 0,
82 IMAGE = 1,
83 ARROW_UP = 2,
84 ARROW_DOWN = 3,
85 ARROW_LEFT = 4,
86 ARROW_RIGHT = 5,
87 SPIN_UP = 6,
88 SPIN_DOWN = 7,
89 SPIN_LEFT = 8,
90 SPIN_RIGHT = 9,
91 FIRST = 10,
92 LAST = 11,
93 PREV = 12,
94 NEXT = 13,
95 PAGEUP = 14,
96 PAGEDOWN = 15,
97 PLAY = 16,
98 REVERSEPLAY = 17,
99 RECORD = 18,
100 STOP = 19,
101 PAUSE = 20,
102 WINDSTART = 21,
103 WINDEND = 22,
104 WINDBACKWARD = 23,
105 WINDFORWARD = 24,
106 CLOSE = 25,
107 ROLLUP = 26,
108 ROLLDOWN = 27,
109 CHECKMARK = 28,
110 RADIOCHECKMARK = 29,
111 SPIN_UPDOWN = 30,
112 FLOAT = 31,
113 DOCK = 32,
114 HIDE = 33,
115 HELP = 34,
116 PLUS = 35,
117 MENU = SymbolType::SPIN_DOWN
121 // Border-Styles fuer SetBorder()
122 enum class WindowBorderStyle : sal_Int16
124 NONE = 0x0000,
125 NORMAL = 0x0001,
126 MONO = 0x0002,
127 MENU = 0x0010,
128 NWF = 0x0020,
129 NOBORDER = 0x1000,
130 REMOVEBORDER = 0x2000
132 namespace o3tl
134 template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
137 #define KEY_CODE_MASK ((sal_uInt16)0x0FFF)
139 // Modifier-Tasten
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)
146 #endif
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */