TermOx
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
ox::Scrollbar< Layout_t > Class Template Reference

Scrollbar to display progress through some structure, and control progress. More...

#include <scrollbar.hpp>

Inheritance diagram for ox::Scrollbar< Layout_t >:

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

Buttondecrement_btn
 
Middle & middle = this->template make_child<Middle>({0, invalid_position})
 
Buttonincrement_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
 

Detailed Description

template<template< typename > typename Layout_t>
class ox::Scrollbar< Layout_t >

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.

Member Data Documentation

◆ decrement_btn

template<template< typename > typename Layout_t>
Button& ox::Scrollbar< Layout_t >::decrement_btn
Initial value:
=
this->template make_child<Button>(Glyph_string{top_symbol_})

◆ increment_btn

template<template< typename > typename Layout_t>
Button& ox::Scrollbar< Layout_t >::increment_btn
Initial value:
=
this->template make_child<Button>(Glyph_string{bottom_symbol_})

The documentation for this class was generated from the following files: