star-context.cpp revision 9b64c78f3873403775d80ce62fcec325a92a62a7
1607N/A#define __SP_STAR_CONTEXT_C__
1607N/A#include "display/sp-canvas.h"
1607N/A#include "document.h"
1607N/A#include "sp-namedview.h"
1607N/A#include "selection.h"
1607N/A#include "desktop-handles.h"
1607N/A#include "desktop-affine.h"
2478N/A#include "desktop-style.h"
1607N/A#include "message-context.h"
2284N/A#include "pixmaps/cursor-star.xpm"
2284N/A#include "sp-metrics.h"
1607N/A#include "prefs-utils.h"
1607N/A#include "xml/node-event-vector.h"
1607N/A#include "object-edit.h"
2375N/A#include "context-fns.h"
1607N/A#include "star-context.h"
1607N/A sizeof (SPStarContextClass),
2375N/A sizeof (SPStarContext),
2415N/A type = g_type_register_static (SP_TYPE_EVENT_CONTEXT, "SPStarContext", &info, (GTypeFlags)0);
2375N/A if (shape_repr) {
2847N/A if (shape_repr) {
2457N/A sc->sel_changed_connection = selection->connectChanged(sigc::bind(sigc::ptr_fun(&sp_star_context_selection_changed), (gpointer)sc));
2375N/A event_context->tolerance = prefs_get_int_attribute_limited("options.dragtolerance", "value", 0, 0, 100);
2375N/A case GDK_BUTTON_PRESS:
1607N/A sc->center = m.freeSnap(Inkscape::Snapper::SNAPPOINT_NODE, sc->center, sc->item).getPoint();
2375N/A case GDK_MOTION_NOTIFY:
2375N/A if (dragging && (event->motion.state & GDK_BUTTON1_MASK) && !event_context->space_panning) {
2375N/A case GDK_BUTTON_RELEASE:
case GDK_KEY_PRESS:
case GDK_Alt_R:
case GDK_Control_L:
case GDK_Control_R:
case GDK_Shift_L:
case GDK_Shift_R:
case GDK_Meta_R:
NULL,
NULL);
case GDK_Up:
case GDK_Down:
case GDK_KP_Up:
case GDK_KP_Down:
if (!MOD__CTRL_ONLY)
case GDK_x:
case GDK_X:
if (MOD__ALT_ONLY) {
case GDK_Escape:
case GDK_space:
if (dragging) {
dragging = false;
case GDK_KEY_RELEASE:
case GDK_Alt_L:
case GDK_Alt_R:
case GDK_Control_L:
case GDK_Control_R:
case GDK_Shift_L:
case GDK_Shift_R:
case GDK_Meta_R:
if (!ret) {
return ret;
sc->item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer());