diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/node-context.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/node-context.h')
| -rw-r--r-- | src/node-context.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/node-context.h b/src/node-context.h new file mode 100644 index 000000000..a9b4beb07 --- /dev/null +++ b/src/node-context.h @@ -0,0 +1,69 @@ +#ifndef __SP_NODE_CONTEXT_H__ +#define __SP_NODE_CONTEXT_H__ + +/* + * Node editing context + * + * Authors: + * Lauris Kaplinski <lauris@kaplinski.com> + * bulia byak <buliabyak@users.sf.net> + * + * This code is in public domain + */ + +#include <sigc++/sigc++.h> +#include "event-context.h" +#include "forward.h" +#include "nodepath.h" +struct SPKnotHolder; +namespace Inkscape { class Selection; } + +#define SP_TYPE_NODE_CONTEXT (sp_node_context_get_type ()) +#define SP_NODE_CONTEXT(obj) (GTK_CHECK_CAST ((obj), SP_TYPE_NODE_CONTEXT, SPNodeContext)) +#define SP_NODE_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_NODE_CONTEXT, SPNodeContextClass)) +#define SP_IS_NODE_CONTEXT(obj) (GTK_CHECK_TYPE ((obj), SP_TYPE_NODE_CONTEXT)) +#define SP_IS_NODE_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_NODE_CONTEXT)) + +class SPNodeContext; +class SPNodeContextClass; + +struct SPNodeContext { + SPEventContext event_context; + + guint drag : 1; + + Inkscape::NodePath::Path *nodepath; + + gboolean leftalt; + gboolean rightalt; + gboolean leftctrl; + gboolean rightctrl; + + /// If true, rubberband was cancelled by esc, so the next button release should not deselect. + bool rb_escaped; + + sigc::connection sel_changed_connection; + + Inkscape::MessageContext *_node_message_context; + + double grab_t; + Inkscape::NodePath::Node * grab_node; + bool hit; + NR::Point curvepoint_event; // int coords from event + NR::Point curvepoint_doc; // same, in doc coords + bool cursor_drag; + + bool added_node; +}; + +struct SPNodeContextClass { + SPEventContextClass parent_class; +}; + +/* Standard Gtk function */ + +GtkType sp_node_context_get_type (void); + +void sp_node_context_selection_changed (Inkscape::Selection * selection, gpointer data); + +#endif |
