Blender  V3.3
Public Member Functions | Protected Member Functions | Friends | List of all members
blender::ui::AbstractView Class Referenceabstract

#include <UI_abstract_view.hh>

Inheritance diagram for blender::ui::AbstractView:
blender::ui::AbstractGridView blender::ui::AbstractTreeView blender::ed::asset_browser::AssetCatalogTreeView blender::ed::spreadsheet::GeometryDataSetTreeView

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
 

Detailed Description

Definition at line 42 of file UI_abstract_view.hh.

Constructor & Destructor Documentation

◆ ~AbstractView()

virtual blender::ui::AbstractView::~AbstractView ( )
virtualdefault

◆ AbstractView()

blender::ui::AbstractView::AbstractView ( )
protecteddefault

Member Function Documentation

◆ begin_renaming()

bool blender::ui::AbstractView::begin_renaming ( )
Returns
If renaming was started successfully.

Definition at line 82 of file abstract_view.cc.

References is_renaming().

◆ end_renaming()

void blender::ui::AbstractView::end_renaming ( )

Definition at line 92 of file abstract_view.cc.

References BLI_assert, and is_renaming().

◆ get_rename_buffer() [1/2]

MutableSpan< char > blender::ui::AbstractView::get_rename_buffer ( )

Definition at line 102 of file abstract_view.cc.

◆ get_rename_buffer() [2/2]

Span< char > blender::ui::AbstractView::get_rename_buffer ( ) const

Definition at line 98 of file abstract_view.cc.

◆ is_reconstructed()

bool blender::ui::AbstractView::is_reconstructed ( ) const
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.

◆ is_renaming()

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().

◆ listen()

bool blender::ui::AbstractView::listen ( const wmNotifier ) const
virtual

Listen to a notifier, returning true if a redraw is needed.

Definition at line 65 of file abstract_view.cc.

◆ register_item()

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().

◆ update_children_from_old()

virtual void blender::ui::AbstractView::update_children_from_old ( const AbstractView old_view)
protectedpure virtual

Referenced by update_from_old().

◆ update_from_old()

void blender::ui::AbstractView::update_from_old ( uiBlock new_block)
protected

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().

Friends And Related Function Documentation

◆ AbstractViewItem

friend class AbstractViewItem
friend

Definition at line 43 of file UI_abstract_view.hh.


The documentation for this class was generated from the following files: