Blender
V3.3
|
#include <UI_grid_view.hh>
Public Member Functions | |
virtual | ~AbstractGridViewItem ()=default |
virtual void | build_grid_tile (uiLayout &layout) const =0 |
const AbstractGridView & | get_view () const |
![]() | |
virtual | ~AbstractViewItem ()=default |
virtual void | build_context_menu (bContext &C, uiLayout &column) const |
virtual std::unique_ptr< AbstractViewItemDragController > | create_drag_controller () const |
virtual std::unique_ptr< AbstractViewItemDropController > | create_drop_controller () const |
AbstractView & | get_view () const |
bool | is_active () const |
virtual bool | supports_renaming () const |
virtual bool | rename (StringRefNull new_name) |
virtual StringRef | get_rename_string () const |
bool | is_renaming () const |
void | begin_renaming () |
void | end_renaming () |
void | rename_apply () |
Protected Member Functions | |
AbstractGridViewItem (StringRef identifier) | |
virtual bool | matches (const AbstractViewItem &other) const override |
virtual void | on_activate () |
virtual std::optional< bool > | should_be_active () const |
void | activate () |
void | deactivate () |
![]() | |
AbstractViewItem ()=default | |
virtual void | update_from_old (const AbstractViewItem &old) |
void | add_rename_button (uiBlock &block) |
Protected Attributes | |
StringRef | identifier_ {} |
uiButViewItem * | view_item_but_ = nullptr |
![]() | |
AbstractView * | view_ = nullptr |
bool | is_active_ = false |
bool | is_renaming_ = false |
Friends | |
class | AbstractGridView |
class | GridViewLayoutBuilder |
Additional Inherited Members | |
![]() | |
template<typename ToType = AbstractViewItem> | |
static ToType * | from_item_handle (uiViewItemHandle *handle) |
Definition at line 35 of file UI_grid_view.hh.
|
virtualdefault |
|
protected |
Definition at line 93 of file grid_view.cc.
|
protected |
Activates this item, deactivates other items, and calls the #AbstractGridViewItem::on_activate() function. Requires the tree to have completed reconstruction, see #is_reconstructed(). Otherwise the actual item state is unknown, possibly calling state-change update functions incorrectly.
Definition at line 154 of file grid_view.cc.
References BLI_assert_msg, blender::ui::AbstractGridView::foreach_item(), get_view(), blender::ui::AbstractViewItem::is_active(), blender::ui::AbstractViewItem::is_active_, and on_activate().
|
pure virtual |
Implemented in blender::ui::PreviewGridItem.
|
protected |
Definition at line 171 of file grid_view.cc.
References blender::ui::AbstractViewItem::is_active_.
const AbstractGridView & blender::ui::AbstractGridViewItem::get_view | ( | ) | const |
Definition at line 176 of file grid_view.cc.
References UNLIKELY, and blender::ui::AbstractViewItem::view_.
Referenced by activate(), and blender::ui::PreviewGridItem::build_grid_tile().
|
overrideprotectedvirtual |
See AbstractViewItem::matches().
Implements blender::ui::AbstractViewItem.
Definition at line 97 of file grid_view.cc.
References identifier_.
|
protectedvirtual |
Called when the item's state changes from inactive to active.
Definition at line 136 of file grid_view.cc.
Referenced by activate().
|
protectedvirtual |
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.
Definition at line 141 of file grid_view.cc.
|
friend |
Definition at line 36 of file UI_grid_view.hh.
|
friend |
Definition at line 37 of file UI_grid_view.hh.
|
protected |
Reference to a string that uniquely identifies this item in the view.
Definition at line 41 of file UI_grid_view.hh.
Referenced by matches().
|
protected |
Every visible item gets a button of type UI_BTYPE_VIEW_ITEM during the layout building.
Definition at line 43 of file UI_grid_view.hh.