|
TachyonUI 0.1.0
High-performance UI for building tools.
|
What a control shows: a text, an icon or both, and an optional tooltip. More...
#include <gui_controls/gui_content.h>
Public Member Functions | |
| constexpr | GUIContent ()=default |
| constexpr | GUIContent (const char *text) |
| Text only, from any string type. | |
| constexpr | GUIContent (std::string_view text) |
| GUIContent (const std::string &text) | |
| constexpr | GUIContent (std::string_view text, std::string_view tooltip) |
| Text with a tooltip. | |
| constexpr | GUIContent (IconID icon, std::string_view text={}, std::string_view tooltip={}) |
| An icon, optionally with text and a tooltip. | |
Public Attributes | |
| IconID | icon = IconID::Invalid |
| Invalid = no icon. | |
| std::string_view | text |
| empty = no text | |
| std::string_view | tooltip |
| shown on hover when not empty | |
What a control shows: a text, an icon or both, and an optional tooltip.
It converts from a string or an icon, so a control showing one of them takes it as is:
Button("Save", onSave);
Button(saveIcon, onSave);
Button({ saveIcon, "Save", "Write the file to disk" }, onSave);
It refers to its strings, which only need to live for the call.
|
constexprdefault |
|
inlineconstexpr |
Text only, from any string type.
|
inlineconstexpr |
|
inline |
|
inlineconstexpr |
Text with a tooltip.
|
inlineconstexpr |
An icon, optionally with text and a tooltip.
| IconID tachyon::GUIContent::icon = IconID::Invalid |
Invalid = no icon.
| std::string_view tachyon::GUIContent::text |
empty = no text
| std::string_view tachyon::GUIContent::tooltip |
shown on hover when not empty