Splitter class
#include <Jazz2/UI/Windows/Widgets.h>
Edge of a panel that is dragged to resize it.
Base classes
- class Element
- Element of the interface.
Constructors, destructors, conversion operators
-
Splitter(Windows::
Orientation orientation, Function<void()>&& onDragStart, Function<void(float)>&& onDrag, Function<void()>&& onDragEnd = {}) - Creates a new instance, a vertical splitter is dragged horizontally.
Public functions
- void Draw(Painter& painter) override
- Draws the element and its children.
- void Update(float timeMult) override
- Advances animations of the element and its children.
- auto AcceptsPointer() const -> bool override
- Returns
trueif the element takes the pointer itself. - auto OnPointerDown(const PointerEvent& event) -> bool override
- Called when the pointer is pressed over the element, returns
trueto keep getting it until released. - void OnPointerMove(const PointerEvent& event) override
- Called when the pointer moves while pressed over the element.
- void OnPointerUp(const PointerEvent& event, bool inside) override
- Called when the pointer is released,
insidetells whether it's still over the element.
Public variables
-
Windows::
Orientation Orientation - Direction of the edge.
- Function<void()> OnDragStart
- Called when the edge is pressed.
- Function<void(float)> OnDrag
- Called with how far the edge was dragged since it was pressed, in pixels.
- Function<void()> OnDragEnd
- Called when the edge is let go.
- bool ShowLine
- Whether a line like a separator is shown along it all the time, not only while it's pointed at.