Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
node-tool.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/* Authors:
6 * Krzysztof KosiƄski <tweenk@gmail.com>
7 *
8 * Copyright (C) 2009 Authors
9 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
10 */
11
12#ifndef INKSCAPE_UI_TOOLS_NODE_TOOL_H
13#define INKSCAPE_UI_TOOLS_NODE_TOOL_H
14
15#include "ui/tools/tool-base.h"
16
17namespace Inkscape {
18 namespace Display {
19 class TemporaryItem;
20 }
21
22 namespace UI {
23 class MultiPathManipulator;
24 class ControlPointSelection;
25 class Selector;
26 class ControlPoint;
27
28 struct PathSharedData;
29 }
30
31 class Selection;
32 class Rubberband;
33 class CanvasItemGroup;
34 struct ButtonReleaseEvent;
35}
36
37namespace Inkscape::UI::Tools {
38
39class NodeTool : public ToolBase
40{
41public:
43 ~NodeTool() override;
44
47 std::vector<Inkscape::Display::TemporaryItem *> _helperpath_tmpitem;
48 std::map<SPItem *, std::unique_ptr<ShapeEditor>> _shape_editors;
49
50 bool edit_clipping_paths = false;
51 bool edit_masks = false;
52
53 void set(Preferences::Entry const &val) override;
54 bool root_handler(CanvasEvent const &event) override;
55 bool item_handler(SPItem *item, CanvasEvent const &event) override;
56 void deleteSelected();
57
58private:
60
63
64 SPItem *flashed_item = nullptr;
65
67 Inkscape::UI::Selector* _selector = nullptr;
70 SPItem *_last_over = nullptr;
71
72 bool cursor_drag = false;
73 bool show_handles = false;
74 bool show_outline =false;
75 bool live_outline = false;
76 bool live_objects = false;
77 bool show_path_direction = false;
80
81 std::vector<SPItem*> _current_selection;
82 std::vector<SPItem*> _previous_selection;
83
85
86 void select_area(Geom::Path const &path, ButtonReleaseEvent const &event);
87 void select_point(ButtonReleaseEvent const &event);
89 void update_tip(CanvasEvent const &event);
90 void update_tip();
92
93 void _updateSelectionColor(CanvasEvent const &event);
94};
95
97
98} // namespace Inkscape::UI::Tools
99
100// Todo: Remove
101inline bool INK_IS_NODE_TOOL(Inkscape::UI::Tools::ToolBase const *obj) { return dynamic_cast<Inkscape::UI::Tools::NodeTool const *>(obj); }
102
103#endif // INKSCAPE_UI_TOOLS_NODE_TOOL_H
104
105/*
106 Local Variables:
107 mode:c++
108 c-file-style:"stroustrup"
109 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
110 indent-tabs-mode:nil
111 fill-column:99
112 End:
113*/
114// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Sequence of contiguous curves, aka spline.
Definition path.h:353
Provides a class to put a canvasitem temporarily on-canvas.
Data type representing a typeless value of a preference.
Rubberbanding selector.
Definition rubberband.h:35
The set of selected SPObjects for a given document and layer model.
Definition selection.h:80
Group of selected control points.
Draggable point, the workhorse of on-canvas editing.
Manipulator that manages multiple path manipulators active at the same time.
std::vector< Inkscape::Display::TemporaryItem * > _helperpath_tmpitem
Definition node-tool.h:47
std::vector< SPItem * > _previous_selection
Definition node-tool.h:82
Inkscape::UI::PathSharedData * _path_data
Definition node-tool.h:68
void _updateSelectionColor(CanvasEvent const &event)
void mouseover_changed(Inkscape::UI::ControlPoint *p)
sigc::connection _mouseover_changed_connection
Definition node-tool.h:62
std::vector< SPItem * > _current_selection
Definition node-tool.h:81
void select_point(ButtonReleaseEvent const &event)
Inkscape::UI::ControlPointSelection * _selected_nodes
Definition node-tool.h:45
bool item_handler(SPItem *item, CanvasEvent const &event) override
Handles item specific events.
Inkscape::CanvasItemGroup * _transform_handle_group
Definition node-tool.h:69
void selection_changed(Inkscape::Selection *sel)
std::map< SPItem *, std::unique_ptr< ShapeEditor > > _shape_editors
Definition node-tool.h:48
sigc::connection _selection_changed_connection
Definition node-tool.h:61
Inkscape::UI::Selector * _selector
Definition node-tool.h:67
Inkscape::Display::TemporaryItem * flash_tempitem
Definition node-tool.h:66
void select_area(Geom::Path const &path, ButtonReleaseEvent const &event)
Inkscape::Rubberband * get_rubberband() const
bool root_handler(CanvasEvent const &event) override
Inkscape::UI::MultiPathManipulator * _multipath
Definition node-tool.h:46
Base class for Event processors.
Definition tool-base.h:95
To do: update description of desktop.
Definition desktop.h:149
Base class for visual SVG elements.
Definition sp-item.h:109
SPItem * item
void sp_update_helperpath(SPDesktop *desktop)
Helper class to stream background task notifications as a series of messages.
bool INK_IS_NODE_TOOL(Inkscape::UI::Tools::ToolBase const *obj)
Definition node-tool.h:101
A mouse button (left/right/middle) is released.
Abstract base class for events.
SPDesktop * desktop