7#include <unordered_map>
29 const std::string&
value)
override;
30 const char*
TypeName()
const override {
return "FileExplorer"; }
33 std::unordered_map<const TreeViewItemNode*, std::filesystem::path>
ItemPaths;
35 std::unique_ptr<TreeViewItemNode>
37 static std::string
ToUtf8(
const std::filesystem::path&
path);
资源的强类型引用,同时覆盖持久化 ID 与运行时索引两种边界。
Definition ResourceRef.h:36
把文件目录投影为 TreeView 的编辑器文件浏览控件。
Definition FileExplorerNode.h:17
std::function< void(const std::filesystem::path &) PathSelected)
Definition FileExplorerNode.h:21
std::filesystem::path RootPath
Definition FileExplorerNode.h:19
const std::filesystem::path * GetPath(const TreeViewItemNode *item) const
Definition FileExplorerNode.cpp:61
bool SetProperty(const std::string &name, const std::string &value) override
Definition FileExplorerNode.cpp:81
std::unique_ptr< TreeViewItemNode > BuildItem(const std::filesystem::path &path, bool isRoot)
Definition FileExplorerNode.cpp:20
FileExplorerNode()
Definition FileExplorerNode.cpp:10
const char * TypeName() const override
Definition FileExplorerNode.h:30
bool ShowHidden
Definition FileExplorerNode.h:20
void Refresh()
Definition FileExplorerNode.cpp:66
static std::string ToUtf8(const std::filesystem::path &path)
Definition FileExplorerNode.cpp:99
std::unordered_map< const TreeViewItemNode *, std::filesystem::path > ItemPaths
Definition FileExplorerNode.h:33
Definition TreeViewNode.h:15
Definition TreeViewNode.h:50
Definition Application.h:18