![]() |
Ember
|
File drop target for XML files. More...
#include <XMLFileDropTarget.h>
Public Types | |
| using | FileDropCallback = std::function<void(const wxString &filePath, bool loadInCurrentScene)> |
Public Member Functions | |
| XMLFileDropTarget (FileDropCallback callback) | |
| Construct a new XMLFileDropTarget. | |
| bool | OnDropFiles (wxCoord x, wxCoord y, const wxArrayString &filenames) override |
| Called when files are dropped. | |
Private Attributes | |
| FileDropCallback | m_callback |
File drop target for XML files.
This class handles drag and drop of XML files onto the scene view. It validates that the dropped file is a single XML file and calls the provided callback to load it.
Definition at line 16 of file XMLFileDropTarget.h.
| using EmberForge::XMLFileDropTarget::FileDropCallback = std::function<void(const wxString &filePath, bool loadInCurrentScene)> |
Definition at line 18 of file XMLFileDropTarget.h.
|
inlineexplicit |
Construct a new XMLFileDropTarget.
| callback | Function to call when a valid XML file is dropped Parameters: filePath, loadInCurrentScene (true if Ctrl is pressed) |
Definition at line 25 of file XMLFileDropTarget.h.
|
inlineoverride |
Called when files are dropped.
| x | X coordinate of drop location |
| y | Y coordinate of drop location |
| filenames | Array of dropped file paths |
Definition at line 34 of file XMLFileDropTarget.h.
|
private |
Definition at line 69 of file XMLFileDropTarget.h.