|
Blender V5.3
|
#include <UI_grid_view.hh>
Inherits blender::ui::AbstractViewItem.
Inherited by blender::ui::PreviewGridItem.
Public Member Functions | |
| ~AbstractGridViewItem () override=default | |
| virtual void | build_grid_tile (const bContext &C, Layout &layout) const =0 |
| std::optional< std::string > | debug_name () const override |
| AbstractGridView & | get_view () const |
| Public Member Functions inherited from blender::ui::AbstractViewItem | |
| virtual | ~AbstractViewItem ()=default |
| virtual void | build_context_menu (bContext &C, Layout &column) const |
| virtual bool | set_state_active () |
| 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 |
| 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 |
Protected Member Functions | |
| AbstractGridViewItem (StringRef identifier) | |
| bool | matches (const AbstractViewItem &other) const override |
| std::unique_ptr< DropTargetInterface > | create_item_drop_target () final |
| virtual std::unique_ptr< GridViewItemDropTarget > | create_drop_target () |
| Protected Member Functions inherited from blender::ui::AbstractViewItem | |
| AbstractViewItem ()=default | |
| virtual void | update_from_old (const AbstractViewItem &old) |
| virtual void | change_state_delayed () |
| void | add_rename_button (Block &block) |
| virtual bool | should_be_filtered_visible (StringRefNull filter_string) const |
Protected Attributes | |
| std::string | identifier_ {} |
| Protected Attributes inherited from blender::ui::AbstractViewItem | |
| AbstractView * | view_ = nullptr |
| ui::ButtonViewItem * | view_item_but_ = nullptr |
| bool | is_activatable_ = true |
| bool | is_interactive_ = true |
| bool | is_hovered_ = false |
| bool | is_active_ = false |
| bool | is_selected_ = false |
| bool | is_renaming_ = false |
| bool | is_highlighted_search_ = false |
| bool | is_filtered_visible_ = true |
| bool | is_always_collapsible_ = false |
| bool | select_on_click_ = false |
| bool | reactivate_on_click_ = false |
| bool | activate_for_context_menu_ = false |
Friends | |
| class | AbstractGridView |
| class | GridViewLayoutBuilder |
Definition at line 39 of file UI_grid_view.hh.
|
overridedefault |
|
protected |
Definition at line 357 of file grid_view.cc.
References identifier_.
Referenced by matches(), and blender::ui::PreviewGridItem::PreviewGridItem().
|
pure virtual |
Implemented in blender::ed::asset::shelf::AssetViewItem, and blender::ui::PreviewGridItem.
References AbstractGridView, blender::ui::AbstractViewItem::AbstractViewItem(), C, create_drop_target(), create_item_drop_target(), debug_name(), final, get_view(), and matches().
|
protectedvirtual |
Definition at line 404 of file grid_view.cc.
Referenced by build_grid_tile(), and create_item_drop_target().
|
finalprotectedvirtual |
If an item wants to support dropping data into it, it has to return a drop target here. That is an object implementing DropTargetInterface.
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 399 of file grid_view.cc.
References create_drop_target().
Referenced by build_grid_tile().
|
overridevirtual |
View types should implement this to return some name or identifier of the item, which is helpful for debugging (there's nothing to identify the item just from the AbstractViewItem otherwise).
Reimplemented from blender::ui::AbstractViewItem.
Definition at line 383 of file grid_view.cc.
References identifier_.
Referenced by build_grid_tile().
| AbstractGridView & blender::ui::AbstractGridViewItem::get_view | ( | ) | const |
Definition at line 388 of file grid_view.cc.
References AbstractGridView, and blender::ui::AbstractViewItem::view_.
Referenced by blender::ed::asset::shelf::AssetViewItem::build_context_menu(), blender::ed::asset::shelf::AssetViewItem::build_grid_tile(), build_grid_tile(), blender::ui::PreviewGridItem::build_grid_tile_button(), blender::ed::asset::shelf::AssetViewItem::create_drag_controller(), blender::ui::find_filtered_item_index(), blender::ed::asset::shelf::AssetViewItem::on_activate(), and blender::ed::asset::shelf::AssetViewItem::should_be_active().
|
overrideprotectedvirtual |
See AbstractViewItem::matches().
Implements blender::ui::AbstractViewItem.
Definition at line 359 of file grid_view.cc.
References AbstractGridViewItem(), blender::ui::AbstractViewItem::AbstractViewItem(), and identifier_.
Referenced by build_grid_tile(), and blender::ed::asset::shelf::AssetViewItem::should_be_active().
|
friend |
Definition at line 40 of file UI_grid_view.hh.
References AbstractGridView.
Referenced by AbstractGridView, build_grid_tile(), and get_view().
|
friend |
Definition at line 41 of file UI_grid_view.hh.
References GridViewLayoutBuilder.
Referenced by GridViewLayoutBuilder.
|
protected |
A string that uniquely identifies this item in the view.
Ideally this would just be a StringRef to save memory. This was made a std::string to fix #141882 in a relatively safe way.
Definition at line 49 of file UI_grid_view.hh.
Referenced by AbstractGridViewItem(), debug_name(), and matches().