Bezos2 is my latest version of the Bezos learning project that uses raw OpenGL and C++ with Lua.
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.
|
|
|
|
#pragma once
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <any>
|
|
|
|
|
#include <vector>
|
|
|
|
|
#include <unordered_map>
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include "image.hpp"
|
|
|
|
|
|
|
|
|
|
enum class NodeType {
|
|
|
|
|
TEXT,
|
|
|
|
|
H1,
|
|
|
|
|
IMAGE,
|
|
|
|
|
UL,
|
|
|
|
|
ERROR,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Color {
|
|
|
|
|
uint8_t r=0;
|
|
|
|
|
uint8_t g=0;
|
|
|
|
|
uint8_t b=0;
|
|
|
|
|
uint8_t a=255;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Node {
|
|
|
|
|
NodeType type = NodeType::ERROR;
|
|
|
|
|
std::wstring content = L"";
|
|
|
|
|
std::unordered_map<std::string, std::any> config{};
|
|
|
|
|
std::shared_ptr<Image> image = nullptr;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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{};
|
|
|
|
|
bool analyzed = false;
|
|
|
|
|
|
|
|
|
|
void analyze();
|
|
|
|
|
};
|