Blender  V3.3
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
blender::ed::outliner::AbstractTreeElement Class Reference

#include <tree_element.hh>

Inheritance diagram for blender::ed::outliner::AbstractTreeElement:
blender::ed::outliner::TreeElementAnimData blender::ed::outliner::TreeElementCollectionBase blender::ed::outliner::TreeElementDriverBase blender::ed::outliner::TreeElementGPencilLayer blender::ed::outliner::TreeElementID blender::ed::outliner::TreeElementLabel blender::ed::outliner::TreeElementNLA blender::ed::outliner::TreeElementNLAAction blender::ed::outliner::TreeElementNLATrack blender::ed::outliner::TreeElementOverridesBase blender::ed::outliner::TreeElementOverridesProperty blender::ed::outliner::TreeElementRNACommon blender::ed::outliner::TreeElementSceneObjectsBase blender::ed::outliner::TreeElementSequence blender::ed::outliner::TreeElementSequenceStrip blender::ed::outliner::TreeElementSequenceStripDuplicate blender::ed::outliner::TreeElementViewLayerBase

Public Member Functions

virtual ~AbstractTreeElement ()=default
 
virtual bool expandPoll (const SpaceOutliner &) const
 
virtual bool isExpandValid () const
 
TreeElementgetLegacyElement ()
 
virtual StringRefNull getWarning () const
 
virtual std::optional< BIFIconIDgetIcon () const
 

Static Public Member Functions

static std::unique_ptr< AbstractTreeElementcreateFromType (int type, TreeElement &legacy_te, void *idv)
 
static void uncollapse_by_default (TreeElement *legacy_te)
 

Protected Member Functions

 AbstractTreeElement (TreeElement &legacy_te)
 
virtual void expand (SpaceOutliner &) const
 

Protected Attributes

TreeElementlegacy_te_
 

Friends

void tree_element_expand (const AbstractTreeElement &tree_element, SpaceOutliner &space_outliner)
 

Detailed Description

Definition at line 24 of file tree_element.hh.

Constructor & Destructor Documentation

◆ ~AbstractTreeElement()

virtual blender::ed::outliner::AbstractTreeElement::~AbstractTreeElement ( )
virtualdefault

◆ AbstractTreeElement()

blender::ed::outliner::AbstractTreeElement::AbstractTreeElement ( TreeElement legacy_te)
inlineprotected

Definition at line 90 of file tree_element.hh.

Member Function Documentation

◆ createFromType()

std::unique_ptr< AbstractTreeElement > blender::ed::outliner::AbstractTreeElement::createFromType ( int  type,
TreeElement legacy_te,
void idv 
)
static

◆ expand()

virtual void blender::ed::outliner::AbstractTreeElement::expand ( SpaceOutliner ) const
inlineprotectedvirtual

◆ expandPoll()

virtual bool blender::ed::outliner::AbstractTreeElement::expandPoll ( const SpaceOutliner ) const
inlinevirtual

Check if the type is expandable in current context.

Reimplemented in blender::ed::outliner::TreeElementSequence, blender::ed::outliner::TreeElementRNACommon, and blender::ed::outliner::TreeElementID.

Definition at line 43 of file tree_element.hh.

◆ getIcon()

std::optional< BIFIconID > blender::ed::outliner::AbstractTreeElement::getIcon ( ) const
virtual

Define the icon to be displayed for this element. If this returns an icon, this will be displayed. Otherwise, tree_element_get_icon() may still determine an icon. By default no value is returned (#std::nullopt).

All elements should be ported to use this over tree_element_get_icon().

Reimplemented in blender::ed::outliner::TreeElementOverridesPropertyOperation, and blender::ed::outliner::TreeElementLabel.

Definition at line 114 of file tree_element.cc.

◆ getLegacyElement()

TreeElement& blender::ed::outliner::AbstractTreeElement::getLegacyElement ( )
inline

Definition at line 57 of file tree_element.hh.

References legacy_te_.

◆ getWarning()

StringRefNull blender::ed::outliner::AbstractTreeElement::getWarning ( ) const
virtual

By letting this return a warning message, the tree element will display a warning icon with the message in the tooltip.

Reimplemented in blender::ed::outliner::TreeElementOverridesProperty, blender::ed::outliner::TreeElementOverridesBase, and blender::ed::outliner::TreeElementIDLibrary.

Definition at line 109 of file tree_element.cc.

Referenced by outliner_draw_get_warning_tree_element(), and outliner_draw_get_warning_tree_element_subtree().

◆ isExpandValid()

virtual bool blender::ed::outliner::AbstractTreeElement::isExpandValid ( ) const
inlinevirtual

Just while transitioning to the new tree-element design: Some types are only partially ported, and the expanding isn't done yet.

Reimplemented in blender::ed::outliner::TreeElementRNACommon, blender::ed::outliner::TreeElementIDScene, blender::ed::outliner::TreeElementIDLibrary, and blender::ed::outliner::TreeElementID.

Definition at line 52 of file tree_element.hh.

◆ uncollapse_by_default()

void blender::ed::outliner::AbstractTreeElement::uncollapse_by_default ( TreeElement legacy_te)
static

Expand this tree element if it is displayed for the first time (as identified by its tree-store element).

Static for now to allow doing this from the legacy tree element.

Definition at line 119 of file tree_element.cc.

References TREESTORE, and TSE_CLOSED.

Referenced by blender::ed::outliner::TreeDisplayOverrideLibraryHierarchies::buildTree().

Friends And Related Function Documentation

◆ tree_element_expand

void tree_element_expand ( const AbstractTreeElement tree_element,
SpaceOutliner space_outliner 
)
friend

Definition at line 126 of file tree_element.cc.

Member Data Documentation

◆ legacy_te_

TreeElement& blender::ed::outliner::AbstractTreeElement::legacy_te_
protected

Reference back to the owning legacy TreeElement. Most concrete types need access to this, so storing here. Eventually the type should be replaced by AbstractTreeElement and derived types.

Definition at line 31 of file tree_element.hh.

Referenced by blender::ed::outliner::TreeElementCollectionBase::expand(), blender::ed::outliner::TreeElementOverridesBase::expand(), blender::ed::outliner::TreeElementSceneObjectsBase::expand(), blender::ed::outliner::TreeElementSequence::expand(), blender::ed::outliner::TreeElementViewLayerBase::expand(), blender::ed::outliner::TreeElementAnimData::expand(), blender::ed::outliner::TreeElementDriverBase::expand(), blender::ed::outliner::TreeElementNLA::expand(), blender::ed::outliner::TreeElementNLATrack::expand(), blender::ed::outliner::TreeElementRNAStruct::expand(), blender::ed::outliner::TreeElementRNAProperty::expand(), blender::ed::outliner::TreeElementID::expand_animation_data(), blender::ed::outliner::TreeElementID::expandPoll(), getLegacyElement(), blender::ed::outliner::TreeElementRNAArrayElement::getPropertyRNA(), blender::ed::outliner::TreeElementID::TreeElementID(), blender::ed::outliner::TreeElementLabel::TreeElementLabel(), blender::ed::outliner::TreeElementRNAArrayElement::TreeElementRNAArrayElement(), blender::ed::outliner::TreeElementRNAProperty::TreeElementRNAProperty(), blender::ed::outliner::TreeElementRNAStruct::TreeElementRNAStruct(), blender::ed::outliner::TreeElementSequenceStrip::TreeElementSequenceStrip(), blender::ed::outliner::TreeElementSequenceStripDuplicate::TreeElementSequenceStripDuplicate(), and blender::ed::outliner::TreeElementViewLayerBase::TreeElementViewLayerBase().


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