LibreOffice Module vcl (master) 1
vclenum.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef INCLUDED_VCL_VCLENUM_HXX
21#define INCLUDED_VCL_VCLENUM_HXX
22
23#include <sal/types.h>
25
27
28enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_SEC_CS };
29
31
32enum class MenuItemBits : sal_Int16
33{
34 NONE = 0x0000,
35 CHECKABLE = 0x0001,
36 RADIOCHECK = 0x0002,
37 AUTOCHECK = 0x0004,
38 HELP = 0x0010,
39 POPUPSELECT = 0x0020,
40 // These have been said to be a preliminary (sic) solution since 2007
41 NOSELECT = 0x0040,
42 ICON = 0x0080,
43 TEXT = 0x0100,
44};
45namespace o3tl
46{
47 template<> struct typed_flags<MenuItemBits> : is_typed_flags<MenuItemBits, 0x1f7> {};
48}
49
51{
52 NONE = 0x0000,
53 CHECKABLE = 0x0001,
54 RADIOCHECK = 0x0002,
55 AUTOCHECK = 0x0004,
56 LEFT = 0x0008,
57 AUTOSIZE = 0x0010,
58 DROPDOWN = 0x0020,
59 REPEAT = 0x0040,
60 DROPDOWNONLY = 0x00a0, // 0x0080 | DROPDOWN
61 TEXT_ONLY = 0x0100,
62 ICON_ONLY = 0x0200
63};
64namespace o3tl
65{
66 template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {};
67}
68
70
72
73enum class SymbolType : sal_uInt16
74{
75 DONTKNOW = 0,
76 IMAGE = 1,
77 ARROW_UP = 2,
78 ARROW_DOWN = 3,
79 ARROW_LEFT = 4,
80 ARROW_RIGHT = 5,
81 SPIN_UP = 6,
82 SPIN_DOWN = 7,
83 SPIN_LEFT = 8,
84 SPIN_RIGHT = 9,
85 FIRST = 10,
86 LAST = 11,
87 PREV = 12,
88 NEXT = 13,
89 PAGEUP = 14,
90 PAGEDOWN = 15,
91 PLAY = 16,
92 STOP = 19,
93 CLOSE = 25,
94 CHECKMARK = 28,
95 RADIOCHECKMARK = 29,
96 FLOAT = 31,
97 DOCK = 32,
98 HIDE = 33,
99 HELP = 34,
100 PLUS = 35,
102};
103
104
105// Border styles for SetBorder()
106enum class WindowBorderStyle : sal_Int16
107{
108 NONE = 0x0000,
109 NORMAL = 0x0001,
110 MONO = 0x0002,
111 MENU = 0x0010,
112 NWF = 0x0020,
113 NOBORDER = 0x1000,
114 REMOVEBORDER = 0x2000
115};
116namespace o3tl
117{
118 template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
119}
120
121enum class TimeFormat
122{
124};
125
127{
132};
133
135{
142};
143
144enum class HatchStyle
145{
146 Single = 0,
147 Double = 1,
148 Triple = 2,
150};
151
152enum class LineStyle
153{
154 NONE = 0,
155 Solid = 1,
156 Dash = 2,
158};
159
160typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
161
163{
165 B2DDraw,
166 TransparentText // if alpha in TextColor can be honored
167};
168
170{
171 double xx, xy, yx, yy;
172 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
173};
174
175inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
176{
177 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
178}
179
180inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
181{
182 return !(a == b);
183}
184
185enum class VclAlign
186{
187 Fill,
188 Start,
189 End,
190 Center
191};
192
193enum class VclPackType
194{
195 Start = 0,
196 End = 1,
197 LAST = End
198};
199
200// Return Values from Dialog::Execute
202
204{
212 RET_HELP = 10
214
216{
217 NONE,
218 Ok,
219 Close,
220 Cancel,
221 YesNo,
223};
224
226{
227 Info,
228 Warning,
229 Question,
230 Error,
231 Other
232};
233
235{
236 NONE,
238 Vertical,
239 Both
240};
241
243{
244 ALWAYS,
245 AUTOMATIC,
246 NEVER
247};
248
249enum class WizardButtonFlags : sal_Int16
250{
251 NONE = 0x0000,
252 NEXT = 0x0001,
253 PREVIOUS = 0x0002,
254 FINISH = 0x0004,
255 CANCEL = 0x0008,
256 HELP = 0x0010,
257};
258
259namespace o3tl
260{
261 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
262}
263
264// small, large, size32 force an exact toolbox size for proper alignment
265// DontCare will let the toolbox decide about its size
267{
268 DontCare,
269 Small,
270 Large,
271 Size32,
272};
273
274namespace vcl
275{
276 // The exact sizes of the icons in each size grouping are not necessarily
277 // the exact size indicated by the name, but the upper limit of their size.
278 // e.g. many Size26 icons are often 24x24px and only some 26x26px
279 enum class ImageType
280 {
281 Size16,
282 Size26,
283 Size32,
284 Small = Size16,
285 LAST = Size32,
286 };
287}
288
290{
291 NONE = 0x0000,
292 In = 0x0001,
293 Out = 0x0002,
294 Group = 0x0003,
295 DoubleIn = 0x0004,
296 DoubleOut = 0x0005,
297 NWF = 0x0006,
298};
299
300// Flags for DrawFrame()
302{
303 NONE = 0x0000,
304 Menu = 0x0010,
305 WindowBorder = 0x0020,
306 BorderWindowBorder = 0x0040,
307 Mono = 0x1000,
308 NoDraw = 0x8000,
309};
310namespace o3tl
311{
312 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
313}
314
315enum class TxtAlign
316{
317 Left,
318 Center,
319 Right
320};
321
323{
324 NONE = 0x000000,
325 AllowTearOff = 0x000001,
326 Down = 0x000002,
327 Up = 0x000004,
328 Left = 0x000008,
329 Right = 0x000010,
330 NoKeyClose = 0x000020,
331 AllMouseButtonClose = 0x000040,
332 NoAppFocusClose = 0x000080,
333 NewLevel = 0x000100,
334 NoMouseUpClose = 0x000200,
335 GrabFocus = 0x000400,
336 NoHorzPlacement = 0x000800,
338};
339namespace o3tl
340{
341 template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x1fff> {};
342}
343
344// Flags for Window::Show()
345enum class ShowFlags
346{
347 NONE = 0x0000,
348 NoFocusChange = 0x0002,
349 NoActivate = 0x0004,
350 ForegroundTask = 0x0008,
351};
352namespace o3tl
353{
354 template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
355}
356
358{
359 NONE = 0x0000,
360 Cancel = 0x0001,
361 Key = 0x0002,
362 Focus = 0x0004,
363 Repeat = 0x0100,
364 End = 0x1000,
365};
366namespace o3tl
367{
368 template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {};
369}
370
371enum class ScrollType
372{
373 DontKnow,
376 Drag
377};
378
379#endif // INCLUDED_VCL_VCLENUM_HXX
380
381/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const short CLOSE
const short REPEAT
struct _ADOKey Key
struct _ADOGroup Group
Definition: menu.hxx:116
#define SPACE
NORMAL
STRING
uno_Any a
AUTOMATIC
NEVER
#define SEPARATOR
NONE
const sal_uInt32 LEFT
Fill
Info
Warning
Error
HatchStyle
PREVIOUS
ImageType
Definition: vclenum.hxx:280
double yy
Definition: vclenum.hxx:171
double yx
Definition: vclenum.hxx:171
double xy
Definition: vclenum.hxx:171
double xx
Definition: vclenum.hxx:171
STOP
PLUS
TEXT
NEXT
Left
Center
Right
#define SAL_MAX_ENUM
MenuItemType
Definition: vclenum.hxx:30
OutDevSupportType
Definition: vclenum.hxx:163
WizardButtonFlags
Definition: vclenum.hxx:250
TimeFormat
Definition: vclenum.hxx:122
MenuItemBits
Definition: vclenum.hxx:33
SymbolType
Definition: vclenum.hxx:74
ShowFlags
Definition: vclenum.hxx:346
ToolBoxButtonSize
Definition: vclenum.hxx:267
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:175
DrawFrameStyle
Definition: vclenum.hxx:290
SelectionMode
Definition: vclenum.hxx:26
VclResponseType
!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
Definition: vclenum.hxx:204
@ RET_HELP
Definition: vclenum.hxx:212
@ RET_OK
Definition: vclenum.hxx:206
@ RET_CLOSE
Definition: vclenum.hxx:211
@ RET_CANCEL
Definition: vclenum.hxx:205
@ RET_NO
Definition: vclenum.hxx:208
@ RET_IGNORE
Definition: vclenum.hxx:210
@ RET_RETRY
Definition: vclenum.hxx:209
@ RET_YES
Definition: vclenum.hxx:207
VclPolicyType
Definition: vclenum.hxx:243
VclAlign
Definition: vclenum.hxx:186
LineStyle
Definition: vclenum.hxx:153
VclMessageType
Definition: vclenum.hxx:226
ScrollType
Definition: vclenum.hxx:372
VclPackType
Definition: vclenum.hxx:194
FloatWinPopupFlags
Definition: vclenum.hxx:323
@ MakeClientWindowVisibleBeforePopup
TxtAlign
Definition: vclenum.hxx:316
DrawFrameFlags
Definition: vclenum.hxx:302
ToolBoxItemType
Definition: vclenum.hxx:69
VclButtonsType
Definition: vclenum.hxx:216
ExtDateFieldFormat
Definition: vclenum.hxx:135
ToolBoxItemBits
Definition: vclenum.hxx:51
TrackingEventFlags
Definition: vclenum.hxx:358
TimeFieldFormat
Definition: vclenum.hxx:28
ButtonType
Definition: vclenum.hxx:71
WindowBorderStyle
Definition: vclenum.hxx:107
sal_uInt32 sal_UCS4
Definition: vclenum.hxx:160
VclSizeGroupMode
Definition: vclenum.hxx:235
bool operator!=(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:180
ExtTimeFieldFormat
Definition: vclenum.hxx:127
@ Short24H
the first 4 of these are only used by base/dbaccess
SwHTMLWriter & Out(const SwAttrFnTab, const SfxPoolItem &, SwHTMLWriter &)