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.

35 lines
1.1 KiB

#ifndef ELEMENT_H
#define ELEMENT_H
#include <functional>
#include <memory>
#include "../components/Component.h"
#include "../opengl/Window.h"
#include "../../html/Node.h"
class ElementRenderRequest {
// we read the attributes from node (color, size, positioning, font info)
// and pass them to a newly made component
// and then we set up behaviors for that new component
std::shared_ptr<Node> node;
// has really no purpose except to pass win
// it was supposed to be for positions, but ComponentBuilder handles all that now
// as an element we shouldn't really care too much about position
// if we set up the component right, it'll handle all that
std::shared_ptr<Component> parentComponent;
// can get this from parentComponent
//std::shared_ptr<Window> win;
// we define tokens in a language
// and convert them into a component (UI element)
class Element {
bool isInline = false;
virtual ~Element();
virtual std::unique_ptr<Component> renderer(const ElementRenderRequest &request);