Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
KnotHolder Class Reference

#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.
 
SPDesktopgetDesktop ()
 
SPItemgetItem ()
 
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

SPDesktopdesktop
 
SPItemitem
 
Inkscape::XML::Noderepr
 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
 

Friends

class Inkscape::UI::ShapeEditor
 
class Inkscape::LivePathEffect::NodeSatelliteArrayParam
 
class Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity
 
class Inkscape::LivePathEffect::FilletChamferKnotHolderEntity
 

Detailed Description

Definition at line 50 of file knot-holder.h.

Constructor & Destructor Documentation

◆ KnotHolder() [1/2]

KnotHolder::KnotHolder ( SPDesktop desktop,
SPItem item 
)

Definition at line 39 of file knot-holder.cpp.

References desktop, item, and sp_object_ref().

◆ ~KnotHolder()

KnotHolder::~KnotHolder ( )
virtual

Definition at line 52 of file knot-holder.cpp.

References clear(), item, and sp_object_unref().

◆ KnotHolder() [2/2]

KnotHolder::KnotHolder ( )
delete

References add().

Member Function Documentation

◆ add()

◆ add_filter_knotholder()

void KnotHolder::add_filter_knotholder ( )

◆ add_hatch_knotholder()

◆ add_pattern_knotholder()

◆ clear()

◆ getDesktop()

SPDesktop * KnotHolder::getDesktop ( )
inline

Definition at line 78 of file knot-holder.h.

References desktop.

◆ getEditTransform()

Geom::Affine KnotHolder::getEditTransform ( ) const
inline

◆ getItem()

SPItem * KnotHolder::getItem ( )
inline

Definition at line 79 of file knot-holder.h.

References item.

◆ install_modification_watch()

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().

◆ is_dragging()

bool KnotHolder::is_dragging ( ) const
inline

Definition at line 80 of file knot-holder.h.

References dragging.

◆ knot_clicked_handler()

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().

◆ knot_grabbed_handler()

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().

◆ knot_mousedown_handler()

void KnotHolder::knot_mousedown_handler ( SPKnot knot,
unsigned int  state 
)

◆ knot_mouseover()

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().

◆ knot_moved_handler()

void KnotHolder::knot_moved_handler ( SPKnot knot,
Geom::Point const &  p,
unsigned int  state 
)

◆ knot_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().

◆ knot_ungrabbed_handler()

◆ remove()

void KnotHolder::remove ( KnotHolderEntity e)

Definition at line 323 of file knot-holder.cpp.

References counter, and entity.

Referenced by Inkscape::LivePathEffect::PointParam::~PointParam().

◆ set_item_clickpos()

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.

◆ setEditTransform()

void KnotHolder::setEditTransform ( Geom::Affine  edit_transform)

Definition at line 68 of file knot-holder.cpp.

References _edit_transform.

◆ transform_selected()

void KnotHolder::transform_selected ( Geom::Affine  transform)

◆ unselect_knots()

void KnotHolder::unselect_knots ( )

Definition at line 210 of file knot-holder.cpp.

References entity.

◆ update_knots()

Friends And Related Symbol Documentation

◆ Inkscape::LivePathEffect::FilletChamferKnotHolderEntity

Definition at line 89 of file knot-holder.h.

◆ Inkscape::LivePathEffect::NodeSatelliteArrayParam

Definition at line 87 of file knot-holder.h.

◆ Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity

◆ Inkscape::UI::ShapeEditor

friend class Inkscape::UI::ShapeEditor
friend

Definition at line 86 of file knot-holder.h.

Member Data Documentation

◆ _edit_transform

Geom::Affine KnotHolder::_edit_transform
protected

◆ _watch_fill

sigc::scoped_connection KnotHolder::_watch_fill
protected

Definition at line 102 of file knot-holder.h.

Referenced by install_modification_watch().

◆ _watch_stroke

sigc::scoped_connection KnotHolder::_watch_stroke
protected

Definition at line 103 of file knot-holder.h.

Referenced by install_modification_watch().

◆ desktop

◆ dragging

bool KnotHolder::dragging = false
protected

Definition at line 99 of file knot-holder.h.

Referenced by is_dragging(), knot_moved_handler(), and knot_ungrabbed_handler().

◆ entity

◆ item

◆ local_change

bool KnotHolder::local_change = false
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().

◆ repr

Inkscape::XML::Node* KnotHolder::repr
protected

repr of the item, for setting and releasing listeners.

Definition at line 95 of file knot-holder.h.


The documentation for this class was generated from the following files: