22#include <glibmm/i18n.h>
23#include <glibmm/stringutils.h>
24#include <gtkmm/enums.h>
31 double lower,
double upper,
32 double step_increment,
double page_increment,
int digits,
33 SPAttr const a, Glib::ustring
const &tip_text)
35 , _inkspinscale(value, lower, upper, step_increment, page_increment, 0)
37 set_name(
"SpinScale");
51 Glib::RefPtr<Gtk::Adjustment> adjustment,
int digits,
52 SPAttr const a, Glib::ustring
const &tip_text)
54 , _adjustment{
std::move(adjustment)}
55 , _inkspinscale{_adjustment}
57 set_name(
"SpinScale");
73 return Glib::Ascii::dtostr((
int)val);
75 return Glib::Ascii::dtostr(val);
113 double value,
double lower,
double upper,
114 double step_increment,
double page_increment,
int digits,
116 Glib::ustring
const &tip_text1, Glib::ustring
const &tip_text2)
118 _s1{
std::move(label1), value, lower, upper, step_increment, page_increment, digits,
SPAttr::
INVALID, tip_text1},
119 _s2{
std::move(label2), value, lower, upper, step_increment, page_increment, digits,
SPAttr::
INVALID, tip_text2}
121 set_name(
"DualSpinScale");
128 _link.set_has_frame(
false);
129 _link.set_focus_on_click(
false);
130 _link.set_focusable(
false);
131 _link.add_css_class(
"link-edit-button");
132 _link.set_valign(Gtk::Align::CENTER);
137 _s1.set_margin_bottom(3);
142 _s2.set_sensitive(
false);
147 _link.set_image_from_icon_name(
_linked ?
"entries-linked" :
"entries-unlinked", Gtk::IconSize::LARGE);
165 gchar** toks = g_strsplit(val,
" ", 2);
168 double v1 = 0.0, v2 = 0.0;
170 v1 = v2 = Glib::Ascii::strtod(toks[0]);
172 v2 = Glib::Ascii::strtod(toks[1]);
@ INVALID
Must have value 0.
void set_digits(int digits)
Glib::RefPtr< Gtk::Adjustment > get_adjustment()
void set_label(Glib::ustring label)
void set_focus_widget(GtkWidget *focus_widget)
SPObject is an abstract base class of all of the document nodes at the SVG document level.
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.
@ VERTICAL
The y-dimension (1).
Helpers for using Gtk::Boxes, encapsulating large changes between GTK3 & GTK4.
Derived from and replaces SpinSlider.