class UI_Element
{
private:
UI_Element* m_parent = nullptr;
std::vector<UI_Element*> m_children;

public:
virtual ~UI_Element() { for(auto& element : m_children) delete element; }
virtual...