30#include <glibmm/i18n.h>
31#include <gtkmm/adjustment.h>
32#include <gtkmm/togglebutton.h>
64 {1, _(
"(pinch tweak)")},
73 {100, _(
"(broad tweak)")}
77 {1, _(
"(minimum force)")},
84 {100, _(
"(maximum force)")}
88 {10, _(
"(rough, simplified)")},
94 {100, _(
"(fine, but many nodes)")}
100 auto &btn =
dynamic_cast<Gtk::ToggleButton &
>(
item);
110 _pressure_btn.set_active(prefs->getBool(
"/tools/tweak/usepressure",
true));
113 int mode = prefs->getIntLimited(
"/tools/tweak/mode", 0, 0,
_mode_buttons.size() - 1);
121 _doh_btn.set_active(prefs->getBool(
"/tools/tweak/doh",
true));
123 _dos_btn.set_active(prefs->getBool(
"/tools/tweak/dos",
true));
125 _dol_btn.set_active(prefs->getBool(
"/tools/tweak/dol",
true));
127 _doo_btn.set_active(prefs->getBool(
"/tools/tweak/doo",
true));
144 auto const path =
"/tools/tweak/" +
name;
147 auto adj = btn.get_adjustment();
149 adj->signal_value_changed().connect(sigc::mem_fun(*
this, value_changed_mem_fun));
double getDouble(Glib::ustring const &pref_path, double def=0.0, Glib::ustring const &unit="")
Retrieve a floating point value.
static Preferences * get()
Access the singleton Preferences object.
void setDouble(Glib::ustring const &pref_path, double value)
Set a floating point value.
void setInt(Glib::ustring const &pref_path, int value)
Set an integer value.
void setBool(Glib::ustring const &pref_path, bool value)
Set a Boolean value.
Editable view implementation.
W & get_widget(const Glib::RefPtr< Gtk::Builder > &builder, const char *id)
Gtk::Widget * for_each_child(Gtk::Widget &widget, Func &&func, bool const plus_self=false, bool const recurse=false, int const level=0)
Call Func with a reference to each child of parent, until it returns _break.
W & get_derived_widget(const Glib::RefPtr< Gtk::Builder > &builder, const char *id, Args &&... args)
Glib::RefPtr< Gtk::Builder > create_builder(const char *filename)
Glib::RefPtr< Gtk::Builder > builder