Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
SelectionListener Class Referenceabstract

#include <viewinterface.hh>

Inheritance diagram for SelectionListener:
Inheritance graph
Collaboration diagram for SelectionListener:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< SelectionListener >
 

Public Member Functions

virtual std::string getSelectionType ()
 
virtual void onSelectionStart (Selection selection, std::shared_ptr< ViewInterface > view)=0
 
virtual void onSelectionUpdate (Selection selection, std::shared_ptr< ViewInterface > view)=0
 
virtual void onSelectionEnd (Selection selection, std::shared_ptr< ViewInterface > view)=0
 

Additional Inherited Members

- Private Member Functions inherited from Interface
 Interface ()=default
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
 Interface (Interface &&)=delete
 
Interfaceoperator= (Interface &&)=delete
 
virtual ~Interface ()=default
 

Detailed Description

Interface provided to something that wants to be notified of selection updates.

Whenever the user selection changes, the appropriate functions are called with either the starting point or the full selection as argument.

See also
Selection

Member Typedef Documentation

◆ Ptr

using SelectionListener::Ptr = std::shared_ptr<SelectionListener>

Member Function Documentation

◆ getSelectionType()

virtual std::string SelectionListener::getSelectionType ( )
inlinevirtual

Reimplemented in PipetteHandler.

121{ return SelectionType::DEFAULT; }
const std::string DEFAULT(GRID)
Here is the call graph for this function:

◆ onSelectionEnd()

virtual void SelectionListener::onSelectionEnd ( Selection  selection,
std::shared_ptr< ViewInterface view 
)
pure virtual

This function is called whenever the selection ends. That is, whenever the user releases the mouse button that was pressed.

The final selection is passed as an argument.

See also
Selection

Implemented in MeasureHandler, and PipetteHandler.

◆ onSelectionStart()

virtual void SelectionListener::onSelectionStart ( Selection  selection,
std::shared_ptr< ViewInterface view 
)
pure virtual

This function is called whenever the user clicks a view. The point that is clicked is passed as an argument.

The passed point is a point in the presentation coordinate space.

Implemented in MeasureHandler, and PipetteHandler.

◆ onSelectionUpdate()

virtual void SelectionListener::onSelectionUpdate ( Selection  selection,
std::shared_ptr< ViewInterface view 
)
pure virtual

This function is called whenever the selection updates. That is, whenever the user moves the mouse while keeping the mouse button pressed.

The updated selection is passed as an argument.

See also
Selection

Implemented in MeasureHandler, and PipetteHandler.


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