|
Blender V5.3
|
Inherits blender::ui::PreviewGridItem.
Public Member Functions | |
| AssetViewItem (asset_system::AssetRepresentation &asset_, StringRef identifier, StringRef label) | |
| void | disable_asset_drag () |
| void | build_grid_tile (const bContext &C, ui::Layout &layout) const override |
| void | build_context_menu (bContext &C, ui::Layout &column) const override |
| std::optional< bool > | should_be_active () const override |
| void | on_activate (bContext &C) override |
| bool | should_be_filtered_visible (StringRefNull filter_string) const override |
| std::unique_ptr< ui::AbstractViewItemDragController > | create_drag_controller () const override |
| Public Member Functions inherited from blender::ui::PreviewGridItem | |
| PreviewGridItem (StringRef identifier, StringRef label, int preview_icon_id) | |
| void | build_grid_tile (const bContext &C, Layout &layout) const override |
| void | build_grid_tile_button (Layout &layout, BIFIconID override_preview_icon_id=ICON_NONE) const |
| void | set_on_activate_fn (ActivateFn fn) |
| void | set_is_active_fn (IsActiveFn fn) |
| void | hide_label () |
| Public Member Functions inherited from blender::ui::AbstractGridViewItem | |
| ~AbstractGridViewItem () override=default | |
| std::optional< std::string > | debug_name () const override |
| AbstractGridView & | get_view () const |
| Public Member Functions inherited from blender::ui::AbstractViewItem | |
| virtual | ~AbstractViewItem ()=default |
| virtual bool | set_state_active () |
| 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 () |
| 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 |
| virtual bool | supports_renaming () const |
| virtual bool | rename (const bContext &C, StringRefNull new_name) |
| virtual StringRef | get_rename_string () const |
| bool | is_renaming () const |
| void | begin_renaming () |
| void | end_renaming () |
| void | rename_apply (const bContext &C) |
| virtual void | delete_item (bContext *C) |
| virtual void | on_filter () |
| bool | is_filtered_visible () const |
Definition at line 62 of file asset_shelf_asset_view.cc.
| blender::ed::asset::shelf::AssetViewItem::AssetViewItem | ( | asset_system::AssetRepresentation & | asset_, |
| StringRef | identifier, | ||
| StringRef | label ) |
Definition at line 194 of file asset_shelf_asset_view.cc.
References AssetViewItem(), blender::ui::PreviewGridItem::label, and blender::ui::PreviewGridItem::PreviewGridItem().
Referenced by AssetViewItem().
|
overridevirtual |
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 348 of file asset_shelf_asset_view.cc.
References C, blender::AssetShelfType::draw_context_menu, blender::ui::AbstractGridViewItem::get_view(), and blender::AssetShelf::type.
|
overridevirtual |
Implements blender::ui::AbstractGridViewItem.
Definition at line 226 of file asset_shelf_asset_view.cc.
References blender::AssetShelfType::activate_operator, blender::ui::Layout::alignment_set(), blender::ed::asset::asset_preview_or_icon(), blender::ed::asset::asset_tooltip(), blender::ASSETSHELF_SHOW_NAMES, blender::ui::Layout::block(), blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ui::But, blender::ui::button_icon_scale_set(), blender::ui::button_operator_ptr_ensure(), blender::ui::button_pushbutton_draw_as_overlay_set(), C, blender::ui::Center, blender::ui::Layout::column(), blender::ed::asset::shelf::create_asset_operator_params(), blender::AssetShelfSettings::display_flag, blender::wm::ExecDefault, blender::ui::AbstractGridView::get_style(), blender::ui::AbstractGridViewItem::get_view(), ICON_DEFAULT_HEIGHT_SCALE, ICON_DEFAULT_WIDTH_SCALE, blender::ui::AbstractViewItem::is_hovered(), blender::ed::asset::list::is_loaded(), blender::ui::Label, blender::ed::asset::operator_asset_reference_props_set(), blender::ui::Button::optype, blender::ui::Layout::overlap(), blender::ui::Right, blender::RNA_pointer_create_discrete(), blender::ui::Layout::row(), blender::AssetShelf::settings, blender::ed::asset::shelf::tile_height(), blender::ui::GridViewStyle::tile_height, blender::ui::GridViewStyle::tile_width, blender::AssetShelf::type, blender::U, UI_UNIT_X, UI_UNIT_Y, blender::ui::Layout::ui_units_x(), blender::ui::Layout::ui_units_x_set(), blender::ui::Layout::ui_units_y_set(), blender::ui::uiDefBut(), blender::ui::AbstractViewItem::view_item_but_, and blender::ui::AbstractViewItem::view_item_button().
|
overridevirtual |
If an item wants to support being dragged, it has to return a drag controller here. That is an object implementing #AbstractViewItemDragController.
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 400 of file asset_shelf_asset_view.cc.
References blender::AssetShelfType::drag_operator, blender::ui::AbstractGridViewItem::get_view(), and blender::AssetShelf::type.
| void blender::ed::asset::shelf::AssetViewItem::disable_asset_drag | ( | ) |
Definition at line 201 of file asset_shelf_asset_view.cc.
Referenced by blender::ed::asset::shelf::AssetView::build_items().
|
overridevirtual |
Called when the view changes an item's state from inactive to active. Will only be called if the state change is triggered through the view, not through external changes. E.g. a click on an item calls it, a change in the value returned by should_be_active() to reflect an external state change does not.
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 374 of file asset_shelf_asset_view.cc.
References blender::AssetShelfType::activate_operator, C, blender::ed::asset::shelf::create_asset_operator_params(), blender::ui::AbstractGridViewItem::get_view(), blender::AssetShelf::type, blender::WM_operator_name_call_ptr(), and blender::WM_operator_properties_free().
|
overridevirtual |
If the result is not empty, it controls whether the item should be active or not, usually depending on the data that the view represents. Note that since this is meant to reflect externally managed state changes, on_activate() will never be called if this returns true.
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 358 of file asset_shelf_asset_view.cc.
References blender::AssetShelfType::get_active_asset, blender::ui::AbstractGridViewItem::get_view(), blender::ui::AbstractGridViewItem::matches(), and blender::AssetShelf::type.
|
overridevirtual |
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 394 of file asset_shelf_asset_view.cc.
References blender::StringRefNull::c_str().