12#include <glibmm/i18n.h>
13#include <gtkmm/image.h>
14#include <gtkmm/label.h>
31 Glib::ustring inactive_label,
char const *_icon_active,
char const *_icon_inactive,
32 Gtk::IconSize _icon_size)
34 , value(default_value)
35 , defvalue(default_value)
36 , inactive_label(
std::move(inactive_label))
37 , _icon_active(_icon_active)
38 , _icon_inactive(_icon_inactive)
39 , _icon_size(_icon_size)
66 return value ?
"true" :
"false";
102 auto const box_button = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::HORIZONTAL);
104 auto const label = Gtk::make_managed<Gtk::Label>();
112 label->set_visible(
true);
117 box_button->set_visible(
true);
118 Gtk::Widget *icon_button =
nullptr;
124 icon_button->set_visible(
true);
153 auto const box_button =
dynamic_cast<Gtk::Box *
>(
checkwdg->get_child());
159 g_assert(!children.empty());
162 auto const lab =
dynamic_cast<Gtk::Label *
>(children.back());
173 auto const im =
dynamic_cast<Gtk::Image *
>(children.front());
184 if (
value != newvalue) {
193 if (SP_ACTIVE_DESKTOP) {
Inkscape::XML::Node * getRepr()
Inkscape::UI::Widget::Registry * param_wr
Glib::ustring param_tooltip
Glib::ustring param_label
The set of selected SPObjects for a given document and layer model.
Utility functions to convert ascii representations to numbers.
Gtk::Image * sp_get_icon_image(Glib::ustring const &icon_name, int size)
Macro for icon names used in Inkscape.
std::vector< Gtk::Widget * > get_children(Gtk::Widget &widget)
Get a vector of the widgetʼs children, from get_first_child() through each get_next_sibling().
void pack_start(Gtk::Box &box, Gtk::Widget &child, bool const expand, bool const fill, unsigned const padding)
Adds child to box, packed with reference to the start of box.
bool read_bool(gchar const *value, bool default_value)
static cairo_user_data_key_t key
Helpers for using Gtk::Boxes, encapsulating large changes between GTK3 & GTK4.