mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 09:17:04 +09:00
28 lines
714 B
C++
28 lines
714 B
C++
#pragma once
|
|
|
|
#include "Widget.hpp"
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
namespace gsr {
|
|
class List : public Widget {
|
|
public:
|
|
enum class Orientation {
|
|
VERTICAL,
|
|
HORIZONTAL
|
|
};
|
|
|
|
List(Orientation orientation);
|
|
List(const List&) = delete;
|
|
List& operator=(const List&) = delete;
|
|
|
|
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
|
|
void draw(mgl::Window &window, mgl::vec2f offset) override;
|
|
|
|
void add_widget(std::unique_ptr<Widget> widget);
|
|
mgl::vec2f get_size() override;
|
|
protected:
|
|
std::vector<std::unique_ptr<Widget>> widgets;
|
|
Orientation orientation;
|
|
};
|
|
} |