11#include <glibmm/i18n.h>
54 set_opacity(prefs->getDouble(
"/tools/booleans/opacity", 0.5));
72 for (
auto item : selection->items()) {
79 ditem->setOpacity(hide ? 0.0 : SP_SCALE24_TO_FLOAT(
item->
style->
opacity.value));
91 drawing->setOpacity(opacity);
101 if (
boolean_builder && (new_tool ==
"/tools/select" || new_tool ==
"/tool/nodes")) {
115 _desktop->
showNotice(_(
"You must select some objects to use the Shape Builder tool."), 5000);
117 _desktop->
showNotice(_(
"The Shape Builder requires regular shapes to be selected."), 5000);
127 if (path ==
"/tools/booleans/mode") {
177 set_cursor(add ?
"cursor-union.svg" :
"cursor-delete.svg");
194 bool pref = prefs->getInt(
"/tools/booleans/mode", 0) != 0;
196 return pref == modifier->active(state);
202 bool pref = prefs->getInt(
"/tools/booleans/mode", 0) == 0;
205 (pref ?
"<b>Drag</b> over fragments to unite them. <b>Click</b> to create a segment. Hold <b>%s</b> to Subtract."
206 :
"<b>Drag</b> over fragments to delete them. <b>Click</b> to delete a segment. Hold <b>%s</b> to Unite."),
207 modifier->get_label().c_str());
219 }
else if (event.
button == 3) {
232 if (event.
modifiers & GDK_BUTTON1_MASK) {
270 case GDK_KEY_KP_Enter:
Inkscape::Drawing * get_drawing()
static void done(SPDocument *document, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
A class to represent ways functionality is driven by shift modifiers.
boost::enable_if< boost::is_base_of< SPObject, T >, void >::type setList(const std::vector< T * > &objs)
Selects exactly the specified objects.
bool isEmpty()
Returns true if no items are selected.
Data type representing a typeless value of a preference.
Glib::ustring getEntryName() const
Get the last component of the preference's path.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
static Preferences * get()
Access the singleton Preferences object.
The set of selected SPObjects for a given document and layer model.
bool isTriggeredBy(KeyEvent const &key) const
Checks whether a given key event triggers this action.
To do: update description of desktop.
Inkscape::CanvasItemDrawing * getCanvasDrawing() const
Inkscape::Selection * getSelection() const
void clearWaitingCursor()
void showNotice(Glib::ustring const &msg, int timeout=0)
Inkscape::EventLog * get_event_log()
Inkscape::DrawingItem * get_arenaitem(unsigned key) const
Return the arenaitem corresponding to the given item in the display with the given key.
SPStyle * style
Represents the style properties, whether from presentation attributes, the style attribute,...
T< SPAttr::OPACITY, SPIScale24 > opacity
opacity
Editable view implementation.
TODO: insert short description here.
Macro for icon names used in Inkscape.
Helper class to stream background task notifications as a series of messages.
void inspect_event(E &&event, Fs... funcs)
Perform pattern-matching on a CanvasEvent.
Abstract base class for events.
unsigned modifiers
The modifiers mask immediately before the event.
unsigned modifiersAfter() const
Get the modifiers mask immediately after the event. (Convenience function.)
Movement of the mouse pointer.
Geom::Point pos
Location of the cursor.
SPStyle - a style object for SPItem objects.