class

AAssetPicker

Module
Arc
Header
#include "Arc/Widgets/AAssetPicker.h"
Namespace
Arcf

Properties

TypeNameDescription
ArcDelegate<void(const std::string&)>OnAssetSelected
ArcDelegate<void()>OnResetFired by the clear (reset) button — distinct from selecting the None row so callers can reset to a component default rather than empty.
ArcDelegate<void(const std::string&)>OnBrowseToFired by the magnifier button with the current asset path — the host reveals it in the content browser.

Public functions

ReturnsNameDescription
ARC_WIDGET_ARGS
voidSetEntries
voidSetCurrentAsset
voidSetPlaceholderText
const std::string&GetCurrentAssetPath
boolIsOpen
voidSetShowThumbnails
voidSetShowPathSubtitlesTwo-line rows: asset name over its project path in secondary text.
voidSetShowClearButton
voidSetUnresolvedThe field holds a reference that names nothing that exists.
boolIsUnresolved
voidSetThumbnailResolverResolves an asset path/key to an Arc texture.
ArcVec2ComputeDesiredSize
int32_tOnPaint
CReplyOnMouseButtonDown
CReplyOnMouseMove
CReplyOnMouseButtonUp
CReplyOnMouseWheel
CReplyOnKeyDown
CReplyOnKeyChar
voidOnMouseEnter
voidOnMouseLeave
voidOnFocusLost
boolOnDragEnterAsset drops from a browser.
boolOnDragOver
voidOnDragLeave
boolOnDrop
boolCanCacheDesiredSizeA fixed dropdown frame; the asset name inside it is elided to fit rather than widening the picker.
const char*GetTypeName
boolIsFocusableEnter and Space on a tabbed-to picker open its list; the arrows and typing inside the open list were already keyboard-driven.
boolOnActivate

Function details

ARC_WIDGET_ARGS

C++
ARC_WIDGET_ARGS(AAssetPicker) ARC_ATTR(int32_t, MaxVisibleRows) ARC_ATTR(bool, ShowThumbnails) ARC_ATTR(bool, ShowClearButton) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)

SetEntries

C++
void SetEntries(std::vector<FAssetEntry> entries)

SetCurrentAsset

C++
void SetCurrentAsset(const std::string& path, const std::string& name)

SetPlaceholderText

C++
void SetPlaceholderText(const std::string& text)

GetCurrentAssetPath

C++
const std::string& GetCurrentAssetPath() const

IsOpen

C++
bool IsOpen() const

SetShowThumbnails

C++
void SetShowThumbnails(bool show)

SetShowPathSubtitles

C++
void SetShowPathSubtitles(bool show)

Two-line rows: asset name over its project path in secondary text. Off by default — compact pickers (node menus) keep single-line rows.

SetShowClearButton

C++
void SetShowClearButton(bool show)

SetUnresolved

C++
void SetUnresolved(bool unresolved)

The field holds a reference that names nothing that exists. Drawn in the error colour rather than silently as ordinary text: a path that was renamed away otherwise reads exactly like one that resolves, and the author only finds out when the thing fails to appear at runtime.

IsUnresolved

C++
bool IsUnresolved() const

SetThumbnailResolver

C++
void SetThumbnailResolver(std::function<IArcRHITexture*(const std::string&)> resolver)

Resolves an asset path/key to an Arc texture. Called every paint (never cached) so a thumbnail that finishes decoding late fills in on the next frame with no extra plumbing. Null result = nothing drawn yet.

ComputeDesiredSize

C++
ArcVec2 ComputeDesiredSize(float scale) const override

OnPaint

C++
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const override

OnMouseButtonDown

C++
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) override

OnMouseMove

C++
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) override

OnMouseButtonUp

C++
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) override

OnMouseWheel

C++
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) override

OnKeyDown

C++
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) override

OnKeyChar

C++
CReply OnKeyChar(const CGeometry& geo, const CCharacterEvent& event) override

OnMouseEnter

C++
void OnMouseEnter(const CGeometry& geo, const CPointerEvent& event) override

OnMouseLeave

C++
void OnMouseLeave(const CPointerEvent& event) override

OnFocusLost

C++
void OnFocusLost(const CFocusEvent& event) override

OnDragEnter

C++
bool OnDragEnter(const CGeometry& geo, const CDragDropEvent& event) override

Asset drops from a browser. The entry list is already narrowed to the types this field accepts, so membership in it IS the type check — a texture dragged onto a mesh field is simply not offered.

OnDragOver

C++
bool OnDragOver(const CGeometry& geo, const CDragDropEvent& event) override

OnDragLeave

C++
void OnDragLeave(const CDragDropEvent& event) override

OnDrop

C++
bool OnDrop(const CGeometry& geo, const CDragDropEvent& event) override

CanCacheDesiredSize

C++
bool CanCacheDesiredSize() const override

A fixed dropdown frame; the asset name inside it is elided to fit rather than widening the picker.

GetTypeName

C++
const char* GetTypeName() const override

IsFocusable

C++
bool IsFocusable() const override

Enter and Space on a tabbed-to picker open its list; the arrows and typing inside the open list were already keyboard-driven.

OnActivate

C++
bool OnActivate() override
Generated from Arc/Widgets/AAssetPicker.h via arc.json · Nov 5, 2026Version 1.0.0