Blender V4.3
blender::ui::AbstractTreeView Class Referenceabstract

#include <UI_tree_view.hh>

Inherits blender::ui::AbstractView, and blender::ui::TreeViewItemContainer.

Inherited by blender::ed::asset::shelf::AssetCatalogSelectorTree, blender::ed::asset::shelf::AssetCatalogTreeView, blender::ed::asset_browser::AssetCatalogTreeView, blender::ed::spreadsheet::GeometryDataSetTreeView, blender::ed::spreadsheet::GeometryInstancesTreeView, blender::ui::bonecollections::BoneCollectionTreeView, and blender::ui::greasepencil::LayerTreeView.

Public Member Functions

 ~AbstractTreeView () override=default
 
void draw_overlays (const ARegion &region, const uiBlock &block) const override
 
void foreach_item (ItemIterFn iter_fn, IterOptions options=IterOptions::None) const
 
void scroll (ViewScrollDirection direction) override
 
AbstractTreeViewItemfind_hovered (const ARegion &region, const int2 &xy)
 
void set_default_rows (int default_rows)
 
- Public Member Functions inherited from blender::ui::AbstractView
virtual ~AbstractView ()=default
 
void register_item (AbstractViewItem &item)
 
virtual std::unique_ptr< DropTargetInterfacecreate_drop_target ()
 
virtual bool listen (const wmNotifier &) const
 
virtual bool begin_filtering (const bContext &C) const
 
bool is_renaming () const
 
bool begin_renaming ()
 
void end_renaming ()
 
Span< char > get_rename_buffer () const
 
MutableSpan< char > get_rename_buffer ()
 
std::optional< rctiget_bounds () const
 
std::string get_context_menu_title () const
 
void set_context_menu_title (const std::string &title)
 
bool get_popup_keep_open () const
 
void set_popup_keep_open ()
 
void clear_search_highlight ()
 
- Public Member Functions inherited from blender::ui::TreeViewItemContainer
template<class ItemT , typename... Args>
ItemT & add_tree_item (Args &&...args)
 
AbstractTreeViewItemadd_tree_item (std::unique_ptr< AbstractTreeViewItem > item)
 

Protected Member Functions

virtual void build_tree ()=0
 
- Protected Member Functions inherited from blender::ui::AbstractView
 AbstractView ()=default
 
virtual void change_state_delayed ()
 
void update_from_old (uiBlock &new_block)
 
bool is_reconstructed () const
 
const AbstractViewItemsearch_highlight_item () const
 
void filter (std::optional< StringRef > filter_str)
 
- Protected Member Functions inherited from blender::ui::TreeViewItemContainer
void foreach_item_recursive (ItemIterFn iter_fn, IterOptions options=IterOptions::None) const
 
void foreach_parent (ItemIterFn iter_fn) const
 

Friends

class AbstractTreeViewItem
 
class TreeViewBuilder
 
class TreeViewLayoutBuilder
 
class TreeViewItemDropTarget
 

Additional Inherited Members

- Public Types inherited from blender::ui::TreeViewItemContainer
enum class  IterOptions { None = 0 , SkipCollapsed = 1 << 0 , SkipFiltered = 1 << 1 }
 
using ItemIterFn = FunctionRef<void(AbstractTreeViewItem &)>
 
- Protected Attributes inherited from blender::ui::TreeViewItemContainer
Vector< std::unique_ptr< AbstractTreeViewItem > > children_
 
TreeViewItemContainerroot_ = nullptr
 
AbstractTreeViewItemparent_ = nullptr
 

Detailed Description

Definition at line 114 of file UI_tree_view.hh.

Constructor & Destructor Documentation

◆ ~AbstractTreeView()

blender::ui::AbstractTreeView::~AbstractTreeView ( )
overridedefault

Member Function Documentation

◆ build_tree()

◆ draw_overlays()

void blender::ui::AbstractTreeView::draw_overlays ( const ARegion & region,
const uiBlock & block ) const
overridevirtual

Reimplemented from blender::ui::AbstractView.

Definition at line 263 of file tree_view.cc.

◆ find_hovered()

AbstractTreeViewItem * blender::ui::AbstractTreeView::find_hovered ( const ARegion & region,
const int2 & xy )

◆ foreach_item()

◆ scroll()

void blender::ui::AbstractTreeView::scroll ( ViewScrollDirection direction)
overridevirtual

Reimplemented from blender::ui::AbstractView.

Definition at line 332 of file tree_view.cc.

References blender::ui::UP.

◆ set_default_rows()

void blender::ui::AbstractTreeView::set_default_rows ( int default_rows)

Visual feature: Define a number of item rows the view will show by default. If there are fewer items, empty dummy items will be added. These contribute to the view bounds, so the drop target of the view includes them, but they are not interactive (e.g. no mouse-hover highlight).

Definition at line 129 of file tree_view.cc.

References blender::ui::padded_item_height().

Referenced by uiTemplateBoneCollectionTree(), uiTemplateGreasePencilLayerTree(), uiTemplateLightLinkingCollection(), and uiTemplateNodeTreeInterface().

Friends And Related Symbol Documentation

◆ AbstractTreeViewItem

friend class AbstractTreeViewItem
friend

Definition at line 121 of file UI_tree_view.hh.

◆ TreeViewBuilder

friend class TreeViewBuilder
friend

Definition at line 122 of file UI_tree_view.hh.

◆ TreeViewItemDropTarget

friend class TreeViewItemDropTarget
friend

Definition at line 124 of file UI_tree_view.hh.

◆ TreeViewLayoutBuilder

friend class TreeViewLayoutBuilder
friend

Definition at line 123 of file UI_tree_view.hh.


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