TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_content.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <string>
6#include <string_view>
7
8namespace tachyon
9{
12
22 {
24 std::string_view text;
25 std::string_view tooltip;
26
27 constexpr GUIContent() = default;
29 constexpr GUIContent(const char* text) : text(text) {}
30 constexpr GUIContent(std::string_view text) : text(text) {}
31 GUIContent(const std::string& text) : text(text) {}
33 constexpr GUIContent(std::string_view text, std::string_view tooltip) : text(text), tooltip(tooltip) {}
35 constexpr GUIContent(IconID icon, std::string_view text = {}, std::string_view tooltip = {})
37 };
38
43 {
44 std::string_view title;
45 std::string_view description;
46 std::string_view footer;
47 };
48
49}
IconID
Handle for an icon registered with ITextSystem::RegisterIconFromSVG / RegisterIconFromSVGFile.
Definition gui_style_text.h:15
@ Invalid
Definition gui_style_text.h:15
Definition gui_logging.h:24
constexpr GUIContent()=default
std::string_view tooltip
shown on hover when not empty
Definition gui_content.h:25
constexpr GUIContent(IconID icon, std::string_view text={}, std::string_view tooltip={})
An icon, optionally with text and a tooltip.
Definition gui_content.h:35
std::string_view text
empty = no text
Definition gui_content.h:24
IconID icon
Invalid = no icon.
Definition gui_content.h:23
constexpr GUIContent(std::string_view text, std::string_view tooltip)
Text with a tooltip.
Definition gui_content.h:33
GUIContent(const std::string &text)
Definition gui_content.h:31
constexpr GUIContent(const char *text)
Text only, from any string type.
Definition gui_content.h:29
constexpr GUIContent(std::string_view text)
Definition gui_content.h:30
A property's help, shown in a larger tooltip (SetTooltip): its name, what it does,...
Definition gui_content.h:43
std::string_view description
Definition gui_content.h:45
std::string_view footer
Definition gui_content.h:46
std::string_view title
Definition gui_content.h:44