event-context.h revision 70d31ae8a7a27e57cfcdc921ea0d2f47c92442a4
#ifndef __SP_EVENT_CONTEXT_H__
#define __SP_EVENT_CONTEXT_H__
/** \file
* 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
*/
#include <glib-object.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkevents.h>
#include "knot.h"
#include "preferences.h"
struct GrDrag;
struct SPDesktop;
struct SPItem;
struct SPEventContext;
}
}
{
enum DelayedSnapEventOrigin {
UNDEFINED_HANDLER = 0,
};
DelayedSnapEvent(SPEventContext *event_context, SPItem* const item, SPKnot* knot, GdkEventMotion const *event, DelayedSnapEvent::DelayedSnapEventOrigin const origin)
: _timer_id(0), _event(NULL), _item(item), _knot(knot), _origin(origin), _event_context(event_context)
{
}
~DelayedSnapEvent() {
}
};
void sp_event_context_snap_delay_handler(SPEventContext *ec, SPItem* const item, SPKnot* const knot, GdkEventMotion *event, DelayedSnapEvent::DelayedSnapEventOrigin origin);
/**
* Base class for Event processors.
*/
void enableSelectionCue (bool enable=true);
void enableGrDrag (bool enable=true);
/// Desktop eventcontext stack
unsigned key;
gchar const *const *cursor_shape;
bool within_tolerance; ///< are we still within tolerance of origin
///< be selected if this is a click not drag
return _message_context;
}
bool space_panning;
};
/**
* The SPEvent vtable.
*/
};
#define SP_EVENT_CONTEXT_STATIC 0
SPEventContext *sp_event_context_new(GType type, SPDesktop *desktop, gchar const *pref_path, unsigned key);
SPItem *sp_event_context_find_item (SPDesktop *desktop, Geom::Point const &p, bool select_under, bool into_groups);
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :