Voltray Engine Docs
Loading...
Searching...
No Matches
Editor::Assets::AssetBrowser Class Reference

Core asset browser component for displaying and managing assets. More...

#include <AssetBrowser.h>

Public Member Functions

 AssetBrowser (AssetManager &assetManager, IconRenderer &iconRenderer, ContextMenu &contextMenu, NavigationBar &navigationBar, AssetDragDrop &dragDrop)
 Construct a new Asset Browser.
 
void Draw (const ImVec2 &windowSize)
 Draw the asset browser interface.
 
void SetCurrentPath (const std::string &path)
 Set the current directory path.
 
const std::string & GetCurrentPath () const
 Get the current directory path.
 
void SetViewMode (AssetViewMode mode)
 Set the view mode.
 
AssetViewMode GetViewMode () const
 Get the current view mode.
 
void SetIconSize (float size)
 Set the icon size.
 
float GetIconSize () const
 Get the current icon size.
 
void SetSearchFilter (const std::string &filter)
 Set the search filter.
 
const std::string & GetSearchFilter () const
 Get the current search filter.
 
void RefreshCurrentDirectory ()
 Refresh the current directory contents.
 

Detailed Description

Core asset browser component for displaying and managing assets.

This component handles the main file browser functionality including:

  • Different view modes (Grid, List, Details)
  • Asset item rendering with visual icons
  • Search and filtering capabilities
  • Directory navigation
  • Integration with context menus and drag-drop

Constructor & Destructor Documentation

◆ AssetBrowser()

Editor::Assets::AssetBrowser::AssetBrowser ( AssetManager assetManager,
IconRenderer iconRenderer,
ContextMenu contextMenu,
NavigationBar navigationBar,
AssetDragDrop dragDrop 
)

Construct a new Asset Browser.

Parameters
assetManagerReference to the asset manager
iconRendererReference to the icon renderer
contextMenuReference to the context menu system
navigationBarReference to the navigation bar
dragDropReference to the drag and drop system

Member Function Documentation

◆ Draw()

void Editor::Assets::AssetBrowser::Draw ( const ImVec2 &  windowSize)

Draw the asset browser interface.

Parameters
windowSizeSize of the containing window

◆ GetCurrentPath()

const std::string & Editor::Assets::AssetBrowser::GetCurrentPath ( ) const
inline

Get the current directory path.

Returns
Current directory path

◆ GetIconSize()

float Editor::Assets::AssetBrowser::GetIconSize ( ) const
inline

Get the current icon size.

Returns
Current icon size

◆ GetSearchFilter()

const std::string & Editor::Assets::AssetBrowser::GetSearchFilter ( ) const
inline

Get the current search filter.

Returns
Current search filter

◆ GetViewMode()

AssetViewMode Editor::Assets::AssetBrowser::GetViewMode ( ) const
inline

Get the current view mode.

Returns
Current view mode

◆ RefreshCurrentDirectory()

void Editor::Assets::AssetBrowser::RefreshCurrentDirectory ( )

Refresh the current directory contents.

◆ SetCurrentPath()

void Editor::Assets::AssetBrowser::SetCurrentPath ( const std::string &  path)

Set the current directory path.

Parameters
pathNew directory path

◆ SetIconSize()

void Editor::Assets::AssetBrowser::SetIconSize ( float  size)

Set the icon size.

Parameters
sizeNew icon size (32-128 pixels)

◆ SetSearchFilter()

void Editor::Assets::AssetBrowser::SetSearchFilter ( const std::string &  filter)

Set the search filter.

Parameters
filterSearch string

◆ SetViewMode()

void Editor::Assets::AssetBrowser::SetViewMode ( AssetViewMode  mode)
inline

Set the view mode.

Parameters
modeNew view mode

The documentation for this class was generated from the following files: