Browse Source

new build prototype

master
Odilitime 5 years ago
parent
commit
d82b2ba927
  1. 4
      src/graphics/components/ComponentBuilder.h

4
src/graphics/components/ComponentBuilder.h

@ -5,11 +5,13 @@ @@ -5,11 +5,13 @@
#include <memory>
#include <unordered_map>
#include "Component.h"
//#include "DocumentComponent.h"
//#include "../elements/Element.h"
#include "../../html/TagNode.h"
#include "../../html/TextNode.h"
#include "../../html/Node.h"
class DocumentComponent;
class Element;
typedef std::unordered_map<std::string, std::function<std::unique_ptr<Component>(const Node &node, int y, int windowWidth, int windowHeight)>> ElementRendererMap;
@ -19,7 +21,7 @@ private: @@ -19,7 +21,7 @@ private:
const static std::unordered_map<std::string, std::shared_ptr<Element>> elementMap;
public:
// FIXME: consider passing the documentComponent we're bound too
std::shared_ptr<Component> build(const std::shared_ptr<Node> node, const std::shared_ptr<Component> &parentComponent, const std::shared_ptr<Window> win);
std::shared_ptr<Component> build(const std::shared_ptr<Node> node, const std::shared_ptr<Component> &parentComponent, const std::shared_ptr<Window> win, DocumentComponent *docComponent);
};
// getComponentType

Loading…
Cancel
Save