QCAD
Open Source 2D CAD
RSnapRestriction Class Referenceabstract

Abstract base class for all snap restriction implementations. More...

#include <RSnapRestriction.h>

Inheritance diagram for RSnapRestriction:
RRestrictAngleLength RRestrictOff RRestrictOrthogonal RRestrictAngleLengthExtension RRestrictHorizontal RRestrictVertical

Public Member Functions

RVector getLastSnap () const
 
virtual void hideUiOptions ()
 
void reset ()
 
virtual RVector restrictSnap (const RVector &position, const RVector &relativeZero)=0
 
 RSnapRestriction (RDocumentInterface *documentInterface=NULL)
 
virtual void showUiOptions ()
 
virtual ~RSnapRestriction ()
 

Protected Attributes

RDocumentInterfacedocumentInterface
 
RVector lastSnap
 

Detailed Description

Abstract base class for all snap restriction implementations.

Scriptable:
This class is available in script environments.

Constructor & Destructor Documentation

RSnapRestriction::RSnapRestriction ( RDocumentInterface documentInterface = NULL)
inline
virtual RSnapRestriction::~RSnapRestriction ( )
inlinevirtual

Member Function Documentation

RVector RSnapRestriction::getLastSnap ( ) const
inline
virtual void RSnapRestriction::hideUiOptions ( )
inlinevirtual

Reimplemented in RRestrictAngleLengthExtension.

void RSnapRestriction::reset ( )
inline
virtual RVector RSnapRestriction::restrictSnap ( const RVector position,
const RVector relativeZero 
)
pure virtual
Returns
The snapped position (closest relevant position) for the given mouse position.

Implemented in RRestrictAngleLength, RRestrictOrthogonal, and RRestrictOff.

virtual void RSnapRestriction::showUiOptions ( )
inlinevirtual

Reimplemented in RRestrictAngleLengthExtension.

Member Data Documentation

RDocumentInterface* RSnapRestriction::documentInterface
protected
RVector RSnapRestriction::lastSnap
protected

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