Blender  V3.3
tree_element_label.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include "DNA_listBase.h"
8 
9 #include "DNA_outliner_types.h"
10 
11 #include "../outliner_intern.hh"
12 
13 #include "tree_element_label.hh"
14 
15 namespace blender::ed::outliner {
16 
18  : AbstractTreeElement(legacy_te), label_(label)
19 {
21  /* The draw string is actually accessed via #TreeElement.name, so make sure this always points to
22  * our string. */
23  legacy_te_.name = label_.c_str();
24 }
25 
27 {
28  icon_ = icon;
29 }
30 
31 std::optional<BIFIconID> TreeElementLabel::getIcon() const
32 {
33  return icon_;
34 }
35 
36 } // namespace blender::ed::outliner
#define BLI_assert(a)
Definition: BLI_assert.h:46
These structs are the foundation for all linked lists in the library system.
@ TSE_GENERIC_LABEL
BIFIconID
Definition: UI_resources.h:18
std::optional< BIFIconID > getIcon() const override
TreeElementLabel(TreeElement &legacy_te, const char *label)
const char * label
TreeStoreElem * store_elem
const char * name