1#ifndef YAZE_APP_GUI_ZEML_H
2#define YAZE_APP_GUI_ZEML_H
4#include "imgui/imgui.h"
96 ImVec2
size = ImVec2(0, 0);
98 std::shared_ptr<void>
flags =
nullptr;
118std::vector<Token>
Tokenize(
const std::string& input);
138 if (found !=
nullptr) {
149void Bind(Node* node, std::function<
void()> callback);
159void BindSelectable(Node* node,
bool* selected, std::function<
void()> callback);
170 std::map<std::string, Node>& definitions);
179 const std::vector<Token>& tokens,
size_t& index,
const WidgetType& type,
180 const std::map<std::string, void*>& data_bindings = {});
185Node
ParseNode(
const std::vector<Token>& tokens,
size_t& index,
186 const std::map<std::string, void*>& data_bindings = {},
187 const std::map<std::string, Node>& definitions = {});
192Node
Parse(
const std::string& yazon_input,
193 const std::map<std::string, void*>& data_bindings = {});
205std::string
LoadFile(
const std::string& filename);
Zelda Editor Markup Language Functions.
void ParseDefinitions(const std::vector< Token > &tokens, size_t &index, std::map< std::string, Node > &definitions)
Parse a zeml definition.
void ParseFlags(const WidgetType &type, const std::string &flags, WidgetAttributes &attributes)
WidgetType MapType(const std::string &type)
Map a string to a widget type.
void BindAction(Node *node, ActionType type, std::function< void()> callback)
Bind an action to a node.
std::vector< Token > Tokenize(const std::string &input)
Tokenize a zeml string.
void Render(Node &node)
Render a zeml tree.
std::string LoadFile(const std::string &filename)
void Bind(Node *node, std::function< void()> callback)
Bind a callback to a node.
Node Parse(const std::string &yazon_input, const std::map< std::string, void * > &data_bindings)
Parse a zeml string.
void BindSelectable(Node *node, bool *selected, std::function< void()> callback)
Bind a selectable node.
WidgetAttributes ParseAttributes(const std::vector< Token > &tokens, size_t &index, const WidgetType &type, const std::map< std::string, void * > &data_bindings)
ParseNode attributes for a widget.
Node ParseNode(const std::vector< Token > &tokens, size_t &index, const std::map< std::string, void * > &data_bindings, const std::map< std::string, Node > &definitions)
Parse a zeml node.
void ExecuteActions(const std::vector< Action > &actions, ActionType type)
Execute actions for a node.
Graphical User Interface (GUI) components for the application.
Main namespace for the application.
std::function< void()> callback
Node * GetNode(const std::string &searchId)
WidgetAttributes attributes
std::vector< Action > actions
std::vector< Node > children