#pragma once #include // SDL_Renderer #include "../Input/PointerStream.h" #include #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 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; } };