|
Blender V5.3
|
#include <ED_asset_library_ui.hh>
Inherits blender::ui::AbstractTreeViewItem.
Inherited by blender::AssetLibraryListItem, and blender::ui::ProjectAssetLibraryListItem.
Public Member Functions | |
| AssetLibraryListItemCommon (const AnyAssetLibraryDefinition &library, const int index_in_list) | |
| bool | supports_renaming () const override |
| bool | rename (const bContext &C, StringRefNull new_name) override |
| Public Member Functions inherited from blender::ui::AbstractTreeViewItem | |
| AbstractTreeViewItem () | |
| ~AbstractTreeViewItem () override=default | |
| virtual void | build_row (Layout &row)=0 |
| std::optional< std::string > | debug_name () const override |
| std::unique_ptr< DropTargetInterface > | create_item_drop_target () final |
| virtual std::unique_ptr< TreeViewItemDropTarget > | create_drop_target () |
| AbstractTreeView & | get_tree_view () const |
| std::optional< rctf > | get_win_rect (const ARegion ®ion) const |
| void | begin_renaming () |
| bool | toggle_collapsed () |
| virtual bool | set_collapsed (bool collapsed) |
| virtual void | on_collapse_change (bContext &C, bool is_collapsed) |
| virtual std::optional< bool > | should_be_collapsed () const |
| void | uncollapse_by_default () |
| bool | is_collapsed () const |
| bool | is_collapsible () const |
| int | count_parents () const |
| AbstractTreeViewItem * | get_parent () |
| AbstractTreeViewItem * | get_child () |
| void | on_filter () override |
| StringRefNull | label () const |
| Public Member Functions inherited from blender::ui::AbstractViewItem | |
| virtual | ~AbstractViewItem ()=default |
| virtual void | build_context_menu (bContext &C, Layout &column) const |
| virtual void | on_activate (bContext &C) |
| virtual std::optional< bool > | should_be_active () const |
| virtual std::optional< bool > | should_be_selected () const |
| virtual void | set_selected (const bool select) |
| void | activate (bContext &C) |
| void | activate_for_context_menu (bContext &C) |
| void | deactivate () |
| virtual std::unique_ptr< AbstractViewItemDragController > | create_drag_controller () const |
| AbstractView & | get_view () const |
| ui::ButtonViewItem * | view_item_button () const |
| void | disable_interaction () |
| bool | is_interactive () const |
| void | disable_activatable () |
| void | select_on_click_set () |
| bool | is_select_on_click () const |
| void | always_reactivate_on_click () |
| void | activate_for_context_menu_set () |
| bool | is_hovered () const |
| bool | is_active () const |
| bool | is_selected () const |
| bool | is_search_highlight () const |
| bool | is_renaming () const |
| void | begin_renaming () |
| void | end_renaming () |
| void | rename_apply (const bContext &C) |
| virtual void | delete_item (bContext *C) |
| bool | is_filtered_visible () const |
| Public Member Functions inherited from blender::ui::TreeViewItemContainer | |
| template<class ItemT, typename... Args> | |
| ItemT & | add_tree_item (Args &&...args) |
| AbstractTreeViewItem & | add_tree_item (std::unique_ptr< AbstractTreeViewItem > item) |
Public Attributes | |
| AnyAssetLibraryDefinition | library |
| int | index_in_list = 0 |
Definition at line 32 of file ED_asset_library_ui.hh.
| blender::AssetLibraryListItemCommon::AssetLibraryListItemCommon | ( | const AnyAssetLibraryDefinition & | library, |
| const int | index_in_list ) |
Definition at line 27 of file custom_asset_library_list_ui.cc.
References blender::if(), index_in_list, blender::AnyAssetLibraryDefinition::is_extension_repo(), library, and blender::AnyAssetLibraryDefinition::user_library.
|
overridevirtual |
See AbstractViewItem::rename().
Reimplemented from blender::ui::AbstractTreeViewItem.
Definition at line 51 of file custom_asset_library_list_ui.cc.
References C, blender::StringRefNull::c_str(), library, blender::RNA_pointer_create_discrete(), blender::RNA_property_string_set(), blender::RNA_property_update(), blender::RNA_struct_find_property(), and blender::AnyAssetLibraryDefinition::user_library.
|
overridevirtual |
Queries if the view item supports renaming in principle. Renaming may still fail, e.g. if another item is already being renamed.
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 46 of file custom_asset_library_list_ui.cc.
References library, and blender::AnyAssetLibraryDefinition::user_library.
| int blender::AssetLibraryListItemCommon::index_in_list = 0 |
Definition at line 34 of file ED_asset_library_ui.hh.
Referenced by AssetLibraryListItemCommon(), blender::AssetLibraryListItem::on_activate(), blender::ui::ProjectAssetLibraryListItem::on_activate(), blender::AssetLibraryListItem::should_be_active(), and blender::ui::ProjectAssetLibraryListItem::should_be_active().
| AnyAssetLibraryDefinition blender::AssetLibraryListItemCommon::library |
Definition at line 33 of file ED_asset_library_ui.hh.
Referenced by AssetLibraryListItemCommon(), blender::AssetLibraryListItem::build_row(), blender::ui::ProjectAssetLibraryListItem::build_row(), rename(), and supports_renaming().