Inviwo 0.9.12-pre
Inviwo documentation
|
utility class for rendering vertical or horizontal splitters and providing drag interactions. This class will invalidate the processor for hover and drag events in order to trigger a redraw. More...
#include <splitterrenderer.h>
Public Types | |
using | InvalidateCallback = std::function<void()> |
using | DragCallback = std::function<void(float, int)> |
Public Member Functions | |
SplitterRenderer (Processor *processor) | |
SplitterRenderer (const SplitterRenderer &rhs)=delete | |
SplitterRenderer (SplitterRenderer &&rhs)=default | |
SplitterRenderer & | operator= (const SplitterRenderer &rhs)=delete |
SplitterRenderer & | operator= (SplitterRenderer &&rhs)=default |
void | setInvalidateAction (InvalidateCallback callback) |
set the invalidation callback. callback is called whenever the splitter requires a redraw, for example during dragging or for hover events | |
void | setDragAction (DragCallback callback) |
callback will be called when the splitter is moved by dragging via mouse or touch. The arguments of the callback correspond to the new position and the index of the dragged splitter. When only one splitter is rendered the index will be 0. | |
void | render (const SplitterSettings &settings, splitter::Direction direction, const std::vector< float > &pos, size2_t canvasDims) |
utility class for rendering vertical or horizontal splitters and providing drag interactions. This class will invalidate the processor for hover and drag events in order to trigger a redraw.