mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-07 15:19:56 +09:00
More
This commit is contained in:
24
include/gui/Subsection.hpp
Normal file
24
include/gui/Subsection.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "Widget.hpp"
|
||||
#include "Label.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace gsr {
|
||||
class Subsection : public Widget {
|
||||
public:
|
||||
// If size width or height is 0 then the size in that direction is the size of the widgets
|
||||
Subsection(const char *title, std::unique_ptr<Widget> inner_widget, mgl::vec2f size);
|
||||
Subsection(const Subsection&) = delete;
|
||||
Subsection& operator=(const Subsection&) = delete;
|
||||
|
||||
bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) override;
|
||||
void draw(mgl::Window &window, mgl::vec2f offset) override;
|
||||
|
||||
mgl::vec2f get_size() override;
|
||||
private:
|
||||
Label label;
|
||||
std::unique_ptr<Widget> inner_widget;
|
||||
mgl::vec2f size;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user