TermOx
|
Scrollbar to display progress through some structure, and control progress. More...
#include <scrollbar.hpp>
Classes | |
struct | Parameters |
Public Member Functions | |
Scrollbar (std::size_t size=0, std::size_t position=invalid_position) | |
Scrollbar (Parameters p) | |
auto | get_size () const -> std::size_t |
void | set_size (std::size_t s) |
void | increment_size () |
void | decrement_size () |
auto | get_position () const -> std::size_t |
void | set_position (std::size_t p) |
void | decrement_position () |
void | increment_position () |
auto | handle_wheel (Mouse::Button button) -> bool |
Returns true if button was a scoll wheel button. | |
Public Attributes | |
Button & | decrement_btn |
Middle & | middle = this->template make_child<Middle>({0, invalid_position}) |
Button & | increment_btn |
sl::Signal< void(std::size_t)> | new_position |
sl::Signal< void()> | decremented |
sl::Signal< void()> | incremented |
Static Public Attributes | |
static constexpr auto | invalid_position = -1uL |
Protected Member Functions | |
auto | mouse_wheel_event_filter (Widget &, Mouse const &m) -> bool override |
auto | mouse_press_event_filter (Widget &w, Mouse const &m) -> bool override |
auto | mouse_move_event_filter (Widget &w, Mouse const &m) -> bool override |
Scrollbar to display progress through some structure, and control progress.
Provides an increment, decrement, and new_position Signals to notify of changes. The size parameter tells the scrollbar how many units of scroll there are to the scructure it is linked with, and the current position the scrollbar is at is emitted with the new_position signal.
Button& ox::Scrollbar< Layout_t >::decrement_btn |
Button& ox::Scrollbar< Layout_t >::increment_btn |