selection.cpp revision 6e3576be211b59b7d8a9e7afe3493d961c053b75
/** \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"
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;
}
}
// 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();
}
}
_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;
}
} else {
return NULL;
}
}
} else {
return NULL;
}
}
}
{
return bbox;
}
{
}
// TODO: return NR::Maybe<NR::Rect>
if (bbox) {
return *bbox;
} else {
}
}
if (!items) {
return bbox;
}
}
return bbox;
}
NRRect r;
if (rect) {
return *rect;
} else {
// FIXME
}
}
/** 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
} else {
}
} else {
}
return center;
}
/**
* Compute the list of points in the selection that are to be considered for snapping.
*/
}
return p;
}
}
// these are the points we get back
}
return pHull;
}
if (b) {
}
}
return p;
}
return p;
}
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 :