Inkscape
Vector Graphics Editor
|
#include <spiral-toolbar.h>
Public Member Functions | |
SpiralToolbar () | |
void | setDesktop (SPDesktop *desktop) override |
![]() | |
~Toolbar () override | |
SPDesktop * | getDesktop () const |
virtual void | setActiveUnit (Util::Unit const *unit) |
void | onDefocus () override |
![]() | |
~ToolbarWidget () override | |
![]() | |
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 () |
![]() | |
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 | |
![]() | |
ToolbarWidget (Gtk::Box &toolbar) | |
![]() | |
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 () |
![]() | |
void | measure_vfunc (Gtk::Orientation orientation, int for_size, int &min, int &nat, int &min_baseline, int &nat_baseline) const override |
![]() | |
~DefocusTarget ()=default | |
![]() | |
SPDesktop * | _desktop = nullptr |
![]() | |
Gtk::Box & | _toolbar |
Definition at line 49 of file spiral-toolbar.h.
Inkscape::UI::Toolbar::SpiralToolbar::SpiralToolbar | ( | ) |
Definition at line 51 of file spiral-toolbar.cpp.
References Inkscape::UI::create_builder().
|
private |
Definition at line 55 of file spiral-toolbar.cpp.
References _expansion_item, Inkscape::UI::Toolbar::ToolbarWidget::_initMenuBtns(), _revolution_item, _setDefaults(), _setupDerivedSpinButton(), _t0_item, builder, Inkscape::UI::get_widget(), and Inkscape::UI::Widget::SpinButton::set_custom_numeric_menu_data().
|
private |
Definition at line 132 of file spiral-toolbar.cpp.
References _repr, Inkscape::XML::Node::addObserver(), and Inkscape::GC::anchor().
Referenced by _selectionChanged().
|
private |
Definition at line 239 of file spiral-toolbar.cpp.
References _tick_callback.
Referenced by _detachRepr().
|
private |
Definition at line 140 of file spiral-toolbar.cpp.
References _cancelUpdate(), _repr, Inkscape::GC::release(), and Inkscape::XML::Node::removeObserver().
Referenced by _selectionChanged(), and setDesktop().
|
private |
Definition at line 226 of file spiral-toolbar.cpp.
References _tick_callback, and _update().
Referenced by notifyAttributeChanged().
|
private |
Definition at line 190 of file spiral-toolbar.cpp.
References _attachRepr(), _detachRepr(), _mode_item, _repr, SPObject::getRepr(), item, Inkscape::ObjectSet::items(), and Inkscape::XML::Node::synthesizeEvents().
Referenced by setDesktop().
|
private |
Definition at line 180 of file spiral-toolbar.cpp.
References _expansion_item, _revolution_item, _t0_item, and Inkscape::UI::Toolbar::Toolbar::onDefocus().
Referenced by SpiralToolbar().
|
private |
Definition at line 101 of file spiral-toolbar.cpp.
References _valueChanged(), Inkscape::Preferences::get(), Inkscape::Preferences::getDouble(), name, and Inkscape::UI::Widget::SpinButton::setDefocusTarget().
Referenced by SpiralToolbar().
|
private |
Definition at line 249 of file spiral-toolbar.cpp.
References _blocker, _expansion_item, _repr, _revolution_item, _t0_item, OperationBlocker::block(), and Inkscape::XML::Node::getAttributeDouble().
Referenced by _queueUpdate().
|
private |
Definition at line 149 of file spiral-toolbar.cpp.
References _blocker, Inkscape::UI::Toolbar::Toolbar::_desktop, OperationBlocker::block(), Inkscape::DocumentUndo::done(), Inkscape::Preferences::get(), SPDesktop::getDocument(), SPObject::getRepr(), SPDesktop::getSelection(), Inkscape::DocumentUndo::getUndoSensitive(), item, Inkscape::ObjectSet::items(), OperationBlocker::pending(), Inkscape::XML::Node::setAttributeSvgDouble(), Inkscape::Preferences::setDouble(), and SPObject::updateRepr().
Referenced by _setupDerivedSpinButton().
|
overrideprivatevirtual |
Attribute change callback.
This method is called whenever one of a node's attributes is changed.
node | The changed XML node |
name | GQuark corresponding to the attribute's name |
old_value | Old value of the modified attribute. Is a nullptr when the attribute is added. |
new_value | New 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().
|
overridevirtual |
Reimplemented from Inkscape::UI::Toolbar::Toolbar.
Definition at line 113 of file spiral-toolbar.cpp.
References Inkscape::UI::Toolbar::Toolbar::_desktop, _detachRepr(), _repr, _selection_changed_conn, _selectionChanged(), Inkscape::Selection::connectChanged(), desktop, SPDesktop::getSelection(), and Inkscape::UI::Toolbar::Toolbar::setDesktop().
|
private |
Definition at line 67 of file spiral-toolbar.h.
Referenced by _update(), _valueChanged(), and notifyAttributeChanged().
|
private |
Definition at line 64 of file spiral-toolbar.h.
Referenced by _setDefaults(), _update(), and SpiralToolbar().
|
private |
Definition at line 61 of file spiral-toolbar.h.
Referenced by _selectionChanged().
|
private |
Definition at line 69 of file spiral-toolbar.h.
Referenced by _attachRepr(), _detachRepr(), _selectionChanged(), _update(), notifyAttributeChanged(), and setDesktop().
|
private |
Definition at line 63 of file spiral-toolbar.h.
Referenced by _setDefaults(), _update(), and SpiralToolbar().
|
private |
Definition at line 77 of file spiral-toolbar.h.
Referenced by setDesktop().
|
private |
Definition at line 65 of file spiral-toolbar.h.
Referenced by _setDefaults(), _update(), and SpiralToolbar().
|
private |
Definition at line 84 of file spiral-toolbar.h.
Referenced by _cancelUpdate(), and _queueUpdate().