selection.cpp revision 6cc2da37c4f1d408dbc9ca92ee622d4093f554fb
/*
* 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>
* Abhishek Sharma
*
* 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.h"
#include "document.h"
#include "layer-model.h"
#include "selection.h"
#include "preferences.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;
}
}
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 _layers->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();
}
g_print ("Warning! Trying to remove unselected box from selection.\n");
return;
}
}
}
}
// Clear and add, or just clear with emit.
_clear();
} else clear();
}
return;
}
_emitChanged();
}
_clear();
if (obj) {
}
}
_emitChanged();
}
_clear();
_emitChanged();
}
return _objs;
}
if (_items) {
return _items;
}
if (SP_IS_ITEM(obj)) {
}
}
return _items;
}
}
return _reprs;
}
}
return pl;
}
if (persp) {
}
}
} else {
}
return boxes;
}
} else {
return NULL;
}
}
} else {
return NULL;
}
}
return _sizeistItem(true, compare);
}
return _sizeistItem(false, compare);
}
}
}
return ist;
}
}
{
geometricBounds() : visualBounds();
}
{
}
return bbox;
}
{
}
return bbox;
}
{
} else {
}
}
{
}
return bbox;
}
// If we have a selection of multiple items, then the center of the first item
// will be returned; this is also the case in SelTrans::centerRequest()
if (items) {
SPItem *first = reinterpret_cast<SPItem*>(g_slist_last(items)->data); // from the first item in selection
}
}
if (bbox) {
} else {
}
}
std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPoints(SnapPreferences const *snapprefs) const {
snapprefs_dummy.setTargetSnappable(Inkscape::SNAPTARGET_ROTATION_CENTER, false); // locally disable snapping to the item center
//Include the transformation origin for snapping
//For a selection or group only the overall center is considered, not for each item individually
}
}
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:fileencoding=utf-8:textwidth=99 :