HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
hi::v1::default_tab_delegate< T > Class Template Reference

#include <hikogui/widgets/tab_delegate.hpp>

Inheritance diagram for hi::v1::default_tab_delegate< T >:
hi::v1::tab_delegate

Public Types

using value_type = T
 

Public Member Functions

template<forward_of< observer< value_type > > Value>
 default_tab_delegate (Value &&value) noexcept
 Construct a default tab delegate.
 
void add_tab (widget_intf const &sender, std::size_t key, std::size_t index) noexcept override
 
std::ptrdiff_t index (widget_intf const &sender) noexcept override
 
- Public Member Functions inherited from hi::v1::tab_delegate
virtual void init (widget_intf const &sender) noexcept
 
virtual void deinit (widget_intf const &sender) noexcept
 
template<forward_of< void()> Func>
callback< void()> subscribe (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept
 Subscribe a callback for notifying the widget of a data change.
 

Data Fields

observer< value_type > value
 
std::unordered_map< std::size_t, std::size_ttab_indices
 

Detailed Description

template<typename T>
class hi::v1::default_tab_delegate< T >

A delegate that control the state of a tab_widget.

Template Parameters
Tthe type used as the key for which tab is selected.

Constructor & Destructor Documentation

◆ default_tab_delegate()

template<typename T >
template<forward_of< observer< value_type > > Value>
hi::v1::default_tab_delegate< T >::default_tab_delegate ( Value && value)
inlinenoexcept

Construct a default tab delegate.

Parameters
valueThe observer value which represents the selected tab.

Member Function Documentation

◆ add_tab()

template<typename T >
void hi::v1::default_tab_delegate< T >::add_tab ( widget_intf const & sender,
std::size_t key,
std::size_t index )
inlineoverridevirtualnoexcept

Reimplemented from hi::v1::tab_delegate.

◆ index()

template<typename T >
std::ptrdiff_t hi::v1::default_tab_delegate< T >::index ( widget_intf const & sender)
inlineoverridevirtualnoexcept

Reimplemented from hi::v1::tab_delegate.


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