~danieljabailey/inkscape/arc_node_editor

« back to all changes in this revision

Viewing changes to src/node-context.h

  • Committer: scislac
  • Date: 2009-08-12 07:57:52 UTC
  • Revision ID: scislac@users.sourceforge.net-20090812075752-3zt99jgeqr3bm16j
much better quality multi-size windows icon, thanks ChrisMorgan

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SP_NODE_CONTEXT_H__
 
2
#define __SP_NODE_CONTEXT_H__
 
3
 
 
4
/*
 
5
 * Node editing context
 
6
 *
 
7
 * Authors:
 
8
 *   Lauris Kaplinski <lauris@kaplinski.com>
 
9
 *   bulia byak <buliabyak@users.sf.net>
 
10
 *
 
11
 * This code is in public domain
 
12
 */
 
13
 
 
14
#include <gtk/gtktypeutils.h>
 
15
#include <sigc++/sigc++.h>
 
16
#include "event-context.h"
 
17
#include "forward.h"
 
18
#include "display/display-forward.h"
 
19
#include "nodepath.h"
 
20
namespace Inkscape { class Selection; }
 
21
 
 
22
#define SP_TYPE_NODE_CONTEXT            (sp_node_context_get_type ())
 
23
#define SP_NODE_CONTEXT(obj)            (GTK_CHECK_CAST ((obj), SP_TYPE_NODE_CONTEXT, SPNodeContext))
 
24
#define SP_NODE_CONTEXT_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), SP_TYPE_NODE_CONTEXT, SPNodeContextClass))
 
25
#define SP_IS_NODE_CONTEXT(obj)         (GTK_CHECK_TYPE ((obj), SP_TYPE_NODE_CONTEXT))
 
26
#define SP_IS_NODE_CONTEXT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), SP_TYPE_NODE_CONTEXT))
 
27
 
 
28
enum { SP_NODE_CONTEXT_INACTIVE,
 
29
       SP_NODE_CONTEXT_NODE_DRAGGING,
 
30
       SP_NODE_CONTEXT_RUBBERBAND_DRAGGING };
 
31
 
 
32
class SPNodeContext;
 
33
class SPNodeContextClass;
 
34
 
 
35
struct SPNodeContext {
 
36
        // FIXME: shouldn't this be a pointer???
 
37
        SPEventContext event_context;
 
38
 
 
39
        guint drag : 1;
 
40
 
 
41
        gboolean leftalt;
 
42
        gboolean rightalt;
 
43
        gboolean leftctrl;
 
44
        gboolean rightctrl;
 
45
 
 
46
      /// If true, rubberband was cancelled by esc, so the next button release should not deselect.
 
47
        bool rb_escaped;
 
48
 
 
49
        sigc::connection sel_changed_connection;
 
50
 
 
51
        Inkscape::MessageContext *_node_message_context;
 
52
 
 
53
        bool cursor_drag;
 
54
 
 
55
    bool added_node;
 
56
  
 
57
    unsigned int current_state;
 
58
 
 
59
    SPItem * flashed_item;
 
60
        SPCanvasItem *grabbed;
 
61
    Inkscape::Display::TemporaryItem * flash_tempitem;
 
62
    int remove_flash_counter;
 
63
};
 
64
 
 
65
struct SPNodeContextClass {
 
66
        SPEventContextClass parent_class;
 
67
};
 
68
 
 
69
/* Standard Gtk function */
 
70
 
 
71
GtkType sp_node_context_get_type (void);
 
72
 
 
73
void sp_node_context_selection_changed (Inkscape::Selection * selection, gpointer data);
 
74
void sp_node_context_selection_modified (Inkscape::Selection * selection, guint flags, gpointer data);
 
75
 
 
76
#endif
 
77
 
 
78
/*
 
79
  Local Variables:
 
80
  mode:c++
 
81
  c-file-style:"stroustrup"
 
82
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
83
  indent-tabs-mode:nil
 
84
  fill-column:99
 
85
  End:
 
86
*/
 
87
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :