Blender V4.3
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
9#include "DNA_listBase.h"
10
11#include "DNA_outliner_types.h"
12
13#include "../outliner_intern.hh"
14
15#include "tree_element_label.hh"
16
17namespace blender::ed::outliner {
18
20 : AbstractTreeElement(legacy_te), label_(label)
21{
23 /* The draw string is actually accessed via #TreeElement.name, so make sure this always points to
24 * our string. */
25 legacy_te_.name = label_.c_str();
26}
27
29{
30 icon_ = icon;
31}
32
33std::optional<BIFIconID> TreeElementLabel::get_icon() const
34{
35 return icon_;
36}
37
38} // namespace blender::ed::outliner
#define BLI_assert(a)
Definition BLI_assert.h:50
These structs are the foundation for all linked lists in the library system.
@ TSE_GENERIC_LABEL
int BIFIconID
std::optional< BIFIconID > get_icon() const override
TreeElementLabel(TreeElement &legacy_te, const char *label)
const char * label