mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 23:27:49 +01:00
35 lines
905 B
C++
35 lines
905 B
C++
//
|
|
// Created by Stepan Usatiuk on 26.07.2025.
|
|
//
|
|
|
|
#ifndef WINDOW_HPP
|
|
#define WINDOW_HPP
|
|
|
|
#include <type_traits>
|
|
|
|
#include "Event.hpp"
|
|
#include "Pixel.hpp"
|
|
#include "StandardEvents.hpp"
|
|
#include "SubSurface.hpp"
|
|
#include "utils.hpp"
|
|
|
|
class Window : StandardEventHandler<Window> {
|
|
public:
|
|
explicit Window(SubSurface* owner) : _owner(owner) {
|
|
// static_assert(is_specialization_of<Surface, SurfaceType>::value);
|
|
}
|
|
|
|
virtual ~Window() = default;
|
|
|
|
EventHandlingResult handle(auto Event) { return handle_v(Event); }
|
|
|
|
virtual EventHandlingResult handle_v(KeyboardEvent) { return EventHandlingResult::CONTINUE; }
|
|
virtual EventHandlingResult handle_v(SurfaceEvent) { return EventHandlingResult::CONTINUE; }
|
|
virtual EventHandlingResult handle_v(SurfaceResizeEvent) { return EventHandlingResult::CONTINUE; }
|
|
|
|
protected:
|
|
SubSurface* _owner = nullptr;
|
|
};
|
|
|
|
#endif // SURFACE_HPP
|