control-point-selection.h revision a50632739f108520e2208f7b91854015069c947c
/** @file
* Control point selection - stores a set of control points and applies transformations
* to them
*/
/* Authors:
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright (C) 2009 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <memory>
#include <boost/optional.hpp>
#include <stddef.h>
#include "util/accumulators.h"
#include "util/unordered-containers.h"
#include "ui/tool/commit-events.h"
#include "ui/tool/manipulator.h"
#include "snap-candidate.h"
struct SPCanvasGroup;
}
}
typedef SelectableControlPoint *value_type;
typedef SelectableControlPoint *key_type;
// size
// iterators
// insert
}
}
// erase
void clear();
// find
}
// Sometimes it is very useful to keep a list of all selectable points.
// ...for example in these methods. Another useful case is snapping.
void selectAll();
void invertSelection();
bool transformHandlesEnabled() { return _handles_visible; }
void showTransformHandles(bool v, bool one_node);
// the two methods below do not modify the state; they are for use in manipulators
// that need to temporarily hide the handles, for example when moving a node
void hideTransformHandles();
void restoreTransformHandles();
void toggleTransformHandlesMode();
// It turns out that emitting a signal after every point is selected or deselected is not too efficient,
// so this can be done in a massive group once the selection is finally changed.
void setOriginalPoints();
// The functions below are invoked from SelectableControlPoint.
// Previously they were connected to handlers when selecting, but this
// creates problems when dragging a point that was not selected.
void _pointGrabbed(SelectableControlPoint *);
void _pointUngrabbed();
void _pointChanged(SelectableControlPoint *, bool);
void _mouseoverChanged();
void _updateTransformHandles(bool preserve_center);
void _updateBounds();
bool _keyboardRotate(GdkEventKey const &, int);
bool _keyboardScale(GdkEventKey const &, int);
unsigned _dragging : 1;
unsigned _handles_visible : 1;
unsigned _one_node_handles : 1;
};
} // namespace UI
} // namespace Inkscape
#endif
/*
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 :