|
TachyonUI 0.1.0
High-performance UI for building tools.
|
Base types, results, hashing, JSON and number parsing. More...
Namespaces | |
| namespace | tachyon::Hash |
Typedefs | |
| using | tachyon::OnGuiFunc = std::function<void()> |
| using | tachyon::byte = unsigned char |
| using | tachyon::ushort = unsigned short |
Enumerations | |
| enum class | tachyon::ErrorCode : uint8_t { tachyon::ErrorCode::Failed , tachyon::ErrorCode::InvalidArgument , tachyon::ErrorCode::NotFound , tachyon::ErrorCode::ParseFailed , tachyon::ErrorCode::Unsupported , tachyon::ErrorCode::OutOfMemory , tachyon::ErrorCode::DeviceLost } |
| Why a call failed. More... | |
Functions | |
| uint16_t | tachyon::FloatToHalf (float value) |
| float | tachyon::HalfToFloat (uint16_t value) |
| int64_t | tachyon::SteadyClockNowNanos () |
| Monotonic steady_clock time in nanoseconds; a plain int64_t keeps <chrono> out of widely-included headers. | |
| template<typename T> | |
| std::from_chars_result | tachyon::FromCharsStream (const char *first, const char *last, T &value) |
| std::from_chars for a decimal number, through a classic-locale stream. | |
| template<typename T> | |
| std::from_chars_result | tachyon::FromChars (const char *first, const char *last, T &value) |
| std::from_chars, falling back to FromCharsStream on standard libraries without the floating-point overloads (libc++ before LLVM 20, Apple's included). | |
| tachyon::JsonValue::JsonValue ()=default | |
| Default is null. | |
| tachyon::JsonValue::JsonValue (std::nullptr_t) | |
| tachyon::JsonValue::JsonValue (bool value) | |
| tachyon::JsonValue::JsonValue (int value) | |
| tachyon::JsonValue::JsonValue (double value) | |
| tachyon::JsonValue::JsonValue (std::string value) | |
| tachyon::JsonValue::JsonValue (std::string_view value) | |
| tachyon::JsonValue::JsonValue (const char *value) | |
| tachyon::JsonValue::JsonValue (Array value) | |
| tachyon::JsonValue::JsonValue (Object value) | |
| std::span< const std::byte > | tachyon::FindBuiltInResource (std::string_view path) |
| The copy of a resource compiled into the library: the default themes (dark.css, light.css, styles.css) and fonts (Inter, JetBrains Mono), unless the library was built with TACHYON_EMBED_RESOURCES off. | |
| Result< std::string > | tachyon::ReadResource (std::string_view path) |
| A resource's contents: the file at path when it exists, else its built-in copy (which is logged, so a theme file that went missing shows up). | |
| tachyon::Result< T >::Result (T value) | |
| Implicit from a value or an Error, so functions can return either. | |
| tachyon::Result< T >::Result (Error error) | |
Base types, results, hashing, JSON and number parsing.
| using tachyon::OnGuiFunc = std::function<void()> |
#include <gui_core/gui_base_types.h>
| using tachyon::byte = unsigned char |
#include <gui_core/gui_base_types.h>
| using tachyon::ushort = unsigned short |
#include <gui_core/gui_base_types.h>
|
strong |
#include <gui_core/gui_result.h>
Why a call failed.
| uint16_t tachyon::FloatToHalf | ( | float | value | ) |
#include <gui_core/gui_base_types.h>
| float tachyon::HalfToFloat | ( | uint16_t | value | ) |
#include <gui_core/gui_base_types.h>
| int64_t tachyon::SteadyClockNowNanos | ( | ) |
#include <gui_core/gui_base_types.h>
Monotonic steady_clock time in nanoseconds; a plain int64_t keeps <chrono> out of widely-included headers.
| std::from_chars_result tachyon::FromCharsStream | ( | const char * | first, |
| const char * | last, | ||
| T & | value ) |
#include <gui_core/gui_from_chars.h>
std::from_chars for a decimal number, through a classic-locale stream.
For standard libraries without floating-point from_chars. The number is scanned first, as from_chars does ([-]digits[.digits][e[+-]digits], no '+' or whitespace before it): libc++'s stream would also take the letters of a hex float, so "0.25px" fails there.
| std::from_chars_result tachyon::FromChars | ( | const char * | first, |
| const char * | last, | ||
| T & | value ) |
#include <gui_core/gui_from_chars.h>
std::from_chars, falling back to FromCharsStream on standard libraries without the floating-point overloads (libc++ before LLVM 20, Apple's included).
|
default |
#include <gui_core/gui_json.h>
Default is null.
Converts from the matching C++ types; all numbers are stored as double.
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
|
inline |
#include <gui_core/gui_json.h>
| std::span< const std::byte > tachyon::FindBuiltInResource | ( | std::string_view | path | ) |
#include <gui_core/gui_resources.h>
The copy of a resource compiled into the library: the default themes (dark.css, light.css, styles.css) and fonts (Inter, JetBrains Mono), unless the library was built with TACHYON_EMBED_RESOURCES off.
Found by the end of the path, so "themes/styles.css" and "C:/app/resources/themes/styles.css" both find it. Empty when there is none.
| Result< std::string > tachyon::ReadResource | ( | std::string_view | path | ) |
#include <gui_core/gui_resources.h>
A resource's contents: the file at path when it exists, else its built-in copy (which is logged, so a theme file that went missing shows up).
The library reads its themes this way, so an app needs no resource files, and a file of the same name under the resource root replaces the built-in one.
|
inline |
#include <gui_core/gui_result.h>
Implicit from a value or an Error, so functions can return either.
|
inline |
#include <gui_core/gui_result.h>