Toast Engine
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
17namespace ui {
18
19using ColorResolver = std::function<std::optional<std::string>(std::string_view)>;
20
22 std::vector<std::string> style_uris;
23 ColorResolver color_resolver;
24 bool inject_data_model = false;
25};
26
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
45auto TOAST_API preprocessDocument(std::string_view rml, const PreprocessContext& ctx) -> DocumentScan;
46
52auto TOAST_API resolveColorReferences(std::string_view source, const ColorResolver& resolver) -> std::string;
53
54}
Definition document_preprocess.hpp:27
Definition document_preprocess.hpp:21