Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
actions-layer.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
16#include "actions-layer.h"
17
18#include <giomm.h>
19#include <glibmm/i18n.h>
20
21#include "actions-helper.h"
22#include "desktop.h"
23#include "document-undo.h"
24#include "document.h"
26#include "inkscape-window.h"
27#include "message-stack.h"
28#include "selection.h"
29#include "ui/icon-names.h"
31#include "document-undo.h"
32#include "layer-manager.h"
33#include "object/sp-root.h"
34
35/*
36 * A layer is a group <g> element with a special Inkscape attribute (Inkscape:groupMode) set to
37 * "layer". It is typically directly placed in the <svg> element but it is also possible to put
38 * inside any other layer (a "layer" inside a normal group is considered a group). The GUI tracks
39 * which is the "Current" layer. The "Current" layer is set when a new selection initiated
40 * (i.e. when not adding objects to a previous selection), when it is chosen in the "Layers and
41 * Objects" dialog, when using the previous/next layer menu items, and when moving objects to
42 * adjacent layers.
43 */
44
45void
53
54void
56{
57 auto desktop = win->get_desktop();
58 auto document = desktop->getDocument();
59 auto current_layer = desktop->layerManager().currentLayer();
60 auto new_layer = Inkscape::create_layer(document->getRoot(), current_layer, Inkscape::LPOS_ABOVE);
61 desktop->layerManager().renameLayer(new_layer, current_layer->label(), true);
64 Inkscape::DocumentUndo::done(document, _("Add layer"), INKSCAPE_ICON("layer-new"));
65 desktop->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("New layer created."));
66}
67
68void
70{
71 SPDesktop* dt = win->get_desktop();
72
73 if (!dt->layerManager().isRoot()) {
74
75 dt->getSelection()->duplicate(true, true); // This requires the selection to be a layer!
76 Inkscape::DocumentUndo::done(dt->getDocument(), _("Duplicate layer"), INKSCAPE_ICON("layer-duplicate"));
77 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Duplicated layer."));
78
79 } else {
80 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
81 }
82}
83
84void
86{
87 SPDesktop* dt = win->get_desktop();
88 auto root = dt->layerManager().currentRoot();
89
90 if (!dt->layerManager().isRoot()) {
91
92 dt->getSelection()->clear();
93 SPObject *old_layer = dt->layerManager().currentLayer();
94 SPObject *old_parent = old_layer->parent;
95 SPObject *old_parent_parent = (old_parent != nullptr) ? old_parent->parent : nullptr;
96
97 SPObject *survivor = Inkscape::previous_layer(root, old_layer);
98 if (survivor != nullptr && survivor->parent == old_layer) {
99 while (survivor != nullptr &&
100 survivor->parent != old_parent &&
101 survivor->parent != old_parent_parent)
102 {
103 survivor = Inkscape::previous_layer(root, survivor);
104 }
105 }
106
107 if (survivor == nullptr || (survivor->parent != old_parent && survivor->parent != old_layer)) {
108 survivor = Inkscape::next_layer(root, old_layer);
109 while (survivor != nullptr &&
110 survivor != old_parent &&
111 survivor->parent != old_parent)
112 {
113 survivor = Inkscape::next_layer(root, survivor);
114 }
115 }
116
117 // Deleting the old layer before switching layers is a hack to trigger the
118 // listeners of the deletion event (as happens when old_layer is deleted using the
119 // xml editor). See
120 // http://sourceforge.net/tracker/index.php?func=detail&aid=1339397&group_id=93438&atid=604306
121 //
122 old_layer->deleteObject();
123
124 if (survivor) {
125 dt->layerManager().setCurrentLayer(survivor);
126 }
127
128 Inkscape::DocumentUndo::done(dt->getDocument(), _("Delete layer"), INKSCAPE_ICON("layer-delete"));
129 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Deleted layer."));
130
131 } else {
132 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
133 }
134}
135
136void
144
145void
147{
148 SPDesktop* dt = win->get_desktop();
150 Inkscape::DocumentUndo::maybeDone(dt->getDocument(), "layer:hideall", _("Hide all layers"), "");
151}
152
153void
155{
156 SPDesktop* dt = win->get_desktop();
158 Inkscape::DocumentUndo::maybeDone(dt->getDocument(), "layer:showall", _("Show all layers"), "");
159}
160
161void
163{
164 SPDesktop* dt = win->get_desktop();
165 auto layer = dt->layerManager().currentLayer();
166
167 if (!layer || dt->layerManager().isRoot()) {
168 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
169 } else {
170 layer->setHidden(!layer->isHidden());
171 }
172}
173
174void
176{
177 SPDesktop* dt = win->get_desktop();
178 auto layer = dt->layerManager().currentLayer();
179
180 if (!layer || dt->layerManager().isRoot()) {
181 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
182 } else {
183 dt->layerManager().toggleLayerSolo( layer ); // Weird name!
184 Inkscape::DocumentUndo::done(dt->getDocument(), _("Hide other layers"), "");
185 }
186}
187
188void
190{
191 SPDesktop* dt = win->get_desktop();
193 Inkscape::DocumentUndo::maybeDone(dt->getDocument(), "layer:lockall", _("Lock all layers"), "");
194}
195
196void
198{
199 SPDesktop* dt = win->get_desktop();
201 Inkscape::DocumentUndo::maybeDone(dt->getDocument(), "layer:unlockall", _("Unlock all layers"), "");
202}
203
204void
206{
207 SPDesktop* dt = win->get_desktop();
208 auto layer = dt->layerManager().currentLayer();
209
210 if (!layer || dt->layerManager().isRoot()) {
211 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
212 } else {
213 layer->setLocked(!layer->isLocked());
214 }
215}
216
217void
219{
220 SPDesktop* dt = win->get_desktop();
221 auto layer = dt->layerManager().currentLayer();
222
223 if (!layer || dt->layerManager().isRoot()) {
224 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
225 } else {
226 dt->layerManager().toggleLockOtherLayers( layer );
227 Inkscape::DocumentUndo::done(dt->getDocument(), _("Lock other layers"), "");
228 }
229}
230
231void
233{
234 SPDesktop* dt = win->get_desktop();
235
237 if (next) {
238 dt->layerManager().setCurrentLayer(next);
239 Inkscape::DocumentUndo::done(dt->getDocument(), _("Switch to next layer"), INKSCAPE_ICON("layer-previous"));
240 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Switched to next layer."));
241 } else {
242 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot go past last layer."));
243 }
244}
245
246void
248{
249 SPDesktop* dt = win->get_desktop();
250
252 if (prev) {
253 dt->layerManager().setCurrentLayer(prev);
254 Inkscape::DocumentUndo::done(dt->getDocument(), _("Switch to previous layer") ,INKSCAPE_ICON("layer-next"));
255 dt->messageStack()->flash(Inkscape::NORMAL_MESSAGE, _("Switched to previous layer."));
256 } else {
257 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot go before first layer."));
258 }
259}
260
261void
263{
264 SPDesktop* dt = win->get_desktop();
265
266 // Layer Rise
267 dt->getSelection()->toNextLayer();
268}
269
270void
272{
273 SPDesktop* dt = win->get_desktop();
274
275 // Layer Lower
276 dt->getSelection()->toPrevLayer();
277}
278
279void
281{
282 SPDesktop* dt = win->get_desktop();
283
284 // Selection move to layer
286}
287
288void
290{
291 SPDesktop* dt = win->get_desktop();
292
293 if (dt->layerManager().isRoot()) {
294 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
295 return;
296 }
297
298 SPItem *layer = dt->layerManager().currentLayer();
299 g_return_if_fail(layer != nullptr);
300 SPObject *old_pos = layer->getNext();
301 layer->raiseToTop();
302
303 if (layer->getNext() != old_pos) {
304
305 char const * message = g_strdup_printf(_("Raised layer <b>%s</b>."), layer->defaultLabel());
306 Inkscape::DocumentUndo::done(dt->getDocument(), _("Layer to top"), INKSCAPE_ICON("layer-top"));
308 g_free((void *) message);
309
310 } else {
311 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move layer any further."));
312 }
313}
314
315void
317{
318 SPDesktop* dt = win->get_desktop();
319
320 if (dt->layerManager().isRoot()) {
321 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
322 return;
323 }
324
325 SPItem *layer = dt->layerManager().currentLayer();
326 g_return_if_fail(layer != nullptr);
327
328 SPObject *old_pos = layer->getNext();
329
330
331 layer->raiseOne();
332
333
334 if (layer->getNext() != old_pos) {
335
336 char const * message = g_strdup_printf(_("Raised layer <b>%s</b>."), layer->defaultLabel());
337 Inkscape::DocumentUndo::done(dt->getDocument(), _("Raise layer"), INKSCAPE_ICON("layer-raise"));
339 g_free((void *) message);
340
341 } else {
342 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move layer any further."));
343 }
344}
345
346void
348{
349 SPDesktop* dt = win->get_desktop();
350
351 if (dt->layerManager().isRoot()) {
352 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
353 return;
354 }
355
356 SPItem *layer = dt->layerManager().currentLayer();
357 g_return_if_fail(layer != nullptr);
358 SPObject *old_pos = layer->getNext();
359 layer->lowerOne();
360
361 if (layer->getNext() != old_pos) {
362
363 char const * message = g_strdup_printf(_("Lowered layer <b>%s</b>."), layer->defaultLabel());
364 Inkscape::DocumentUndo::done(dt->getDocument(), _("Lower layer"), INKSCAPE_ICON("layer-lower"));
366 g_free((void *) message);
367
368 } else {
369 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move layer any further."));
370 }
371}
372
373void
375{
376 SPDesktop* dt = win->get_desktop();
377
378 if (dt->layerManager().isRoot()) {
379 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
380 return;
381 }
382
383 SPItem *layer = dt->layerManager().currentLayer();
384 g_return_if_fail(layer != nullptr);
385 SPObject *old_pos = layer->getNext();
386 layer->lowerToBottom();
387
388 if (layer->getNext() != old_pos) {
389
390 char const * message = g_strdup_printf(_("Lowered layer <b>%s</b>."), layer->defaultLabel());
391 Inkscape::DocumentUndo::done(dt->getDocument(), _("Layer to bottom"), INKSCAPE_ICON("layer-bottom"));
393 g_free((void *) message);
394
395 } else {
396 dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Cannot move layer any further."));
397 }
398}
399
400void
402{
403 SPDesktop* dt = win->get_desktop();
404 auto layer = dt->layerManager().currentLayer();
405
406 if (!layer || dt->layerManager().isRoot()) {
407 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("No current layer."));
408 return;
409 }
410
411 layer->setLayerMode(SPGroup::GROUP);
412 layer->updateRepr(SP_OBJECT_WRITE_NO_CHILDREN | SP_OBJECT_WRITE_EXT);
413 dt->getSelection()->set(layer);
414 Inkscape::DocumentUndo::done(dt->getDocument(), _("Layer to group"), INKSCAPE_ICON("dialog-objects"));
415}
416
417void
419{
420 SPDesktop* dt = win->get_desktop();
421 auto selection = dt->getSelection();
422
423 std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
424 if (items.size() != 1) {
425 show_output("layer_to_group: only one selected item allowed!");
426 return;
427 }
428
429 if (auto group = cast<SPGroup>(items[0])) {
430 if (!group->isLayer()) {
431 group->setLayerMode(SPGroup::LAYER);
432 group->updateRepr(SP_OBJECT_WRITE_NO_CHILDREN | SP_OBJECT_WRITE_EXT);
433 selection->set(group);
434 Inkscape::DocumentUndo::done(dt->getDocument(), _("Group to layer"), INKSCAPE_ICON("dialog-objects"));
435 } else {
436 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("Group already layer."));
437 }
438 } else {
439 dt->messageStack()->flash(Inkscape::ERROR_MESSAGE, _("Selection is not a group."));
440 }
441}
442
443// Does not change XML.
444void
446{
447 SPDesktop* dt = win->get_desktop();
448 auto selection = dt->getSelection();
449
450 std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
451 if (items.size() == 1 && cast<SPGroup>(items[0])) {
452 // Only one item and it is a group!
454 selection->clear();
455 }
456}
457
458// Does not change XML.
459void
461{
462 SPDesktop* dt = win->get_desktop();
463 auto selection = dt->getSelection();
464
465 auto parent = dt->layerManager().currentLayer()->parent;
467
468 std::vector<SPItem*> items(selection->items().begin(), selection->items().end());
469 if (items.size() == 1 && cast<SPGroup>(items[0]->parent) ) {
470 // Only one item selected and the parent is a group!
471 selection->set(items[0]->parent);
472 } else {
473 selection->clear();
474 }
475}
476
477const Glib::ustring SECTION_LAYER = NC_("Action Section", "Layer");
478const Glib::ustring SECTION_SELECT = NC_("Action Section", "Select");
479
480std::vector<std::vector<Glib::ustring>> raw_data_layer =
481{
482 // clang-format off
483 {"win.layer-new", N_("Add Layer"), SECTION_LAYER, N_("Create a new layer")},
484 {"win.layer-new-above", N_("Add Layer Above"), SECTION_LAYER, N_("Create a new layer above current")},
485 {"win.layer-duplicate", N_("Duplicate Current Layer"), SECTION_LAYER, N_("Duplicate the current layer")},
486 {"win.layer-delete", N_("Delete Current Layer"), SECTION_LAYER, N_("Delete the current layer")},
487 {"win.layer-rename", N_("Rename Layer"), SECTION_LAYER, N_("Rename the current layer")},
488
489 {"win.layer-hide-toggle", N_("Show/Hide Current Layer"), SECTION_LAYER, N_("Toggle visibility of current layer")},
490 {"win.layer-lock-toggle", N_("Lock/Unlock Current Layer"), SECTION_LAYER, N_("Toggle lock on current layer")},
491
492 {"win.layer-previous", N_("Switch to Layer Above"), SECTION_LAYER, N_("Switch to the layer above the current")},
493 {"win.layer-next", N_("Switch to Layer Below"), SECTION_LAYER, N_("Switch to the layer below the current")},
494
495 {"win.selection-move-to-layer-above", N_("Move Selection to Layer Above"), SECTION_LAYER, N_("Move selection to the layer above the current")},
496 {"win.selection-move-to-layer-below", N_("Move Selection to Layer Below"), SECTION_LAYER, N_("Move selection to the layer below the current")},
497 {"win.selection-move-to-layer", N_("Move Selection to Layer..."), SECTION_LAYER, N_("Move selection to layer")},
498
499 {"win.layer-top", N_("Layer to Top"), SECTION_LAYER, N_("Raise the current layer to the top")},
500 {"win.layer-raise", N_("Raise Layer"), SECTION_LAYER, N_("Raise the current layer")},
501 {"win.layer-lower", N_("Lower Layer"), SECTION_LAYER, N_("Lower the current layer")},
502 {"win.layer-bottom", N_("Layer to Bottom"), SECTION_LAYER, N_("Lower the current layer to the bottom")},
503
504 {"win.layer-to-group", N_("Layer to Group"), SECTION_LAYER, N_("Convert the current layer to a group")},
505 {"win.layer-from-group", N_("Layer from Group"), SECTION_LAYER, N_("Convert the group to a layer")},
506
507 // These use Layer technology even if they don't act on layers.
508 {"win.selection-group-enter", N_("Enter Group"), SECTION_SELECT, N_("Enter group")},
509 {"win.selection-group-exit", N_("Exit Group"), SECTION_SELECT, N_("Exit group")},
510 // clang-format on
511};
512
513void
515{
516 // clang-format off
517 win->add_action("layer-new", sigc::bind(sigc::ptr_fun(&layer_new), win));
518 win->add_action("layer-new-above", sigc::bind(sigc::ptr_fun(&layer_new_above), win));
519 win->add_action("layer-duplicate", sigc::bind(sigc::ptr_fun(&layer_duplicate), win));
520 win->add_action("layer-delete", sigc::bind(sigc::ptr_fun(&layer_delete), win));
521 win->add_action("layer-rename", sigc::bind(sigc::ptr_fun(&layer_rename), win));
522
523 win->add_action("layer-hide-all", sigc::bind(sigc::ptr_fun(&layer_hide_all), win));
524 win->add_action("layer-unhide-all", sigc::bind(sigc::ptr_fun(&layer_unhide_all), win));
525 win->add_action("layer-hide-toggle", sigc::bind(sigc::ptr_fun(&layer_hide_toggle), win));
526 win->add_action("layer-hide-toggle-others", sigc::bind(sigc::ptr_fun(&layer_hide_toggle_others), win));
527
528 win->add_action("layer-lock-all", sigc::bind(sigc::ptr_fun(&layer_lock_all), win));
529 win->add_action("layer-unlock-all", sigc::bind(sigc::ptr_fun(&layer_unlock_all), win));
530 win->add_action("layer-lock-toggle", sigc::bind(sigc::ptr_fun(&layer_lock_toggle), win));
531 win->add_action("layer-lock-toggle-others", sigc::bind(sigc::ptr_fun(&layer_lock_toggle_others), win));
532
533 win->add_action("layer-previous", sigc::bind(sigc::ptr_fun(&layer_previous), win));
534 win->add_action("layer-next", sigc::bind(sigc::ptr_fun(&layer_next), win));
535
536 win->add_action("selection-move-to-layer-above", sigc::bind(sigc::ptr_fun(&selection_move_to_layer_above), win));
537 win->add_action("selection-move-to-layer-below", sigc::bind(sigc::ptr_fun(&selection_move_to_layer_below), win));
538 win->add_action("selection-move-to-layer", sigc::bind(sigc::ptr_fun(&selection_move_to_layer), win));
539
540 win->add_action("layer-top", sigc::bind(sigc::ptr_fun(&layer_top), win));
541 win->add_action("layer-raise", sigc::bind(sigc::ptr_fun(&layer_raise), win));
542 win->add_action("layer-lower", sigc::bind(sigc::ptr_fun(&layer_lower), win));
543 win->add_action("layer-bottom", sigc::bind(sigc::ptr_fun(&layer_bottom), win));
544
545 win->add_action("layer-to-group", sigc::bind(sigc::ptr_fun(&layer_to_group), win));
546 win->add_action("layer-from-group", sigc::bind(sigc::ptr_fun(&layer_from_group), win));
547
548 win->add_action("selection-group-enter", sigc::bind(sigc::ptr_fun(&group_enter), win));
549 win->add_action("selection-group-exit", sigc::bind(sigc::ptr_fun(&group_exit), win));
550 // clang-format on
551
553 if (!app) {
554 show_output("add_actions_layer: no app!");
555 return;
556 }
557 app->get_action_extra_data().add_data(raw_data_layer);
558}
559
560/*
561 Local Variables:
562 mode:c++
563 c-file-style:"stroustrup"
564 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
565 indent-tabs-mode:nil
566 fill-column:99
567 End:
568*/
569// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
void show_output(Glib::ustring const &data, bool const is_cerr)
void add_actions_layer(InkscapeWindow *win)
void layer_lock_all(InkscapeWindow *win)
void layer_unhide_all(InkscapeWindow *win)
void layer_bottom(InkscapeWindow *win)
const Glib::ustring SECTION_SELECT
void selection_move_to_layer(InkscapeWindow *win)
void layer_raise(InkscapeWindow *win)
void layer_hide_toggle(InkscapeWindow *win)
void layer_lock_toggle(InkscapeWindow *win)
void layer_rename(InkscapeWindow *win)
void group_enter(InkscapeWindow *win)
void layer_new(InkscapeWindow *win)
void layer_from_group(InkscapeWindow *win)
void layer_new_above(InkscapeWindow *win)
void layer_unlock_all(InkscapeWindow *win)
void layer_hide_all(InkscapeWindow *win)
const Glib::ustring SECTION_LAYER
void layer_next(InkscapeWindow *win)
void layer_lock_toggle_others(InkscapeWindow *win)
std::vector< std::vector< Glib::ustring > > raw_data_layer
void layer_hide_toggle_others(InkscapeWindow *win)
void layer_lower(InkscapeWindow *win)
void layer_previous(InkscapeWindow *win)
void layer_delete(InkscapeWindow *win)
void group_exit(InkscapeWindow *win)
void layer_top(InkscapeWindow *win)
void layer_duplicate(InkscapeWindow *win)
void layer_to_group(InkscapeWindow *win)
void selection_move_to_layer_below(InkscapeWindow *win)
void selection_move_to_layer_above(InkscapeWindow *win)
Authors: Sushant A A sushant.co19@gmail.com
static InkscapeApplication * instance()
Singleton instance.
SPDesktop * get_desktop()
static void done(SPDocument *document, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
static void maybeDone(SPDocument *document, const gchar *keyconst, Glib::ustring const &event_description, Glib::ustring const &undo_icon, unsigned int object_modified_tag=0)
void toggleLayerSolo(SPObject *object, bool force_hide=false)
Toggle the visibility of every layer except the given layer.
void renameLayer(SPObject *obj, char const *label, bool uniquify)
void setCurrentLayer(SPObject *object, bool clear=false)
Sets the current layer of the desktop.
void toggleHideAllLayers(bool hide)
SPGroup * currentLayer() const
Returns current top layer.
void toggleLockOtherLayers(SPObject *object, bool force_lock=false)
Toggle the sensitivity of every layer except the given layer.
SPGroup * currentRoot() const
Returns current root (=bottom) layer.
void toggleLockAllLayers(bool lock)
MessageId flash(MessageType type, char const *message)
Temporarily pushes a message onto the stack.
void toNextLayer(bool skip_undo=false)
void duplicate(bool suppressDone=false, bool duplicateLayer=false)
void toPrevLayer(bool skip_undo=false)
void clear()
Unselects all selected objects.
void set(XML::Node *repr)
Set the selection to an XML node's SPObject.
Definition selection.h:118
static void showMove(SPDesktop *desktop, SPObject *layer)
static void showCreate(SPDesktop *desktop, SPObject *layer)
static void showRename(SPDesktop *desktop, SPObject *layer)
To do: update description of desktop.
Definition desktop.h:149
SPDocument * getDocument() const
Definition desktop.h:189
Inkscape::MessageStack * messageStack() const
Definition desktop.h:160
Inkscape::Selection * getSelection() const
Definition desktop.h:188
Inkscape::LayerManager & layerManager()
Definition desktop.h:287
Base class for visual SVG elements.
Definition sp-item.h:109
bool raiseOne()
Definition sp-item.cpp:436
void lowerToBottom()
Definition sp-item.cpp:465
void raiseToTop()
Definition sp-item.cpp:426
bool lowerOne()
Definition sp-item.cpp:446
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
SPObject * getNext()
char const * defaultLabel() const
Returns a default label property for this object.
SPObject * parent
Definition sp-object.h:189
void deleteObject(bool propagate, bool propagate_descendants)
Deletes an object, unparenting it from its parent.
RootCluster root
Editable view implementation.
static char const *const parent
Definition dir-util.cpp:70
TODO: insert short description here.
Macro for icon names used in Inkscape.
Inkscape - An SVG editor.
Dialog for renaming layers.
Raw stack of active status messages.
SPObject * create_layer(SPObject *root, SPObject *layer, LayerRelativePosition position)
Creates a new layer.
SPObject * next_layer(SPObject *root, SPObject *layer)
Finds the next layer under root, relative to layer in depth-first order.
SPObject * previous_layer(SPObject *root, SPObject *layer)
Finds the previous layer under root, relative to layer in depth-first order.
@ ERROR_MESSAGE
Definition message.h:29
@ NORMAL_MESSAGE
Definition message.h:26
@ WARNING_MESSAGE
Definition message.h:28
GList * items
SPRoot: SVG <svg> implementation.
SPDesktop * desktop