Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
mesh-toolbar.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/*
6 * Authors:
7 * bulia byak <bulia@dr.com>
8 * Tavmjong Bah <tavmjong@free.fr>
9 * Vaibhav Malik <vaibhavmalik2018@gmail.com>
10 *
11 * Copyright (C) 2012 authors
12 * Copyright (C) 2005 authors
13 *
14 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
15 */
16
17#ifndef INKSCAPE_UI_TOOLBAR_MESH_TOOLBAR_H
18#define INKSCAPE_UI_TOOLBAR_MESH_TOOLBAR_H
19
20#include <vector>
21
22#include "toolbar.h"
24
25class SPObject;
26
27namespace Gtk {
28class Builder;
29class ToggleButton;
30} // namespace Gtk
31
32namespace Inkscape {
33class Selection;
34namespace UI {
35class SimplePrefPusher;
36namespace Tools { class MeshTool; }
37namespace Widget {
38class ComboToolItem;
39class SpinButton;
40} // namespace Widget
41} // namespace UI
42} // namespace Inkscape
43
44namespace Inkscape::UI::Toolbar {
45
46class MeshToolbar : public Toolbar
47{
48public:
50 ~MeshToolbar() override;
51
52 void setDesktop(SPDesktop *desktop) override;
53
54private:
55 MeshToolbar(Glib::RefPtr<Gtk::Builder> const &builder);
56
57 using ValueChangedMemFun = void (MeshToolbar::*)();
58
59 std::vector<Gtk::ToggleButton *> _new_type_buttons;
60 std::vector<Gtk::ToggleButton *> _new_fillstroke_buttons;
62
63 Gtk::ToggleButton *_edit_fill_btn;
64 Gtk::ToggleButton *_edit_stroke_btn;
65 Gtk::ToggleButton *_show_handles_btn;
66
69
70 std::unique_ptr<UI::SimplePrefPusher> _edit_fill_pusher;
71 std::unique_ptr<UI::SimplePrefPusher> _edit_stroke_pusher;
72 std::unique_ptr<UI::SimplePrefPusher> _show_handles_pusher;
73
75
76 sigc::connection c_selection_changed;
77 sigc::connection c_selection_modified;
78 sigc::connection c_subselection_changed;
79 sigc::connection c_defs_release;
80 sigc::connection c_defs_modified;
81
82 void setup_derived_spin_button(UI::Widget::SpinButton &btn, Glib::ustring const &name, double default_value,
83 ValueChangedMemFun value_changed_mem_fun);
84 void new_geometry_changed(int mode);
86 void row_changed();
87 void col_changed();
88 void toggle_fill_stroke();
89 void selection_changed();
90 void toggle_handles();
91 void warning_popup();
92 void type_changed(int mode);
93 void toggle_sides();
94 void make_elliptical();
95 void pick_colors();
96 void fit_mesh();
97
99};
100
101} // namespace Inkscape::UI::Toolbar
102
103#endif // INKSCAPE_UI_TOOLBAR_MESH_TOOLBAR_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 :
std::unique_ptr< UI::SimplePrefPusher > _edit_stroke_pusher
void type_changed(int mode)
Sets mesh type: Coons, Bicubic.
UI::Widget::SpinButton & _col_item
void(MeshToolbar::*)() ValueChangedMemFun
UI::Widget::SpinButton & _row_item
sigc::connection c_subselection_changed
std::unique_ptr< UI::SimplePrefPusher > _edit_fill_pusher
UI::Widget::ComboToolItem * _select_type_item
std::vector< Gtk::ToggleButton * > _new_fillstroke_buttons
std::unique_ptr< UI::SimplePrefPusher > _show_handles_pusher
Gtk::ToggleButton * _edit_stroke_btn
void setup_derived_spin_button(UI::Widget::SpinButton &btn, Glib::ustring const &name, double default_value, ValueChangedMemFun value_changed_mem_fun)
Tools::MeshTool * get_mesh_tool() const
void setDesktop(SPDesktop *desktop) override
std::vector< Gtk::ToggleButton * > _new_type_buttons
Gtk::ToggleButton * _show_handles_btn
Gtk::ToggleButton * _edit_fill_btn
Base class for all tool toolbars.
Definition toolbar.h:72
SpinButton widget, that allows entry of simple math expressions (also units, when linked with UnitMen...
Definition spinbutton.h:52
To do: update description of desktop.
Definition desktop.h:149
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
Definition desktop.h:50
Helper class to stream background task notifications as a series of messages.
int mode
SPDesktop * desktop
TODO: insert short description here.
Glib::ustring name
Definition toolbars.cpp:55
Glib::RefPtr< Gtk::Builder > builder