Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
eraser-toolbar.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
6/* Authors:
7 * MenTaLguY <mental@rydia.net>
8 * Lauris Kaplinski <lauris@kaplinski.com>
9 * bulia byak <buliabyak@users.sf.net>
10 * Frank Felfe <innerspace@iname.com>
11 * John Cliff <simarilius@yahoo.com>
12 * David Turner <novalis@gnu.org>
13 * Josh Andler <scislac@scislac.com>
14 * Jon A. Cruz <jon@joncruz.org>
15 * Maximilian Albert <maximilian.albert@gmail.com>
16 * Tavmjong Bah <tavmjong@free.fr>
17 * Abhishek Sharma
18 * Kris De Gussem <Kris.DeGussem@gmail.com>
19 * Vaibhav Malik <vaibhavmalik2018@gmail.com>
20 *
21 * Copyright (C) 2004 David Turner
22 * Copyright (C) 2003 MenTaLguY
23 * Copyright (C) 1999-2011 authors
24 * Copyright (C) 2001-2002 Ximian, Inc.
25 *
26 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
27 */
28
29#ifndef INKCAPE_UI_TOOLBAR_ERASER_TOOLBAR_H
30#define INKCAPE_UI_TOOLBAR_ERASER_TOOLBAR_H
31
32#include "toolbar.h"
33
34namespace Gtk {
35class Builder;
36class ToggleButton;
37} // namespace Gtk
38
39class SPDesktop;
40
41namespace Inkscape {
42namespace UI {
43class SimplePrefPusher;
44
45namespace Tools {
46enum class EraserToolMode;
47} // namespace Tools
48
49namespace Widget {
50class SpinButton;
51} // namespace Widget
52
53namespace Toolbar {
54
55class EraserToolbar : public Toolbar
56{
57public:
59 ~EraserToolbar() override;
60
61private:
62 EraserToolbar(Glib::RefPtr<Gtk::Builder> const &builder);
63
64 using ValueChangedMemFun = void (EraserToolbar::*)();
65
71 Gtk::ToggleButton *_usepressure_btn = nullptr;
72 Gtk::ToggleButton &_split_btn;
73
74 std::unique_ptr<SimplePrefPusher> _pressure_pusher;
75
76 void setup_derived_spin_button(UI::Widget::SpinButton &btn, Glib::ustring const &name, double default_value,
77 ValueChangedMemFun value_changed_mem_fun);
78 static unsigned _modeAsInt(Tools::EraserToolMode mode);
79 void mode_changed(int mode);
80 void set_eraser_mode_visibility(unsigned eraser_mode);
82 void mass_value_changed();
86 static void update_presets_list(gpointer data);
87 void toggle_break_apart();
89};
90
91} // namespace Toolbar
92} // namespace UI
93} // namespace Inkscape
94
95#endif // INKCAPE_UI_TOOLBAR_ERASER_TOOLBAR_H
96
97/*
98 Local Variables:
99 mode:c++
100 c-file-style:"stroustrup"
101 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
102 indent-tabs-mode:nil
103 fill-column:99
104 End:
105*/
106// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
std::unique_ptr< SimplePrefPusher > _pressure_pusher
UI::Widget::SpinButton & _mass_item
UI::Widget::SpinButton & _cap_rounding_item
static unsigned _modeAsInt(Tools::EraserToolMode mode)
Computes the integer value representing eraser mode.
UI::Widget::SpinButton & _thinning_item
UI::Widget::SpinButton & _tremor_item
void setup_derived_spin_button(UI::Widget::SpinButton &btn, Glib::ustring const &name, double default_value, ValueChangedMemFun value_changed_mem_fun)
static void update_presets_list(gpointer data)
void set_eraser_mode_visibility(unsigned eraser_mode)
UI::Widget::SpinButton & _width_item
void(EraserToolbar::*)() ValueChangedMemFun
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
Definition desktop.h:50
Helper class to stream background task notifications as a series of messages.
int mode
static const Point data[]
TODO: insert short description here.
Glib::ustring name
Definition toolbars.cpp:55
Glib::RefPtr< Gtk::Builder > builder