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  Short24H, Long24H,
152  Short12H, Long12H,
154 };
155 
157 {
159  SystemLong,
164 };
165 
166 // this appears to be a direct copy of css::awt::GradientStyle
167 enum class GradientStyle
168 {
169  Linear = 0,
170  Axial = 1,
171  Radial = 2,
172  Elliptical = 3,
173  Square = 4,
174  Rect = 5,
176 };
177 
178 enum class HatchStyle
179 {
180  Single = 0,
181  Double = 1,
182  Triple = 2,
184 };
185 
186 enum class LineStyle
187 {
188  NONE = 0,
189  Solid = 1,
190  Dash = 2,
192 };
193 
194 enum class RasterOp { OverPaint, Xor, N0, N1, Invert };
195 
196 typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
197 
199 
201 {
202  double xx, xy, yx, yy;
203  ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
204 };
205 
206 inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
207 {
208  return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
209 }
210 
211 inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
212 {
213  return !(a == b);
214 }
215 
216 enum class VclAlign
217 {
218  Fill,
219  Start,
220  End,
221  Center
222 };
223 
224 enum class VclPackType
225 {
226  Start = 0,
227  End = 1,
228  LAST = End
229 };
230 
231 // Return Values from Dialog::Execute
233 
235 {
237  RET_OK = 1,
238  RET_YES = 2,
239  RET_NO = 3,
243  RET_HELP = 10
244 };
245 
246 enum class VclButtonsType
247 {
248  NONE,
249  Ok,
250  Close,
251  Cancel,
252  YesNo,
253  OkCancel
254 };
255 
256 enum class VclMessageType
257 {
258  Info,
259  Warning,
260  Question,
261  Error,
262  Other
263 };
264 
266 {
267  NONE,
268  Horizontal,
269  Vertical,
270  Both
271 };
272 
273 enum class VclPolicyType
274 {
275  ALWAYS,
276  AUTOMATIC,
277  NEVER
278 };
279 
280 enum class WizardButtonFlags : sal_Int16
281 {
282  NONE = 0x0000,
283  NEXT = 0x0001,
284  PREVIOUS = 0x0002,
285  FINISH = 0x0004,
286  CANCEL = 0x0008,
287  HELP = 0x0010,
288 };
289 
290 namespace o3tl
291 {
292  template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
293 }
294 
295 // small, large, size32 force an exact toolbox size for proper alignment
296 // DontCare will let the toolbox decide about its size
298 {
299  DontCare,
300  Small,
301  Large,
302  Size32,
303 };
304 
305 enum class WindowStateState {
306  NONE = 0x0000,
307  Normal = 0x0001,
308  Minimized = 0x0002,
309  Maximized = 0x0004,
310  Rollup = 0x0008,
311  MaximizedHorz = 0x0010,
312  MaximizedVert = 0x0020,
313  FullScreen = 0x0040,
314  SystemMask = 0xffff
315 };
316 namespace o3tl
317 {
318  template<> struct typed_flags<WindowStateState> : is_typed_flags<WindowStateState, 0xffff> {};
319 }
320 
321 namespace vcl
322 {
323  // The exact sizes of the icons in each size grouping are not necessarily
324  // the exact size indicated by the name, but the upper limit of their size.
325  // e.g. many Size26 icons are often 24x24px and only some 26x26px
326  enum class ImageType
327  {
328  Size16,
329  Size26,
330  Size32,
331  Small = Size16,
332  LAST = Size32,
333  };
334 }
335 
336 enum class DrawFrameStyle
337 {
338  NONE = 0x0000,
339  In = 0x0001,
340  Out = 0x0002,
341  Group = 0x0003,
342  DoubleIn = 0x0004,
343  DoubleOut = 0x0005,
344  NWF = 0x0006,
345 };
346 
347 // Flags for DrawFrame()
348 enum class DrawFrameFlags
349 {
350  NONE = 0x0000,
351  Menu = 0x0010,
352  WindowBorder = 0x0020,
353  BorderWindowBorder = 0x0040,
354  Mono = 0x1000,
355  NoDraw = 0x8000,
356 };
357 namespace o3tl
358 {
359  template<> struct typed_flags<DrawFrameFlags> : is_typed_flags<DrawFrameFlags, 0x9070> {};
360 }
361 
362 enum class TxtAlign
363 {
364  Left,
365  Center,
366  Right
367 };
368 
369 #endif // INCLUDED_VCL_VCLENUM_HXX
370 
371 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
STRING
Group
bool operator!=(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:211
MenuItemType
Definition: vclenum.hxx:30
ExtTimeFieldFormat
Definition: vclenum.hxx:148
ToolBoxButtonSize
Definition: vclenum.hxx:297
TimeFieldFormat
Definition: vclenum.hxx:28
sal_uInt32 sal_UCS4
Definition: vclenum.hxx:196
VclButtonsType
Definition: vclenum.hxx:246
double xy
Definition: vclenum.hxx:202
the first 4 of these are only used by base/dbaccess
SelectionMode
Definition: vclenum.hxx:26
ButtonType
Definition: vclenum.hxx:71
ToolBoxItemType
Definition: vclenum.hxx:69
OutDevSupportType
Definition: vclenum.hxx:198
MenuItemBits
Definition: vclenum.hxx:32
WizardButtonFlags
Definition: vclenum.hxx:280
TimeFormat
Definition: vclenum.hxx:143
SymbolType
Definition: vclenum.hxx:73
LineStyle
Definition: vclenum.hxx:186
RasterOp
Definition: vclenum.hxx:194
VclSizeGroupMode
Definition: vclenum.hxx:265
WindowStateMask
Definition: vclenum.hxx:123
GradientStyle
VclMessageType
Definition: vclenum.hxx:256
VclPolicyType
Definition: vclenum.hxx:273
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:206
ToolBoxItemBits
Definition: vclenum.hxx:50
VclPackType
Definition: vclenum.hxx:224
ImageType
Definition: vclenum.hxx:326
VclResponseType
!! in case of changes adjust /basic/source/runtime/methods.cxx msgbox
Definition: vclenum.hxx:234
double xx
Definition: vclenum.hxx:202
DrawFrameStyle
Definition: vclenum.hxx:336
ExtDateFieldFormat
Definition: vclenum.hxx:156
Definition: menu.hxx:118
State
#define SAL_MAX_ENUM
TxtAlign
Definition: vclenum.hxx:362
double yx
Definition: vclenum.hxx:202
VclAlign
Definition: vclenum.hxx:216
WindowStateState
Definition: vclenum.hxx:305
WindowBorderStyle
Definition: vclenum.hxx:108
DrawFrameFlags
Definition: vclenum.hxx:348
HatchStyle
double yy
Definition: vclenum.hxx:202