HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
hi::v1::default_text_delegate< char const * > Class Reference

#include <hikogui/widgets/text_delegate.hpp>

Inheritance diagram for hi::v1::default_text_delegate< char const * >:
hi::v1::text_delegate

Public Types

using value_type = char const *
 

Public Member Functions

template<forward_of< observer< value_type > > Value>
 default_text_delegate (Value &&value) noexcept
 Construct a delegate.
 
gstring read (widget_intf const &sender) noexcept override
 Read text as a string of graphemes.
 
void write (widget_intf const &sender, gstring const &text) noexcept override
 Write text from a string of graphemes.
 
- Public Member Functions inherited from hi::v1::text_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
 

Detailed Description

A default text delegate specialization for std::string.

Constructor & Destructor Documentation

◆ default_text_delegate()

template<forward_of< observer< value_type > > Value>
hi::v1::default_text_delegate< char const * >::default_text_delegate ( Value && value)
inlineexplicitnoexcept

Construct a delegate.

Parameters
valueA value or observer-value used as a representation of the state.

Member Function Documentation

◆ read()

gstring hi::v1::default_text_delegate< char const * >::read ( widget_intf const & sender)
inlineoverridevirtualnoexcept

Read text as a string of graphemes.

Implements hi::v1::text_delegate.

◆ write()

void hi::v1::default_text_delegate< char const * >::write ( widget_intf const & sender,
gstring const & text )
inlineoverridevirtualnoexcept

Write text from a string of graphemes.

Implements hi::v1::text_delegate.


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