document-subset.cpp revision 9c0a44bb47b022c4cdb319d697ccd5a42d3253dd
/*
* Inkscape::DocumentSubset - view of a document including only a subset
* of nodes
*
* Copyright 2006 MenTaLguY <mental@rydia.net>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "gc-finalized.h"
#include "document-subset.h"
#include "document.h"
#include "sp-object.h"
#include <glib/gmessages.h>
#include "util/reverse-list.h"
#include <vector>
#include <map>
#include <algorithm>
#include <iterator>
namespace Inkscape {
{
struct Record {
} else {
return 0;
}
}
return 0;
} else {
if ( pos < 0 ) {
} else if ( pos > 0 ) {
} else {
}
} else {
}
}
// compare to the single possiblity left
if ( pos < 0 ) {
last++;
}
}
}
}
}
template <typename OutputIterator>
{
bool found_one=false;
{
if (!found_one) {
found_one = true;
}
*descendants++ = *iter;
} else if (found_one) {
}
}
if (found_one) {
}
}
}
return index;
}
};
~Relations() {
{
}
}
} else {
return NULL;
}
}
void clear();
private:
= obj->connectRelease(
);
);
return record;
}
}
break;
}
}
}
}
if (record) {
{
}
}
}
}
}
};
{
}
/* find the nearest ancestor in the subset */
{
if (parent_record) {
}
}
if (!parent_record) {
}
/* reparent descendants of obj to obj */
);
{
}
/* add obj to the child list */
}
if (subtree) {
} else {
/* reparent obj's orphaned children to their grandparent */
{
}
/* remove obj's record */
}
}
}
}
/* find nearest ancestor in the subset */
while (!parent_record) {
}
/* move the object if it's in the subset */
} else {
/* otherwise, move any top-level descendants */
);
if (!descendants.empty()) {
}
}
}
}
}
void DocumentSubset::_clear() {
_relations->clear();
}
}
}
}
}
}
}
}
}
}
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :