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>
24 #include <o3tl/typed_flags_set.hxx>
25 
27 
28 enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_SEC_CS };
29 
31 
32 enum 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 };
45 namespace o3tl
46 {
47  template<> struct typed_flags<MenuItemBits> : is_typed_flags<MenuItemBits, 0x1f7> {};
48 }
49 
50 enum class ToolBoxItemBits
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 };
64 namespace o3tl
65 {
66  template<> struct typed_flags<ToolBoxItemBits> : is_typed_flags<ToolBoxItemBits, 0x3ff> {};
67 }
68 
70 
72 
73 enum 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  ROLLUP = 26,
95  ROLLDOWN = 27,
96  CHECKMARK = 28,
97  RADIOCHECKMARK = 29,
98  FLOAT = 31,
99  DOCK = 32,
100  HIDE = 33,
101  HELP = 34,
102  PLUS = 35,
104 };
105 
106 
107 // Border styles for SetBorder()
108 enum class WindowBorderStyle : sal_Int16
109 {
110  NONE = 0x0000,
111  NORMAL = 0x0001,
112  MONO = 0x0002,
113  MENU = 0x0010,
114  NWF = 0x0020,
115  NOBORDER = 0x1000,
116  REMOVEBORDER = 0x2000
117 };
118 namespace o3tl
119 {
120  template<> struct typed_flags<WindowBorderStyle> : is_typed_flags<WindowBorderStyle, 0x3033> {};
121 }
122 
123 enum class WindowStateMask {
124  NONE = 0x0000,
125  X = 0x0001,
126  Y = 0x0002,
127  Width = 0x0004,
128  Height = 0x0008,
129  State = 0x0010,
130  Minimized = 0x0020,
131  MaximizedX = 0x0100,
132  MaximizedY = 0x0200,
133  MaximizedWidth = 0x0400,
134  MaximizedHeight = 0x0800,
135  Pos = X | Y,
137 };
138 namespace o3tl
139 {
140  template<> struct typed_flags<WindowStateMask> : is_typed_flags<WindowStateMask, 0x0f3f> {};
141 }
142 
143 enum class TimeFormat
144 {
145  Hour12, Hour24
146 };
147 
149 {
151 };
152 
154 {
156  SystemLong,
161 };
162 
163 // this appears to be a direct copy of css::awt::GradientStyle
164 enum class GradientStyle
165 {
166  Linear = 0,
167  Axial = 1,
168  Radial = 2,
169  Elliptical = 3,
170  Square = 4,
171  Rect = 5,
173 };
174 
175 enum class HatchStyle
176 {
177  Single = 0,
178  Double = 1,
179  Triple = 2,
181 };
182 
183 enum class LineStyle
184 {
185  NONE = 0,
186  Solid = 1,
187  Dash = 2,
189 };
190 
191 enum class RasterOp { OverPaint, Xor, N0, N1, Invert };
192 
193 typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
194 
196 
198 {
199  double xx, xy, yx, yy;
200  ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
201 };
202 
203 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
204 {
205  return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
206 }
207 
208 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
209 {
210  return !(a == b);
211 }
212 
213 enum class VclAlign
214 {
215  Fill,
216  Start,
217  End,
218  Center
219 };
220 
221 enum class VclPackType
222 {
223  Start = 0,
224  End = 1,
225  LAST = End
226 };
227 
228 // Return Values from Dialog::Execute
230 
232 {
234  RET_OK = 1,
235  RET_YES = 2,
236  RET_NO = 3,
240  RET_HELP = 10
241 };
242 
243 enum class VclButtonsType
244 {
245  NONE,
246  Ok,
247  Close,
248  Cancel,
249  YesNo,
250  OkCancel
251 };
252 
253 enum class VclMessageType
254 {
255  Info,
256  Warning,
257  Question,
258  Error
259 };
260 
262 {
263  NONE,
264  Horizontal,
265  Vertical,
266  Both
267 };
268 
269 enum class VclPolicyType
270 {
271  ALWAYS,
272  AUTOMATIC,
273  NEVER
274 };
275 
276 enum class WizardButtonFlags : sal_Int16
277 {
278  NONE = 0x0000,
279  NEXT = 0x0001,
280  PREVIOUS = 0x0002,
281  FINISH = 0x0004,
282  CANCEL = 0x0008,
283  HELP = 0x0010,
284 };
285 
286 namespace o3tl
287 {
288  template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
289 }
290 
291 // small, large, size32 force an exact toolbox size for proper alignment
292 // DontCare will let the toolbox decide about its size
294 {
295  DontCare,
296  Small,
297  Large,
298  Size32,
299 };
300 
301 enum class WindowStateState {
302  NONE = 0x0000,
303  Normal = 0x0001,
304  Minimized = 0x0002,
305  Maximized = 0x0004,
306  Rollup = 0x0008,
307  MaximizedHorz = 0x0010,
308  MaximizedVert = 0x0020,
309  FullScreen = 0x0040,
310  SystemMask = 0xffff
311 };
312 namespace o3tl
313 {
314  template<> struct typed_flags<WindowStateState> : is_typed_flags<WindowStateState, 0xffff> {};
315 }
316 
317 namespace vcl
318 {
319  enum class ImageType
320  {
321  Size16,
322  Size26,
323  Size32,
324  Small = Size16,
325  LAST = Size32,
326  };
327 }
328 
329 #endif // INCLUDED_VCL_VCLENUM_HXX
330 
331 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
STRING
bool operator!=(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:208
MenuItemType
Definition: vclenum.hxx:30
ExtTimeFieldFormat
Definition: vclenum.hxx:148
ToolBoxButtonSize
Definition: vclenum.hxx:293
TimeFieldFormat
Definition: vclenum.hxx:28
sal_uInt32 sal_UCS4
Definition: vclenum.hxx:193
VclButtonsType
Definition: vclenum.hxx:243
double xy
Definition: vclenum.hxx:199
SelectionMode
Definition: vclenum.hxx:26
ButtonType
Definition: vclenum.hxx:71
ToolBoxItemType
Definition: vclenum.hxx:69
OutDevSupportType
Definition: vclenum.hxx:195
MenuItemBits
Definition: vclenum.hxx:32
WizardButtonFlags
Definition: vclenum.hxx:276
TimeFormat
Definition: vclenum.hxx:143
SymbolType
Definition: vclenum.hxx:73
LineStyle
Definition: vclenum.hxx:183
RasterOp
Definition: vclenum.hxx:191
VclSizeGroupMode
Definition: vclenum.hxx:261
WindowStateMask
Definition: vclenum.hxx:123
GradientStyle
VclMessageType
Definition: vclenum.hxx:253
VclPolicyType
Definition: vclenum.hxx:269
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:203
ToolBoxItemBits
Definition: vclenum.hxx:50
VclPackType
Definition: vclenum.hxx:221
ImageType
Definition: vclenum.hxx:319
VclResponseType
!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
Definition: vclenum.hxx:231
double xx
Definition: vclenum.hxx:199
ExtDateFieldFormat
Definition: vclenum.hxx:153
State
#define SAL_MAX_ENUM
double yx
Definition: vclenum.hxx:199
VclAlign
Definition: vclenum.hxx:213
WindowStateState
Definition: vclenum.hxx:301
WindowBorderStyle
Definition: vclenum.hxx:108
HatchStyle
double yy
Definition: vclenum.hxx:199