You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
672 B
42 lines
672 B
|
1 month ago
|
#pragma once
|
||
|
|
#include <string>
|
||
|
|
#include <any>
|
||
|
|
#include <vector>
|
||
|
|
#include <unordered_map>
|
||
|
|
#include <cstdint>
|
||
|
|
|
||
|
|
enum class NodeType {
|
||
|
|
TEXT,
|
||
|
|
H1,
|
||
|
|
IMAGE,
|
||
|
|
UL,
|
||
|
|
ERROR,
|
||
|
|
};
|
||
|
|
|
||
|
|
struct Color {
|
||
|
|
uint8_t r;
|
||
|
|
uint8_t g;
|
||
|
|
uint8_t b;
|
||
|
|
uint8_t a;
|
||
|
|
|
||
|
|
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) :
|
||
|
|
r(r), g(g), b(g), a(a)
|
||
|
|
{}
|
||
|
|
};
|
||
|
|
|
||
|
|
struct Node {
|
||
|
|
NodeType type = NodeType::ERROR;
|
||
|
|
std::string content = "";
|
||
|
|
std::unordered_map<std::string, std::any> config{};
|
||
|
|
};
|
||
|
|
|
||
|
|
struct Slide {
|
||
|
|
std::vector<Node> content{};
|
||
|
|
std::unordered_map<std::string, std::any> config{};
|
||
|
|
};
|
||
|
|
|
||
|
|
struct Deck {
|
||
|
|
std::vector<Slide> slides{};
|
||
|
|
std::unordered_map<std::string, std::any> config{};
|
||
|
|
};
|