Add file drop functionality

Adds the ability to drag and drop files from windows in order to attempt
to execute them
This commit is contained in:
Leighton Hancock
2016-11-14 16:50:58 +13:00
parent f5168c5768
commit 524ba0c88c
7 changed files with 51 additions and 0 deletions

View File

@@ -26,6 +26,18 @@ class UIEvent {
Window* target_ = nullptr;
};
class FileDropEvent : public UIEvent {
public:
FileDropEvent(Window* target, wchar_t* filename)
: UIEvent(target), filename_(filename) {}
~FileDropEvent() override = default;
wchar_t* filename() const { return filename_; }
private:
wchar_t* filename_ = nullptr;
};
class KeyEvent : public UIEvent {
public:
KeyEvent(Window* target, int key_code, int repeat_count, bool prev_state)