Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

gint sp_event_context_root_handler ( SPEventContext event_context,
GdkEvent *  event 
)

Calls virtual root_handler(), the main event handling function.

Definition at line 908 of file event-context.cpp.

References sp_event_context_snap_delay_handler(), and sp_event_context_snap_watchdog_callback().

Referenced by _arena_handler().

{
    switch (event->type) {
    case GDK_MOTION_NOTIFY:
        sp_event_context_snap_delay_handler(event_context, NULL, NULL,
                (GdkEventMotion *) event,
                DelayedSnapEvent::EVENTCONTEXT_ROOT_HANDLER);
        break;
    case GDK_BUTTON_RELEASE:
        if (event_context->_delayed_snap_event) {
            // If we have any pending snapping action, then invoke it now
            sp_event_context_snap_watchdog_callback(
                    event_context->_delayed_snap_event);
        }
        break;
    case GDK_BUTTON_PRESS:
    case GDK_2BUTTON_PRESS:
    case GDK_3BUTTON_PRESS:
        // Snapping will be on hold if we're moving the mouse at high speeds. When starting
        // drawing a new shape we really should snap though.
        event_context->desktop->namedview->snap_manager.snapprefs.setSnapPostponedGlobally(
                false);
        break;
    default:
        break;
    }

    return sp_event_context_virtual_root_handler(event_context, event);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index