Blender
V3.3
|
#include <UI_abstract_view.hh>
Public Member Functions | |
virtual | ~AbstractView ()=default |
void | register_item (AbstractViewItem &item) |
Default implementations of virtual functions | |
virtual bool | listen (const wmNotifier &) const |
Renaming | |
bool | is_renaming () const |
bool | begin_renaming () |
void | end_renaming () |
Span< char > | get_rename_buffer () const |
MutableSpan< char > | get_rename_buffer () |
Protected Member Functions | |
AbstractView ()=default | |
virtual void | update_children_from_old (const AbstractView &old_view)=0 |
View Reconstruction | |
void | update_from_old (uiBlock &new_block) |
bool | is_reconstructed () const |
Friends | |
class | AbstractViewItem |
Definition at line 42 of file UI_abstract_view.hh.
|
virtualdefault |
|
protecteddefault |
bool blender::ui::AbstractView::begin_renaming | ( | ) |
Definition at line 82 of file abstract_view.cc.
References is_renaming().
void blender::ui::AbstractView::end_renaming | ( | ) |
Definition at line 92 of file abstract_view.cc.
References BLI_assert, and is_renaming().
MutableSpan< char > blender::ui::AbstractView::get_rename_buffer | ( | ) |
Definition at line 102 of file abstract_view.cc.
Span< char > blender::ui::AbstractView::get_rename_buffer | ( | ) | const |
Definition at line 98 of file abstract_view.cc.
|
protected |
Check if the view is fully (re-)constructed. That means, both the build function and update_from_old() have finished.
Definition at line 24 of file abstract_view.cc.
bool blender::ui::AbstractView::is_renaming | ( | ) | const |
Only one item can be renamed at a time.
Definition at line 77 of file abstract_view.cc.
Referenced by begin_renaming(), and end_renaming().
|
virtual |
Listen to a notifier, returning true if a redraw is needed.
Definition at line 65 of file abstract_view.cc.
void blender::ui::AbstractView::register_item | ( | AbstractViewItem & | item | ) |
Makes item valid for display in this view. Behavior is undefined for items not registered with this.
Definition at line 13 of file abstract_view.cc.
References blender::ui::AbstractViewItem::view_.
Referenced by blender::ui::TreeViewItemContainer::add_tree_item().
|
protectedpure virtual |
Referenced by update_from_old().
Match the view and its items against an earlier version of itself (if any) and copy the old UI state (e.g. collapsed, active, selected, renaming, etc.) to the new one. See #AbstractViewItem.update_from_old(). After this, reconstruction is complete (see is_reconstructed()).
Definition at line 29 of file abstract_view.cc.
References uiBlock::oldblock, ui_block_view_find_matching_in_old_block(), and update_children_from_old().
Referenced by blender::ui::GridViewBuilder::build_grid_view(), and blender::ui::TreeViewBuilder::build_tree_view().
|
friend |
Definition at line 43 of file UI_abstract_view.hh.