Toast Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
document_preprocess.hpp
Go to the documentation of this file.
1
8
9
#pragma once
10
#include <functional>
11
#include <optional>
12
#include <string>
13
#include <string_view>
14
#include <
toast/export.hpp
>
15
#include <vector>
16
17
namespace
ui {
18
19
using
ColorResolver = std::function<std::optional<std::string>(std::string_view)>;
20
21
struct
PreprocessContext
{
22
std::vector<std::string> style_uris;
23
ColorResolver color_resolver;
24
bool
inject_data_model =
false
;
25
};
26
27
struct
DocumentScan
{
28
std::string transformed_rml;
29
std::vector<std::string> binds;
30
std::vector<std::string> bool_binds;
31
std::vector<std::string> events;
32
};
33
45
auto
TOAST_API preprocessDocument(std::string_view rml,
const
PreprocessContext
& ctx) ->
DocumentScan
;
46
52
auto
TOAST_API resolveColorReferences(std::string_view source,
const
ColorResolver& resolver) -> std::string;
53
54
}
export.hpp
ui::DocumentScan
Definition
document_preprocess.hpp:27
ui::PreprocessContext
Definition
document_preprocess.hpp:21
engine
src
toast
ui
document_preprocess.hpp
Generated by
1.17.0