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

#include <hikogui/widgets/text_delegate.hpp>

Inheritance diagram for hi::v1::text_delegate:
hi::v1::default_text_delegate< char const * > hi::v1::default_text_delegate< gstring > hi::v1::default_text_delegate< std::string > hi::v1::default_text_delegate< txt >

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 (text_widget &sender) noexcept
 
virtual void deinit (text_widget &sender) noexcept
 
virtual gstring read (text_widget &sender) noexcept=0
 Read text as a string of graphemes.
 
virtual void write (text_widget &sender, gstring const &text) noexcept=0
 Write text from a string of graphemes.
 
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 delegate that controls the state of a text_widget.

Member Function Documentation

◆ read()

virtual gstring hi::v1::text_delegate::read ( text_widget & sender)
pure virtualnoexcept

◆ subscribe()

callback_token hi::v1::text_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.

◆ write()

virtual void hi::v1::text_delegate::write ( text_widget & sender,
gstring const & text )
pure virtualnoexcept

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