diff --git a/src/seltrans.h b/src/seltrans.h
index 30be58eeb98ba4d16773328cb7b9845403672858..d3cbcbd5750861cfb3210631a3aeeaf43443cf0e 100644 (file)
--- a/src/seltrans.h
+++ b/src/seltrans.h
* Lauris Kaplinski <lauris@kaplinski.com>
* Carl Hetherington <inkscape@carlh.net>
*
+ * Copyright (C) 2006 Johan Engelen <johan@shouraizou.nl>
* Copyright (C) 1999-2002 Lauris Kaplinski
*
* Released under GNU GPL, read the file 'COPYING' for more information
#include <libnr/nr-point.h>
#include <libnr/nr-matrix.h>
#include <libnr/nr-rect.h>
+#include "knot.h"
#include "forward.h"
#include "selcue.h"
#include "message-context.h"
gboolean handleRequest(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle);
void handleGrab(SPKnot *knot, guint state, SPSelTransHandle const &handle);
+ void handleClick(SPKnot *knot, guint state, SPSelTransHandle const &handle);
void handleNewEvent(SPKnot *knot, NR::Point *position, guint state, SPSelTransHandle const &handle);
enum Show
bool isEmpty() {
return _empty;
}
-
+ bool isGrabbed() {
+ return _grabbed;
+ }
+ bool centerIsVisible() {
+ return ( _chandle && SP_KNOT_IS_VISIBLE (_chandle) );
+ }
+
private:
void _updateHandles();
void _updateVolatileState();
void _selModified(Inkscape::Selection *selection, guint flags);
void _showHandles(SPKnot *knot[], SPSelTransHandle const handle[], gint num,
gchar const *even_tip, gchar const *odd_tip);
- void _centreTrans(Inkscape::XML::Node *current) const;
-
+
enum State {
STATE_SCALE,
STATE_ROTATE
SPDesktop *_desktop;
std::vector<std::pair<SPItem *, NR::Matrix> > _items;
+ std::vector<std::pair<SPItem *, NR::Point> > _items_centers;
std::vector<NR::Point> _snap_points;
std::vector<NR::Point> _bbox_points;
bool _empty;
bool _changed;
- NR::Rect _box;
+ SPItem::BBoxType _snap_bbox_type;
+
+ NR::Maybe<NR::Rect> _bbox;
+ NR::Maybe<NR::Rect> _approximate_bbox;
gdouble _strokewidth;
NR::Matrix _current;
NR::Point _opposite; ///< opposite point to where a scale is taking place
- NR::Point _center;
+
+ NR::Point _opposite_for_specpoints;
+ NR::Point _opposite_for_bboxpoints;
+ NR::Point _origin_for_specpoints;
+ NR::Point _origin_for_bboxpoints;
+
+ NR::Maybe<NR::Point> _center;
+ bool _center_is_set; ///< we've already set _center, no need to reread it from items
+
SPKnot *_shandle[8];
SPKnot *_rhandle[8];
SPKnot *_chandle;