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

A list of buttons with connected scrollbar. More...

#include <button_list.hpp>

Inheritance diagram for ox::Button_list< Layout_t >:
ox::Pair< layout::Opposite_t< Layout_t< Widget > >, Scrollbar< Layout_t >, detail::Just_a_button_list_and_buffer< Layout_t > >

Classes

struct  Parameters
 

Public Member Functions

 Button_list (Color scrollbar_bg=Color::Background, Color scrollbar_fg=Color::Foreground)
 
 Button_list (Parameters p)
 
auto add_button (std::u32string const &name) -> Button &
 Returns reference to the Button added. More...
 
void set_scrollbar_bg (Color c)
 Set the background color of the Scrollbar.
 
void set_scrollbar_fg (Color c)
 Set the foreground color of the Scrollbar.
 
- Public Member Functions inherited from ox::Pair< layout::Opposite_t< Layout_t< Widget > >, Scrollbar< Layout_t >, detail::Just_a_button_list_and_buffer< Layout_t > >
 Pair ()
 Widgets are default constructed.
 
 Pair (Parameters p)
 
 Pair (typename First::Parameters a, typename Second::Parameters b)
 Widgets are constructed with passed in First/Second::Parameters objects.
 
 Pair (std::unique_ptr< Scrollbar< Layout_t > > a, std::unique_ptr< detail::Just_a_button_list_and_buffer< Layout_t > > b)
 Existing Widgets are moved into the Pair.
 
auto get () -> auto &
 Get child by index.
 
auto get () const -> auto const &
 Get child by index.
 

Public Attributes

sl::Signal< void(std::u32string const &name)> & button_pressed
 
- Public Attributes inherited from ox::Pair< layout::Opposite_t< Layout_t< Widget > >, Scrollbar< Layout_t >, detail::Just_a_button_list_and_buffer< Layout_t > >
Scrollbar< Layout_t > & first
 
detail::Just_a_button_list_and_buffer< Layout_t > & second
 

Detailed Description

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

A list of buttons with connected scrollbar.

Member Function Documentation

◆ add_button()

template<template< typename > class Layout_t>
auto ox::Button_list< Layout_t >::add_button ( std::u32string const &  name) -> Button&

Returns reference to the Button added.

The Brush and the 'pressed' signal are accessible to customize.

Member Data Documentation

◆ button_pressed

template<template< typename > class Layout_t>
sl::Signal<void(std::u32string const& name)>& ox::Button_list< Layout_t >::button_pressed
Initial value:
=
buttons.button_pressed

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