![]() |
Inviwo 0.9.12-pre
Inviwo documentation
|
Handles interaction for 2D rectangle selection/filtering Selection/Filtering callbacks are called when filtering changes. More...
#include <modules/plotting/interaction/boxselection.h>
Public Types | |
| using | SelectionCallbackHandle = std::shared_ptr<std::function<SelectionFunc>> |
| using | SelectionFunc |
Public Member Functions | |
| SelectionCallbackHandle | addEventCallback (std::function< SelectionFunc > callback) |
| Added callbacks will be called when a box selection is initiated, updated, and finished. | |
| BoxSelection (const BoxSelectionProperty &boxSelectionSettings, std::function< dvec2(dvec2 p, const size2_t &dims)> screenToData, MouseButton mouseButton=MouseButton::Left, KeyModifiers modifiers=KeyModifiers(flags::none)) | |
| Handles interaction for 2D rectangle selection/filtering The callbacks are called when filtering changes. | |
| std::optional< std::array< dvec2, 2 > > | getDragRectangle () const |
| Returns (lower, upper) screen space coordinates of selection rectangle, null if not active. | |
| auto | properties () |
| auto | properties () const |
| void | reset () |
| Reset the drag rectangle. | |
Protected Member Functions | |
| void | handleEvent (Event *event, EventProperty::State state) |
Protected Attributes | |
| std::optional< std::array< dvec2, 2 > > | dataRect_ |
| std::optional< std::array< dvec2, 2 > > | dragRect_ |
| const BoxSelectionProperty & | dragRectSettings_ |
| Dispatcher< SelectionFunc > | eventCallback_ |
| EventProperty | mouseBoxSelection_ |
| std::function< dvec2(dvec2 p, const size2_t &dims)> | screenToData_ |
| ! Selection/filtering | |
Handles interaction for 2D rectangle selection/filtering Selection/Filtering callbacks are called when filtering changes.
The current drag rectangle is given by getDragRectangle.
The event properties returned by properties() need to be added to a processor in order for the interactions to work.
| using inviwo::plot::BoxSelection::SelectionFunc |
| inviwo::plot::BoxSelection::BoxSelection | ( | const BoxSelectionProperty & | boxSelectionSettings, |
| std::function< dvec2(dvec2 p, const size2_t &dims)> | screenToData, | ||
| MouseButton | mouseButton = MouseButton::Left, | ||
| KeyModifiers | modifiers = KeyModifiers(flags::none) ) |
Handles interaction for 2D rectangle selection/filtering The callbacks are called when filtering changes.
| boxSelectionSettings | use for selection/filtering/none |
| screenToData | converts screen coordinates to (x,y) data coordinates |
| void inviwo::plot::BoxSelection::reset | ( | ) |
Reset the drag rectangle.