Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
C
12345678910111213141516171819202122232425#pragma once#include <SDL3/SDL.h> // SDL_Renderer
#include "../Input/PointerStream.h"#include <memory>#include "../Commands/HistoryManager.h"
class AppLayer {protected: static HistoryManager* history; bool isActive = false;public: virtual ~AppLayer() = default; virtual void OnActivate() = 0; virtual void OnDeactivate() = 0; virtual bool IsActive() { return isActive; }
virtual void OnEvent() {} virtual bool OnDown(std::shared_ptr<PointerStream> stream) { (void)stream; return false; } // true if consumed virtual bool OnScroll(SDL_MouseWheelEvent e) { (void)e; return false; } virtual void OnRender() {}
static void SetHistory(HistoryManager* history) { AppLayer::history = history; }};