Voltray Engine Docs
Loading...
Searching...
No Matches
AssetItem.h
Go to the documentation of this file.
1#pragma once
2#include <filesystem>
3#include <string>
4
10namespace Editor
11{
12 namespace Assets
13 {
18 enum class AssetViewMode
19 {
20 Grid, // Large icons in a grid
21 List, // List view with small icons
22 Details // Detailed list with file information
23 };
24
29 struct AssetItem
30 {
31 std::string name;
32 std::filesystem::path path;
33 bool isDirectory = false;
34 bool isGlobal = false; // True if it's a global asset, false if workspace-specific
35 size_t fileSize = 0;
36 std::string extension;
37 bool isParentDir = false; // For ".." navigation
38
39 // Additional metadata
40 std::string mimeType;
41 bool isHidden = false;
42 bool isReadOnly = false;
43 std::filesystem::file_time_type lastModified;
44 };
45
51 {
53 float iconSize = 70.0f;
54 int selectedItem = -1;
55 bool showHiddenFiles = false;
56 std::string searchFilter;
57 std::string sortBy = "name"; // "name", "size", "date", "type"
58 bool sortAscending = true;
59 };
60 }
61}
A panel component responsible for managing and displaying asset resources.
AssetViewMode
Different ways to display assets in the browser.
Definition AssetItem.h:19
Definition AssetsPanel.cpp:7
State information for the asset browser.
Definition AssetItem.h:51
float iconSize
Definition AssetItem.h:53
bool sortAscending
Definition AssetItem.h:58
bool showHiddenFiles
Definition AssetItem.h:55
AssetViewMode viewMode
Definition AssetItem.h:52
std::string sortBy
Definition AssetItem.h:57
int selectedItem
Definition AssetItem.h:54
std::string searchFilter
Definition AssetItem.h:56
Represents a single asset item in the file browser.
Definition AssetItem.h:30
std::string name
Definition AssetItem.h:31
bool isReadOnly
Definition AssetItem.h:42
bool isGlobal
Definition AssetItem.h:34
size_t fileSize
Definition AssetItem.h:35
bool isHidden
Definition AssetItem.h:41
std::string extension
Definition AssetItem.h:36
std::string mimeType
Definition AssetItem.h:40
bool isDirectory
Definition AssetItem.h:33
std::filesystem::path path
Definition AssetItem.h:32
bool isParentDir
Definition AssetItem.h:37
std::filesystem::file_time_type lastModified
Definition AssetItem.h:43