13namespace hi {
inline namespace v1 {
79 different_from<std::shared_ptr<delegate_type>> Value,
80 forward_of<observer<observer_decay_t<Value>>> OnValue,
96 void set_layout(
widget_layout const& context) noexcept override;
97 void draw(
draw_context const& context) noexcept override;
100 static constexpr
std::chrono::nanoseconds _animation_duration =
std::chrono::milliseconds(150);
105 aarectanglei _button_rectangle;
108 animator<
float> _animated_value = _animation_duration;
111 void draw_radio_button(
draw_context const& context) noexcept;
112 void draw_radio_pip(
draw_context const& context) noexcept;
Defines abstract_button_widget.
#define hi_forward(x)
Forward a value, based on the decltype of the value.
Definition utility.hpp:29
geo::extent< int, 2 > extent2i
A 2D extent.
Definition extent.hpp:512
std::shared_ptr< button_delegate > make_default_radio_button_delegate(auto &&value, auto &&on_value) noexcept
Make a shared pointer to a radio-button delegate.
Definition button_delegate.hpp:227
DOXYGEN BUG.
Definition algorithm.hpp:13
geometry/margins.hpp
Definition cache.hpp:11
A type defining a 2D circle.
Definition circle.hpp:18
Draw context for drawing using the HikoGUI shaders.
Definition draw_context.hpp:211
2D constraints.
Definition box_constraints.hpp:22
Base class for implementing button widgets.
Definition abstract_button_widget.hpp:32
std::shared_ptr< delegate_type > delegate
The delegate that controls the button widget.
Definition abstract_button_widget.hpp:39
observer< alignment > alignment
The alignment of the button and on/off/other label.
Definition abstract_button_widget.hpp:55
A button delegate controls the state of a button widget.
Definition button_delegate.hpp:45
A graphical control element that allows the user to choose only one of a predefined set of mutually e...
Definition radio_button_widget.hpp:42
radio_button_widget(widget *parent, std::shared_ptr< delegate_type > delegate, button_widget_attribute auto &&...attributes) noexcept
Construct a radio button widget.
Definition radio_button_widget.hpp:56
radio_button_widget(widget *parent, Value &&value, OnValue &&on_value, Attributes &&...attributes) noexcept
Construct a radio button widget with a default button delegate.
Definition radio_button_widget.hpp:82
An interactive graphical object as part of the user-interface.
Definition widget.hpp:46
widget * parent
Pointer to the parent widget.
Definition widget.hpp:51
The layout of a widget.
Definition widget_layout.hpp:38
Definition abstract_button_widget.hpp:26