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

#include <spiral-toolbar.h>

Inheritance diagram for Inkscape::UI::Toolbar::SpiralToolbar:
Inkscape::UI::Toolbar::Toolbar Inkscape::XML::NodeObserver Inkscape::UI::Toolbar::ToolbarWidget Inkscape::UI::DefocusTarget Inkscape::UI::Widget::Bin

Public Member Functions

 SpiralToolbar ()
 
void setDesktop (SPDesktop *desktop) override
 
- Public Member Functions inherited from Inkscape::UI::Toolbar::Toolbar
 ~Toolbar () override
 
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 Member Functions

 SpiralToolbar (Glib::RefPtr< Gtk::Builder > const &builder)
 
void _attachRepr (XML::Node *repr)
 
void _detachRepr ()
 
void _setupDerivedSpinButton (UI::Widget::SpinButton &btn, Glib::ustring const &name, double default_value)
 
void _valueChanged (Glib::RefPtr< Gtk::Adjustment > &adj, Glib::ustring const &value_name)
 
void _setDefaults ()
 
void _selectionChanged (Selection *selection)
 
void notifyAttributeChanged (XML::Node &node, GQuark key, Util::ptr_shared oldval, Util::ptr_shared newval) override
 Attribute change callback.
 
void _queueUpdate ()
 
void _cancelUpdate ()
 
void _update ()
 
- Private Member Functions inherited from Inkscape::XML::NodeObserver
virtual ~NodeObserver ()=default
 
virtual void notifyChildAdded (Node &node, Node &child, Node *prev)
 Child addition callback.
 
virtual void notifyChildRemoved (Node &node, Node &child, Node *prev)
 Child removal callback.
 
virtual void notifyChildOrderChanged (Node &node, Node &child, Node *old_prev, Node *new_prev)
 Child order change callback.
 
virtual void notifyContentChanged (Node &node, Util::ptr_shared old_content, Util::ptr_shared new_content)
 Content change callback.
 
virtual void notifyElementNameChanged (Node &node, GQuark old_name, GQuark new_name)
 Element name change callback.
 
 NodeObserver ()=default
 

Private Attributes

Gtk::Label & _mode_item
 
UI::Widget::SpinButton_revolution_item
 
UI::Widget::SpinButton_expansion_item
 
UI::Widget::SpinButton_t0_item
 
OperationBlocker _blocker
 
XML::Node_repr = nullptr
 
sigc::connection _selection_changed_conn
 
unsigned _tick_callback = 0
 

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 49 of file spiral-toolbar.h.

Constructor & Destructor Documentation

◆ SpiralToolbar() [1/2]

Inkscape::UI::Toolbar::SpiralToolbar::SpiralToolbar ( )

Definition at line 51 of file spiral-toolbar.cpp.

References Inkscape::UI::create_builder().

◆ SpiralToolbar() [2/2]

Inkscape::UI::Toolbar::SpiralToolbar::SpiralToolbar ( Glib::RefPtr< Gtk::Builder > const &  builder)
private

Member Function Documentation

◆ _attachRepr()

void Inkscape::UI::Toolbar::SpiralToolbar::_attachRepr ( XML::Node repr)
private

Definition at line 132 of file spiral-toolbar.cpp.

References _repr, Inkscape::XML::Node::addObserver(), and Inkscape::GC::anchor().

Referenced by _selectionChanged().

◆ _cancelUpdate()

void Inkscape::UI::Toolbar::SpiralToolbar::_cancelUpdate ( )
private

Definition at line 239 of file spiral-toolbar.cpp.

References _tick_callback.

Referenced by _detachRepr().

◆ _detachRepr()

void Inkscape::UI::Toolbar::SpiralToolbar::_detachRepr ( )
private

◆ _queueUpdate()

void Inkscape::UI::Toolbar::SpiralToolbar::_queueUpdate ( )
private

Definition at line 226 of file spiral-toolbar.cpp.

References _tick_callback, and _update().

Referenced by notifyAttributeChanged().

◆ _selectionChanged()

void Inkscape::UI::Toolbar::SpiralToolbar::_selectionChanged ( Selection selection)
private

◆ _setDefaults()

void Inkscape::UI::Toolbar::SpiralToolbar::_setDefaults ( )
private

◆ _setupDerivedSpinButton()

void Inkscape::UI::Toolbar::SpiralToolbar::_setupDerivedSpinButton ( UI::Widget::SpinButton btn,
Glib::ustring const &  name,
double  default_value 
)
private

◆ _update()

void Inkscape::UI::Toolbar::SpiralToolbar::_update ( )
private

◆ _valueChanged()

◆ notifyAttributeChanged()

void Inkscape::UI::Toolbar::SpiralToolbar::notifyAttributeChanged ( XML::Node node,
GQuark  name,
Util::ptr_shared  old_value,
Util::ptr_shared  new_value 
)
overrideprivatevirtual

Attribute change callback.

This method is called whenever one of a node's attributes is changed.

Parameters
nodeThe changed XML node
nameGQuark corresponding to the attribute's name
old_valueOld value of the modified attribute. Is a nullptr when the attribute is added.
new_valueNew value of the modified attribute. Is a nullptr when the attribute is removed.

Reimplemented from Inkscape::XML::NodeObserver.

Definition at line 214 of file spiral-toolbar.cpp.

References _blocker, _queueUpdate(), _repr, and OperationBlocker::pending().

◆ setDesktop()

Member Data Documentation

◆ _blocker

OperationBlocker Inkscape::UI::Toolbar::SpiralToolbar::_blocker
private

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

Referenced by _update(), _valueChanged(), and notifyAttributeChanged().

◆ _expansion_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::SpiralToolbar::_expansion_item
private

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

Referenced by _setDefaults(), _update(), and SpiralToolbar().

◆ _mode_item

Gtk::Label& Inkscape::UI::Toolbar::SpiralToolbar::_mode_item
private

Definition at line 61 of file spiral-toolbar.h.

Referenced by _selectionChanged().

◆ _repr

XML::Node* Inkscape::UI::Toolbar::SpiralToolbar::_repr = nullptr
private

◆ _revolution_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::SpiralToolbar::_revolution_item
private

Definition at line 63 of file spiral-toolbar.h.

Referenced by _setDefaults(), _update(), and SpiralToolbar().

◆ _selection_changed_conn

sigc::connection Inkscape::UI::Toolbar::SpiralToolbar::_selection_changed_conn
private

Definition at line 77 of file spiral-toolbar.h.

Referenced by setDesktop().

◆ _t0_item

UI::Widget::SpinButton& Inkscape::UI::Toolbar::SpiralToolbar::_t0_item
private

Definition at line 65 of file spiral-toolbar.h.

Referenced by _setDefaults(), _update(), and SpiralToolbar().

◆ _tick_callback

unsigned Inkscape::UI::Toolbar::SpiralToolbar::_tick_callback = 0
private

Definition at line 84 of file spiral-toolbar.h.

Referenced by _cancelUpdate(), and _queueUpdate().


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