Line data Source code
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 _VCL_VCLENUM_HXX
21 : #define _VCL_VCLENUM_HXX
22 :
23 : #include <sal/types.h>
24 : #include <tools/solar.h>
25 : #include <tools/fontenum.hxx>
26 :
27 : #ifndef ENUM_TIMEFIELDFORMAT_DECLARED
28 : #define ENUM_TIMEFIELDFORMAT_DECLARED
29 :
30 : // By changes you must also change: rsc/vclrsc.hxx
31 : enum TimeFieldFormat {TIMEF_NONE, TIMEF_SEC, TIMEF_100TH_SEC, TIMEF_SEC_CS, TimeFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
32 :
33 : #endif
34 :
35 : // ------------------------------------------------------------
36 :
37 : #ifndef ENUM_EXTTIMEFIELDFORMAT_DECLARED
38 : #define ENUM_EXTTIMEFIELDFORMAT_DECLARED
39 :
40 : enum ExtTimeFieldFormat { EXTTIMEF_24H_SHORT, EXTTIMEF_24H_LONG,
41 : EXTTIMEF_12H_SHORT, EXTTIMEF_12H_LONG,
42 : EXTTIMEF_DURATION_SHORT, EXTTIMEF_DURATION_LONG };
43 :
44 : #endif
45 :
46 : // ------------------------------------------------------------
47 :
48 : #ifndef ENUM_EXTDATEFIELDFORMAT_DECLARED
49 : #define ENUM_EXTDATEFIELDFORMAT_DECLARED
50 :
51 : enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF_SYSTEM_SHORT_YYYY,
52 : XTDATEF_SYSTEM_LONG,
53 : XTDATEF_SHORT_DDMMYY, XTDATEF_SHORT_MMDDYY, XTDATEF_SHORT_YYMMDD,
54 : XTDATEF_SHORT_DDMMYYYY, XTDATEF_SHORT_MMDDYYYY, XTDATEF_SHORT_YYYYMMDD,
55 : XTDATEF_SHORT_YYMMDD_DIN5008, XTDATEF_SHORT_YYYYMMDD_DIN5008, ExtDateFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
56 :
57 : #endif
58 :
59 : // ------------------------------------------------------------
60 :
61 : enum GradientStyle
62 : {
63 : GradientStyle_LINEAR = 0,
64 : GradientStyle_AXIAL = 1,
65 : GradientStyle_RADIAL = 2,
66 : GradientStyle_ELLIPTICAL = 3,
67 : GradientStyle_SQUARE = 4,
68 : GradientStyle_RECT = 5,
69 : GradientStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
70 : };
71 :
72 : // ------------------------------------------------------------
73 :
74 : // to avoid conflicts with enum's declared otherwise
75 : #define HATCH_SINGLE HatchStyle_SINGLE
76 : #define HATCH_DOUBLE HatchStyle_DOUBLE
77 : #define HATCH_TRIPLE HatchStyle_TRIPLE
78 : #define HATCH_FORCE_EQUAL_SIZE HatchStyle_FORCE_EQUAL_SIZE
79 :
80 : #ifndef ENUM_HATCHSTYLE_DECLARED
81 : #define ENUM_HATCHSTYLE_DECLARED
82 :
83 : enum HatchStyle
84 : {
85 : HATCH_SINGLE = 0,
86 : HATCH_DOUBLE = 1,
87 : HATCH_TRIPLE = 2,
88 : HatchStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
89 : };
90 :
91 : #endif
92 :
93 : // ------------------------------------------------------------
94 :
95 : // to avoid conflicts with enum's declared otherwise
96 : #define LINE_NONE LineStyle_NONE
97 : #define LINE_SOLID LineStyle_SOLID
98 : #define LINE_DASH LineStyle_DASH
99 : #define LINE_FORCE_EQUAL_SIZE LineStyle_FORCE_EQUAL_SIZE
100 :
101 : #ifndef ENUM_LINESTYLE_DECLARED
102 : #define ENUM_LINESTYLE_DECLARED
103 :
104 : enum LineStyle
105 : {
106 : LINE_NONE = 0,
107 : LINE_SOLID = 1,
108 : LINE_DASH = 2,
109 : LineStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
110 : };
111 :
112 : #endif
113 :
114 : // ------------------------------------------------------------
115 :
116 : #ifndef ENUM_RASTEROP_DECLARED
117 : #define ENUM_RASTEROP_DECLARED
118 :
119 : enum RasterOp { ROP_OVERPAINT, ROP_XOR, ROP_0, ROP_1, ROP_INVERT };
120 :
121 : #endif
122 :
123 : // ------------------------------------------------------------
124 :
125 :
126 : #ifndef ENUM_FONTAUTOHINT_DECLARED
127 : #define ENUM_FONTAUTOHINT_DECLARED
128 :
129 : enum FontAutoHint { AUTOHINT_DONTKNOW, AUTOHINT_FALSE, AUTOHINT_TRUE };
130 :
131 : #endif
132 :
133 : #ifndef ENUM_FONTHINTING_DECLARED
134 : #define ENUM_FONTHINTING_DECLARED
135 :
136 : enum FontHinting { HINTING_DONTKNOW, HINTING_FALSE, HINTING_TRUE };
137 :
138 : #endif
139 :
140 : #ifndef ENUM_FONTHINTSTYLE_DECLARED
141 : #define ENUM_FONTHINTSTYLE_DECLARED
142 :
143 : enum FontHintStyle { HINT_NONE, HINT_SLIGHT, HINT_MEDIUM, HINT_FULL };
144 :
145 : #endif
146 :
147 : // ------------------------------------------------------------
148 :
149 : #ifndef ENUM_KEYFUNCTYPE_DECLARED
150 : #define ENUM_KEYFUNCTYPE_DECLARED
151 :
152 : enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE,
153 : KEYFUNC_SAVEAS, KEYFUNC_PRINT, KEYFUNC_CLOSE, KEYFUNC_QUIT,
154 : KEYFUNC_CUT, KEYFUNC_COPY, KEYFUNC_PASTE, KEYFUNC_UNDO,
155 : KEYFUNC_REDO, KEYFUNC_DELETE, KEYFUNC_REPEAT, KEYFUNC_FIND,
156 : KEYFUNC_FINDBACKWARD, KEYFUNC_PROPERTIES, KEYFUNC_FRONT,
157 : KeyFuncType_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
158 :
159 : #endif
160 :
161 : typedef sal_uInt32 sal_UCS4; // TODO: this should be moved to rtl
162 :
163 : #ifndef ENUM_OUTDEVSUPPORT_DECLARED
164 : #define ENUM_OUTDEVSUPPORT_DECLARED
165 :
166 : enum OutDevSupportType { OutDevSupport_TransparentRect, OutDevSupport_B2DClip, OutDevSupport_B2DDraw };
167 :
168 : #endif
169 :
170 : struct ItalicMatrix
171 : {
172 : double xx, xy, yx, yy;
173 70277 : ItalicMatrix() : xx(1), xy(0), yx(0), yy(1) {}
174 : };
175 :
176 : inline bool operator ==(const ItalicMatrix& a, const ItalicMatrix& b)
177 : {
178 : return a.xx == b.xx && a.xy == b.xy && a.yx == b.yx && a.yy == b.yy;
179 : }
180 :
181 121738 : inline bool operator !=(const ItalicMatrix& a, const ItalicMatrix& b)
182 : {
183 121738 : return a.xx != b.xx || a.xy != b.xy || a.yx != b.yx || a.yy != b.yy;
184 : }
185 :
186 : enum VclAlign
187 : {
188 : VCL_ALIGN_FILL,
189 : VCL_ALIGN_START,
190 : VCL_ALIGN_END,
191 : VCL_ALIGN_CENTER
192 : };
193 :
194 : enum VclPackType
195 : {
196 : VCL_PACK_START = 0,
197 : VCL_PACK_END = 1
198 : };
199 :
200 : #endif // _VCL_VCLENUM_HXX
201 :
202 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|