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 };
263 
265 {
266  NONE,
267  Horizontal,
268  Vertical,
269  Both
270 };
271 
272 enum class VclPolicyType
273 {
274  ALWAYS,
275  AUTOMATIC,
276  NEVER
277 };
278 
279 enum class WizardButtonFlags : sal_Int16
280 {
281  NONE = 0x0000,
282  NEXT = 0x0001,
283  PREVIOUS = 0x0002,
284  FINISH = 0x0004,
285  CANCEL = 0x0008,
286  HELP = 0x0010,
287 };
288 
289 namespace o3tl
290 {
291  template<> struct typed_flags<WizardButtonFlags> : is_typed_flags<WizardButtonFlags, 0x001f> {};
292 }
293 
294 // small, large, size32 force an exact toolbox size for proper alignment
295 // DontCare will let the toolbox decide about its size
297 {
298  DontCare,
299  Small,
300  Large,
301  Size32,
302 };
303 
304 enum class WindowStateState {
305  NONE = 0x0000,
306  Normal = 0x0001,
307  Minimized = 0x0002,
308  Maximized = 0x0004,
309  Rollup = 0x0008,
310  MaximizedHorz = 0x0010,
311  MaximizedVert = 0x0020,
312  FullScreen = 0x0040,
313  SystemMask = 0xffff
314 };
315 namespace o3tl
316 {
317  template<> struct typed_flags<WindowStateState> : is_typed_flags<WindowStateState, 0xffff> {};
318 }
319 
320 namespace vcl
321 {
322  enum class ImageType
323  {
324  Size16,
325  Size26,
326  Size32,
327  Small = Size16,
328  LAST = Size32,
329  };
330 }
331 
332 enum class DrawFrameStyle
333 {
334  NONE = 0x0000,
335  In = 0x0001,
336  Out = 0x0002,
337  Group = 0x0003,
338  DoubleIn = 0x0004,
339  DoubleOut = 0x0005,
340  NWF = 0x0006,
341 };
342 
343 #endif // INCLUDED_VCL_VCLENUM_HXX
344 
345 /* 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:296
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:279
TimeFormat
Definition: vclenum.hxx:143
SymbolType
Definition: vclenum.hxx:73
LineStyle
Definition: vclenum.hxx:186
RasterOp
Definition: vclenum.hxx:194
VclSizeGroupMode
Definition: vclenum.hxx:264
WindowStateMask
Definition: vclenum.hxx:123
GradientStyle
VclMessageType
Definition: vclenum.hxx:256
VclPolicyType
Definition: vclenum.hxx:272
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:322
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:332
ExtDateFieldFormat
Definition: vclenum.hxx:156
State
#define SAL_MAX_ENUM
double yx
Definition: vclenum.hxx:202
VclAlign
Definition: vclenum.hxx:216
WindowStateState
Definition: vclenum.hxx:304
WindowBorderStyle
Definition: vclenum.hxx:108
HatchStyle
double yy
Definition: vclenum.hxx:202