HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions
hi::v1::button_delegate Class Reference

#include <hikogui/widgets/button_delegate.hpp>

Public Types

using notifier_type = notifier<>
 
using callback_token = notifier_type::callback_token
 
using callback_proto = notifier_type::callback_proto
 

Public Member Functions

virtual void init (widget &sender) noexcept
 
virtual void deinit (widget &sender) noexcept
 
virtual void activate (widget &sender) noexcept
 Called when the button is pressed by the user.
 
virtual widget_state state (widget const &sender) const noexcept
 Used by the widget to check the state of the button.
 
callback_token subscribe (forward_of< callback_proto > auto &&callback, callback_flags flags=callback_flags::synchronous) noexcept
 Subscribe a callback for notifying the widget of a data change.
 

Detailed Description

A button delegate controls the state of a button widget.

Member Function Documentation

◆ activate()

virtual void hi::v1::button_delegate::activate ( widget & sender)
inlinevirtualnoexcept

Called when the button is pressed by the user.

◆ state()

virtual widget_state hi::v1::button_delegate::state ( widget const & sender) const
inlinevirtualnoexcept

Used by the widget to check the state of the button.

◆ subscribe()

callback_token hi::v1::button_delegate::subscribe ( forward_of< callback_proto > auto && callback,
callback_flags flags = callback_flags::synchronous )
inlinenoexcept

Subscribe a callback for notifying the widget of a data change.


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