Blender
V4.3
source
blender
editors
space_outliner
tree
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
17
namespace
blender::ed::outliner
{
18
19
TreeElementLabel::TreeElementLabel
(
TreeElement
&legacy_te,
const
char
*
label
)
20
:
AbstractTreeElement
(legacy_te), label_(
label
)
21
{
22
BLI_assert
(
legacy_te_
.
store_elem
->
type
==
TSE_GENERIC_LABEL
);
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
28
void
TreeElementLabel::set_icon
(
const
BIFIconID
icon)
29
{
30
icon_ = icon;
31
}
32
33
std::optional<BIFIconID>
TreeElementLabel::get_icon
()
const
34
{
35
return
icon_;
36
}
37
38
}
// namespace blender::ed::outliner
BLI_assert
#define BLI_assert(a)
Definition
BLI_assert.h:50
DNA_listBase.h
These structs are the foundation for all linked lists in the library system.
DNA_outliner_types.h
TSE_GENERIC_LABEL
@ TSE_GENERIC_LABEL
Definition
DNA_outliner_types.h:115
BIFIconID
int BIFIconID
Definition
UI_resources.hh:33
blender::ed::outliner::AbstractTreeElement
Definition
tree_element.hh:29
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition
tree_element.hh:36
blender::ed::outliner::TreeElementLabel::get_icon
std::optional< BIFIconID > get_icon() const override
Definition
tree_element_label.cc:33
blender::ed::outliner::TreeElementLabel::TreeElementLabel
TreeElementLabel(TreeElement &legacy_te, const char *label)
Definition
tree_element_label.cc:19
blender::ed::outliner::TreeElementLabel::set_icon
void set_icon(BIFIconID icon)
Definition
tree_element_label.cc:28
label
const char * label
Definition
deg_debug_stats_gnuplot.cc:32
blender::ed::outliner
Definition
outliner_collections.cc:42
outliner_intern.hh
TreeStoreElem::type
short type
Definition
DNA_outliner_types.h:16
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:84
blender::ed::outliner::TreeElement::name
const char * name
Definition
outliner_intern.hh:102
blender::ed::outliner::TreeElement::store_elem
TreeStoreElem * store_elem
Definition
outliner_intern.hh:97
tree_element_label.hh
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0