Blender V4.3
blender::ed::asset::shelf::AssetView Class Reference

Inherits blender::ui::AbstractGridView.

Public Member Functions

 AssetView (const AssetLibraryReference &library_ref, const AssetShelf &shelf)
 
void build_items () override
 
bool begin_filtering (const bContext &C) const override
 
void set_catalog_filter (const std::optional< asset_system::AssetCatalogFilter > &catalog_filter)
 
- Public Member Functions inherited from blender::ui::AbstractGridView
 AbstractGridView ()
 
 ~AbstractGridView () override=default
 
void foreach_item (ItemIterFn iter_fn) const
 
void foreach_filtered_item (ItemIterFn iter_fn) const
 
template<class ItemT , typename... Args>
ItemT & add_item (Args &&...args)
 
const GridViewStyleget_style () const
 
int get_item_count () const
 
int get_item_count_filtered () const
 
void set_tile_size (int tile_width, int tile_height)
 
- Public Member Functions inherited from blender::ui::AbstractView
virtual ~AbstractView ()=default
 
void register_item (AbstractViewItem &item)
 
virtual std::unique_ptr< DropTargetInterfacecreate_drop_target ()
 
virtual bool listen (const wmNotifier &) const
 
virtual void draw_overlays (const ARegion &region, const uiBlock &block) const
 
virtual bool supports_scrolling () const
 
virtual void scroll (ViewScrollDirection direction)
 
bool is_renaming () const
 
bool begin_renaming ()
 
void end_renaming ()
 
Span< char > get_rename_buffer () const
 
MutableSpan< char > get_rename_buffer ()
 
std::optional< rctiget_bounds () const
 
std::string get_context_menu_title () const
 
void set_context_menu_title (const std::string &title)
 
bool get_popup_keep_open () const
 
void set_popup_keep_open ()
 
void clear_search_highlight ()
 

Friends

class AssetViewItem
 
class AssetDragController
 

Additional Inherited Members

- Public Types inherited from blender::ui::AbstractGridView
using ItemIterFn = FunctionRef<void(AbstractGridViewItem &)>
 
- Protected Member Functions inherited from blender::ui::AbstractView
 AbstractView ()=default
 
virtual void change_state_delayed ()
 
void update_from_old (uiBlock &new_block)
 
bool is_reconstructed () const
 
const AbstractViewItemsearch_highlight_item () const
 
void filter (std::optional< StringRef > filter_str)
 
- Protected Attributes inherited from blender::ui::AbstractGridView
Vector< std::unique_ptr< AbstractGridViewItem > > items_
 
std::optional< intitem_count_filtered_
 
Map< StringRef, AbstractGridViewItem * > item_map_
 
GridViewStyle style_
 

Detailed Description

Definition at line 39 of file asset_shelf_asset_view.cc.

Constructor & Destructor Documentation

◆ AssetView()

blender::ed::asset::shelf::AssetView::AssetView ( const AssetLibraryReference & library_ref,
const AssetShelf & shelf )

Definition at line 87 of file asset_shelf_asset_view.cc.

References AssetShelfType::get_active_asset, and AssetShelf::type.

Member Function Documentation

◆ begin_filtering()

bool blender::ed::asset::shelf::AssetView::begin_filtering ( const bContext & C) const
overridevirtual

Enable filtering. Typically used to enable a filter text button. Triggered on Ctrl+F by default.

Returns
True when filtering was enabled successfully.

Reimplemented from blender::ui::AbstractView.

Definition at line 143 of file asset_shelf_asset_view.cc.

References CTX_wm_area(), LISTBASE_FOREACH, and UI_textbutton_activate_rna().

◆ build_items()

◆ set_catalog_filter()

void blender::ed::asset::shelf::AssetView::set_catalog_filter ( const std::optional< asset_system::AssetCatalogFilter > & catalog_filter)

Definition at line 155 of file asset_shelf_asset_view.cc.

Friends And Related Symbol Documentation

◆ AssetDragController

friend class AssetDragController
friend

Definition at line 46 of file asset_shelf_asset_view.cc.

◆ AssetViewItem

friend class AssetViewItem
friend

Definition at line 45 of file asset_shelf_asset_view.cc.


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