sp-item-group.cpp revision f8beeeb76fbc5e83ebbecccc6fc5aed10a6b4978
7329N/A#define __SP_GROUP_C__
7329N/A#ifdef HAVE_CONFIG_H
7329N/A#include "display/nr-arena-group.h"
7329N/A#include "libnr/nr-matrix-ops.h"
7329N/A#include "libnr/nr-matrix-fns.h"
7329N/A#include "document.h"
7329N/A#include "attributes.h"
7329N/A#include "sp-item-transform.h"
7329N/A#include "prefs-utils.h"
7329N/A#include "sp-clippath.h"
7329N/Astatic void sp_group_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
7329N/Astatic void sp_group_child_added (SPObject * object, Inkscape::XML::Node * child, Inkscape::XML::Node * ref);
7329N/Astatic void sp_group_order_changed (SPObject * object, Inkscape::XML::Node * child, Inkscape::XML::Node * old_ref, Inkscape::XML::Node * new_ref);
7329N/Astatic Inkscape::XML::Node *sp_group_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
7329N/Astatic void sp_group_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsigned const flags);
7329N/Astatic NRArenaItem *sp_group_show (SPItem *item, NRArena *arena, unsigned int key, unsigned int flags);
7372N/Asp_group_get_type (void)
7329N/A if (!group_type) {
7329N/A sizeof (SPGroupClass),
return group_type;
sp_group_order_changed (SPObject *object, Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref)
GSList *l;
if (!repr) {
l = NULL;
const char *value;
return repr;
switch (key) {
case SP_ATTR_INKSCAPE_GROUPMODE: {
static NRArenaItem *
o != NULL;
o = SP_OBJECT_NEXT(o))
if (SP_IS_ITEM(o)) {
g_return_if_fail (!strcmp (grepr->name(), "svg:g") || !strcmp (grepr->name(), "svg:a") || !strcmp (grepr->name(), "svg:switch"));
for (SPObject *child = sp_object_first_child(SP_OBJECT(group)) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
// the group is leaving forever, no heir, clones should take note; its children however are going to reemerge
if (objects) {
while (objects) {
while (items) {
if (do_done)
GSList *
GSList *s;
SPObject *o;
s = NULL;
if (SP_IS_ITEM (o)) {
s = g_slist_prepend (s, o);
return g_slist_reverse (s);
SPObject *
return child;
return GROUP;
if (arena_group) {
if (this->hasChildren())
if (SP_IS_ITEM (o)) {
SPItemView *v;
if (ac) {
SPItemView *v;
if (ac) {
if (SP_IS_ITEM(o)) {
l = g_slist_remove (l, o);
if (SP_IS_ITEM(o)) {
l = g_slist_remove (l, o);
if (SP_IS_ITEM(o)) {
len++;
return len;
return g_strdup_printf(
return ai;
void CGroup::_showChildren (NRArena *arena, NRArenaItem *ai, unsigned int key, unsigned int flags) {
if (SP_IS_ITEM (o)) {
if (ac) {
l = g_slist_remove (l, o);
if (SP_IS_ITEM (o)) {
l = g_slist_remove (l, o);
void CGroup::onOrderChanged (Inkscape::XML::Node *child, Inkscape::XML::Node *, Inkscape::XML::Node *)
SPItemView *v;