#pragma once /* Parent of all widgets that contain other widgets. */ #include #include "gui_widget.h" namespace Gui { class Container : public Widget { public: bool OnMouseDown(MouseButtonEvent* e); bool OnMouseUp(MouseButtonEvent* e); void DeleteAllChildren(void); virtual void Draw(void); virtual void ShowAll(void); virtual void HideAll(void); private: bool HandleMouseEvent(MouseButtonEvent* e); protected: void PrependChild(Widget* w, float x, float y); void AppendChild(Widget* w, float x, float y); struct widget_pos { Widget* w; float pos[2]; }; std::list m_children; }; }