mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-03-31 17:27:05 +09:00
30 lines
784 B
C++
30 lines
784 B
C++
#pragma once
|
|
|
|
#include <mglpp/system/vec.hpp>
|
|
|
|
namespace mgl {
|
|
class Event;
|
|
class Window;
|
|
}
|
|
|
|
namespace gsr {
|
|
class Widget {
|
|
friend class StaticPage;
|
|
friend class ScrollablePage;
|
|
public:
|
|
Widget();
|
|
Widget(const Widget&) = delete;
|
|
Widget& operator=(const Widget&) = delete;
|
|
virtual ~Widget();
|
|
|
|
// Return true to allow other widgets to also process the event
|
|
virtual bool on_event(mgl::Event &event, mgl::Window &window, mgl::vec2f offset) = 0;
|
|
virtual void draw(mgl::Window &window, mgl::vec2f offset) = 0;
|
|
virtual void set_position(mgl::vec2f position);
|
|
|
|
virtual mgl::vec2f get_position() const;
|
|
protected:
|
|
mgl::vec2f position;
|
|
bool move_to_top = false;
|
|
};
|
|
} |