Code

4d38e69e2dc8739a8e2fdd244f02b0cc6afa09ca
[inkscape.git] / src / ui / tool / node-tool.h
1 /** @file
2  * @brief New node tool with support for multiple path editing
3  */
4 /* Authors:
5  *   Krzysztof KosiƄski <tweenk@gmail.com>
6  *
7  * Copyright (C) 2009 Authors
8  * Released under GNU GPL, read the file 'COPYING' for more information
9  */
11 #ifndef SEEN_UI_TOOL_NODE_TOOL_H
12 #define SEEN_UI_TOOL_NODE_TOOL_H
14 #include <memory>
15 #include <boost/ptr_container/ptr_map.hpp>
16 #include <glib.h>
17 #include <sigc++/sigc++.h>
18 #include "event-context.h"
19 #include "forward.h"
20 #include "display/display-forward.h"
21 #include "ui/tool/node-types.h"
23 #define INK_TYPE_NODE_TOOL               (ink_node_tool_get_type ())
24 #define INK_NODE_TOOL(obj)            (GTK_CHECK_CAST ((obj), INK_TYPE_NODE_TOOL, InkNodeTool))
25 #define INK_NODE_TOOL_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), INK_TYPE_NODE_TOOL, InkNodeToolClass))
26 #define INK_IS_NODE_TOOL(obj)         (GTK_CHECK_TYPE ((obj), INK_TYPE_NODE_TOOL))
27 #define INK_IS_NODE_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), INK_TYPE_NODE_TOOL))
29 class InkNodeTool;
30 class InkNodeToolClass;
32 namespace Inkscape {
33 namespace UI {
34 class MultiPathManipulator;
35 class ControlPointSelection;
36 class Selector;
37 struct PathSharedData;
38 }
39 }
41 typedef std::auto_ptr<Inkscape::UI::MultiPathManipulator> MultiPathPtr;
42 typedef std::auto_ptr<Inkscape::UI::ControlPointSelection> CSelPtr;
43 typedef std::auto_ptr<Inkscape::UI::Selector> SelectorPtr;
44 typedef std::auto_ptr<Inkscape::UI::PathSharedData> PathSharedDataPtr;
45 typedef boost::ptr_map<SPItem*, ShapeEditor> ShapeEditors;
47 struct InkNodeTool : public SPEventContext
48 {
49     sigc::connection _selection_changed_connection;
50     sigc::connection _mouseover_changed_connection;
51     sigc::connection _selection_modified_connection;
52     Inkscape::MessageContext *_node_message_context;
53     SPItem *flashed_item;
54     Inkscape::Display::TemporaryItem *flash_tempitem;
55     CSelPtr _selected_nodes;
56     MultiPathPtr _multipath;
57     SelectorPtr _selector;
58     PathSharedDataPtr _path_data;
59     SPCanvasGroup *_transform_handle_group;
60     SPItem *_last_over;
61     ShapeEditors _shape_editors;
63     unsigned cursor_drag : 1;
64     unsigned show_handles : 1;
65     unsigned show_outline : 1;
66     unsigned live_outline : 1;
67     unsigned live_objects : 1;
68     unsigned show_path_direction : 1;
69     unsigned show_transform_handles : 1;
70     unsigned single_node_transform_handles : 1;
71     unsigned edit_clipping_paths : 1;
72     unsigned edit_masks : 1;
73 };
75 struct InkNodeToolClass {
76         SPEventContextClass parent_class;
77 };
79 GType ink_node_tool_get_type (void);
81 #endif
83 /*
84   Local Variables:
85   mode:c++
86   c-file-style:"stroustrup"
87   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
88   indent-tabs-mode:nil
89   fill-column:99
90   End:
91 */
92 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :