Inkscape
Vector Graphics Editor
|
A toolbar widget providing support for collapsible sections. More...
#include <toolbar.h>
Public Member Functions | |
~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. | |
Protected Member Functions | |
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 |
Protected Attributes | |
Gtk::Box & | _toolbar |
Private Member Functions | |
void | _insert_menu_btn (int priority, int group_size, std::stack< std::pair< Gtk::Widget *, Gtk::Widget * > > toolbar_children) |
void | _resize_handler (int width, int height) |
void | _update_menu_btn_image (Gtk::Widget *child) |
void | _move_children (Gtk::Box *src, Gtk::Box *dest, std::stack< std::pair< Gtk::Widget *, Gtk::Widget * > > &tb_children, std::stack< std::pair< Gtk::Widget *, Gtk::Widget * > > &popover_children, int group_size, bool is_expanding=false) |
Private Attributes | |
std::vector< std::unique_ptr< MenuButton > > | _menu_btns |
std::stack< int > | _size_needed |
int | _active_mb_index = -1 |
bool | _resizing = false |
A toolbar widget providing support for collapsible sections.
|
overridedefault |
|
protected |
Definition at line 45 of file toolbar.cpp.
References _toolbar, and Inkscape::UI::Widget::Bin::set_child().
|
protected |
Definition at line 70 of file toolbar.cpp.
References _active_mb_index, _insert_menu_btn(), _menu_btns, _size_needed, _toolbar, c, child, Inkscape::UI::get_children(), Inkscape::UI::Toolbar::isMatchingPattern(), and key.
Referenced by Inkscape::UI::Toolbar::ArcToolbar::ArcToolbar(), Inkscape::UI::Toolbar::BooleansToolbar::BooleansToolbar(), Inkscape::UI::Toolbar::Box3DToolbar::Box3DToolbar(), Inkscape::UI::Toolbar::CalligraphyToolbar::CalligraphyToolbar(), Inkscape::UI::Toolbar::CommandToolbar::CommandToolbar(), Inkscape::UI::Toolbar::ConnectorToolbar::ConnectorToolbar(), Inkscape::UI::Toolbar::DropperToolbar::DropperToolbar(), Inkscape::UI::Toolbar::EraserToolbar::EraserToolbar(), Inkscape::UI::Toolbar::GradientToolbar::GradientToolbar(), Inkscape::UI::Toolbar::LPEToolbar::LPEToolbar(), Inkscape::UI::Toolbar::MarkerToolbar::MarkerToolbar(), Inkscape::UI::Toolbar::MeasureToolbar::MeasureToolbar(), Inkscape::UI::Toolbar::MeshToolbar::MeshToolbar(), Inkscape::UI::Toolbar::NodeToolbar::NodeToolbar(), Inkscape::UI::Toolbar::ObjectPickerToolbar::ObjectPickerToolbar(), Inkscape::UI::Toolbar::PageToolbar::PageToolbar(), Inkscape::UI::Toolbar::PaintbucketToolbar::PaintbucketToolbar(), Inkscape::UI::Toolbar::PencilToolbar::PencilToolbar(), Inkscape::UI::Toolbar::RectToolbar::RectToolbar(), Inkscape::UI::Toolbar::SelectToolbar::SelectToolbar(), Inkscape::UI::Toolbar::SpiralToolbar::SpiralToolbar(), Inkscape::UI::Toolbar::SprayToolbar::SprayToolbar(), Inkscape::UI::Toolbar::StarToolbar::StarToolbar(), Inkscape::UI::Toolbar::TextToolbar::TextToolbar(), Inkscape::UI::Toolbar::TweakToolbar::TweakToolbar(), and Inkscape::UI::Toolbar::ZoomToolbar::ZoomToolbar().
|
private |
Definition at line 139 of file toolbar.cpp.
References _menu_btns, and _toolbar.
Referenced by _initMenuBtns().
|
private |
Definition at line 304 of file toolbar.cpp.
References _update_menu_btn_image(), and child.
Referenced by _resize_handler().
|
private |
Definition at line 186 of file toolbar.cpp.
References _active_mb_index, _menu_btns, _move_children(), _resizing, _size_needed, _toolbar, height, min_dimension, and width.
Referenced by on_size_allocate().
|
private |
Definition at line 279 of file toolbar.cpp.
References _active_mb_index, _menu_btns, _toolbar, child, and image.
Referenced by _move_children().
|
overrideprotected |
Definition at line 162 of file toolbar.cpp.
References _toolbar.
|
overrideprotectedvirtual |
Reimplemented from Inkscape::UI::Widget::Bin.
Definition at line 172 of file toolbar.cpp.
References _resize_handler(), height, Inkscape::UI::Widget::Bin::on_size_allocate(), and width.
|
private |
Definition at line 54 of file toolbar.h.
Referenced by _initMenuBtns(), _resize_handler(), and _update_menu_btn_image().
|
private |
Definition at line 52 of file toolbar.h.
Referenced by _initMenuBtns(), _insert_menu_btn(), _resize_handler(), and _update_menu_btn_image().
|
private |
Definition at line 55 of file toolbar.h.
Referenced by _resize_handler().
|
private |
Definition at line 53 of file toolbar.h.
Referenced by _initMenuBtns(), and _resize_handler().
|
protected |
Definition at line 41 of file toolbar.h.
Referenced by _initMenuBtns(), _insert_menu_btn(), _resize_handler(), _update_menu_btn_image(), measure_vfunc(), Inkscape::UI::Toolbar::SelectToolbar::SelectToolbar(), Inkscape::UI::Toolbar::EraserToolbar::set_eraser_mode_visibility(), and ToolbarWidget().