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

event-context.h File Reference


Detailed Description

SPEventContext: base class for event processors

This is per desktop object, which (its derivatives) implements different actions bound to mouse events.

Authors: Lauris Kaplinski <lauris@kaplinski.com> Frank Felfe <innerspace@iname.com>

Copyright (C) 1999-2002 authors Copyright (C) 2001-2002 Ximian, Inc.

Released under GNU GPL, read the file 'COPYING' for more information

Definition in file event-context.h.

#include <glib-object.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkevents.h>
#include "knot.h"
#include "2geom/forward.h"
#include "preferences.h"

Go to the source code of this file.

Namespaces

namespace  Inkscape
namespace  Inkscape::XML

Classes

class  DelayedSnapEvent
class  SPEventContext
struct  SPEventContextClass

Defines

#define SP_EVENT_CONTEXT_DESKTOP(e)   (SP_EVENT_CONTEXT(e)->desktop)
#define SP_EVENT_CONTEXT_DOCUMENT(e)   ((SP_EVENT_CONTEXT_DESKTOP(e))->doc())
#define SP_EVENT_CONTEXT_STATIC   0

Functions

void ec_shape_event_attr_changed (Inkscape::XML::Node *shape_repr, gchar const *name, gchar const *old_value, gchar const *new_value, bool const is_interactive, gpointer const data)
void event_context_print_event_info (GdkEvent *event, bool print_return=true)
guint get_group0_keyval (GdkEventKey *event)
gint gobble_key_events (guint keyval, gint mask)
 Gobbles next key events on the queue with the same keyval and mask. Returns the number of events consumed.
gint gobble_motion_events (gint mask)
 Gobbles next motion notify events on the queue with the same mask. Returns the number of events consumed.
void sp_event_context_activate (SPEventContext *ec)
void sp_event_context_deactivate (SPEventContext *ec)
void sp_event_context_discard_delayed_snap_event (SPEventContext *ec)
SPItemsp_event_context_find_item (SPDesktop *desktop, Geom::Point const &p, bool select_under, bool into_groups)
void sp_event_context_finish (SPEventContext *ec)
ShapeEditor * sp_event_context_get_shape_editor (SPEventContext *ec)
gint sp_event_context_item_handler (SPEventContext *ec, SPItem *item, GdkEvent *event)
bool sp_event_context_knot_mouseover (SPEventContext *ec)
 : Returns true if we're hovering above a knot (needed because we don't want to pre-snap in that case)
SPEventContextsp_event_context_new (GType type, SPDesktop *desktop, gchar const *pref_path, unsigned key)
SPItemsp_event_context_over_item (SPDesktop *desktop, SPItem *item, Geom::Point const &p)
void sp_event_context_read (SPEventContext *ec, gchar const *key)
gint sp_event_context_root_handler (SPEventContext *ec, GdkEvent *event)
void sp_event_context_snap_delay_handler (SPEventContext *ec, gpointer const dse_item, gpointer const dse_item2, GdkEventMotion *event, DelayedSnapEvent::DelayedSnapEventOrigin origin)
 Analyses the current event, calculates the mouse speed, turns snapping off (temporarily) if the mouse speed is above a threshold, and stores the current event such that it can be re-triggered when needed (re-triggering is controlled by a watchdog timer).
gboolean sp_event_context_snap_watchdog_callback (gpointer data)
 When the snap delay watchdog timer barks, this method will be called and will re-inject the last motion event in an appropriate place, with snapping being turned on again.
void sp_event_context_update_cursor (SPEventContext *ec)
gint sp_event_context_virtual_item_handler (SPEventContext *ec, SPItem *item, GdkEvent *event)
gint sp_event_context_virtual_root_handler (SPEventContext *ec, GdkEvent *event)
void sp_event_root_menu_popup (SPDesktop *desktop, SPItem *item, GdkEvent *event)
void sp_event_show_modifier_tip (Inkscape::MessageContext *message_context, GdkEvent *event, gchar const *ctrl_tip, gchar const *shift_tip, gchar const *alt_tip)


Generated by  Doxygen 1.6.0   Back to index