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) 2006 Johan Engelen <johan@shouraizou.nl>
12 * Copyright (C) 2002 Lauris Kaplinski
13 *
14 * Released under GNU GPL, read the file 'COPYING' for more information
15 */
16 #include <glib/gtypes.h>
17 #include <glib/gmessages.h>
19 unsigned int sp_attribute_lookup(gchar const *key);
20 unsigned char const *sp_attribute_name(unsigned int id);
22 /**
23 * True iff k is a property in SVG, i.e. something that can be written either in a style attribute
24 * or as its own XML attribute.
25 */
26 #define SP_ATTRIBUTE_IS_CSS(k) (((k) >= SP_PROP_INKSCAPE_FONT_SPEC) && ((k) <= SP_PROP_TEXT_RENDERING))
28 enum SPAttributeEnum {
29 SP_ATTR_INVALID, ///< Must have value 0.
30 /* SPObject */
31 SP_ATTR_ID,
32 SP_ATTR_INKSCAPE_COLLECT,
33 SP_ATTR_INKSCAPE_LABEL,
34 /* SPItem */
35 SP_ATTR_TRANSFORM,
36 SP_ATTR_SODIPODI_INSENSITIVE,
37 SP_ATTR_SODIPODI_NONPRINTABLE,
38 SP_ATTR_CONNECTOR_AVOID,
39 SP_ATTR_STYLE,
40 SP_ATTR_TRANSFORM_CENTER_X,
41 SP_ATTR_TRANSFORM_CENTER_Y,
42 SP_ATTR_INKSCAPE_PATH_EFFECT,
43 /* SPAnchor */
44 SP_ATTR_XLINK_HREF,
45 SP_ATTR_XLINK_TYPE,
46 SP_ATTR_XLINK_ROLE,
47 SP_ATTR_XLINK_ARCROLE,
48 SP_ATTR_XLINK_TITLE,
49 SP_ATTR_XLINK_SHOW,
50 SP_ATTR_XLINK_ACTUATE,
51 SP_ATTR_TARGET,
52 /* SPGroup */
53 SP_ATTR_INKSCAPE_GROUPMODE,
54 /* SPRoot */
55 SP_ATTR_VERSION,
56 SP_ATTR_WIDTH,
57 SP_ATTR_HEIGHT,
58 SP_ATTR_VIEWBOX,
59 SP_ATTR_PRESERVEASPECTRATIO,
60 SP_ATTR_SODIPODI_VERSION,
61 SP_ATTR_INKSCAPE_VERSION,
62 SP_ATTR_ONLOAD,
63 /* SPNamedView */
64 SP_ATTR_VIEWONLY,
65 SP_ATTR_SHOWGUIDES,
66 SP_ATTR_SHOWGRIDS,
67 SP_ATTR_GRIDTOLERANCE,
68 SP_ATTR_GUIDETOLERANCE,
69 SP_ATTR_OBJECTTOLERANCE,
70 SP_ATTR_GUIDECOLOR,
71 SP_ATTR_GUIDEOPACITY,
72 SP_ATTR_GUIDEHICOLOR,
73 SP_ATTR_GUIDEHIOPACITY,
74 SP_ATTR_SHOWBORDER,
75 SP_ATTR_SHOWPAGESHADOW,
76 SP_ATTR_BORDERLAYER,
77 SP_ATTR_BORDERCOLOR,
78 SP_ATTR_BORDEROPACITY,
79 SP_ATTR_PAGECOLOR,
80 SP_ATTR_INKSCAPE_PAGEOPACITY,
81 SP_ATTR_INKSCAPE_PAGESHADOW,
82 SP_ATTR_INKSCAPE_ZOOM,
83 SP_ATTR_INKSCAPE_CX,
84 SP_ATTR_INKSCAPE_CY,
85 SP_ATTR_INKSCAPE_WINDOW_WIDTH,
86 SP_ATTR_INKSCAPE_WINDOW_HEIGHT,
87 SP_ATTR_INKSCAPE_WINDOW_X,
88 SP_ATTR_INKSCAPE_WINDOW_Y,
89 SP_ATTR_INKSCAPE_SNAP_GLOBAL,
90 SP_ATTR_INKSCAPE_SNAP_BBOX,
91 SP_ATTR_INKSCAPE_SNAP_NODES,
92 SP_ATTR_INKSCAPE_SNAP_GUIDE,
93 SP_ATTR_INKSCAPE_SNAP_CENTER,
94 SP_ATTR_INKSCAPE_SNAP_SMOOTH_NODES,
95 SP_ATTR_INKSCAPE_SNAP_LINE_MIDPOINTS,
96 SP_ATTR_INKSCAPE_SNAP_OBJECT_MIDPOINTS,
97 SP_ATTR_INKSCAPE_SNAP_BBOX_EDGE_MIDPOINTS,
98 SP_ATTR_INKSCAPE_SNAP_BBOX_MIDPOINTS,
99 SP_ATTR_INKSCAPE_SNAP_INTERS_GRIDGUIDE,
100 SP_ATTR_INKSCAPE_SNAP_INTERS_PATHS,
101 SP_ATTR_INKSCAPE_OBJECT_PATHS,
102 SP_ATTR_INKSCAPE_OBJECT_NODES,
103 SP_ATTR_INKSCAPE_BBOX_PATHS,
104 SP_ATTR_INKSCAPE_BBOX_NODES,
105 SP_ATTR_INKSCAPE_SNAP_PAGE,
106 SP_ATTR_INKSCAPE_CURRENT_LAYER,
107 SP_ATTR_INKSCAPE_DOCUMENT_UNITS,
108 SP_ATTR_INKSCAPE_CONNECTOR_SPACING,
109 /* SPColorProfile */
110 SP_ATTR_LOCAL,
111 SP_ATTR_NAME,
112 SP_ATTR_RENDERING_INTENT,
113 /* SPGuide */
114 SP_ATTR_ORIENTATION,
115 SP_ATTR_POSITION,
116 /* SPImage */
117 SP_ATTR_X,
118 SP_ATTR_Y,
119 /* SPPath */
120 SP_ATTR_D,
121 SP_ATTR_INKSCAPE_ORIGINAL_D,
122 SP_ATTR_CONNECTOR_TYPE,
123 SP_ATTR_CONNECTION_START,
124 SP_ATTR_CONNECTION_END,
125 /* SPRect */
126 SP_ATTR_RX,
127 SP_ATTR_RY,
128 /* Box3D */
129 SP_ATTR_INKSCAPE_BOX3D_PERSPECTIVE_ID,
130 SP_ATTR_INKSCAPE_BOX3D_CORNER0, // "upper left front" corner (as a point in 3-space)
131 SP_ATTR_INKSCAPE_BOX3D_CORNER7, // "lower right rear" corner (as a point in 3-space)
132 /* Box3DSide */
133 SP_ATTR_INKSCAPE_BOX3D_SIDE_TYPE,
134 /* Persp3D */
135 SP_ATTR_INKSCAPE_PERSP3D,
136 SP_ATTR_INKSCAPE_PERSP3D_VP_X,
137 SP_ATTR_INKSCAPE_PERSP3D_VP_Y,
138 SP_ATTR_INKSCAPE_PERSP3D_VP_Z,
139 SP_ATTR_INKSCAPE_PERSP3D_ORIGIN,
140 /* SPEllipse */
141 SP_ATTR_R,
142 SP_ATTR_CX,
143 SP_ATTR_CY,
144 SP_ATTR_SODIPODI_CX,
145 SP_ATTR_SODIPODI_CY,
146 SP_ATTR_SODIPODI_RX,
147 SP_ATTR_SODIPODI_RY,
148 SP_ATTR_SODIPODI_START,
149 SP_ATTR_SODIPODI_END,
150 SP_ATTR_SODIPODI_OPEN,
151 /* SPStar */
152 SP_ATTR_SODIPODI_SIDES,
153 SP_ATTR_SODIPODI_R1,
154 SP_ATTR_SODIPODI_R2,
155 SP_ATTR_SODIPODI_ARG1,
156 SP_ATTR_SODIPODI_ARG2,
157 SP_ATTR_INKSCAPE_FLATSIDED,
158 SP_ATTR_INKSCAPE_ROUNDED,
159 SP_ATTR_INKSCAPE_RANDOMIZED,
160 /* SPSpiral */
161 SP_ATTR_SODIPODI_EXPANSION,
162 SP_ATTR_SODIPODI_REVOLUTION,
163 SP_ATTR_SODIPODI_RADIUS,
164 SP_ATTR_SODIPODI_ARGUMENT,
165 SP_ATTR_SODIPODI_T0,
166 /* SPOffset */
167 SP_ATTR_SODIPODI_ORIGINAL,
168 SP_ATTR_INKSCAPE_ORIGINAL,
169 SP_ATTR_INKSCAPE_HREF,
170 SP_ATTR_INKSCAPE_RADIUS,
171 /* SPLine */
172 SP_ATTR_X1,
173 SP_ATTR_Y1,
174 SP_ATTR_X2,
175 SP_ATTR_Y2,
176 /* SPPolyline */
177 SP_ATTR_POINTS,
178 /* SPTSpan */
179 SP_ATTR_DX,
180 SP_ATTR_DY,
181 SP_ATTR_ROTATE,
182 SP_ATTR_SODIPODI_ROLE,
183 /* SPText */
184 SP_ATTR_SODIPODI_LINESPACING,
185 /* SPTextPath */
186 SP_ATTR_STARTOFFSET,
187 /* SPStop */
188 SP_ATTR_OFFSET,
189 /* SPFilter */
190 SP_ATTR_FILTERUNITS,
191 SP_ATTR_PRIMITIVEUNITS,
192 SP_ATTR_FILTERRES,
193 /* Filter primitives common */
194 SP_ATTR_IN,
195 SP_ATTR_RESULT,
196 /*feBlend*/
197 SP_ATTR_MODE,
198 SP_ATTR_IN2,
199 /*feColorMatrix*/
200 SP_ATTR_TYPE,
201 SP_ATTR_VALUES,
202 /*feComponentTransfer*/
203 //SP_ATTR_TYPE,
204 SP_ATTR_TABLEVALUES,
205 SP_ATTR_SLOPE,
206 SP_ATTR_INTERCEPT,
207 SP_ATTR_AMPLITUDE,
208 SP_ATTR_EXPONENT,
209 //SP_ATTR_OFFSET,
210 /*feComposite*/
211 SP_ATTR_OPERATOR,
212 SP_ATTR_K1,
213 SP_ATTR_K2,
214 SP_ATTR_K3,
215 SP_ATTR_K4,
216 //SP_ATTR_IN2,
217 /*feConvolveMatrix*/
218 SP_ATTR_ORDER,
219 SP_ATTR_KERNELMATRIX,
220 SP_ATTR_DIVISOR,
221 SP_ATTR_BIAS,
222 SP_ATTR_TARGETX,
223 SP_ATTR_TARGETY,
224 SP_ATTR_EDGEMODE,
225 SP_ATTR_KERNELUNITLENGTH,
226 SP_ATTR_PRESERVEALPHA,
227 /*feDiffuseLighting*/
228 SP_ATTR_SURFACESCALE,
229 SP_ATTR_DIFFUSECONSTANT,
230 //SP_ATTR_KERNELUNITLENGTH,
231 /*feDisplacementMap*/
232 SP_ATTR_SCALE,
233 SP_ATTR_XCHANNELSELECTOR,
234 SP_ATTR_YCHANNELSELECTOR,
235 //SP_ATTR_IN2,
236 /*feDistantLight*/
237 SP_ATTR_AZIMUTH,
238 SP_ATTR_ELEVATION,
239 /*fePointLight*/
240 SP_ATTR_Z,
241 /*feSpotLight*/
242 SP_ATTR_POINTSATX,
243 SP_ATTR_POINTSATY,
244 SP_ATTR_POINTSATZ,
245 SP_ATTR_LIMITINGCONEANGLE,
246 /*feFlood*/
247 SP_ATTR_FLOODCOLOR,
248 SP_ATTR_FLOODOPACITY,
249 /* SPGaussianBlur */
250 SP_ATTR_STDDEVIATION,
251 /*feImage*/
252 /*feMerge*/
253 /*feMorphology*/
254 //SP_ATTR_OPERATOR,
255 SP_ATTR_RADIUS,
256 /*feOffset*/
257 //SP_ATTR_DX,
258 //SP_ATTR_DY,
259 /*feSpecularLighting*/
260 //SP_ATTR_SURFACESCALE,
261 SP_ATTR_SPECULARCONSTANT,
262 SP_ATTR_SPECULAREXPONENT,
263 /*feTile*/
264 /*feTurbulence*/
265 SP_ATTR_BASEFREQUENCY,
266 SP_ATTR_NUMOCTAVES,
267 SP_ATTR_SEED,
268 SP_ATTR_STITCHTILES,
269 //SP_ATTR_TYPE,
270 /* SPGradient */
271 SP_ATTR_GRADIENTUNITS,
272 SP_ATTR_GRADIENTTRANSFORM,
273 SP_ATTR_SPREADMETHOD,
274 /* SPRadialGradient */
275 SP_ATTR_FX,
276 SP_ATTR_FY,
277 /* SPPattern */
278 SP_ATTR_PATTERNUNITS,
279 SP_ATTR_PATTERNCONTENTUNITS,
280 SP_ATTR_PATTERNTRANSFORM,
281 /* SPClipPath */
282 SP_ATTR_CLIPPATHUNITS,
283 /* SPMask */
284 SP_ATTR_MASKUNITS,
285 SP_ATTR_MASKCONTENTUNITS,
286 /* SPMarker */
287 SP_ATTR_MARKERUNITS,
288 SP_ATTR_REFX,
289 SP_ATTR_REFY,
290 SP_ATTR_MARKERWIDTH,
291 SP_ATTR_MARKERHEIGHT,
292 SP_ATTR_ORIENT,
293 /* SPStyleElem */
294 //SP_ATTR_TYPE,
295 /* Animations */
296 SP_ATTR_ATTRIBUTENAME,
297 SP_ATTR_ATTRIBUTETYPE,
298 SP_ATTR_BEGIN,
299 SP_ATTR_DUR,
300 SP_ATTR_END,
301 SP_ATTR_MIN,
302 SP_ATTR_MAX,
303 SP_ATTR_RESTART,
304 SP_ATTR_REPEATCOUNT,
305 SP_ATTR_REPEATDUR,
306 /* Interpolating animations */
307 SP_ATTR_CALCMODE,
308 //SP_ATTR_VALUES,
309 SP_ATTR_KEYTIMES,
310 SP_ATTR_KEYSPLINES,
311 SP_ATTR_FROM,
312 SP_ATTR_TO,
313 SP_ATTR_BY,
314 SP_ATTR_ADDITIVE,
315 SP_ATTR_ACCUMULATE,
317 /* SVGFonts */
318 /* SPFont */
319 SP_ATTR_HORIZ_ORIGIN_X,
320 SP_ATTR_HORIZ_ORIGIN_Y,
321 SP_ATTR_HORIZ_ADV_X,
322 SP_ATTR_VERT_ORIGIN_X,
323 SP_ATTR_VERT_ORIGIN_Y,
324 SP_ATTR_VERT_ADV_Y,
326 SP_ATTR_UNICODE,
327 SP_ATTR_GLYPH_NAME,
328 //SP_ATTR_ORIENTATION,
329 SP_ATTR_ARABIC_FORM,
330 SP_ATTR_LANG,
332 /*<hkern> and <vkern>*/
333 SP_ATTR_U1,
334 SP_ATTR_G1,
335 SP_ATTR_U2,
336 SP_ATTR_G2,
337 SP_ATTR_K,
339 /*<font-face>*/
340 // SP_ATTR_FONT_FAMILY,
341 // SP_ATTR_FONT_STYLE,
342 // SP_ATTR_FONT_VARIANT,
343 // SP_ATTR_FONT_WEIGHT,
344 // SP_ATTR_FONT_STRETCH,
345 // SP_ATTR_FONT_SIZE,
346 SP_ATTR_UNICODE_RANGE,
347 SP_ATTR_UNITS_PER_EM,
348 SP_ATTR_PANOSE_1,
349 SP_ATTR_STEMV,
350 SP_ATTR_STEMH,
351 //SP_ATTR_SLOPE,
352 SP_ATTR_CAP_HEIGHT,
353 SP_ATTR_X_HEIGHT,
354 SP_ATTR_ACCENT_HEIGHT,
355 SP_ATTR_ASCENT,
356 SP_ATTR_DESCENT,
357 SP_ATTR_WIDTHS,
358 SP_ATTR_BBOX,
359 SP_ATTR_IDEOGRAPHIC,
360 SP_ATTR_ALPHABETIC,
361 SP_ATTR_MATHEMATICAL,
362 SP_ATTR_HANGING,
363 SP_ATTR_V_IDEOGRAPHIC,
364 SP_ATTR_V_ALPHABETIC,
365 SP_ATTR_V_MATHEMATICAL,
366 SP_ATTR_V_HANGING,
367 SP_ATTR_UNDERLINE_POSITION,
368 SP_ATTR_UNDERLINE_THICKNESS,
369 SP_ATTR_STRIKETHROUGH_POSITION,
370 SP_ATTR_STRIKETHROUGH_THICKNESS,
371 SP_ATTR_OVERLINE_POSITION,
372 SP_ATTR_OVERLINE_THICKNESS,
374 /* XML */
375 SP_ATTR_XML_SPACE,
377 /* typeset */
378 SP_ATTR_TEXT_NOMARKUP,
379 SP_ATTR_TEXT_PANGOMARKUP,
380 SP_ATTR_TEXT_INSHAPE,
381 SP_ATTR_TEXT_ONPATH,
382 SP_ATTR_TEXT_INBOX,
383 SP_ATTR_TEXT_INCOLUMN,
384 SP_ATTR_TEXT_EXCLUDE,
385 SP_ATTR_LAYOUT_OPTIONS,
387 /* CSS2 */
388 /* Custom full font name because Font stuff below is inadequate */
389 SP_PROP_INKSCAPE_FONT_SPEC,
390 /* Font */
391 SP_PROP_FONT,
392 SP_PROP_FONT_FAMILY,
393 SP_PROP_FONT_SIZE,
394 SP_PROP_FONT_SIZE_ADJUST,
395 SP_PROP_FONT_STRETCH,
396 SP_PROP_FONT_STYLE,
397 SP_PROP_FONT_VARIANT,
398 SP_PROP_FONT_WEIGHT,
399 /* Text */
400 SP_PROP_TEXT_INDENT,
401 SP_PROP_TEXT_ALIGN,
402 SP_PROP_TEXT_DECORATION,
403 SP_PROP_LINE_HEIGHT,
404 SP_PROP_LETTER_SPACING,
405 SP_PROP_WORD_SPACING,
406 SP_PROP_TEXT_TRANSFORM,
407 /* text (css3) */
408 SP_PROP_DIRECTION,
409 SP_PROP_BLOCK_PROGRESSION,
410 SP_PROP_WRITING_MODE,
411 SP_PROP_UNICODE_BIDI,
412 SP_PROP_ALIGNMENT_BASELINE,
413 SP_PROP_BASELINE_SHIFT,
414 SP_PROP_DOMINANT_BASELINE,
415 SP_PROP_GLYPH_ORIENTATION_HORIZONTAL,
416 SP_PROP_GLYPH_ORIENTATION_VERTICAL,
417 SP_PROP_KERNING,
418 SP_PROP_TEXT_ANCHOR,
419 /* Misc */
420 SP_PROP_CLIP,
421 SP_PROP_COLOR,
422 SP_PROP_CURSOR,
423 SP_PROP_DISPLAY,
424 SP_PROP_OVERFLOW,
425 SP_PROP_VISIBILITY,
426 /* SVG */
427 /* Clip/Mask */
428 SP_PROP_CLIP_PATH,
429 SP_PROP_CLIP_RULE,
430 SP_PROP_MASK,
431 SP_PROP_OPACITY,
432 /* Filter */
433 SP_PROP_ENABLE_BACKGROUND,
434 SP_PROP_FILTER,
435 SP_PROP_FLOOD_COLOR,
436 SP_PROP_FLOOD_OPACITY,
437 SP_PROP_LIGHTING_COLOR,
438 /* Gradient */
439 SP_PROP_STOP_COLOR,
440 SP_PROP_STOP_OPACITY,
441 /* Interactivity */
442 SP_PROP_POINTER_EVENTS,
443 /* Paint */
444 SP_PROP_COLOR_INTERPOLATION,
445 SP_PROP_COLOR_INTERPOLATION_FILTERS,
446 SP_PROP_COLOR_PROFILE,
447 SP_PROP_COLOR_RENDERING,
448 SP_PROP_FILL,
449 SP_PROP_FILL_OPACITY,
450 SP_PROP_FILL_RULE,
451 SP_PROP_IMAGE_RENDERING,
452 SP_PROP_MARKER,
453 SP_PROP_MARKER_END,
454 SP_PROP_MARKER_MID,
455 SP_PROP_MARKER_START,
456 SP_PROP_SHAPE_RENDERING,
457 SP_PROP_STROKE,
458 SP_PROP_STROKE_DASHARRAY,
459 SP_PROP_STROKE_DASHOFFSET,
460 SP_PROP_STROKE_LINECAP,
461 SP_PROP_STROKE_LINEJOIN,
462 SP_PROP_STROKE_MITERLIMIT,
463 SP_PROP_STROKE_OPACITY,
464 SP_PROP_STROKE_WIDTH,
465 SP_PROP_TEXT_RENDERING,
466 /* Conditional */
467 SP_PROP_SYSTEM_LANGUAGE,
468 SP_PROP_REQUIRED_FEATURES,
469 SP_PROP_REQUIRED_EXTENSIONS,
470 /* LivePathEffect */
471 SP_PROP_PATH_EFFECT,
472 };
474 #endif
477 /*
478 Local Variables:
479 mode:c++
480 c-file-style:"stroustrup"
481 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
482 indent-tabs-mode:nil
483 fill-column:99
484 End:
485 */
486 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :