Blender
V3.3
source
blender
editors
space_outliner
tree
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
17
TreeElementLabel::TreeElementLabel
(
TreeElement
&legacy_te,
const
char
*
label
)
18
:
AbstractTreeElement
(legacy_te), label_(
label
)
19
{
20
BLI_assert
(
legacy_te_
.
store_elem
->
type
==
TSE_GENERIC_LABEL
);
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
26
void
TreeElementLabel::setIcon
(
const
BIFIconID
icon)
27
{
28
icon_ = icon;
29
}
30
31
std::optional<BIFIconID>
TreeElementLabel::getIcon
()
const
32
{
33
return
icon_;
34
}
35
36
}
// namespace blender::ed::outliner
BLI_assert
#define BLI_assert(a)
Definition:
BLI_assert.h:46
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:118
BIFIconID
BIFIconID
Definition:
UI_resources.h:18
blender::ed::outliner::AbstractTreeElement
Definition:
tree_element.hh:24
blender::ed::outliner::AbstractTreeElement::legacy_te_
TreeElement & legacy_te_
Definition:
tree_element.hh:31
blender::ed::outliner::TreeElementLabel::setIcon
void setIcon(BIFIconID icon)
Definition:
tree_element_label.cc:26
blender::ed::outliner::TreeElementLabel::getIcon
std::optional< BIFIconID > getIcon() const override
Definition:
tree_element_label.cc:31
blender::ed::outliner::TreeElementLabel::TreeElementLabel
TreeElementLabel(TreeElement &legacy_te, const char *label)
Definition:
tree_element_label.cc:17
label
const char * label
Definition:
deg_debug_stats_gnuplot.cc:31
blender::ed::outliner
Definition:
outliner_intern.hh:40
TreeElement
Definition:
outliner_intern.hh:79
TreeElement::store_elem
TreeStoreElem * store_elem
Definition:
outliner_intern.hh:92
TreeElement::name
const char * name
Definition:
outliner_intern.hh:97
TreeStoreElem::type
short type
Definition:
DNA_outliner_types.h:19
tree_element_label.hh
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1