blob: 32fa62c5f5ee7a0e6d7e864b75c99c4d31d5f809 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup spoutliner
*/
#include "DNA_listBase.h"
#include "DNA_outliner_types.h"
#include "../outliner_intern.hh"
#include "tree_element_label.hh"
namespace blender::ed::outliner {
TreeElementLabel::TreeElementLabel(TreeElement &legacy_te, const char *label)
: AbstractTreeElement(legacy_te), label_(label)
{
BLI_assert(legacy_te_.store_elem->type == TSE_GENERIC_LABEL);
/* The draw string is actually accessed via #TreeElement.name, so make sure this always points to
* our string. */
legacy_te_.name = label_.c_str();
}
void TreeElementLabel::setIcon(const BIFIconID icon)
{
icon_ = icon;
}
std::optional<BIFIconID> TreeElementLabel::getIcon() const
{
return icon_;
}
} // namespace blender::ed::outliner
|