Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
object-properties.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/*
6 * Inkscape, an Open Source vector graphics editor
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *
22 * Copyright (C) 2012 Kris De Gussem <Kris.DeGussem@gmail.com>
23 * c++ version based on former C-version (GPL v2+) with authors:
24 * Lauris Kaplinski <lauris@kaplinski.com>
25 * bulia byak <buliabyak@users.sf.net>
26 * Johan Engelen <goejendaagh@zonnet.nl>
27 * Abhishek Sharma
28 */
29
30#include "object-properties.h"
31
32#include <glibmm/i18n.h>
33#include <gtkmm/adjustment.h>
34#include <gtkmm/box.h>
35#include <gtkmm/enums.h>
36#include <gtkmm/expander.h>
37#include <gtkmm/grid.h>
38#include <gtkmm/label.h>
39#include <gtkmm/object.h>
40#include <gtkmm/separator.h>
41#include <gtkmm/version.h>
42
43#include "document-undo.h"
44#include "document.h"
45#include "inkscape.h"
46#include "object/sp-item.h"
47#include "preferences.h"
48#include "selection.h"
49#include "object/sp-image.h"
50#include "ui/icon-names.h"
51#include "ui/pack.h"
52#include "ui/syntax.h"
53#include "ui/widget/frame.h"
56
57namespace Inkscape::UI::Dialog {
58
60 : DialogBase("/dialogs/object-properties-widget/", "ObjectPropertiesWidget")
61 , _blocked(false)
62 , _current_item(nullptr)
63 , _label_id(_("_ID:"), true)
64 , _label_label(_("_Label:"), true)
65 , _label_title(_("_Title:"), true)
66 , _label_dpi(_("_DPI SVG:"), true)
67 , _label_color(_("Highlight Color:"), true)
68 , _highlight_color(_("Highlight Color"), "", Colors::Color(0xff0000ff), true)
69 , _cb_hide(_("_Hide"), true)
70 , _cb_lock(_("L_ock"), true)
71 , _cb_aspect_ratio(_("Preserve Ratio"), true)
72 , _exp_interactivity(_("_Interactivity"), true)
73 , _attr_table(Gtk::make_managed<SPAttributeTable>(Syntax::SyntaxMode::JavaScript))
74{
75 //initialize labels for the table at the bottom of the dialog
76 _int_attrs.emplace_back("onclick");
77 _int_attrs.emplace_back("onmouseover");
78 _int_attrs.emplace_back("onmouseout");
79 _int_attrs.emplace_back("onmousedown");
80 _int_attrs.emplace_back("onmouseup");
81 _int_attrs.emplace_back("onmousemove");
82 _int_attrs.emplace_back("onfocusin");
83 _int_attrs.emplace_back("onfocusout");
84 _int_attrs.emplace_back("onload");
85
86 _int_labels.emplace_back("OnClick:");
87 _int_labels.emplace_back("OnMouseOver:");
88 _int_labels.emplace_back("OnMouseOut:");
89 _int_labels.emplace_back("OnMouseDown:");
90 _int_labels.emplace_back("OnMouseUp:");
91 _int_labels.emplace_back("OnMouseMove:");
92 _int_labels.emplace_back("OnFocusIn:");
93 _int_labels.emplace_back("OnFocusOut:");
94 _int_labels.emplace_back("OnLoad:");
95
96 _init();
97}
98
100{
101 const int spacing = 4;
102 set_spacing(spacing);
103
104 {
105 auto exp_path = _prefs_path + "expand-props";
106 auto expanded = Inkscape::Preferences::get()->getBool(exp_path, false);
107 _exp_properties.set_expanded(expanded);
108 _exp_properties.property_expanded().signal_changed().connect([exp_path, this]{
109 Inkscape::Preferences::get()->setBool(exp_path, _exp_properties.get_expanded());
110 });
111 }
112 {
113 auto exp_path = _prefs_path + "expand-interactive";
114 auto expanded = Inkscape::Preferences::get()->getBool(exp_path, false);
115 _exp_interactivity.set_expanded(expanded);
116 _exp_interactivity.property_expanded().signal_changed().connect([exp_path, this]{
117 Inkscape::Preferences::get()->setBool(exp_path, _exp_interactivity.get_expanded());
118 });
119 }
120
121 auto const grid_top = Gtk::make_managed<Gtk::Grid>();
122 grid_top->set_row_spacing(spacing);
123 grid_top->set_column_spacing(spacing);
124
125 _exp_properties.set_label(_("Properties"));
126 _exp_properties.set_child(*grid_top);
127 UI::pack_start(*this, _exp_properties, false, false);
128
129 /* Create the label for the object id */
130 _label_id.set_label(_label_id.get_label() + " ");
131 _label_id.set_halign(Gtk::Align::START);
132 _label_id.set_valign(Gtk::Align::CENTER);
133
134 /* Create the entry box for the object id */
135 _entry_id.set_tooltip_text(_("The id= attribute (only letters, digits, and the characters .-_: allowed)"));
136 _entry_id.set_max_length(64);
137 _entry_id.set_hexpand();
138 _entry_id.set_valign(Gtk::Align::CENTER);
139
140 _label_id.set_mnemonic_widget(_entry_id);
141
142 // pressing enter in the id field is the same as clicking Set:
143 _entry_id.signal_activate().connect(sigc::mem_fun(*this, &ObjectProperties::_labelChanged));
144 // focus is in the id field initially:
145 _entry_id.grab_focus();
146
147 /* Create the label for the object label */
148 _label_label.set_label(_label_label.get_label() + " ");
149 _label_label.set_halign(Gtk::Align::START);
150 _label_label.set_valign(Gtk::Align::CENTER);
151
152 /* Create the entry box for the object label */
153 _entry_label.set_tooltip_text(_("A freeform label for the object"));
154 _entry_label.set_max_length(256);
155
156 _entry_label.set_hexpand();
157 _entry_label.set_valign(Gtk::Align::CENTER);
158
159 _label_label.set_mnemonic_widget(_entry_label);
160
161 // pressing enter in the label field is the same as clicking Set:
162 _entry_label.signal_activate().connect(sigc::mem_fun(*this, &ObjectProperties::_labelChanged));
163
164 /* Create the label for the object title */
165 _label_title.set_label(_label_title.get_label() + " ");
166 _label_title.set_halign(Gtk::Align::START);
167 _label_title.set_valign(Gtk::Align::CENTER);
168
169 /* Create the entry box for the object title */
170 _entry_title.set_sensitive (FALSE);
171 _entry_title.set_max_length (256);
172
173 _entry_title.set_hexpand();
174 _entry_title.set_valign(Gtk::Align::CENTER);
175
176 _label_title.set_mnemonic_widget(_entry_title);
177 // pressing enter in the label field is the same as clicking Set:
178 _entry_title.signal_activate().connect(sigc::mem_fun(*this, &ObjectProperties::_labelChanged));
179
180 _label_color.set_mnemonic_widget(_highlight_color);
181 _label_color.set_halign(Gtk::Align::START);
183
184 /* Create the frame for the object description */
185 auto const label_desc = Gtk::make_managed<Gtk::Label>(_("_Description:"), true);
186 auto const frame_desc = Gtk::make_managed<UI::Widget::Frame>("", FALSE);
187 frame_desc->set_label_widget(*label_desc);
188 label_desc->set_margin_bottom(spacing);
189 frame_desc->set_padding(0, 0, 0, 0);
190 frame_desc->set_size_request(-1, 80);
191
192 /* Create the text view box for the object description */
193 _ft_description.set_sensitive(false);
194 frame_desc->set_child(_ft_description);
195 _ft_description.set_margin(0);
196
197 _tv_description.set_wrap_mode(Gtk::WrapMode::WORD);
198 _tv_description.get_buffer()->set_text("");
200 _tv_description.add_mnemonic_label(*label_desc);
201
202 /* Create the label for the object title */
203 _label_dpi.set_halign(Gtk::Align::START);
204 _label_dpi.set_valign(Gtk::Align::CENTER);
205
206 /* Create the entry box for the SVG DPI */
207 _spin_dpi.set_digits(2);
208 _spin_dpi.set_range(1, 2400);
209 auto adj = Gtk::Adjustment::create(96, 1, 2400);
210 adj->set_step_increment(10);
211 adj->set_page_increment(100);
212 _spin_dpi.set_adjustment(adj);
213 _spin_dpi.set_tooltip_text(_("Set resolution for vector images (press Enter to see change in rendering quality)"));
214
215 _label_dpi.set_mnemonic_widget(_spin_dpi);
216 // pressing enter in the label field is the same as clicking Set:
217#if GTKMM_CHECK_VERSION(4, 14, 0)
218 _spin_dpi.signal_activate().connect(sigc::mem_fun(*this, &ObjectProperties::_labelChanged));
219#endif
220
221 /* Check boxes */
222 auto const hb_checkboxes = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::HORIZONTAL);
223
224 auto const grid_cb = Gtk::make_managed<Gtk::Grid>();
225 grid_cb->set_row_homogeneous();
226 grid_cb->set_column_homogeneous(true);
227 grid_cb->set_row_spacing(spacing);
228 grid_cb->set_column_spacing(spacing);
229 grid_cb->set_margin(0);
230 UI::pack_start(*hb_checkboxes, *grid_cb, true, true);
231
232 /* Hide */
233 _cb_hide.set_tooltip_text (_("Check to make the object invisible"));
234 _cb_hide.set_hexpand();
235 _cb_hide.set_valign(Gtk::Align::CENTER);
236 grid_cb->attach(_cb_hide, 0, 0, 1, 1);
237
238 _cb_hide.signal_toggled().connect(sigc::mem_fun(*this, &ObjectProperties::_hiddenToggled));
239
240 /* Lock */
241 // TRANSLATORS: "Lock" is a verb here
242 _cb_lock.set_tooltip_text(_("Check to make the object insensitive (not selectable by mouse)"));
243 _cb_lock.set_hexpand();
244 _cb_lock.set_valign(Gtk::Align::CENTER);
245 grid_cb->attach(_cb_lock, 1, 0, 1, 1);
246
247 _cb_lock.signal_toggled().connect(sigc::mem_fun(*this, &ObjectProperties::_sensitivityToggled));
248
249 /* Preserve aspect ratio */
250 _cb_aspect_ratio.set_tooltip_text(_("Check to preserve aspect ratio on images"));
251 _cb_aspect_ratio.set_hexpand();
252 _cb_aspect_ratio.set_valign(Gtk::Align::CENTER);
253 grid_cb->attach(_cb_aspect_ratio, 0, 1, 1, 1);
254
255 _cb_aspect_ratio.signal_toggled().connect(sigc::mem_fun(*this, &ObjectProperties::_aspectRatioToggled));
256
257 /* Button for setting the object's id, label, title and description. */
258 auto const btn_set = Gtk::make_managed<Gtk::Button>(_("_Set"), true);
259 btn_set->set_hexpand();
260 btn_set->set_valign(Gtk::Align::CENTER);
261 grid_cb->attach(*btn_set, 1, 1, 1, 1);
262
263 btn_set->signal_clicked().connect(sigc::mem_fun(*this, &ObjectProperties::_labelChanged));
264
265 grid_top->attach(_label_id, 0, 0, 1, 1);
266 grid_top->attach(_entry_id, 1, 0, 1, 1);
267 grid_top->attach(_label_label, 0, 1, 1, 1);
268 grid_top->attach(_entry_label, 1, 1, 1, 1);
269 grid_top->attach(_label_title, 0, 2, 1, 1);
270 grid_top->attach(_entry_title, 1, 2, 1, 1);
271 grid_top->attach(_label_color, 0, 3, 1, 1);
272 grid_top->attach(_highlight_color, 1, 3, 1, 1);
273 grid_top->attach(_label_dpi, 0, 4, 1, 1);
274 grid_top->attach(_spin_dpi, 1, 4, 1, 1);
275 grid_top->attach(*frame_desc, 0, 5, 2, 1);
276 grid_top->attach(*hb_checkboxes, 0, 6, 2, 1);
277
279 auto vbox = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::VERTICAL);
280 auto js = Gtk::make_managed<Gtk::Label>();
281 js->set_markup(_("<small><i>Enter JavaScript code for interactive behavior in a browser.</i></small>"));
282 js->set_ellipsize(Pango::EllipsizeMode::END);
283 js->set_xalign(0.0);
284 vbox->set_spacing(spacing);
285 vbox->append(*_attr_table);
286 vbox->append(*js);
287 _exp_interactivity.set_child(*vbox);
288
289 auto sep = Gtk::make_managed<Gtk::Separator>(Gtk::Orientation::HORIZONTAL);
290 UI::pack_start(*this, *sep, false, false);
291 UI::pack_start(*this, _exp_interactivity, false, false);
292
293 set_visible(true);
294}
295
297{
298 if (_blocked || !getDesktop()) {
299 return;
300 }
301
302 auto selection = getSelection();
303 if (!selection) return;
304
305 SPItem* item = nullptr;
306
307 auto set_sens = [](Gtk::Expander& exp, bool sensitive) {
308 if (auto w = exp.get_child()) {
309 w->set_sensitive(sensitive);
310 }
311 };
312
313 if (selection->singleItem()) {
315 set_sens(_exp_properties, true);
316 set_sens(_exp_interactivity, true);
317 }
318 else {
319 set_sens(_exp_properties, false);
320 set_sens(_exp_interactivity, false);
321 _current_item = nullptr;
322 //no selection anymore or multiple objects selected, means that we need
323 //to close the connections to the previously selected object
324 _attr_table->change_object(nullptr);
325 }
326
327 if (item && _current_item == item) {
328 //otherwise we would end up wasting resources through the modify selection
329 //callback when moving an object (endlessly setting the labels and recreating _attr_table)
330 return;
331 }
332
333 _blocked = true;
334 _cb_aspect_ratio.set_active(item && g_strcmp0(item->getAttribute("preserveAspectRatio"), "none") != 0);
335 _cb_lock.set_active(item && item->isLocked()); /* Sensitive */
336 _cb_hide.set_active(item && item->isExplicitlyHidden()); /* Hidden */
339 // hide aspect ratio checkbox for an image element, images have their own panel in object attributes;
340 // apart from <image> only <marker>, <patten>, and <view> support this attribute, but we don't handle them
341 // in this dialog today; I'm leaving the code, as we may handle them in the future
342 _cb_aspect_ratio.set_visible(item && false);
343
344 // image-only SVG DPI attribute:
345 bool show_dpi = is<SPImage>(item);
346 _label_dpi.set_visible(show_dpi);
347 _spin_dpi.set_visible(show_dpi);
348 if (show_dpi && item->getRepr()) {
349 // update DPI
350 auto dpi = item->getRepr()->getAttributeDouble("inkscape:svg-dpi", 96);
351 _spin_dpi.set_value(dpi);
352 }
353
354 if (item && item->cloned) {
355 /* ID */
356 _entry_id.set_text("");
357 _entry_id.set_sensitive(FALSE);
358 _label_id.set_text(_("Ref"));
359
360 /* Label */
361 _entry_label.set_text("");
362 _entry_label.set_sensitive(FALSE);
363 _label_label.set_text(_("Ref"));
364
365 } else {
366 auto obj = static_cast<SPObject*>(item);
367
368 /* ID */
369 _entry_id.set_text(obj && obj->getId() ? obj->getId() : "");
370 _entry_id.set_sensitive(TRUE);
371 _label_id.set_markup_with_mnemonic(_("_ID:") + Glib::ustring(" "));
372
373 /* Label */
374 auto currentlabel = obj ? obj->label() : nullptr;
375 auto placeholder = "";
376 if (!currentlabel) {
377 currentlabel = "";
378 placeholder = obj ? obj->defaultLabel() : "";
379 }
380 _entry_label.set_text(currentlabel);
381 _entry_label.set_placeholder_text(placeholder);
382 _entry_label.set_sensitive(TRUE);
383
384 /* Title */
385 auto title = obj ? obj->title() : nullptr;
386 if (title) {
387 _entry_title.set_text(title);
388 g_free(title);
389 }
390 else {
391 _entry_title.set_text("");
392 }
393 _entry_title.set_sensitive(TRUE);
394
395 /* Description */
396 auto desc = obj ? obj->desc() : nullptr;
397 if (desc) {
398 _tv_description.get_buffer()->set_text(desc);
399 g_free(desc);
400 } else {
401 _tv_description.get_buffer()->set_text("");
402 }
403 _ft_description.set_sensitive(TRUE);
404
406 }
408 _blocked = false;
409}
410
412{
413 if (_blocked) {
414 return;
415 }
416
418 g_return_if_fail (item != nullptr);
419
420 _blocked = true;
421
422 /* Retrieve the label widget for the object's id */
423 gchar *id = g_strdup(_entry_id.get_text().c_str());
424 g_strcanon(id, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.:", '_');
425 if (g_strcmp0(id, item->getId()) == 0) {
426 _label_id.set_markup_with_mnemonic(_("_ID:") + Glib::ustring(" "));
427 } else if (!*id || !isalnum (*id)) {
428 _label_id.set_text(_("Id invalid! "));
429 } else if (getDocument()->getObjectById(id) != nullptr) {
430 _label_id.set_text(_("Id exists! "));
431 } else {
432 _label_id.set_markup_with_mnemonic(_("_ID:") + Glib::ustring(" "));
433 item->setAttribute("id", id);
434 DocumentUndo::done(getDocument(), _("Set object ID"), INKSCAPE_ICON("dialog-object-properties"));
435 }
436 g_free(id);
437
438 /* Retrieve the label widget for the object's label */
439 Glib::ustring label = _entry_label.get_text();
440
441 /* Give feedback on success of setting the drawing object's label
442 * using the widget's label text
443 */
444 SPObject *obj = static_cast<SPObject*>(item);
445 char const *currentlabel = obj->label();
446 if (label.compare(currentlabel ? currentlabel : "")) {
447 obj->setLabel(label.c_str());
448 DocumentUndo::done(getDocument(), _("Set object label"), INKSCAPE_ICON("dialog-object-properties"));
449 }
450
451 /* Retrieve the title */
452 if (obj->setTitle(_entry_title.get_text().c_str())) {
453 DocumentUndo::done(getDocument(), _("Set object title"), INKSCAPE_ICON("dialog-object-properties"));
454 }
455
456 /* Retrieve the DPI */
457 if (is<SPImage>(obj)) {
458 Glib::ustring dpi_value = Inkscape::ustring::format_classic(_spin_dpi.get_value());
459 obj->setAttribute("inkscape:svg-dpi", dpi_value);
460 DocumentUndo::done(getDocument(), _("Set image DPI"), INKSCAPE_ICON("dialog-object-properties"));
461 }
462
463 /* Retrieve the description */
464 Gtk::TextBuffer::iterator start, end;
465 _tv_description.get_buffer()->get_bounds(start, end);
466 Glib::ustring desc = _tv_description.get_buffer()->get_text(start, end, TRUE);
467 if (obj->setDesc(desc.c_str())) {
468 DocumentUndo::done(getDocument(), _("Set object description"), INKSCAPE_ICON("dialog-object-properties"));
469 }
470
471 _blocked = false;
472}
473
475{
476 if (_blocked)
477 return;
478
479 if (auto item = getSelection()->singleItem()) {
480 item->setHighlight(color);
481 DocumentUndo::done(getDocument(), _("Set item highlight color"), INKSCAPE_ICON("dialog-object-properties"));
482 }
483}
484
486{
487 if (_blocked) {
488 return;
489 }
490
492 g_return_if_fail(item != nullptr);
493
494 _blocked = true;
495 item->setLocked(_cb_lock.get_active());
496 DocumentUndo::done(getDocument(), _cb_lock.get_active() ? _("Lock object") : _("Unlock object"), INKSCAPE_ICON("dialog-object-properties"));
497 _blocked = false;
498}
499
501{
502 if (_blocked) {
503 return;
504 }
505
507 g_return_if_fail(item != nullptr);
508
509 _blocked = true;
510
511 const char *active;
512 if (_cb_aspect_ratio.get_active()) {
513 active = "xMidYMid";
514 }
515 else {
516 active = "none";
517 }
518 /* Retrieve the DPI */
519 if (is<SPImage>(item)) {
520 Glib::ustring dpi_value = Inkscape::ustring::format_classic(_spin_dpi.get_value());
521 item->setAttribute("preserveAspectRatio", active);
522 DocumentUndo::done(getDocument(), _("Set preserve ratio"), INKSCAPE_ICON("dialog-object-properties"));
523 }
524 _blocked = false;
525}
526
528{
529 if (_blocked) {
530 return;
531 }
532
534 g_return_if_fail(item != nullptr);
535
536 _blocked = true;
537 item->setExplicitlyHidden(_cb_hide.get_active());
538 DocumentUndo::done(getDocument(), _cb_hide.get_active() ? _("Hide object") : _("Unhide object"), INKSCAPE_ICON("dialog-object-properties"));
539 _blocked = false;
540}
541
546
551
552} // namespace Inkscape::UI::Dialog
553
554/*
555 Local Variables:
556 mode:c++
557 c-file-style:"stroustrup"
558 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
559 indent-tabs-mode:nil
560 fill-column:99
561 End:
562*/
563// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
static void done(SPDocument *document, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
SPItem * singleItem()
Returns a single selected item.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
static Preferences * get()
Access the singleton Preferences object.
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.
Definition selection.h:80
DialogBase is the base class for the dialog system.
Definition dialog-base.h:42
Selection * getSelection() const
Definition dialog-base.h:84
SPDocument * getDocument() const
Definition dialog-base.h:83
Glib::ustring const _prefs_path
Definition dialog-base.h:88
SPDesktop * getDesktop() const
Definition dialog-base.h:79
std::vector< Glib::ustring > _int_labels
Inkscape::UI::Widget::ColorPicker _highlight_color
void _highlightChanged(Colors::Color const &color)
void _hiddenToggled()
Callback for checkbox Hide.
void _aspectRatioToggled()
Callback for checkbox Preserve Aspect Ratio.
void _init()
Constructor auxiliary function creating the child widgets.
void update_entries()
Updates entries and other child widgets on selection change, object modification, etc.
std::vector< Glib::ustring > _int_attrs
void _labelChanged()
Sets object properties (ID, label, title, description) on user input.
void desktopReplaced() override
Called when the desktop has certainly changed.
void selectionChanged(Selection *selection) override
void _sensitivityToggled()
Callback for checkbox Lock.
sigc::connection connectChanged(sigc::slot< void(Colors::Color const &)> slot)
void setColor(Colors::Color const &)
double getAttributeDouble(Util::const_char_ptr key, double default_value=0.0) const
Definition node.cpp:76
A base class for dialogs to enter the value of several properties.
void change_object(SPObject *object)
Update values in entry boxes on change of object.
void create(const std::vector< Glib::ustring > &labels, const std::vector< Glib::ustring > &attributes)
Base class for visual SVG elements.
Definition sp-item.h:109
void setHighlight(Inkscape::Colors::Color color)
Definition sp-item.cpp:275
virtual Inkscape::Colors::Color highlight_color() const
Definition sp-item.cpp:284
void setLocked(bool lock, bool recursive=false)
Definition sp-item.cpp:228
bool isLocked() const
Definition sp-item.cpp:218
bool isExplicitlyHidden() const
Returns something suitable for the ‘Hide’ checkbox in the Object Properties dialog box.
Definition sp-item.cpp:325
void setExplicitlyHidden(bool val)
Sets the display CSS property to ‘hidden’ if val is true, otherwise makes it unset.
Definition sp-item.cpp:331
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
char const * label() const
Gets the author-visible label property for the object or a default if no label is defined.
void setAttribute(Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
bool setDesc(char const *desc, bool verbatim=false)
Sets the description of this object.
char const * getId() const
Returns the objects current ID string.
bool setTitle(char const *title, bool verbatim=false)
Sets the title of this object.
void setLabel(char const *label)
Sets the author-visible label for this object.
Inkscape::XML::Node * getRepr()
Returns the XML representation of tree.
char const * getAttribute(char const *name) const
unsigned int cloned
Definition sp-object.h:180
const double w
Definition conic-4.cpp:19
TODO: insert short description here.
Macro for icon names used in Inkscape.
SPItem * item
Glib::ustring label
Definition desktop.h:50
Dialog code.
Definition desktop.h:117
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.
Definition pack.cpp:141
Glib::ustring format_classic(T const &... args)
Helpers for using Gtk::Boxes, encapsulating large changes between GTK3 & GTK4.
Singleton class to access the preferences file in a convenient way.
Widget that listens and modifies repr attributes.
SVG <image> implementation.
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.