MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / AegisubFileDropTarget

Class AegisubFileDropTarget

src/frame_main.cpp:82–93  ·  view source on GitHub ↗

Handle files drag and dropped onto Aegisub

Source from the content-addressed store, hash-verified

80
81/// Handle files drag and dropped onto Aegisub
82class AegisubFileDropTarget final : public wxFileDropTarget {
83 agi::Context *context;
84public:
85 AegisubFileDropTarget(agi::Context *context) : context(context) { }
86 bool OnDropFiles(wxCoord, wxCoord, wxArrayString const& filenames) override {
87 std::vector<agi::fs::path> files;
88 for (wxString const& fn : filenames)
89 files.push_back(from_wx(fn));
90 agi::dispatch::Main().Async([=, this] { context->project->LoadList(files); });
91 return true;
92 }
93};
94
95FrameMain::FrameMain()
96: wxFrame(nullptr, -1, "", wxDefaultPosition, wxSize(920,700), wxDEFAULT_FRAME_STYLE | wxCLIP_CHILDREN)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected