Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Snapper Class Referenceabstract

Parent for classes that can snap points to something. More...

#include <snapper.h>

Inheritance diagram for Inkscape::Snapper:
Inkscape::AlignmentSnapper Inkscape::DistributionSnapper Inkscape::LineSnapper Inkscape::ObjectSnapper Inkscape::GridSnapper Inkscape::GuideSnapper

Classes

class  SnapConstraint
 

Public Member Functions

 Snapper (SnapManager *sm, ::Geom::Coord const t)
 Construct new Snapper for named view.
 
virtual ~Snapper ()=default
 
virtual Geom::Coord getSnapperTolerance () const =0
 
virtual bool getSnapperAlwaysSnap (SnapSourceType const &source) const =0
 
virtual bool ThisSnapperMightSnap () const
 
void setEnabled (bool s)
 
void setSnapVisibleOnly (bool s)
 
bool getEnabled () const
 
bool getSnapVisibleOnly () const
 
virtual void freeSnap (IntermSnapResults &, Inkscape::SnapCandidatePoint const &, Geom::OptRect const &, std::vector< SPObject const * > const *, std::vector< SnapCandidatePoint > *) const
 
virtual void constrainedSnap (IntermSnapResults &, Inkscape::SnapCandidatePoint const &, Geom::OptRect const &, SnapConstraint const &, std::vector< SPObject const * > const *, std::vector< SnapCandidatePoint > *) const
 

Protected Attributes

SnapManager_snapmanager
 
bool _snap_enabled
 true if this snapper is enabled, otherwise false
 
bool _snap_visible_only
 

Detailed Description

Parent for classes that can snap points to something.

Definition at line 38 of file snapper.h.

Constructor & Destructor Documentation

◆ Snapper()

Inkscape::Snapper::Snapper ( SnapManager sm,
::Geom::Coord const  t 
)

Construct new Snapper for named view.

Parameters
nvNamed view.
dSnap tolerance.

Definition at line 22 of file snapper.cpp.

References _snapmanager.

◆ ~Snapper()

virtual Inkscape::Snapper::~Snapper ( )
virtualdefault

Member Function Documentation

◆ constrainedSnap()

virtual void Inkscape::Snapper::constrainedSnap ( IntermSnapResults ,
Inkscape::SnapCandidatePoint const &  ,
Geom::OptRect const &  ,
SnapConstraint const &  ,
std::vector< SPObject const * > const *  ,
std::vector< SnapCandidatePoint > *   
) const
inlinevirtual

◆ freeSnap()

virtual void Inkscape::Snapper::freeSnap ( IntermSnapResults ,
Inkscape::SnapCandidatePoint const &  ,
Geom::OptRect const &  ,
std::vector< SPObject const * > const *  ,
std::vector< SnapCandidatePoint > *   
) const
inlinevirtual

◆ getEnabled()

bool Inkscape::Snapper::getEnabled ( ) const
inline

Definition at line 56 of file snapper.h.

References _snap_enabled.

◆ getSnapperAlwaysSnap()

virtual bool Inkscape::Snapper::getSnapperAlwaysSnap ( SnapSourceType const &  source) const
pure virtual

◆ getSnapperTolerance()

virtual Geom::Coord Inkscape::Snapper::getSnapperTolerance ( ) const
pure virtual

◆ getSnapVisibleOnly()

bool Inkscape::Snapper::getSnapVisibleOnly ( ) const
inline

◆ setEnabled()

void Inkscape::Snapper::setEnabled ( bool  s)
Parameters
strue to enable this snapper, otherwise false.

Definition at line 34 of file snapper.cpp.

◆ setSnapVisibleOnly()

void Inkscape::Snapper::setSnapVisibleOnly ( bool  s)

Definition at line 39 of file snapper.cpp.

◆ ThisSnapperMightSnap()

virtual bool Inkscape::Snapper::ThisSnapperMightSnap ( ) const
inlinevirtual
Returns
true if this Snapper will snap at least one kind of point.

Reimplemented in Inkscape::AlignmentSnapper, Inkscape::DistributionSnapper, Inkscape::GridSnapper, Inkscape::GuideSnapper, and Inkscape::ObjectSnapper.

Definition at line 51 of file snapper.h.

References _snap_enabled.

Referenced by SnapManager::multipleOfGridPitch().

Member Data Documentation

◆ _snap_enabled

bool Inkscape::Snapper::_snap_enabled
protected

true if this snapper is enabled, otherwise false

Definition at line 149 of file snapper.h.

Referenced by getEnabled(), ThisSnapperMightSnap(), and Inkscape::GridSnapper::ThisSnapperMightSnap().

◆ _snap_visible_only

bool Inkscape::Snapper::_snap_visible_only
protected

Definition at line 150 of file snapper.h.

Referenced by getSnapVisibleOnly().

◆ _snapmanager


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