TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::TextConverter< T > Struct Template Reference

Turns a field's value into the text it shows and edits, and edited text back into a value. More...

Detailed Description

template<typename T>
struct tachyon::TextConverter< T >

Turns a field's value into the text it shows and edits, and edited text back into a value.

Specialize it for a type to edit that type in a field, or pass any object with the same members (and ITextValidator as its base) to RegisterEditableValue:

std::string Format(const T& value, bool editing) const; // editing: the focus just arrived bool Parse(std::string_view text, T& value) const; // false: not a T, value untouched


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