mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-05 14:30:45 +09:00
widgets
This commit is contained in:
@@ -9,13 +9,21 @@ namespace mgl {
|
||||
|
||||
namespace gsr {
|
||||
class Widget {
|
||||
friend class WidgetContainer;
|
||||
public:
|
||||
virtual ~Widget() = default;
|
||||
Widget();
|
||||
Widget(const Widget&) = delete;
|
||||
Widget& operator=(const Widget&) = delete;
|
||||
virtual ~Widget();
|
||||
|
||||
virtual void on_event(mgl::Event &event, mgl::Window &window) = 0;
|
||||
// Return true to allow other widgets to also process the event
|
||||
virtual bool on_event(mgl::Event &event, mgl::Window &window) = 0;
|
||||
virtual void draw(mgl::Window &window) = 0;
|
||||
virtual void set_position(mgl::vec2f position);
|
||||
|
||||
virtual mgl::vec2f get_position() const;
|
||||
protected:
|
||||
mgl::vec2f position;
|
||||
bool move_to_top = false;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user