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

Classes | Defines | Functions | Variables

event-context.cpp File Reference

#include "event-context.h"
#include <string.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtkmain.h>
#include <gtk/gtkmenu.h>
#include <glibmm/i18n.h>
#include <cstring>
#include <string>
#include "display/sp-canvas.h"
#include "xml/node-event-vector.h"
#include "sp-cursor.h"
#include "shortcuts.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "desktop-events.h"
#include "widgets/desktop-widget.h"
#include "sp-namedview.h"
#include "selection.h"
#include "file.h"
#include "interface.h"
#include "macros.h"
#include "tools-switch.h"
#include "preferences.h"
#include "message-context.h"
#include "gradient-drag.h"
#include "object-edit.h"
#include "attributes.h"
#include "rubberband.h"
#include "selcue.h"
#include "lpe-tool-context.h"
#include "ui/tool/control-point.h"
#include "shape-editor.h"
#include "sp-guide.h"
Include dependency graph for event-context.cpp:

Go to the source code of this file.


class  ToolPrefObserver
 An observer that relays pref changes to the derived classes. More...


static gdouble accelerate_scroll (GdkEvent *event, gdouble acceleration, SPCanvas *)
void event_context_print_event_info (GdkEvent *event, bool print_return)
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.
static void set_event_location (SPDesktop *desktop, GdkEvent *event)
void sp_event_context_activate (SPEventContext *ec)
static void sp_event_context_class_init (SPEventContextClass *klass)
void sp_event_context_deactivate (SPEventContext *ec)
void sp_event_context_discard_delayed_snap_event (SPEventContext *ec)
static void sp_event_context_dispose (GObject *object)
SPItemsp_event_context_find_item (SPDesktop *desktop, Geom::Point const &p, bool select_under, bool into_groups)
void sp_event_context_finish (SPEventContext *ec)
ShapeEditorsp_event_context_get_shape_editor (SPEventContext *ec)
GType sp_event_context_get_type (void)
static void sp_event_context_init (SPEventContext *event_context)
gint sp_event_context_item_handler (SPEventContext *event_context, 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 int key)
SPItemsp_event_context_over_item (SPDesktop *desktop, SPItem *item, Geom::Point const &p)
static gint sp_event_context_private_item_handler (SPEventContext *event_context, SPItem *item, GdkEvent *event)
static gint sp_event_context_private_root_handler (SPEventContext *event_context, GdkEvent *event)
static void sp_event_context_private_setup (SPEventContext *ec)
void sp_event_context_read (SPEventContext *ec, gchar const *key)
gint sp_event_context_root_handler (SPEventContext *event_context, 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 *event_context, SPItem *item, GdkEvent *event)
gint sp_event_context_virtual_root_handler (SPEventContext *event_context, 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)
static void sp_toggle_dropper (SPDesktop *dt)
static void sp_toggle_selector (SPDesktop *dt)


static bool dropper_toggled = FALSE
static GObjectClass * parent_class
static guint32 scroll_event_time = 0
static guint scroll_keyval = 0
static gdouble scroll_multiply = 1
static bool selector_toggled = FALSE
static int switch_dropper_to = 0
static int switch_selector_to = 0
static gint tolerance = 0
static bool within_tolerance = false
static gint xp = 0
static gint yp = 0

Detailed Description

Main event handling, and related helper functions.

Authors: Lauris Kaplinski <lauris@kaplinski.com> Frank Felfe <innerspace@iname.com> bulia byak <buliabyak@users.sf.net>

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

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

Definition in file event-context.cpp.

Generated by  Doxygen 1.6.0   Back to index