Voltray Engine Docs
Loading...
Searching...
No Matches
NavigationBar.h
Go to the documentation of this file.
1#pragma once
2#include <imgui.h>
3#include <filesystem>
4#include <string>
5#include <vector>
6
12namespace Editor
13{
14 namespace Assets
15 {
21 {
22 public:
30 static std::filesystem::path Render(const std::filesystem::path &currentPath,
31 const std::filesystem::path &rootPath,
32 bool isGlobal);
33
40 static std::filesystem::path RenderBreadcrumbs(const std::filesystem::path &currentPath,
41 const std::filesystem::path &rootPath);
42
49 static std::filesystem::path RenderNavigationButtons(const std::filesystem::path &currentPath,
50 const std::filesystem::path &rootPath);
51
58 static std::string GetRelativePath(const std::filesystem::path &fullPath,
59 const std::filesystem::path &rootPath);
60
61 private:
67 static std::vector<std::string> ParsePathSegments(const std::string &relativePath);
68
76 static std::filesystem::path BuildPathFromSegments(const std::filesystem::path &rootPath,
77 const std::vector<std::string> &segments,
78 size_t upToIndex);
79 };
80 }
81}
A panel component responsible for managing and displaying asset resources.
Provides breadcrumb navigation and path controls for asset browser.
Definition NavigationBar.h:21
static std::filesystem::path Render(const std::filesystem::path &currentPath, const std::filesystem::path &rootPath, bool isGlobal)
Render the navigation bar.
Definition NavigationBar.cpp:9
static std::string GetRelativePath(const std::filesystem::path &fullPath, const std::filesystem::path &rootPath)
Get relative path from root as string.
Definition NavigationBar.cpp:131
static std::filesystem::path RenderBreadcrumbs(const std::filesystem::path &currentPath, const std::filesystem::path &rootPath)
Render just the breadcrumb path.
Definition NavigationBar.cpp:47
static std::filesystem::path RenderNavigationButtons(const std::filesystem::path &currentPath, const std::filesystem::path &rootPath)
Render navigation buttons (home, back, forward)
Definition NavigationBar.cpp:83
Definition AssetsPanel.cpp:7