Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::UI::Toolbar::EraserToolbar Class Reference

#include <eraser-toolbar.h>

Inheritance diagram for Inkscape::UI::Toolbar::EraserToolbar:
Inkscape::UI::Toolbar::Toolbar Inkscape::UI::Toolbar::ToolbarWidget Inkscape::UI::DefocusTarget Inkscape::UI::Widget::Bin

Public Member Functions

 EraserToolbar ()
 
 ~EraserToolbar () override
 
- Public Member Functions inherited from Inkscape::UI::Toolbar::Toolbar
 ~Toolbar () override
 
virtual void setDesktop (SPDesktop *desktop)
 
SPDesktopgetDesktop () const
 
virtual void setActiveUnit (Util::Unit const *unit)
 
void onDefocus () override
 
- Public Member Functions inherited from Inkscape::UI::Toolbar::ToolbarWidget
 ~ToolbarWidget () override
 
- Public Member Functions inherited from Inkscape::UI::Widget::Bin
 Bin (Gtk::Widget *child=nullptr)
 
 Bin (BaseObjectType *cobject, Glib::RefPtr< Gtk::Builder > const &)
 
Gtk::Widget * get_child ()
 Gets the child widget, or nullptr if none.
 
Gtk::Widget const * get_child () const
 Gets the child widget, or nullptr if none.
 
void set_child (Gtk::Widget *child)
 Sets (parents) the child widget, or unsets (unparents) it if child is null.
 
void set_child (Gtk::Widget &child)
 Convenience function: Sets (parents) the child widget.
 
void unset_child ()
 Convenience function: Unsets (unparents) the child widget.
 
template<typename F >
sigc::connection connectBeforeResize (F &&slot)
 Register a handler to run immediately before a resize operation.
 
template<typename F >
sigc::connection connectAfterResize (F &&slot)
 Register a handler to run immediately after a resize operation.
 

Private Types

using ValueChangedMemFun = void(EraserToolbar::*)()
 

Private Member Functions

 EraserToolbar (Glib::RefPtr< Gtk::Builder > const &builder)
 
void setup_derived_spin_button (UI::Widget::SpinButton &btn, Glib::ustring const &name, double default_value, ValueChangedMemFun value_changed_mem_fun)
 
void mode_changed (int mode)
 
void set_eraser_mode_visibility (unsigned eraser_mode)
 
void width_value_changed ()
 
void mass_value_changed ()
 
void velthin_value_changed ()
 
void cap_rounding_value_changed ()
 
void tremor_value_changed ()
 
void toggle_break_apart ()
 
void usepressure_toggled ()
 

Static Private Member Functions

static unsigned _modeAsInt (Tools::EraserToolMode mode)
 Computes the integer value representing eraser mode.
 
static void update_presets_list (gpointer data)
 

Private Attributes

UI::Widget::SpinButton_width_item
 
UI::Widget::SpinButton_thinning_item
 
UI::Widget::SpinButton_cap_rounding_item
 
UI::Widget::SpinButton_tremor_item
 
UI::Widget::SpinButton_mass_item
 
Gtk::ToggleButton * _usepressure_btn = nullptr
 
Gtk::ToggleButton & _split_btn
 
std::unique_ptr< SimplePrefPusher_pressure_pusher
 

Additional Inherited Members

- Protected Member Functions inherited from Inkscape::UI::Toolbar::Toolbar
 ToolbarWidget (Gtk::Box &toolbar)
 
- Protected Member Functions inherited from Inkscape::UI::Toolbar::ToolbarWidget
 ToolbarWidget (Gtk::Box &toolbar)
 
void measure_vfunc (Gtk::Orientation orientation, int for_size, int &min, int &nat, int &min_baseline, int &nat_baseline) const override
 
void on_size_allocate (int width, int height, int baseline) override
 
void _initMenuBtns ()
 
- Protected Member Functions inherited from Inkscape::UI::Widget::Bin
void measure_vfunc (Gtk::Orientation orientation, int for_size, int &min, int &nat, int &min_baseline, int &nat_baseline) const override
 
- Protected Member Functions inherited from Inkscape::UI::DefocusTarget
 ~DefocusTarget ()=default
 
- Protected Attributes inherited from Inkscape::UI::Toolbar::Toolbar
SPDesktop_desktop = nullptr
 
- Protected Attributes inherited from Inkscape::UI::Toolbar::ToolbarWidget
Gtk::Box & _toolbar
 

Detailed Description

Definition at line 55 of file eraser-toolbar.h.

Member Typedef Documentation

◆ ValueChangedMemFun

using Inkscape::UI::Toolbar::EraserToolbar::ValueChangedMemFun = void (EraserToolbar::*)()
private

Definition at line 64 of file eraser-toolbar.h.

Constructor & Destructor Documentation

◆ EraserToolbar() [1/2]

Inkscape::UI::Toolbar::EraserToolbar::EraserToolbar ( )

Definition at line 47 of file eraser-toolbar.cpp.

References Inkscape::UI::create_builder().

◆ ~EraserToolbar()

Inkscape::UI::Toolbar::EraserToolbar::~EraserToolbar ( )
overridedefault

◆ EraserToolbar() [2/2]

Member Function Documentation

◆ _modeAsInt()

unsigned Inkscape::UI::Toolbar::EraserToolbar::_modeAsInt ( Tools::EraserToolMode  mode)
staticprivate

Computes the integer value representing eraser mode.

Parameters
modeA mode of the eraser tool, from the enum EraserToolMode
Returns
the integer to be stored in the prefs as the selected mode

Definition at line 168 of file eraser-toolbar.cpp.

References _modeAsInt(), and mode.

Referenced by _modeAsInt(), EraserToolbar(), and set_eraser_mode_visibility().

◆ cap_rounding_value_changed()

void Inkscape::UI::Toolbar::EraserToolbar::cap_rounding_value_changed ( )
private

◆ mass_value_changed()

void Inkscape::UI::Toolbar::EraserToolbar::mass_value_changed ( )
private

◆ mode_changed()

◆ set_eraser_mode_visibility()

void Inkscape::UI::Toolbar::EraserToolbar::set_eraser_mode_visibility ( unsigned  eraser_mode)
private

◆ setup_derived_spin_button()

void Inkscape::UI::Toolbar::EraserToolbar::setup_derived_spin_button ( UI::Widget::SpinButton btn,
Glib::ustring const &  name,
double  default_value,
ValueChangedMemFun  value_changed_mem_fun 
)
private

◆ toggle_break_apart()

void Inkscape::UI::Toolbar::EraserToolbar::toggle_break_apart ( )
private

◆ tremor_value_changed()

void Inkscape::UI::Toolbar::EraserToolbar::tremor_value_changed ( )
private

◆ update_presets_list()

static void Inkscape::UI::Toolbar::EraserToolbar::update_presets_list ( gpointer  data)
staticprivate

◆ usepressure_toggled()

void Inkscape::UI::Toolbar::EraserToolbar::usepressure_toggled ( )
private

◆ velthin_value_changed()

void Inkscape::UI::Toolbar::EraserToolbar::velthin_value_changed ( )
private

◆ width_value_changed()

void Inkscape::UI::Toolbar::EraserToolbar::width_value_changed ( )
private

Member Data Documentation

◆ _cap_rounding_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::EraserToolbar::_cap_rounding_item
private

Definition at line 68 of file eraser-toolbar.h.

Referenced by cap_rounding_value_changed(), and EraserToolbar().

◆ _mass_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::EraserToolbar::_mass_item
private

Definition at line 70 of file eraser-toolbar.h.

Referenced by EraserToolbar(), and mass_value_changed().

◆ _pressure_pusher

std::unique_ptr<SimplePrefPusher> Inkscape::UI::Toolbar::EraserToolbar::_pressure_pusher
private

Definition at line 74 of file eraser-toolbar.h.

Referenced by EraserToolbar().

◆ _split_btn

Gtk::ToggleButton& Inkscape::UI::Toolbar::EraserToolbar::_split_btn
private

Definition at line 72 of file eraser-toolbar.h.

Referenced by EraserToolbar(), set_eraser_mode_visibility(), and toggle_break_apart().

◆ _thinning_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::EraserToolbar::_thinning_item
private

Definition at line 67 of file eraser-toolbar.h.

Referenced by EraserToolbar(), and velthin_value_changed().

◆ _tremor_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::EraserToolbar::_tremor_item
private

Definition at line 69 of file eraser-toolbar.h.

Referenced by EraserToolbar(), and tremor_value_changed().

◆ _usepressure_btn

Gtk::ToggleButton* Inkscape::UI::Toolbar::EraserToolbar::_usepressure_btn = nullptr
private

Definition at line 71 of file eraser-toolbar.h.

Referenced by EraserToolbar(), and usepressure_toggled().

◆ _width_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::EraserToolbar::_width_item
private

Definition at line 66 of file eraser-toolbar.h.

Referenced by EraserToolbar(), and width_value_changed().


The documentation for this class was generated from the following files: