#pragma once #include "src/Layout.hpp" #include "src/Widget.hpp" #include "src/Box.hpp" #include #include namespace Raven { class BoxLayout : public Layout { public: enum class SlotType { No, Percent, Pixel }; 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 }; }; }