Inkscape
Vector Graphics Editor
|
#include <knot-holder.h>
Inherited by ArcKnotHolder, Box3DKnotHolder, FlowtextKnotHolder, MarkerKnotHolder, MiscKnotHolder, OffsetKnotHolder, RectKnotHolder, SpiralKnotHolder, StarKnotHolder, TextKnotHolder, and TextPathKnotHolder.
Public Member Functions | |
KnotHolder (SPDesktop *desktop, SPItem *item) | |
virtual | ~KnotHolder () |
KnotHolder ()=delete | |
void | update_knots () |
void | unselect_knots () |
void | knot_mousedown_handler (SPKnot *knot, unsigned int state) |
void | knot_moved_handler (SPKnot *knot, Geom::Point const &p, unsigned int state) |
void | knot_clicked_handler (SPKnot *knot, unsigned int state) |
void | knot_grabbed_handler (SPKnot *knot, unsigned state) |
Notifies an entity that its knot has just been grabbed. | |
void | knot_ungrabbed_handler (SPKnot *knot, unsigned int state) |
void | transform_selected (Geom::Affine transform) |
void | add (KnotHolderEntity *e) |
void | remove (KnotHolderEntity *e) |
void | add_pattern_knotholder () |
void | add_hatch_knotholder () |
void | add_filter_knotholder () |
void | clear () |
void | setEditTransform (Geom::Affine edit_transform) |
Geom::Affine | getEditTransform () const |
bool | knot_selected () const |
Returns true if at least one of the KnotHolderEntities is selected. | |
bool | knot_mouseover () const |
Returns true if at least one of the KnotHolderEntities has the mouse hovering above it. | |
SPDesktop * | getDesktop () |
SPItem * | getItem () |
bool | is_dragging () const |
bool | set_item_clickpos (Geom::Point loc) |
When editing an object, this extra information tells out knots where the user has clicked on the item. | |
void | install_modification_watch () |
When object being edited has some attributes changed (fill, stroke) update what objects we watch. | |
Public Attributes | |
std::list< KnotHolderEntity * > | entity |
Protected Attributes | |
SPDesktop * | desktop |
SPItem * | item |
Inkscape::XML::Node * | repr |
repr of the item, for setting and releasing listeners. | |
bool | local_change = false |
if true, no need to recreate knotholder if repr was changed. | |
bool | dragging = false |
Geom::Affine | _edit_transform |
sigc::scoped_connection | _watch_fill |
sigc::scoped_connection | _watch_stroke |
Definition at line 50 of file knot-holder.h.
Definition at line 39 of file knot-holder.cpp.
References desktop, item, and sp_object_ref().
|
virtual |
Definition at line 52 of file knot-holder.cpp.
References clear(), item, and sp_object_unref().
|
delete |
References add().
void KnotHolder::add | ( | KnotHolderEntity * | e | ) |
Definition at line 317 of file knot-holder.cpp.
References entity.
Referenced by Inkscape::LivePathEffect::LPEAngleBisector::addKnotHolderEntities(), Inkscape::LivePathEffect::LPEParallel::addKnotHolderEntities(), Inkscape::LivePathEffect::LPEPerpBisector::addKnotHolderEntities(), Inkscape::LivePathEffect::TransformedPointParam::addKnotHolderEntities(), Inkscape::LivePathEffect::LPETiling::addKnotHolderEntities(), Inkscape::LivePathEffect::PointParam::addKnotHolderEntities(), Inkscape::LivePathEffect::LPEBendPath::addKnotHolderEntities(), Inkscape::LivePathEffect::LPEKnot::addKnotHolderEntities(), Inkscape::LivePathEffect::LPEOffset::addKnotHolderEntities(), Inkscape::LivePathEffect::LPEPatternAlongPath::addKnotHolderEntities(), Inkscape::LivePathEffect::LPETangentToCurve::addKnotHolderEntities(), Inkscape::LivePathEffect::LPETaperStroke::addKnotHolderEntities(), Inkscape::LivePathEffect::PowerStrokePointArrayParam::addKnotHolderEntities(), Inkscape::LivePathEffect::VectorParam::addKnotHolderEntities(), Inkscape::LivePathEffect::NodeSatelliteArrayParam::addKnotHolderEntities(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_click(), and KnotHolder().
void KnotHolder::add_filter_knotholder | ( | ) |
Definition at line 422 of file knot-holder.cpp.
References Inkscape::CANVAS_ITEM_CTRL_TYPE_MARKER, Inkscape::CANVAS_ITEM_CTRL_TYPE_ROTATE, desktop, entity, SPStyle::getFilter(), item, SPObject::style, Geom::X, and Geom::Y.
void KnotHolder::add_hatch_knotholder | ( | ) |
Definition at line 381 of file knot-holder.cpp.
References Inkscape::CANVAS_ITEM_CTRL_TYPE_MARKER, Inkscape::CANVAS_ITEM_CTRL_TYPE_ROTATE, Inkscape::CANVAS_ITEM_CTRL_TYPE_SIZER, KnotHolderEntity::create(), desktop, entity, SPStyle::fill, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), item, SPStyle::stroke, and SPObject::style.
void KnotHolder::add_pattern_knotholder | ( | ) |
Definition at line 337 of file knot-holder.cpp.
References Inkscape::CANVAS_ITEM_CTRL_TYPE_MARKER, Inkscape::CANVAS_ITEM_CTRL_TYPE_ROTATE, Inkscape::CANVAS_ITEM_CTRL_TYPE_SIZER, desktop, entity, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), install_modification_watch(), item, and SPObject::style.
void KnotHolder::clear | ( | ) |
Definition at line 59 of file knot-holder.cpp.
References entity.
Referenced by ~KnotHolder(), Inkscape::LivePathEffect::LPEBendPath::~LPEBendPath(), Inkscape::LivePathEffect::LPEOffset::~LPEOffset(), Inkscape::LivePathEffect::LPEPatternAlongPath::~LPEPatternAlongPath(), and Inkscape::LivePathEffect::LPETiling::~LPETiling().
|
inline |
Definition at line 78 of file knot-holder.h.
References desktop.
|
inline |
Definition at line 73 of file knot-holder.h.
References _edit_transform.
Referenced by KnotHolderEntity::snap_knot_position(), KnotHolderEntity::snap_knot_position_constrained(), and KnotHolderEntity::update_knot().
|
inline |
Definition at line 79 of file knot-holder.h.
References item.
void KnotHolder::install_modification_watch | ( | ) |
When object being edited has some attributes changed (fill, stroke) update what objects we watch.
Definition at line 464 of file knot-holder.cpp.
References _watch_fill, _watch_stroke, SPStyle::getFillPaintServer(), SPStyle::getStrokePaintServer(), item, SPObject::style, and update_knots().
Referenced by add_pattern_knotholder().
|
inline |
Definition at line 80 of file knot-holder.h.
References dragging.
void KnotHolder::knot_clicked_handler | ( | SPKnot * | knot, |
unsigned int | state | ||
) |
Definition at line 145 of file knot-holder.cpp.
References SPObject::document, entity, item, offset, and update_knots().
Referenced by KnotHolderEntity::create().
void KnotHolder::knot_grabbed_handler | ( | SPKnot * | knot, |
unsigned | state | ||
) |
Notifies an entity that its knot has just been grabbed.
Definition at line 220 of file knot-holder.cpp.
References _edit_transform, SPItem::dt2i_affine(), entity, Geom::Affine::inverse(), and item.
Referenced by knot_moved_handler().
void KnotHolder::knot_mousedown_handler | ( | SPKnot * | knot, |
unsigned int | state | ||
) |
Definition at line 117 of file knot-holder.cpp.
References desktop, entity, SPDesktop::getTool(), and Inkscape::UI::ShapeEditor::knotholder.
Referenced by KnotHolderEntity::create().
bool KnotHolder::knot_mouseover | ( | ) | const |
Returns true if at least one of the KnotHolderEntities has the mouse hovering above it.
Definition at line 90 of file knot-holder.cpp.
References entity, and SPKnot::is_mouseover().
void KnotHolder::knot_moved_handler | ( | SPKnot * | knot, |
Geom::Point const & | p, | ||
unsigned int | state | ||
) |
Definition at line 233 of file knot-holder.cpp.
References _edit_transform, dragging, entity, SPItem::i2dt_affine(), Geom::Affine::inverse(), item, knot_grabbed_handler(), local_change, and update_knots().
Referenced by KnotHolderEntity::create(), and transform_selected().
bool KnotHolder::knot_selected | ( | ) | const |
Returns true if at least one of the KnotHolderEntities is selected.
Definition at line 105 of file knot-holder.cpp.
References entity, and SPKnot::is_selected().
void KnotHolder::knot_ungrabbed_handler | ( | SPKnot * | knot, |
unsigned int | state | ||
) |
Definition at line 261 of file knot-holder.cpp.
References _edit_transform, desktop, SPObject::document, dragging, entity, SPStyle::getFilter(), SPDesktop::getSnapIndicator(), SPItem::i2dt_affine(), Geom::Affine::inverse(), SPKnot::is_selected(), item, offset, Inkscape::Display::SnapIndicator::remove_snaptarget(), SPKnot::selectKnot(), SPObject::style, and SPObject::updateRepr().
Referenced by KnotHolderEntity::create(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set_offset(), and Inkscape::LivePathEffect::FilletChamferKnotHolderEntity::knot_set_offset().
void KnotHolder::remove | ( | KnotHolderEntity * | e | ) |
Definition at line 323 of file knot-holder.cpp.
References counter, and entity.
Referenced by Inkscape::LivePathEffect::PointParam::~PointParam().
bool KnotHolder::set_item_clickpos | ( | Geom::Point | loc | ) |
When editing an object, this extra information tells out knots where the user has clicked on the item.
Definition at line 451 of file knot-holder.cpp.
References entity.
void KnotHolder::setEditTransform | ( | Geom::Affine | edit_transform | ) |
Definition at line 68 of file knot-holder.cpp.
References _edit_transform.
void KnotHolder::transform_selected | ( | Geom::Affine | transform | ) |
Definition at line 200 of file knot-holder.cpp.
References entity, SPKnot::is_selected(), knot_moved_handler(), SPKnot::pos, and SPKnot::selectKnot().
void KnotHolder::unselect_knots | ( | ) |
Definition at line 210 of file knot-holder.cpp.
References entity.
void KnotHolder::update_knots | ( | ) |
Definition at line 73 of file knot-holder.cpp.
References entity.
Referenced by Inkscape::LivePathEffect::LPEBendPath::doBeforeEffect(), Inkscape::LivePathEffect::LPEPatternAlongPath::doBeforeEffect(), Inkscape::LivePathEffect::LPETiling::doEffect_path(), install_modification_watch(), knot_clicked_handler(), and knot_moved_handler().
|
friend |
Definition at line 89 of file knot-holder.h.
|
friend |
Definition at line 87 of file knot-holder.h.
|
friend |
Definition at line 88 of file knot-holder.h.
|
friend |
Definition at line 86 of file knot-holder.h.
|
protected |
Definition at line 101 of file knot-holder.h.
Referenced by getEditTransform(), knot_grabbed_handler(), knot_moved_handler(), knot_ungrabbed_handler(), and setEditTransform().
|
protected |
Definition at line 102 of file knot-holder.h.
Referenced by install_modification_watch().
|
protected |
Definition at line 103 of file knot-holder.h.
Referenced by install_modification_watch().
|
protected |
Definition at line 93 of file knot-holder.h.
Referenced by add_filter_knotholder(), add_hatch_knotholder(), add_pattern_knotholder(), getDesktop(), knot_mousedown_handler(), knot_ungrabbed_handler(), and KnotHolder().
|
protected |
Definition at line 99 of file knot-holder.h.
Referenced by is_dragging(), knot_moved_handler(), and knot_ungrabbed_handler().
std::list<KnotHolderEntity *> KnotHolder::entity |
Definition at line 85 of file knot-holder.h.
Referenced by add(), add_filter_knotholder(), add_hatch_knotholder(), add_pattern_knotholder(), clear(), Inkscape::LivePathEffect::LPEOffset::doAfterEffect(), Inkscape::LivePathEffect::LPEBendPath::doBeforeEffect(), Inkscape::LivePathEffect::LPEPatternAlongPath::doBeforeEffect(), Inkscape::LivePathEffect::LPEOffset::doEffect_path(), Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_click(), knot_clicked_handler(), knot_grabbed_handler(), knot_mousedown_handler(), knot_mouseover(), knot_moved_handler(), knot_selected(), knot_ungrabbed_handler(), remove(), set_item_clickpos(), transform_selected(), unselect_knots(), and update_knots().
|
protected |
Definition at line 94 of file knot-holder.h.
Referenced by add_filter_knotholder(), add_hatch_knotholder(), add_pattern_knotholder(), getItem(), install_modification_watch(), knot_clicked_handler(), knot_grabbed_handler(), knot_moved_handler(), knot_ungrabbed_handler(), KnotHolder(), and ~KnotHolder().
|
protected |
if true, no need to recreate knotholder if repr was changed.
Definition at line 97 of file knot-holder.h.
Referenced by knot_moved_handler().
|
protected |
repr of the item, for setting and releasing listeners.
Definition at line 95 of file knot-holder.h.