1 #ifndef __SP_ATTRIBUTES_H__
2 #define __SP_ATTRIBUTES_H__
4 /** \file
5 * Lookup dictionary for attributes/properties.
6 */
7 /*
8 * Author:
9 * Lauris Kaplinski <lauris@kaplinski.com>
10 *
11 * Copyright (C) 2002 Lauris Kaplinski
12 *
13 * Released under GNU GPL, read the file 'COPYING' for more information
14 */
15 #include <glib/gtypes.h>
16 #include <glib/gmessages.h>
18 unsigned int sp_attribute_lookup(gchar const *key);
19 unsigned char const *sp_attribute_name(unsigned int id);
21 /**
22 * True iff k is a property in SVG, i.e. something that can be written either in a style attribute
23 * or as its own XML attribute.
24 */
25 #define SP_ATTRIBUTE_IS_CSS(k) (((k) >= SP_PROP_FONT) && ((k) <= SP_PROP_TEXT_RENDERING))
27 enum SPAttributeEnum {
28 SP_ATTR_INVALID, ///< Must have value 0.
29 /* SPObject */
30 SP_ATTR_ID,
31 SP_ATTR_INKSCAPE_COLLECT,
32 SP_ATTR_INKSCAPE_LABEL,
33 /* SPItem */
34 SP_ATTR_TRANSFORM,
35 SP_ATTR_SODIPODI_INSENSITIVE,
36 SP_ATTR_SODIPODI_NONPRINTABLE,
37 SP_ATTR_CONNECTOR_AVOID,
38 SP_ATTR_STYLE,
39 SP_ATTR_TRANSFORM_CENTER_X,
40 SP_ATTR_TRANSFORM_CENTER_Y,
41 /* SPAnchor */
42 SP_ATTR_XLINK_HREF,
43 SP_ATTR_XLINK_TYPE,
44 SP_ATTR_XLINK_ROLE,
45 SP_ATTR_XLINK_ARCROLE,
46 SP_ATTR_XLINK_TITLE,
47 SP_ATTR_XLINK_SHOW,
48 SP_ATTR_XLINK_ACTUATE,
49 SP_ATTR_TARGET,
50 /* SPGroup */
51 SP_ATTR_INKSCAPE_GROUPMODE,
52 /* SPRoot */
53 SP_ATTR_VERSION,
54 SP_ATTR_WIDTH,
55 SP_ATTR_HEIGHT,
56 SP_ATTR_VIEWBOX,
57 SP_ATTR_PRESERVEASPECTRATIO,
58 SP_ATTR_SODIPODI_VERSION,
59 SP_ATTR_INKSCAPE_VERSION,
60 /* SPNamedView */
61 SP_ATTR_VIEWONLY,
62 SP_ATTR_SHOWGRID,
63 SP_ATTR_SHOWGUIDES,
64 SP_ATTR_GRIDTOLERANCE,
65 SP_ATTR_GUIDETOLERANCE,
66 SP_ATTR_OBJECTTOLERANCE,
67 SP_ATTR_ABS_TOLERANCE,
68 SP_ATTR_GRIDORIGINX,
69 SP_ATTR_GRIDORIGINY,
70 SP_ATTR_GRIDSPACINGX,
71 SP_ATTR_GRIDSPACINGY,
72 SP_ATTR_GRIDCOLOR,
73 SP_ATTR_GRIDOPACITY,
74 SP_ATTR_GRIDEMPCOLOR,
75 SP_ATTR_GRIDEMPOPACITY,
76 SP_ATTR_GRIDEMPSPACING,
77 SP_ATTR_GUIDECOLOR,
78 SP_ATTR_GUIDEOPACITY,
79 SP_ATTR_GUIDEHICOLOR,
80 SP_ATTR_GUIDEHIOPACITY,
81 SP_ATTR_SHOWBORDER,
82 SP_ATTR_SHOWPAGESHADOW,
83 SP_ATTR_BORDERLAYER,
84 SP_ATTR_BORDERCOLOR,
85 SP_ATTR_BORDEROPACITY,
86 SP_ATTR_PAGECOLOR,
87 SP_ATTR_INKSCAPE_PAGEOPACITY,
88 SP_ATTR_INKSCAPE_PAGESHADOW,
89 SP_ATTR_INKSCAPE_ZOOM,
90 SP_ATTR_INKSCAPE_CX,
91 SP_ATTR_INKSCAPE_CY,
92 SP_ATTR_INKSCAPE_WINDOW_WIDTH,
93 SP_ATTR_INKSCAPE_WINDOW_HEIGHT,
94 SP_ATTR_INKSCAPE_WINDOW_X,
95 SP_ATTR_INKSCAPE_WINDOW_Y,
96 SP_ATTR_INKSCAPE_GRID_BBOX,
97 SP_ATTR_INKSCAPE_GUIDE_BBOX,
98 SP_ATTR_INKSCAPE_OBJECT_BBOX,
99 SP_ATTR_INKSCAPE_GRID_POINTS,
100 SP_ATTR_INKSCAPE_GUIDE_POINTS,
101 SP_ATTR_INKSCAPE_OBJECT_POINTS,
102 SP_ATTR_INKSCAPE_OBJECT_PATHS,
103 SP_ATTR_INKSCAPE_OBJECT_NODES,
104 SP_ATTR_INKSCAPE_CURRENT_LAYER,
105 SP_ATTR_INKSCAPE_DOCUMENT_UNITS,
106 SP_ATTR_INKSCAPE_CONNECTOR_SPACING,
107 /* SPColorProfile */
108 SP_ATTR_LOCAL,
109 SP_ATTR_NAME,
110 SP_ATTR_RENDERING_INTENT,
111 /* SPGuide */
112 SP_ATTR_ORIENTATION,
113 SP_ATTR_POSITION,
114 /* SPImage */
115 SP_ATTR_X,
116 SP_ATTR_Y,
117 /* SPPath */
118 SP_ATTR_D,
119 SP_ATTR_CONNECTOR_TYPE,
120 SP_ATTR_CONNECTION_START,
121 SP_ATTR_CONNECTION_END,
122 /* SPRect */
123 SP_ATTR_RX,
124 SP_ATTR_RY,
125 /* SPEllipse */
126 SP_ATTR_R,
127 SP_ATTR_CX,
128 SP_ATTR_CY,
129 SP_ATTR_SODIPODI_CX,
130 SP_ATTR_SODIPODI_CY,
131 SP_ATTR_SODIPODI_RX,
132 SP_ATTR_SODIPODI_RY,
133 SP_ATTR_SODIPODI_START,
134 SP_ATTR_SODIPODI_END,
135 SP_ATTR_SODIPODI_OPEN,
136 /* SPStar */
137 SP_ATTR_SODIPODI_SIDES,
138 SP_ATTR_SODIPODI_R1,
139 SP_ATTR_SODIPODI_R2,
140 SP_ATTR_SODIPODI_ARG1,
141 SP_ATTR_SODIPODI_ARG2,
142 SP_ATTR_INKSCAPE_FLATSIDED,
143 SP_ATTR_INKSCAPE_ROUNDED,
144 SP_ATTR_INKSCAPE_RANDOMIZED,
145 /* SPSpiral */
146 SP_ATTR_SODIPODI_EXPANSION,
147 SP_ATTR_SODIPODI_REVOLUTION,
148 SP_ATTR_SODIPODI_RADIUS,
149 SP_ATTR_SODIPODI_ARGUMENT,
150 SP_ATTR_SODIPODI_T0,
151 /* SPOffset */
152 SP_ATTR_SODIPODI_ORIGINAL,
153 SP_ATTR_INKSCAPE_ORIGINAL,
154 SP_ATTR_INKSCAPE_HREF,
155 SP_ATTR_INKSCAPE_RADIUS,
156 /* SPLine */
157 SP_ATTR_X1,
158 SP_ATTR_Y1,
159 SP_ATTR_X2,
160 SP_ATTR_Y2,
161 /* SPPolyline */
162 SP_ATTR_POINTS,
163 /* SPTSpan */
164 SP_ATTR_DX,
165 SP_ATTR_DY,
166 SP_ATTR_ROTATE,
167 SP_ATTR_SODIPODI_ROLE,
168 /* SPText */
169 SP_ATTR_SODIPODI_LINESPACING,
170 /* SPTextPath */
171 SP_ATTR_STARTOFFSET,
172 /* SPStop */
173 SP_ATTR_OFFSET,
174 /* SPFilter */
175 SP_ATTR_FILTERUNITS,
176 SP_ATTR_PRIMITIVEUNITS,
177 SP_ATTR_FILTERRES,
178 /* SPGaussianBlur */
179 SP_ATTR_STDDEVIATION,
180 /* SPGradient */
181 SP_ATTR_GRADIENTUNITS,
182 SP_ATTR_GRADIENTTRANSFORM,
183 SP_ATTR_SPREADMETHOD,
184 /* SPRadialGradient */
185 SP_ATTR_FX,
186 SP_ATTR_FY,
187 /* SPPattern */
188 SP_ATTR_PATTERNUNITS,
189 SP_ATTR_PATTERNCONTENTUNITS,
190 SP_ATTR_PATTERNTRANSFORM,
191 /* SPClipPath */
192 SP_ATTR_CLIPPATHUNITS,
193 /* SPMask */
194 SP_ATTR_MASKUNITS,
195 SP_ATTR_MASKCONTENTUNITS,
196 /* SPMarker */
197 SP_ATTR_MARKERUNITS,
198 SP_ATTR_REFX,
199 SP_ATTR_REFY,
200 SP_ATTR_MARKERWIDTH,
201 SP_ATTR_MARKERHEIGHT,
202 SP_ATTR_ORIENT,
203 /* SPStyleElem */
204 SP_ATTR_TYPE,
205 /* Animations */
206 SP_ATTR_ATTRIBUTENAME,
207 SP_ATTR_ATTRIBUTETYPE,
208 SP_ATTR_BEGIN,
209 SP_ATTR_DUR,
210 SP_ATTR_END,
211 SP_ATTR_MIN,
212 SP_ATTR_MAX,
213 SP_ATTR_RESTART,
214 SP_ATTR_REPEATCOUNT,
215 SP_ATTR_REPEATDUR,
216 /* Interpolating animations */
217 SP_ATTR_CALCMODE,
218 SP_ATTR_VALUES,
219 SP_ATTR_KEYTIMES,
220 SP_ATTR_KEYSPLINES,
221 SP_ATTR_FROM,
222 SP_ATTR_TO,
223 SP_ATTR_BY,
224 SP_ATTR_ADDITIVE,
225 SP_ATTR_ACCUMULATE,
227 /* XML */
228 SP_ATTR_XML_SPACE,
230 /* typeset */
231 SP_ATTR_TEXT_NOMARKUP,
232 SP_ATTR_TEXT_PANGOMARKUP,
233 SP_ATTR_TEXT_INSHAPE,
234 SP_ATTR_TEXT_ONPATH,
235 SP_ATTR_TEXT_INBOX,
236 SP_ATTR_TEXT_INCOLUMN,
237 SP_ATTR_TEXT_EXCLUDE,
238 SP_ATTR_LAYOUT_OPTIONS,
240 /* CSS2 */
241 /* Font */
242 SP_PROP_FONT,
243 SP_PROP_FONT_FAMILY,
244 SP_PROP_FONT_SIZE,
245 SP_PROP_FONT_SIZE_ADJUST,
246 SP_PROP_FONT_STRETCH,
247 SP_PROP_FONT_STYLE,
248 SP_PROP_FONT_VARIANT,
249 SP_PROP_FONT_WEIGHT,
250 /* Text */
251 SP_PROP_TEXT_INDENT,
252 SP_PROP_TEXT_ALIGN,
253 SP_PROP_TEXT_DECORATION,
254 SP_PROP_LINE_HEIGHT,
255 SP_PROP_LETTER_SPACING,
256 SP_PROP_WORD_SPACING,
257 SP_PROP_TEXT_TRANSFORM,
258 /* text (css3) */
259 SP_PROP_DIRECTION,
260 SP_PROP_BLOCK_PROGRESSION,
261 SP_PROP_WRITING_MODE,
262 SP_PROP_UNICODE_BIDI,
263 SP_PROP_ALIGNMENT_BASELINE,
264 SP_PROP_BASELINE_SHIFT,
265 SP_PROP_DOMINANT_BASELINE,
266 SP_PROP_GLYPH_ORIENTATION_HORIZONTAL,
267 SP_PROP_GLYPH_ORIENTATION_VERTICAL,
268 SP_PROP_KERNING,
269 SP_PROP_TEXT_ANCHOR,
270 /* Misc */
271 SP_PROP_CLIP,
272 SP_PROP_COLOR,
273 SP_PROP_CURSOR,
274 SP_PROP_DISPLAY,
275 SP_PROP_OVERFLOW,
276 SP_PROP_VISIBILITY,
277 /* SVG */
278 /* Clip/Mask */
279 SP_PROP_CLIP_PATH,
280 SP_PROP_CLIP_RULE,
281 SP_PROP_MASK,
282 SP_PROP_OPACITY,
283 /* Filter */
284 SP_PROP_ENABLE_BACKGROUND,
285 SP_PROP_FILTER,
286 SP_PROP_FLOOD_COLOR,
287 SP_PROP_FLOOD_OPACITY,
288 SP_PROP_LIGHTING_COLOR,
289 /* Gradient */
290 SP_PROP_STOP_COLOR,
291 SP_PROP_STOP_OPACITY,
292 /* Interactivity */
293 SP_PROP_POINTER_EVENTS,
294 /* Paint */
295 SP_PROP_COLOR_INTERPOLATION,
296 SP_PROP_COLOR_INTERPOLATION_FILTERS,
297 SP_PROP_COLOR_PROFILE,
298 SP_PROP_COLOR_RENDERING,
299 SP_PROP_FILL,
300 SP_PROP_FILL_OPACITY,
301 SP_PROP_FILL_RULE,
302 SP_PROP_IMAGE_RENDERING,
303 SP_PROP_MARKER,
304 SP_PROP_MARKER_END,
305 SP_PROP_MARKER_MID,
306 SP_PROP_MARKER_START,
307 SP_PROP_SHAPE_RENDERING,
308 SP_PROP_STROKE,
309 SP_PROP_STROKE_DASHARRAY,
310 SP_PROP_STROKE_DASHOFFSET,
311 SP_PROP_STROKE_LINECAP,
312 SP_PROP_STROKE_LINEJOIN,
313 SP_PROP_STROKE_MITERLIMIT,
314 SP_PROP_STROKE_OPACITY,
315 SP_PROP_STROKE_WIDTH,
316 SP_PROP_TEXT_RENDERING,
317 /* Conditional */
318 SP_PROP_SYSTEM_LANGUAGE,
319 SP_PROP_REQUIRED_FEATURES,
320 SP_PROP_REQUIRED_EXTENSIONS,
321 };
323 #endif
326 /*
327 Local Variables:
328 mode:c++
329 c-file-style:"stroustrup"
330 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
331 indent-tabs-mode:nil
332 fill-column:99
333 End:
334 */
335 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :