HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions
tt::boolean_checkbox_widget Class Reference

#include <ttauri/widgets/boolean_checkbox_widget.hpp>

Inheritance diagram for tt::boolean_checkbox_widget:
tt::checkbox_widget< bool > tt::abstract_toggle_button_widget< T > tt::abstract_button_widget< T > tt::widget std::enable_shared_from_this< widget >

Public Member Functions

template<typename Value = observable<bool>>
 boolean_checkbox_widget (gui_window &window, std::shared_ptr< abstract_container_widget > parent, Value &&value={}) noexcept
 
- Public Member Functions inherited from tt::checkbox_widget< bool >
 checkbox_widget (gui_window &window, std::shared_ptr< abstract_container_widget > parent, value_type true_value, value_type false_value, Value &&value={}) noexcept
 
void init () noexcept override
 Should be called right after allocating and constructing a widget.
 
bool update_constraints (hires_utc_clock::time_point display_time_point, bool need_reconstrain) noexcept override
 Update the constraints of the widget.
 
void update_layout (hires_utc_clock::time_point displayTimePoint, bool need_layout) noexcept override
 Update the internal layout of the widget.
 
void draw (draw_context context, hires_utc_clock::time_point display_time_point) noexcept override
 Draw the widget.
 
- Public Member Functions inherited from tt::abstract_toggle_button_widget< T >
template<typename Value = observable<value_type>>
 abstract_toggle_button_widget (gui_window &window, std::shared_ptr< abstract_container_widget > parent, value_type true_value, value_type false_value, Value &&value={}) noexcept
 
void toggle () noexcept
 
- Public Member Functions inherited from tt::abstract_button_widget< T >
template<typename Value = observable<value_type>>
 abstract_button_widget (gui_window &window, std::shared_ptr< abstract_container_widget > parent, value_type true_value, Value &&value={})
 
draw_context make_draw_context (draw_context context) const noexcept override
 Make a draw context for this widget.
 
bool accepts_keyboard_focus (keyboard_focus_group group) const noexcept
 Check if the widget will accept keyboard focus.
 
bool handle_event (command command) noexcept
 Handle command.
 
bool handle_event (mouse_event const &event) noexcept final
 
hit_box hitbox_test (f32x4 window_position) const noexcept final
 Find the widget that is under the mouse cursor.
 
template<typename Callback >
callback_ptr_type subscribe (Callback &&callback) noexcept
 Subscribe a callback to call when the button is activated.
 
void unsubscribe (callback_ptr_type &callback_ptr) noexcept
 Unsubscribe a callback.
 
- Public Member Functions inherited from tt::widget
 widget (gui_window &window, std::shared_ptr< abstract_container_widget > parent) noexcept
 
 widget (const widget &)=delete
 
widgetoperator= (const widget &)=delete
 
 widget (widget &&)=delete
 
widgetoperator= (widget &&)=delete
 
float margin () const noexcept
 Get the margin around the Widget.
 
float draw_layer () const noexcept
 The first drawing layer of the widget.
 
int logical_layer () const noexcept
 The logical layer of the widget.
 
int semantic_layer () const noexcept
 The semantic layer of the widget.
 
ranged_int< 3 > width_resistance () const noexcept
 Get the resistance in width.
 
ranged_int< 3 > height_resistance () const noexcept
 Get the resistance in height.
 
interval_vec2 preferred_size () const noexcept
 Get the size-range of the widget.
 
relative_base_line preferred_base_line () const noexcept
 Get the relative_base_line of the widget.
 
void set_layout_parameters (aarect const &window_rectangle, aarect const &window_clipping_rectangle, float window_base_line=std::numeric_limits< float >::infinity()) noexcept
 Set the location and size of the widget inside the window.
 
aarect window_rectangle () const noexcept
 Get the rectangle in window coordinates.
 
virtual aarect window_clipping_rectangle () const noexcept
 Get the clipping-rectangle in window coordinates.
 
float window_base_line () const noexcept
 Get the base-line distance from the bottom of the window.
 
aarect rectangle () const noexcept
 Get the rectangle in local coordinates.
 
float base_line () const noexcept
 Get the base-line in local coordinates.
 
gui_devicedevice () const noexcept
 
virtual bool handle_event (std::vector< command > const &commands) noexcept
 
virtual bool handle_command_recursive (command command, std::vector< std::shared_ptr< widget > > const &reject_list) noexcept
 Handle command recursive.
 
virtual bool handle_event (keyboard_event const &event) noexcept
 Handle keyboard event.
 
virtual std::shared_ptr< widgetfind_next_widget (std::shared_ptr< widget > const &current_keyboard_widget, keyboard_focus_group group, keyboard_focus_direction direction) const noexcept
 Find the next widget that handles keyboard focus.
 
std::shared_ptr< abstract_container_widget const > shared_parent () const noexcept
 Get a shared_ptr to the parent.
 
std::shared_ptr< abstract_container_widgetshared_parent () noexcept
 Get a shared_ptr to the parent.
 
abstract_container_widget const & parent () const noexcept
 Get a reference to the parent.
 
abstract_container_widgetparent () noexcept
 Get a reference to the parent.
 
bool is_first (keyboard_focus_group group) const noexcept
 Is this widget the first widget in the parent container.
 
bool is_last (keyboard_focus_group group) const noexcept
 Is this widget the last widget in the parent container.
 
- Public Member Functions inherited from std::enable_shared_from_this< widget >
enable_shared_from_this (T... args)
 
operator= (T... args)
 
shared_from_this (T... args)
 
~enable_shared_from_this (T... args)
 

Additional Inherited Members

- Public Types inherited from tt::checkbox_widget< bool >
using super
 
using value_type
 
- Public Types inherited from tt::abstract_toggle_button_widget< T >
using super = abstract_button_widget<T>
 
using value_type = T
 
- Public Types inherited from tt::abstract_button_widget< T >
using super = widget
 
using value_type = T
 
using notifier_type = notifier<void()>
 
using callback_type = typename notifier_type::callback_type
 
using callback_ptr_type = typename notifier_type::callback_ptr_type
 
- Static Public Member Functions inherited from tt::widget
static std::vector< std::shared_ptr< widget > > parent_chain (std::shared_ptr< tt::widget > const &child_widget) noexcept
 Get a list of parents of a given widget.
 
- Data Fields inherited from tt::checkbox_widget< bool >
observable< labeltrue_label
 
observable< labelfalse_label
 
observable< labelother_label
 
- Data Fields inherited from tt::abstract_toggle_button_widget< T >
value_type const false_value
 
- Data Fields inherited from tt::abstract_button_widget< T >
value_type const true_value
 
observable< value_type > value
 
- Data Fields inherited from tt::widget
gui_windowwindow
 Convenient reference to the Window.
 
observable< bool > enabled = true
 The widget is enabled.
 

Detailed Description

An abstract toggle button widget.

This widgets toggles a value from the true_value to false_value and back.


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