snap-indicator.cpp revision ab4b85bc1cf30c1c4dbe43ef4de05aa1ee8420e5
5331N/A * Provides a class that shows a temporary indicator on the canvas of where the snap was, and what kind of snap
5331N/A#include "display/snap-indicator.h"
5331N/A#include "desktop-handles.h"
5331N/A#include "display/sodipodi-ctrl.h"
5331N/A#include "display/canvas-text.h"
5680N/A#include "preferences.h"
if (value) {
switch (p.getTarget()) {
case SNAPTARGET_UNDEFINED:
case SNAPTARGET_GRID:
case SNAPTARGET_GUIDE:
case SNAPTARGET_NODE_CUSP:
case SNAPTARGET_NODE_SMOOTH:
case SNAPTARGET_PATH:
case SNAPTARGET_BBOX_CORNER:
case SNAPTARGET_BBOX_EDGE:
case SNAPTARGET_GRADIENT:
case SNAPTARGET_PAGE_BORDER:
case SNAPTARGET_LINE_MIDPOINT:
case SNAPTARGET_HANDLE:
case SNAPTARGET_BBOX_MIDPOINT:
case SNAPTARGET_PAGE_CORNER:
case SNAPTARGET_CENTER:
case SNAPTARGET_CORNER:
case SNAPTARGET_TEXT_BASELINE:
switch (p.getSource()) {
case SNAPSOURCE_UNDEFINED:
case SNAPSOURCE_BBOX_CORNER:
case SNAPSOURCE_BBOX_MIDPOINT:
case SNAPSOURCE_NODE_SMOOTH:
case SNAPSOURCE_NODE_CUSP:
case SNAPSOURCE_LINE_MIDPOINT:
case SNAPSOURCE_HANDLE:
case SNAPSOURCE_GUIDE:
case SNAPSOURCE_CENTER:
case SNAPSOURCE_CORNER:
case SNAPSOURCE_TEXT_BASELINE:
NULL );
NULL );
SPCanvasItem *canvas_tooltip = sp_canvastext_new(sp_desktop_tempgroup(_desktop), _desktop, tooltip_pos, tooltip_str);
if (_snaptarget) {
if (_snaptarget_tooltip) {
if (value) {
NULL );
if (_snapsource) {