control-point-selection.h revision 7c24f119c9c63a4d88adf31795adcced5d909958
/** @file
* Node selection - stores a set of nodes 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
*/
#ifndef SEEN_UI_TOOL_NODE_SELECTION_H
#define SEEN_UI_TOOL_NODE_SELECTION_H
#include <memory>
#include <boost/optional.hpp>
#include "util/set-types.h"
#include "display/display-forward.h"
#include "util/accumulators.h"
#include "ui/tool/commit-events.h"
#include "ui/tool/manipulator.h"
}
}
#ifdef USE_GNU_HASHES
template<>
return reinterpret_cast<size_t>(p);
}
};
} // namespace __gnu_cxx
#endif // USE_GNU_HASHES
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();
// 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:encoding=utf-8:textwidth=99 :