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.

43 lines
1.1 KiB

#ifndef APP_H
#define APP_H
#include "interfaces/graphical/renderers/glfw/Window.h"
#include "interfaces/components/Component.h"
#include "parsers/markup/Node.h"
//#include <GL/glew.h>
//#include <GLFW/glfw3.h>
//#include <memory>
#include <vector>
//#include <algorithm>
void doOnClick(std::string type, Component *component, Window *win);
// this is the actually application that
// contains a list of windows
class App {
std::shared_ptr<Node> loadTheme(std::string filename);
void destroyTheme();
// maybe applyTheme?
void rebuildTheme();
void transferTheme(std::string filename);
void NextTheme();
void createComponentTree(const std::shared_ptr<Node> node, std::shared_ptr<Component> &parentComponent, std::shared_ptr<Window> win);
void addWindow();
void render();
void loop();
// properties
std::shared_ptr<Node> uiRootNode;
std::vector<std::shared_ptr<Component>> layers;
// because components take a shared_ptr for win, this has to be shared too
std::vector<std::shared_ptr<Window>> windows;
Window *activeWindow = nullptr;
size_t windowCounter = 0;