30#include <gtkmm/togglebutton.h>
66 auto store = Gtk::ListStore::create(columns);
68 for (
auto item : {_(
"Closed"), _(
"Open start"), _(
"Open end"), _(
"Open both")}) {
69 auto row = *
store->append();
83 auto &btn =
dynamic_cast<Gtk::ToggleButton &
>(
item);
89 int mode = prefs->getInt(
"/tools/lpetool/mode", 0);
95 _units_item->set_sensitive(prefs->getBool(
"/tools/lpetool/show_measuring_info",
true));
101 _measuring_btn.set_active(prefs->getBool(
"/tools/lpetool/show_measuring_info",
true));
145 using namespace LivePathEffect;
183 lc->reset_limiting_bbox();
202 prefs->setDouble(
"/tools/lpetool/bbox_upperleftx", A[
Geom::X]);
203 prefs->setDouble(
"/tools/lpetool/bbox_upperlefty", A[
Geom::Y]);
204 prefs->setDouble(
"/tools/lpetool/bbox_lowerrightx", B[
Geom::X]);
205 prefs->setDouble(
"/tools/lpetool/bbox_lowerrighty", B[
Geom::Y]);
215 using namespace LivePathEffect;
225 auto line_seg =
dynamic_cast<LPELineSegment *
>(
_currentlpe);
242 lc->show_measuring_info(show);
255 lc->delete_measuring_items();
256 lc->create_measuring_items();
265 std::cerr <<
"LPEToolbar::open_lpe_dialog: LPEToolbar active but current tool is not LPE tool!" << std::endl;
274 lc->update_measuring_items();
280 using namespace LivePathEffect;
287 lc->delete_measuring_items();
288 lc->create_measuring_items(selection);
291 auto lpeitem = cast<SPLPEItem>(selection->
singleItem());
294 auto lpe = lpeitem->getCurrentLPE();
295 if (lpe && lpe->effectType() == LINE_SEGMENT) {
296 auto lpels =
static_cast<LPELineSegment *
>(lpe);
Two-dimensional point that doubles as a vector.
static bool getUndoSensitive(SPDocument const *document)
SPDesktop * desktop()
Returns the desktop the selection is bound to.
SPItem * singleItem()
Returns a single selected item.
Geom::OptRect visualBounds() const
static Preferences * get()
Access the singleton Preferences object.
void setString(Glib::ustring const &pref_path, Glib::ustring const &value)
Set an UTF-8 string 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.
The set of selected SPObjects for a given document and layer model.
sigc::connection connectChanged(sigc::slot< void(Selection *)> slot)
Connects a slot to be notified of selection changes.
sigc::connection connectModified(sigc::slot< void(Selection *, unsigned)> slot)
Connects a slot to be notified of selected object modifications.
void new_dialog(const Glib::ustring &dialog_type)
Add new dialog to the current container or in a floating window, based on preferences.
To do: update description of desktop.
SPDocument * getDocument() const
Inkscape::UI::Dialog::DialogContainer * getContainer()
Inkscape::Selection * getSelection() const
Inkscape::UI::Tools::ToolBase * getTool() const
Geom::Affine const & doc2dt() const
A widget that manages DialogNotebook's and other widgets inside a horizontal DialogMultipaned.
LPE <line_segment> 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.
Glib::RefPtr< Gtk::Builder > create_builder(const char *filename)
Miscellaneous supporting code.
void sp_lpe_item_update_patheffect(SPLPEItem *lpeitem, bool wholetree, bool write, bool with_satellites)
Calls any registered handlers for the update_patheffect action.
Inkscape::LivePathEffect::EffectType type
Glib::RefPtr< Gtk::Builder > builder