diff options
| author | Diederik van Lierop <mail@diedenrezi.nl> | 2011-06-30 20:46:15 +0000 |
|---|---|---|
| committer | Diederik van Lierop <mail@diedenrezi.nl> | 2011-06-30 20:46:15 +0000 |
| commit | 8911d9a8ca0c7f4ef1476b2f056adf2afa4e99cd (patch) | |
| tree | bc14be1ac41f82196fc5a07ac99ff3613eeb4cd7 /src/snap-enums.h | |
| parent | Minimise GTK version changes in text-edit dialog (diff) | |
| download | inkscape-8911d9a8ca0c7f4ef1476b2f056adf2afa4e99cd.tar.gz inkscape-8911d9a8ca0c7f4ef1476b2f056adf2afa4e99cd.zip | |
Implement decent snapping to text (baseline & anchor), and provide a toggle button for this (as requested in LP bug #727281 )
(bzr r10392)
Diffstat (limited to 'src/snap-enums.h')
| -rw-r--r-- | src/snap-enums.h | 69 |
1 files changed, 38 insertions, 31 deletions
diff --git a/src/snap-enums.h b/src/snap-enums.h index 8988589a1..6ef021fc0 100644 --- a/src/snap-enums.h +++ b/src/snap-enums.h @@ -15,36 +15,6 @@ namespace Inkscape { -enum SnapTargetType { - SNAPTARGET_UNDEFINED = 0, - SNAPTARGET_GRID, - SNAPTARGET_GRID_INTERSECTION, - SNAPTARGET_GUIDE, - SNAPTARGET_GUIDE_INTERSECTION, - SNAPTARGET_GUIDE_ORIGIN, - SNAPTARGET_GRID_GUIDE_INTERSECTION, - SNAPTARGET_NODE_SMOOTH, - SNAPTARGET_NODE_CUSP, - SNAPTARGET_LINE_MIDPOINT, - SNAPTARGET_OBJECT_MIDPOINT, - SNAPTARGET_ROTATION_CENTER, - SNAPTARGET_HANDLE, - SNAPTARGET_PATH, - SNAPTARGET_PATH_INTERSECTION, - SNAPTARGET_BBOX_CORNER, - SNAPTARGET_BBOX_EDGE, - SNAPTARGET_BBOX_EDGE_MIDPOINT, - SNAPTARGET_BBOX_MIDPOINT, - SNAPTARGET_PAGE_BORDER, - SNAPTARGET_PAGE_CORNER, - SNAPTARGET_CONVEX_HULL_CORNER, - SNAPTARGET_ELLIPSE_QUADRANT_POINT, - SNAPTARGET_CORNER, // of image or of rectangle - SNAPTARGET_TEXT_BASELINE, - SNAPTARGET_CONSTRAINED_ANGLE, - SNAPTARGET_CONSTRAINT -}; - enum SnapSourceType { SNAPSOURCE_UNDEFINED = 0, //------------------------------------------------------------------- @@ -72,10 +42,47 @@ enum SnapSourceType { SNAPSOURCE_OBJECT_MIDPOINT, // midpoint of rectangles, ellipses, polygon, etc. SNAPSOURCE_GUIDE, SNAPSOURCE_GUIDE_ORIGIN, - SNAPSOURCE_TEXT_BASELINE, + SNAPSOURCE_TEXT_ANCHOR, SNAPSOURCE_OTHER_HANDLE, // eg. the handle of a gradient or of a connector (ie not being tied to a stroke) SNAPSOURCE_GRID_PITCH, // eg. when pasting or alt-dragging in the selector tool; not realy a snap source }; +enum SnapTargetType { + SNAPTARGET_UNDEFINED = 0, + //------------------------------------------------------------------- + SNAPTARGET_BBOX_CATEGORY = 256, // will be used as a flag and must therefore be a power of two + SNAPTARGET_BBOX_CORNER, + SNAPTARGET_BBOX_EDGE, + SNAPTARGET_BBOX_EDGE_MIDPOINT, + SNAPTARGET_BBOX_MIDPOINT, + //------------------------------------------------------------------- + SNAPTARGET_NODE_CATEGORY = 512, // will be used as a flag and must therefore be a power of two + SNAPTARGET_NODE_SMOOTH, + SNAPTARGET_NODE_CUSP, + SNAPTARGET_LINE_MIDPOINT, + SNAPTARGET_PATH, + SNAPTARGET_PATH_INTERSECTION, + SNAPTARGET_ELLIPSE_QUADRANT_POINT, + SNAPTARGET_CORNER, // of image or of rectangle + //------------------------------------------------------------------- + SNAPTARGET_OTHERS_CATEGORY = 1024, // will be used as a flag and must therefore be a power of two + SNAPTARGET_GRID, + SNAPTARGET_GRID_INTERSECTION, + SNAPTARGET_GUIDE, + SNAPTARGET_GUIDE_INTERSECTION, + SNAPTARGET_GUIDE_ORIGIN, + SNAPTARGET_GRID_GUIDE_INTERSECTION, + SNAPTARGET_OBJECT_MIDPOINT, + SNAPTARGET_ROTATION_CENTER, + SNAPTARGET_HANDLE, + SNAPTARGET_PAGE_BORDER, + SNAPTARGET_PAGE_CORNER, + SNAPTARGET_CONVEX_HULL_CORNER, + SNAPTARGET_TEXT_ANCHOR, + SNAPTARGET_TEXT_BASELINE, + SNAPTARGET_CONSTRAINED_ANGLE, + SNAPTARGET_CONSTRAINT +}; + } #endif /* SNAPENUMS_H_ */ |
