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 <glib.h>
16 #include <sigc++/sigc++.h>
17 #include "event-context.h"
18 #include "forward.h"
19 #include "display/display-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 {
32 namespace UI {
33 class MultiPathManipulator;
34 class ControlPointSelection;
35 class Selector;
36 struct PathSharedData;
37 }
38 }
40 typedef std::auto_ptr<Inkscape::UI::MultiPathManipulator> MultiPathPtr;
41 typedef std::auto_ptr<Inkscape::UI::ControlPointSelection> CSelPtr;
42 typedef std::auto_ptr<Inkscape::UI::Selector> SelectorPtr;
43 typedef std::auto_ptr<Inkscape::UI::PathSharedData> PathSharedDataPtr;
45 struct InkNodeTool : public SPEventContext
46 {
47 sigc::connection _selection_changed_connection;
48 sigc::connection _mouseover_changed_connection;
49 Inkscape::MessageContext *_node_message_context;
50 SPItem *flashed_item;
51 Inkscape::Display::TemporaryItem *flash_tempitem;
52 CSelPtr _selected_nodes;
53 MultiPathPtr _multipath;
54 SelectorPtr _selector;
55 PathSharedDataPtr _path_data;
56 SPCanvasGroup *_transform_handle_group;
58 unsigned cursor_drag : 1;
59 unsigned show_outline : 1;
60 unsigned show_path_direction : 1;
61 unsigned show_transform_handles : 1;
62 unsigned single_node_transform_handles : 1;
63 unsigned edit_clipping_paths : 1;
64 unsigned edit_masks : 1;
65 };
67 struct InkNodeToolClass {
68 SPEventContextClass parent_class;
69 };
71 GType ink_node_tool_get_type (void);
73 #endif
75 /*
76 Local Variables:
77 mode:c++
78 c-file-style:"stroustrup"
79 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
80 indent-tabs-mode:nil
81 fill-column:99
82 End:
83 */
84 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :