[studio] Add ability to move directories
All checks were successful
Build / build (push) Successful in 3m29s

This commit is contained in:
2025-01-26 09:38:27 -06:00
parent 109e1898cc
commit 1207dadee8
10 changed files with 85 additions and 3 deletions

View File

@@ -13,10 +13,12 @@ struct FileRef {
static constexpr auto TypeName = "net.drinkingtea.studio.FileRef";
static constexpr auto TypeVersion = 1;
ox::String path;
bool isDir{};
};
OX_MODEL_BEGIN(FileRef)
OX_MODEL_FIELD(path)
OX_MODEL_FIELD(isDir)
OX_MODEL_END()
}

View File

@@ -47,6 +47,8 @@ class FileExplorer: public ox::SignalHandler {
virtual void fileMoved(ox::StringViewCR src, ox::StringViewCR dst) const noexcept;
virtual void dirMoved(ox::StringViewCR src, ox::StringViewCR dst) const noexcept;
void drawFileContextMenu(ox::CStringViewCR path) const noexcept;
void drawDirContextMenu(ox::CStringViewCR path) const noexcept;

View File

@@ -94,6 +94,8 @@ class Project: public ox::SignalHandler {
ox::Error moveItem(ox::StringViewCR src, ox::StringViewCR dest) noexcept;
ox::Error moveDir(ox::StringViewCR src, ox::StringViewCR dest) noexcept;
ox::Error deleteItem(ox::StringViewCR path) noexcept;
[[nodiscard]]