aboutsummaryrefslogtreecommitdiff
path: root/include/gui/Widget.hpp
blob: cf81d69580656e762fba86a268245de4867f6406 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <mglpp/system/vec.hpp>

namespace mgl {
    class Event;
    class Window;
}

namespace gsr {
    class Widget {
    public:
        virtual ~Widget() = default;

        virtual void on_event(mgl::Event &event, mgl::Window &window) = 0;
        virtual void draw(mgl::Window &window) = 0;
        virtual void set_position(mgl::vec2f position);
    protected:
        mgl::vec2f position;
    };
}