#pragma once #include #include namespace hex { enum class Events { FileLoaded, DataChanged, PatternChanged, FileDropped, WindowClosing, RegionSelected, SelectionChangeRequest, AddBookmark, AppendPatternLanguageCode, ProjectFileStore, ProjectFileLoad }; struct EventHandler { void *owner; Events eventType; std::function callback; }; class EventManager { public: static void post(Events eventType, const void *userData); static void subscribe(Events eventType, void *owner, std::function callback); static void unsubscribe(Events eventType, void *sender); }; }