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
144// this appears to be a direct copy of css::awt::GradientStyle
146{
147 Linear = 0,
148 Axial = 1,
149 Radial = 2,
150 Elliptical = 3,
151 Square = 4,
152 Rect = 5,
154};
155
156enum class HatchStyle
157{
158 Single = 0,
159 Double = 1,
160 Triple = 2,
162};
163
164enum class LineStyle
165{
166 NONE = 0,
167 Solid = 1,
168 Dash = 2,
170};
171
172typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
173
175
177{
178 double xx, xy, yx, yy;
179 ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
180};
181
182inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
183{
184 return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
185}
186
187inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
188{
189 return !(a == b);
190}
191
192enum class VclAlign
193{
194 Fill,
195 Start,
196 End,
197 Center
198};
199
200enum class VclPackType
201{
202 Start = 0,
203 End = 1,
204 LAST = End
205};
206
207// Return Values from Dialog::Execute
209
211{
219 RET_HELP = 10
221
223{
224 NONE,
225 Ok,
226 Close,
227 Cancel,
228 YesNo,
230};
231
233{
234 Info,
235 Warning,
236 Question,
237 Error,
238 Other
239};
240
242{
243 NONE,
245 Vertical,
246 Both
247};
248
250{
251 ALWAYS,
252 AUTOMATIC,
253 NEVER
254};
255
256enum class WizardButtonFlags : sal_Int16
257{
258 NONE = 0x0000,
259 NEXT = 0x0001,
260 PREVIOUS = 0x0002,
261 FINISH = 0x0004,
262 CANCEL = 0x0008,
263 HELP = 0x0010,
264};
265
266namespace o3tl
267{
268 template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
269}
270
271// small, large, size32 force an exact toolbox size for proper alignment
272// DontCare will let the toolbox decide about its size
274{
275 DontCare,
276 Small,
277 Large,
278 Size32,
279};
280
281namespace vcl
282{
283 // The exact sizes of the icons in each size grouping are not necessarily
284 // the exact size indicated by the name, but the upper limit of their size.
285 // e.g. many Size26 icons are often 24x24px and only some 26x26px
286 enum class ImageType
287 {
288 Size16,
289 Size26,
290 Size32,
291 Small = Size16,
292 LAST = Size32,
293 };
294}
295
297{
298 NONE = 0x0000,
299 In = 0x0001,
300 Out = 0x0002,
301 Group = 0x0003,
302 DoubleIn = 0x0004,
303 DoubleOut = 0x0005,
304 NWF = 0x0006,
305};
306
307// Flags for DrawFrame()
309{
310 NONE = 0x0000,
311 Menu = 0x0010,
312 WindowBorder = 0x0020,
313 BorderWindowBorder = 0x0040,
314 Mono = 0x1000,
315 NoDraw = 0x8000,
316};
317namespace o3tl
318{
319 template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
320}
321
322enum class TxtAlign
323{
324 Left,
325 Center,
326 Right
327};
328
330{
331 NONE = 0x000000,
332 AllowTearOff = 0x000001,
333 Down = 0x000002,
334 Up = 0x000004,
335 Left = 0x000008,
336 Right = 0x000010,
337 NoKeyClose = 0x000020,
338 AllMouseButtonClose = 0x000040,
339 NoAppFocusClose = 0x000080,
340 NewLevel = 0x000100,
341 NoMouseUpClose = 0x000200,
342 GrabFocus = 0x000400,
343 NoHorzPlacement = 0x000800,
344};
345namespace o3tl
346{
347 template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x0fff> {};
348}
349
350// Flags for Window::Show()
351enum class ShowFlags
352{
353 NONE = 0x0000,
354 NoFocusChange = 0x0002,
355 NoActivate = 0x0004,
356 ForegroundTask = 0x0008,
357};
358namespace o3tl
359{
360 template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000e> {};
361}
362
364{
365 NONE = 0x0000,
366 Cancel = 0x0001,
367 Key = 0x0002,
368 Focus = 0x0004,
369 Repeat = 0x0100,
370 End = 0x1000,
371};
372namespace o3tl
373{
374 template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x1107> {};
375}
376
377#endif // INCLUDED_VCL_VCLENUM_HXX
378
379/* 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
uno_Any a
AUTOMATIC
NEVER
#define SEPARATOR
NONE
const sal_uInt32 LEFT
Fill
Info
Warning
Error
HatchStyle
GradientStyle
PREVIOUS
ImageType
Definition: vclenum.hxx:287
STRING
double yy
Definition: vclenum.hxx:178
double yx
Definition: vclenum.hxx:178
double xy
Definition: vclenum.hxx:178
double xx
Definition: vclenum.hxx:178
STOP
PLUS
TEXT
NEXT
Left
Center
Right
#define SAL_MAX_ENUM
MenuItemType
Definition: vclenum.hxx:30
OutDevSupportType
Definition: vclenum.hxx:174
WizardButtonFlags
Definition: vclenum.hxx:257
TimeFormat
Definition: vclenum.hxx:122
MenuItemBits
Definition: vclenum.hxx:33
SymbolType
Definition: vclenum.hxx:74
ShowFlags
Definition: vclenum.hxx:352
ToolBoxButtonSize
Definition: vclenum.hxx:274
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:182
DrawFrameStyle
Definition: vclenum.hxx:297
SelectionMode
Definition: vclenum.hxx:26
VclResponseType
!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
Definition: vclenum.hxx:211
@ RET_HELP
Definition: vclenum.hxx:219
@ RET_OK
Definition: vclenum.hxx:213
@ RET_CLOSE
Definition: vclenum.hxx:218
@ RET_CANCEL
Definition: vclenum.hxx:212
@ RET_NO
Definition: vclenum.hxx:215
@ RET_IGNORE
Definition: vclenum.hxx:217
@ RET_RETRY
Definition: vclenum.hxx:216
@ RET_YES
Definition: vclenum.hxx:214
VclPolicyType
Definition: vclenum.hxx:250
VclAlign
Definition: vclenum.hxx:193
LineStyle
Definition: vclenum.hxx:165
VclMessageType
Definition: vclenum.hxx:233
VclPackType
Definition: vclenum.hxx:201
FloatWinPopupFlags
Definition: vclenum.hxx:330
TxtAlign
Definition: vclenum.hxx:323
DrawFrameFlags
Definition: vclenum.hxx:309
ToolBoxItemType
Definition: vclenum.hxx:69
VclButtonsType
Definition: vclenum.hxx:223
ExtDateFieldFormat
Definition: vclenum.hxx:135
ToolBoxItemBits
Definition: vclenum.hxx:51
TrackingEventFlags
Definition: vclenum.hxx:364
TimeFieldFormat
Definition: vclenum.hxx:28
ButtonType
Definition: vclenum.hxx:71
WindowBorderStyle
Definition: vclenum.hxx:107
sal_uInt32 sal_UCS4
Definition: vclenum.hxx:172
VclSizeGroupMode
Definition: vclenum.hxx:242
bool operator!=(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:187
ExtTimeFieldFormat
Definition: vclenum.hxx:127
@ Short24H
the first 4 of these are only used by base/dbaccess
Writer & Out(const SwAttrFnTab, const SfxPoolItem &, Writer &)