Browse Source

remove unneeded elements

master
Odilitime 5 years ago
parent
commit
3f89d69db8
  1. 9
      src/graphics/elements/BLOCKQUOTEElement.cpp
  2. 14
      src/graphics/elements/BLOCKQUOTEElement.h
  3. 11
      src/graphics/elements/PElement.cpp
  4. 14
      src/graphics/elements/PElement.h

9
src/graphics/elements/BLOCKQUOTEElement.cpp

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
#include "BLOCKQUOTEElement.h"
std::unique_ptr<Component> BLOCKQUOTEElement::renderer(const std::shared_ptr<Node> node, const int x, const int y, const int windowWidth, const int windowHeight) {
TextNode *textNode = dynamic_cast<TextNode*>(node.get());
if (textNode) {
return std::make_unique<TextComponent>(textNode->text, x, y, 12, false, 0x000000FF, windowWidth, windowHeight);
}
return nullptr;
}

14
src/graphics/elements/BLOCKQUOTEElement.h

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
#ifndef BLOCKQUOTEELEMENT_H
#define BLOCKQUOTEELEMENT_H
#include "Element.h"
#include "../components/Component.h"
#include "../components/TextComponent.h"
#include "../../html/TextNode.h"
class BLOCKQUOTEElement : public Element {
public:
virtual std::unique_ptr<Component> renderer(const std::shared_ptr<Node> node, const int x, const int y, const int windowWidth, const int windowHeight);
};
#endif

11
src/graphics/elements/PElement.cpp

@ -1,11 +0,0 @@ @@ -1,11 +0,0 @@
#include "PElement.h"
#include "../components/TextComponent.h"
#include "../../html/TextNode.h"
std::unique_ptr<Component> PElement::renderer(const std::shared_ptr<Node> node, const int x, const int y, const int windowWidth, const int windowHeight) {
TextNode *textNode = dynamic_cast<TextNode*>(node.get());
if (textNode) {
return std::make_unique<TextComponent>(textNode->text, x, y, 12, false, 0x000000FF, windowWidth, windowHeight);
}
return nullptr;
}

14
src/graphics/elements/PElement.h

@ -1,14 +0,0 @@ @@ -1,14 +0,0 @@
#ifndef PELEMENT_H
#define PELEMENT_H
#include "Element.h"
#include "../components/Component.h"
#include "../components/TextComponent.h"
#include "../../html/TextNode.h"
class PElement : public Element {
public:
virtual std::unique_ptr<Component> renderer(const std::shared_ptr<Node> node, const int x, const int y, const int windowWidth, const int windowHeight);
};
#endif
Loading…
Cancel
Save