|
Scroom 0.14-49-gb7ae7a6d
|
#include <pipette.hh>


Public Types | |
| using | Ptr = std::shared_ptr< PipetteHandler > |
Public Types inherited from ToolStateListener | |
| using | Ptr = std::shared_ptr< ToolStateListener > |
Public Types inherited from PostRenderer | |
| using | Ptr = std::shared_ptr< PostRenderer > |
Public Types inherited from SelectionListener | |
| using | Ptr = std::shared_ptr< SelectionListener > |
Public Member Functions | |
| void | render (ViewInterface::Ptr const &vi, cairo_t *cr, Scroom::Utils::Rectangle< double > presentationArea, int zoom) override |
| std::string | getSelectionType () override |
| void | onSelectionStart (Selection p, ViewInterface::Ptr view) override |
| void | onSelectionUpdate (Selection s, ViewInterface::Ptr view) override |
| void | onSelectionEnd (Selection s, ViewInterface::Ptr view) override |
| void | onEnable () override |
| void | onDisable () override |
| virtual void | computeValues (const ViewInterface::Ptr &view, Scroom::Utils::Rectangle< double > sel_rect) |
| virtual void | displayValues (const ViewInterface::Ptr &view, Scroom::Utils::Rectangle< double > rect, const PipetteLayerOperations::PipetteColor &colors) |
| std::optional< Selection > | getSelection () const |
| bool | isEnabled () const |
Public Member Functions inherited from Scroom::Utils::Base | |
| Base ()=default | |
| Base (const Base &)=delete | |
| Base (Base &&)=delete | |
| Base & | operator= (const Base &)=delete |
| Base & | operator= (Base &&)=delete |
| virtual | ~Base ()=default |
| template<typename R > | |
| std::shared_ptr< R > | shared_from_this () |
| template<typename R > | |
| std::shared_ptr< R const > | shared_from_this () const |
Static Public Member Functions | |
| static Ptr | create () |
Private Attributes | |
| std::optional< Selection > | selection |
| bool | enabled {false} |
| std::atomic_flag | wasDisabled = ATOMIC_FLAG_INIT |
| std::mutex | jobMutex |
| ThreadPool::Queue::Ptr | currentJob {ThreadPool::Queue::createAsync()} |
| Scroom::Logger | logger |
| using PipetteHandler::Ptr = std::shared_ptr<PipetteHandler> |
|
virtual |

|
static |
Referenced by Pipette::viewAdded().

|
virtual |
Referenced by computeValues().


|
inline |
|
overridevirtual |
Reimplemented from SelectionListener.

|
inline |
|
overridevirtual |
Then function is called whenever the tool button is deselected.
Implements ToolStateListener.
|
overridevirtual |
This function is called whenever the tool button is selected.
Implements ToolStateListener.
|
overridevirtual |
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.
Implements SelectionListener.

|
overridevirtual |
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.
Implements SelectionListener.
|
overridevirtual |
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.
Implements SelectionListener.
|
overridevirtual |
This function is called after the presentation finishes redrawing.
| vi | The ViewInterface on whose behalf the request is made |
| cr | The context to with, the origin of the context is translated to be the same as the origin of the presentation. |
| presentationArea | the area that is to be drawn. The given x and y coordinates should map on 0,0 of the given context cr. |
| zoom | The requested zoom level. One pixel should have size 2**zoom when drawn. zoom may be negative. |
Implements PostRenderer.

|
private |
Referenced by onSelectionEnd().
|
private |
Referenced by isEnabled(), onDisable(), onEnable(), onSelectionEnd(), and onSelectionUpdate().
|
private |
Referenced by computeValues(), onEnable(), onSelectionEnd(), and onSelectionUpdate().
|
private |
Referenced by computeValues().
|
private |
Referenced by getSelection(), onDisable(), onSelectionEnd(), onSelectionUpdate(), and render().
|
private |
Referenced by computeValues(), onDisable(), and onEnable().