Scroom  0.14
SelectionListener Class Referenceabstract

#include <viewinterface.hh>

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

Public Types

using Ptr = boost::shared_ptr< SelectionListener >
 

Public Member Functions

virtual std::string getSelectionType ()
 
virtual void onSelectionStart (Selection selection, boost::shared_ptr< ViewInterface > view)=0
 
virtual void onSelectionUpdate (Selection selection, boost::shared_ptr< ViewInterface > view)=0
 
virtual void onSelectionEnd (Selection selection, boost::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 (const Interface &&)=delete
 
Interfaceoperator= (const 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 = boost::shared_ptr<SelectionListener>

Member Function Documentation

◆ getSelectionType()

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

Reimplemented in PipetteHandler.

121 { return SelectionType::DEFAULT; }
Here is the call graph for this function:

◆ onSelectionEnd()

virtual void SelectionListener::onSelectionEnd ( Selection  selection,
boost::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

◆ onSelectionStart()

virtual void SelectionListener::onSelectionStart ( Selection  selection,
boost::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.

◆ onSelectionUpdate()

virtual void SelectionListener::onSelectionUpdate ( Selection  selection,
boost::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

The documentation for this class was generated from the following file:
SelectionType::DEFAULT
const std::string DEFAULT(GRID)