#pragma once #include "Layout.hpp" #include "Widget.hpp" #include "Box.hpp" #include #include namespace Raven { class BoxLayout : public Layout { public: enum class SlotType { No, Percent, Pixel, Auto }; struct Slot { double percent, pixel; SlotType type; }; public: BoxLayout(Direction direction) : Layout() , m_direction(direction) {} ~BoxLayout() {} void run(); void slot_percent(double percent); void slot_pixel(double pixel); private: std::vector m_slots; Direction m_direction { Direction::Horizontal }; }; }