Simple SFML GUI  0.2a
InspectedNode.hpp
1 #ifndef INSPECTEDNODE_HPP
2 #define INSPECTEDNODE_HPP
3 
4 #include "Element.hpp"
5 
6 class InspectedNode {
7 private:
8  const Element* element;
9  const sf::RenderWindow* target;
10  std::vector<std::unique_ptr<InspectedNode>> childs;
11  int depth;
12  void recurrentGetNodes(std::vector<InspectedNode*>& vec);
13 
14 public:
15  InspectedNode(const Element* element = nullptr, const sf::RenderWindow* target = nullptr, int depth = 0);
16  InspectedNode& operator=(InspectedNode& node);
17  void addChild(std::unique_ptr<InspectedNode>& ptr);
18  void recurrentAddChild(const Element* ptr, const sf::RenderWindow* target);
19  std::vector<InspectedNode*> getNodes();
20  const Element* getElement() const;
21  int getDepth() const;
22  std::vector<const InspectedNode*> getChilds() const;
23  size_t childCount() const;
24  const sf::RenderWindow* getTarget() const;
25 };
26 
27 #endif // INSPECTEDNODE_HPP
Definition: Element.hpp:22
Definition: InspectedNode.hpp:6