selectable-control-point.cpp revision 70d31ae8a7a27e57cfcdc921ea0d2f47c92442a4
/** @file
* Desktop-bound selectable control object - implementation
*/
/* Authors:
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright (C) 2009 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "ui/tool/control-point-selection.h"
#include "ui/tool/event-utils.h"
#include "ui/tool/selectable-control-point.h"
namespace Inkscape {
namespace UI {
{
{0xffffff00, 0x01000000}, // normal fill, stroke
{0xff0000ff, 0x01000000}, // mouseover fill, stroke
{0x0000ffff, 0x01000000} // clicked fill, stroke
},
{0x0000ffff, 0x000000ff}, // normal fill, stroke when selected
{0xff000000, 0x000000ff}, // mouseover fill, stroke when selected
{0xff000000, 0x000000ff} // clicked fill, stroke when selected
};
, _selection (sel)
{
}
, _selection (sel)
{
}
{
_selection.erase(this);
}
{
false));
}
{
// if a point is dragged while not selected, it should select itself
if (!selected()) {
// HACK!!! invoke the last slot for signal_grabbed (it will be the callback registered
// by ControlPointSelection when adding to selection).
}
}
{
if (held_shift(*event)) {
if (selected()) {
_selection.erase(this);
} else {
_selection.insert(this);
}
} else {
}
return true;
}
void SelectableControlPoint::_takeSelection()
{
_selection.clear();
_selection.insert(this);
}
bool SelectableControlPoint::selected() const
{
SelectableControlPoint *p = const_cast<SelectableControlPoint*>(this);
}
{
if (!selected()) {
return;
}
ColorEntry current = {0, 0};
switch (state) {
case STATE_NORMAL:
case STATE_MOUSEOVER:
case STATE_CLICKED:
}
}
} // namespace UI
} // namespace Inkscape
/*
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 :