TermOx
|
A Button with two alternating sides. More...
#include <toggle_button.hpp>
Classes | |
struct | Parameters |
Public Member Functions | |
Toggle_button (Glyph_string top_text, Glyph_string bottom_text) | |
Construct with corresponding labels. | |
Toggle_button (Parameters p) | |
Construct with given p . | |
void | show_top () |
Display the top button, without emitting any Signals. | |
void | show_bottom () |
Display the bottom button, without emitting any Signals. | |
void | toggle () |
Change the displayed button without emitting any signals. | |
Public Member Functions inherited from ox::Pair< Layout_t, First, Second > | |
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< First > a, std::unique_ptr< Second > b) | |
Existing Widgets are moved into the Pair. | |
template<std::size_t Index> | |
auto | get () -> auto & |
Get child by index. | |
template<std::size_t Index> | |
auto | get () const -> auto const & |
Get child by index. | |
Public Attributes | |
Button & | top = this->first |
Button & | bottom = this->second |
sl::Signal< void()> & | top_pressed = top.pressed |
sl::Signal< void()> & | bottom_pressed = bottom.pressed |
Public Attributes inherited from ox::Pair< Layout_t, First, Second > | |
First & | first |
Second & | second |
A Button with two alternating sides.
The top button is active first, switching between the two sides on clicks