Blender V4.5
tree_element_label.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#include "../outliner_intern.hh"
12
13#include "tree_element_label.hh"
14
15namespace 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
31std::optional<BIFIconID> TreeElementLabel::get_icon() const
32{
33 return icon_;
34}
35
36} // namespace blender::ed::outliner
#define BLI_assert(a)
Definition BLI_assert.h:46
@ TSE_GENERIC_LABEL
int BIFIconID
Definition ED_asset.hh:29
std::optional< BIFIconID > get_icon() const override
TreeElementLabel(TreeElement &legacy_te, const char *label)
const char * label