Code

Filters. Custom predefined filters update and new ABC filters.
[inkscape.git] / src / snap-enums.h
1 #ifndef SNAPENUMS_H_
2 #define SNAPENUMS_H_
4 /**
5  * \file snap-enums.h
6  * \brief enumerations of snap source types and snap target types
7  *
8  * Authors:
9  *   Diederik van Lierop <mail@diedenrezi.nl>
10  *
11  * Copyright (C) 2010 Authors
12  *
13  * Released under GNU GPL, read the file 'COPYING' for more information
14  */
16 namespace Inkscape {
18 enum SnapTargetType {
19     SNAPTARGET_UNDEFINED = 0,
20     SNAPTARGET_GRID,
21     SNAPTARGET_GRID_INTERSECTION,
22     SNAPTARGET_GUIDE,
23     SNAPTARGET_GUIDE_INTERSECTION,
24     SNAPTARGET_GUIDE_ORIGIN,
25     SNAPTARGET_GRID_GUIDE_INTERSECTION,
26     SNAPTARGET_NODE_SMOOTH,
27     SNAPTARGET_NODE_CUSP,
28     SNAPTARGET_LINE_MIDPOINT,
29     SNAPTARGET_OBJECT_MIDPOINT,
30     SNAPTARGET_ROTATION_CENTER,
31     SNAPTARGET_HANDLE,
32     SNAPTARGET_PATH,
33     SNAPTARGET_PATH_INTERSECTION,
34     SNAPTARGET_BBOX_CORNER,
35     SNAPTARGET_BBOX_EDGE,
36     SNAPTARGET_BBOX_EDGE_MIDPOINT,
37     SNAPTARGET_BBOX_MIDPOINT,
38     SNAPTARGET_PAGE_BORDER,
39     SNAPTARGET_PAGE_CORNER,
40     SNAPTARGET_CONVEX_HULL_CORNER,
41     SNAPTARGET_ELLIPSE_QUADRANT_POINT,
42     SNAPTARGET_CENTER, // of ellipse
43     SNAPTARGET_CORNER, // of image or of rectangle
44     SNAPTARGET_TEXT_BASELINE,
45     SNAPTARGET_CONSTRAINED_ANGLE,
46     SNAPTARGET_CONSTRAINT
47 };
49 enum SnapSourceType {
50     SNAPSOURCE_UNDEFINED = 0,
51     //-------------------------------------------------------------------
52     // Bbox points can be located at the edge of the stroke (for visual bboxes); they will therefore not snap
53     // to nodes because these are always located at the center of the stroke
54     SNAPSOURCE_BBOX_CATEGORY = 256, // will be used as a flag and must therefore be a power of two
55     SNAPSOURCE_BBOX_CORNER,
56     SNAPSOURCE_BBOX_MIDPOINT,
57     SNAPSOURCE_BBOX_EDGE_MIDPOINT,
58     //-------------------------------------------------------------------
59     // For the same reason, nodes will not snap to bbox points
60     SNAPSOURCE_NODE_CATEGORY = 512, // will be used as a flag and must therefore be a power of two
61     SNAPSOURCE_NODE_SMOOTH, // Symmetrical nodes are also considered to be smooth; there's no dedicated type for symm. nodes
62     SNAPSOURCE_NODE_CUSP,
63     SNAPSOURCE_LINE_MIDPOINT,
64     SNAPSOURCE_PATH_INTERSECTION,
65     SNAPSOURCE_CORNER, // of image or of rectangle
66     SNAPSOURCE_CONVEX_HULL_CORNER,
67     SNAPSOURCE_ELLIPSE_QUADRANT_POINT,
68     SNAPSOURCE_NODE_HANDLE, // eg. nodes in the path editor, handles of stars or rectangles, etc. (tied to a stroke)
69     SNAPSOURCE_OBJECT_MIDPOINT, // midpoint of rectangles, polygon, etc.
70     //-------------------------------------------------------------------
71     // Other points (e.g. guides, gradient knots) will snap to both bounding boxes and nodes
72     SNAPSOURCE_OTHER_CATEGORY = 1024, // will be used as a flag and must therefore be a power of two
73     SNAPSOURCE_ROTATION_CENTER,
74     SNAPSOURCE_CENTER, // of ellipse
75     SNAPSOURCE_GUIDE,
76     SNAPSOURCE_GUIDE_ORIGIN,
77     SNAPSOURCE_TEXT_BASELINE,
78     SNAPSOURCE_OTHER_HANDLE, // eg. the handle of a gradient of a connector (ie not being tied to a stroke)
79     SNAPSOURCE_GRID_PITCH, // eg. when pasting or alt-dragging in the selector tool; not realy a snap source
80 };
82 }
83 #endif /* SNAPENUMS_H_ */