TachyonUI
1.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_resources.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
gui_core/gui_result.h
>
4
5
#include <cstddef>
6
#include <cstdint>
7
#include <span>
8
#include <string>
9
#include <string_view>
10
11
namespace
tachyon
12
{
15
19
enum class
PathCaseCheck
: uint8_t
20
{
21
Off
,
22
Warn
,
23
Fail
,
24
};
25
27
void
SetPathCaseCheck
(
PathCaseCheck
mode);
28
PathCaseCheck
GetPathCaseCheck
();
29
37
std::string
FindPathCaseMismatch
(std::string_view path);
38
42
bool
CheckPathCase
(std::string_view path);
43
49
std::span<const std::byte>
FindBuiltInResource
(std::string_view path);
50
55
Result<std::string>
ReadResource
(std::string_view path);
56
58
}
tachyon::Result
A value, or the Error saying why there is none.
Definition
gui_result.h:36
tachyon::ReadResource
Result< std::string > ReadResource(std::string_view path)
A resource's contents: the file at path when it exists, else its built-in copy (which is logged,...
tachyon::FindBuiltInResource
std::span< const std::byte > FindBuiltInResource(std::string_view path)
The copy of a resource compiled into the library: the default themes (dark.css, light....
tachyon::CheckPathCase
bool CheckPathCase(std::string_view path)
Applies the PathCaseCheck mode to a resource file about to be opened: false only in Fail mode when pa...
tachyon::GetPathCaseCheck
PathCaseCheck GetPathCaseCheck()
tachyon::SetPathCaseCheck
void SetPathCaseCheck(PathCaseCheck mode)
Sets how resource paths are checked; see PathCaseCheck. Thread safe.
tachyon::FindPathCaseMismatch
std::string FindPathCaseMismatch(std::string_view path)
The spelling on disk of the file or folder at path when it exists under a name that differs from path...
tachyon::PathCaseCheck
PathCaseCheck
What the library does when a resource file it opens is named in a case other than the one it has on d...
Definition
gui_resources.h:20
tachyon::PathCaseCheck::Warn
@ Warn
Log an error naming both spellings, and open the file. The default in debug builds.
Definition
gui_resources.h:22
tachyon::PathCaseCheck::Fail
@ Fail
Log the error and refuse the file, as Linux would. The test suites use this.
Definition
gui_resources.h:23
tachyon::PathCaseCheck::Off
@ Off
Don't compare; opening a file costs nothing extra. The default in release builds.
Definition
gui_resources.h:21
gui_result.h
tachyon
Definition
gui_logging.h:24
gui_core
gui_resources.h
Generated by
1.18.0