selection.cpp revision 78969d2654d9551abe3e7a5142875516809e4254
/** \file
* Per-desktop selection container
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* MenTaLguY <mental@rydia.net>
* bulia byak <buliabyak@users.sf.net>
* Andrius R. <knutux@gmail.com>
*
* Copyright (C) 2006 Andrius R.
* Copyright (C) 2004-2005 MenTaLguY
* Copyright (C) 1999-2002 Lauris Kaplinski
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "macros.h"
#include "inkscape-private.h"
#include "desktop.h"
#include "desktop-handles.h"
#include "document.h"
#include "selection.h"
#include "sp-shape.h"
#include "sp-path.h"
#include "sp-item-group.h"
#include "box3d.h"
#include "box3d.h"
#include "persp3d.h"
namespace Inkscape {
_flags(0),
_idle(0)
{
}
_clear();
if (_idle) {
_idle = 0;
}
}
/* Handler for selected objects "modified" signal */
if (!this->_idle) {
/* Request handling to be run in _idle loop */
this->_idle = g_idle_add_full(SP_SELECTION_UPDATE_PRIORITY, GSourceFunc(&Selection::_emit_modified), this, NULL);
}
/* Collect all flags */
}
{
/* force new handler to be created if requested before we return */
/* drop this handler */
return FALSE;
}
inkscape_selection_modified(this, flags);
}
if (persist_selection_context) {
if (NULL == _selection_context) {
_context_release_connection = _selection_context->connectRelease(sigc::mem_fun(*this, &Selection::_releaseContext));
}
} else {
}
inkscape_selection_changed(this);
_changed_signal.emit(this);
}
void
{
return;
}
void Selection::_invalidateCachedLists() {
}
while (_objs) {
}
}
if (NULL != _selection_context)
return _selection_context;
return desktop()->currentLayer();
}
return FALSE;
}
return;
}
}
(*p).second++;
} else {
}
}
}
}
// unselect any of the item's ancestors and descendants which may be selected
// (to prevent double-selection)
_release_connections[obj] = obj->connectRelease(sigc::mem_fun(*this, (void (Selection::*)(SPObject *))&Selection::remove));
_modified_connections[obj] = obj->connectModified(sigc::mem_fun(*this, &Selection::_schedule_modified));
}
_clear();
}
} else {
}
}
_emitChanged();
}
g_print ("Warning! Trying to remove unselected perspective from selection!\n");
return;
}
if ((*p).second > 1) {
} else {
}
}
g_print ("Warning! Trying to remove unselected box from selection.\n");
return;
}
}
}
}
_clear();
}
}
_emitChanged();
}
return;
continue;
}
}
_emitChanged();
}
_clear();
if (obj) {
}
}
_emitChanged();
}
_clear();
_emitChanged();
}
return _objs;
}
if (_items) {
return _items;
}
if (SP_IS_ITEM(obj)) {
}
}
return _items;
}
}
return _reprs;
}
}
return pl;
}
return _3dboxes;
}
} else {
return NULL;
}
}
} else {
return NULL;
}
}
}
{
return bbox;
}
{
}
return bbox;
}
if (!items) {
return bbox;
}
}
return bbox;
}
NRRect r;
}
/** Extract the position of the center from the first selected object */
if (items) {
SPItem *first = reinterpret_cast<SPItem*>(g_slist_last(items)->data); // from the first item in selection
}
}
if (bbox) {
} else {
}
}
/**
* Compute the list of points in the selection that are to be considered for snapping.
*/
//Include the transformation origin for snapping
//For a group only the group's origin is considered
if (includeItemCenter) {
}
}
return p;
}
}
if (!p.empty()) {
// these are the points we get back
}
if (rHull) {
for ( unsigned i = 0 ; i < 4 ; ++i ) {
}
}
}
return pHull;
}
while (parent) {
break;
}
}
}
}
while (parent) {
}
}
}
return object;
}
}
}
return ret;
}
}
}
return ret;
}
}
/*
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 :