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 "ui/tool/node-types.h"
22 #define INK_TYPE_NODE_TOOL (ink_node_tool_get_type ())
23 #define INK_NODE_TOOL(obj) (GTK_CHECK_CAST ((obj), INK_TYPE_NODE_TOOL, InkNodeTool))
24 #define INK_NODE_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), INK_TYPE_NODE_TOOL, InkNodeToolClass))
25 #define INK_IS_NODE_TOOL(obj) (GTK_CHECK_TYPE ((obj), INK_TYPE_NODE_TOOL))
26 #define INK_IS_NODE_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), INK_TYPE_NODE_TOOL))
28 class InkNodeTool;
29 class InkNodeToolClass;
31 namespace Inkscape {
33 namespace Display {
34 class TemporaryItem;
35 } // namespace Display
36 namespace UI {
37 class MultiPathManipulator;
38 class ControlPointSelection;
39 class Selector;
40 struct PathSharedData;
41 } // namespace UI
42 } // namespace Inkscape
44 typedef std::auto_ptr<Inkscape::UI::MultiPathManipulator> MultiPathPtr;
45 typedef std::auto_ptr<Inkscape::UI::ControlPointSelection> CSelPtr;
46 typedef std::auto_ptr<Inkscape::UI::Selector> SelectorPtr;
47 typedef std::auto_ptr<Inkscape::UI::PathSharedData> PathSharedDataPtr;
48 typedef boost::ptr_map<SPItem*, ShapeEditor> ShapeEditors;
50 struct InkNodeTool : public SPEventContext
51 {
52 sigc::connection _selection_changed_connection;
53 sigc::connection _mouseover_changed_connection;
54 sigc::connection _selection_modified_connection;
55 Inkscape::MessageContext *_node_message_context;
56 SPItem *flashed_item;
57 Inkscape::Display::TemporaryItem *flash_tempitem;
58 CSelPtr _selected_nodes;
59 MultiPathPtr _multipath;
60 SelectorPtr _selector;
61 PathSharedDataPtr _path_data;
62 SPCanvasGroup *_transform_handle_group;
63 SPItem *_last_over;
64 ShapeEditors _shape_editors;
66 unsigned cursor_drag : 1;
67 unsigned show_handles : 1;
68 unsigned show_outline : 1;
69 unsigned live_outline : 1;
70 unsigned live_objects : 1;
71 unsigned show_path_direction : 1;
72 unsigned show_transform_handles : 1;
73 unsigned single_node_transform_handles : 1;
74 unsigned edit_clipping_paths : 1;
75 unsigned edit_masks : 1;
76 };
78 struct InkNodeToolClass {
79 SPEventContextClass parent_class;
80 };
82 GType ink_node_tool_get_type (void);
84 #endif
86 /*
87 Local Variables:
88 mode:c++
89 c-file-style:"stroustrup"
90 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
91 indent-tabs-mode:nil
92 fill-column:99
93 End:
94 */
95 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :