18#include "RNA_prototypes.hh"
26 std::function<
void(
bContext &)> handle_func,
36 char name_buf[128], *name;
43 if (&rna_type == RNA_NodeTree) {
44 ID *
id =
static_cast<ID *
>(ptr);
48 path.
append({name, icon, 1, handle_func, menu_func, menu_arg});
50 if (name != name_buf) {
69 int icon = context_path[i].icon;
70 std::string name = context_path[i].name;
71 if (context_path[i].handle_func) {
74 but = sub_row.
button(name.c_str(), icon, context_path[i].handle_func);
77 but =
uiItemL_ex(&sub_row, name.c_str(), icon,
false,
false);
81 if (context_path[i].menu_func) {
84 "", ICON_RIGHTARROW_THIN, context_path[i].menu_func, context_path[i].menu_arg);
86 else if (i < context_path.
size() - 1) {
87 sub_row.
label(
"", ICON_RIGHTARROW_THIN);
#define ID_REAL_USERS(id)
constexpr int64_t size() const
constexpr IndexRange index_range() const
void append(const T &value)
void(*)(bContext *C, Layout *layout, void *arg1) MenuCreateFunc
Button * uiItemL_ex(Layout *layout, StringRef name, int icon, bool highlight, bool redalert)
void button_icon_indicator_number_set(Button *but, const int indicator_number)
void context_path_add_generic(Vector< ContextPathItem > &path, StructRNA &rna_type, void *ptr, const BIFIconID icon_override=ICON_NONE, std::function< void(bContext &)> handle_func=nullptr, MenuCreateFunc menu_func=nullptr, void *menu_arg=nullptr)
void template_breadcrumbs(Layout &layout, Span< ContextPathItem > context_path)
char * RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_struct_ui_icon(const StructRNA *type)
void alignment_set(LayoutAlign alignment)
void label(StringRef name, int icon)
Button * button(StringRef name, int icon, std::function< void(bContext &)> func, std::optional< StringRef > tooltip=std::nullopt)
void menu_fn(StringRefNull name, int icon, MenuCreateFunc func, void *arg)
void emboss_set(EmbossType emboss)