Added file drag and drop support

This commit is contained in:
WerWolv
2020-11-17 13:58:50 +01:00
parent d05805595e
commit 6e21f703ab
8 changed files with 38 additions and 17 deletions

View File

@@ -25,8 +25,12 @@ namespace hex {
return View::s_deferedCalls;
}
static void postEvent(Events eventType, const void *userData = nullptr) {
View::s_eventManager.post(eventType, userData);
}
protected:
void subscribeEvent(Events eventType, std::function<void(void*)> callback) {
void subscribeEvent(Events eventType, std::function<void(const void*)> callback) {
View::s_eventManager.subscribe(eventType, this, callback);
}
@@ -34,10 +38,6 @@ namespace hex {
View::s_eventManager.unsubscribe(eventType, this);
}
void postEvent(Events eventType, void *userData = nullptr) {
View::s_eventManager.post(eventType, userData);
}
void doLater(std::function<void()> &&function) {
View::s_deferedCalls.push_back(function);
}

View File

@@ -51,6 +51,7 @@ namespace hex {
void drawSearchPopup();
void drawGotoPopup();
void openFile(std::string path);
void copyBytes();
void copyString();