27 lines
533 B
C++
27 lines
533 B
C++
#ifndef BWIDGETS_ALIGNED_LAYOUT_HPP
|
|
#define BWIDGETS_ALIGNED_LAYOUT_HPP
|
|
|
|
#include <basic_widgets/w/base/layout.hpp>
|
|
|
|
namespace bwidgets
|
|
{
|
|
class AlignedLayout final : public Layout
|
|
{
|
|
private:
|
|
void _update_layout(const SDL_Rect&) noexcept override;
|
|
|
|
public:
|
|
enum struct Alignment
|
|
{
|
|
HORIZONTAL,
|
|
VERTICAL
|
|
} alignment;
|
|
|
|
AlignedLayout(Alignment align) : alignment(align) {}
|
|
|
|
[[nodiscard]] auto size() const noexcept -> Size override;
|
|
};
|
|
}
|
|
|
|
#endif
|