39#include "RNA_prototypes.hh"
48#include "fmt/format.h"
57#define UI_PROP_DECORATE
60#define UI_PROP_SEP_ICON_WIDTH_EXCEPTION
66#define UI_OPERATOR_ERROR_RET(_ot, _opname) \
67 if (ot == nullptr) { \
68 ui_item_disabled(this, _opname); \
69 RNA_warning("'%s' unknown operator", _opname); \
70 return PointerRNA_NULL; \
74#define UI_ITEM_PROP_SEP_DIVIDE 0.4f
318 memcpy(namestr,
name.data(),
len);
320 namestr[
len + 1] =
'\0';
332 memcpy(namestr,
name.data(),
len);
334 namestr[
len + 1] =
'\0';
354 if (
all > available) {
357 return available -
pos;
360 const float width = *extra_pixel + (item * available) /
float(
all);
361 *extra_pixel = width - int(width);
368 return available -
pos;
371 const float width = *extra_pixel + (item * available) /
float(
all);
372 *extra_pixel = width - int(width);
379#define UI_ITEM_VARY_X 1
380#define UI_ITEM_VARY_Y 2
439 if (icon &&
name.is_empty()) {
440 return unit_x * (1.0f + pad_factor.
icon_only);
444 if (!icon &&
name.is_empty()) {
445 return unit_x * (1.0f + pad_factor.
icon_only);
452 float margin = pad_factor.
text;
454 margin += pad_factor.
icon;
459 int(
ceilf(unit_x * margin));
475 if (item->
type() == uiItemType::Button) {
499 if (item->
type() == uiItemType::Button) {
521 if (item->
type() == uiItemType::Button) {
543 if (item->
type() == uiItemType::Button) {
554 if (delta_xmin > 0) {
555 litem->
x_ += delta_xmin;
558 litem->
w_ += delta_xmax;
571 switch (this->
type()) {
572 case uiItemType::LayoutRow:
573 case uiItemType::LayoutRoot:
574 case uiItemType::LayoutOverlap:
575 case uiItemType::LayoutPanelHeader:
576 case uiItemType::LayoutGridFlow:
578 case uiItemType::LayoutColumn:
579 case uiItemType::LayoutColumnFlow:
580 case uiItemType::LayoutSplit:
581 case uiItemType::LayoutAbsolute:
582 case uiItemType::LayoutBox:
583 case uiItemType::LayoutPanelBody:
593 sub = &layout->
row(align);
596 sub = &layout->
column(align);
616 value_array.
fill(
false);
617 value_array[index] =
true;
623 for (
const std::unique_ptr<uiBut> &cbut : but->
block->
buttons) {
644 const bool icon_only,
646 const bool show_text)
658 if (!
name.is_empty() && show_text) {
659 uiDefBut(block,
ButType::Label, 0,
name, 0, 0,
w,
UI_UNIT_Y,
nullptr, 0.0, 0.0,
"");
665 const int cols = (
len >= 20) ? 2 : 1;
666 const int colbuts =
len / (2 * cols);
668 uint layer_active = 0;
675 for (
int b = 0;
b < cols;
b++) {
678 for (
int a = 0; a < colbuts; a++) {
679 const int layer_num = a +
b * colbuts;
680 const uint layer_flag = (1u << layer_num);
682 if (layer_used & layer_flag) {
683 if (layer_active & layer_flag) {
684 icon = ICON_LAYER_ACTIVE;
687 icon = ICON_LAYER_USED;
695 block,
ptr, prop, layer_num,
"", icon,
x + butw * a,
y + buth, butw, buth);
700 for (
int a = 0; a < colbuts; a++) {
701 const int layer_num = a +
len / 2 +
b * colbuts;
702 const uint layer_flag = (1u << layer_num);
704 if (layer_used & layer_flag) {
705 if (layer_active & layer_flag) {
706 icon = ICON_LAYER_ACTIVE;
709 icon = ICON_LAYER_USED;
717 block,
ptr, prop, layer_num,
"", icon,
x + butw * a,
y, butw, buth);
728 int totdim, dim_size[ 3];
742 for (
int a = 0; a <
len; a++) {
746 col = a % dim_size[1];
747 row = a / dim_size[1];
761 const float step_size = number_but->
step_size;
762 const float precision = number_but->
precision;
798 char str[3] = {
'\0'};
800 if (!icon_only && show_text) {
807 bool *boolarr =
nullptr;
816 const char *str_buf = show_text ?
str :
"";
817 for (
int a = 0; a <
len; a++) {
818 if (!icon_only && show_text) {
822 icon = boolarr[a] ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
825 const int width_item = ((compact && type ==
PROP_BOOLEAN) ?
830 block,
ptr, prop, a, str_buf, icon, 0, 0, width_item,
UI_UNIT_Y);
833 const float step_size = number_but->
step_size;
834 const float precision = number_but->
precision;
866 if (!(current_value & enum_value)) {
867 current_value = enum_value;
870 current_value &= enum_value;
883 const std::optional<StringRef> uiname,
886 const bool icon_only,
890 const char *
name = (!uiname || !uiname->is_empty()) ? item->
name :
"";
891 const int icon = item->
icon;
892 const int value = item->
value;
896 if (icon &&
name[0] && !icon_only) {
898 block, but_type, 0, icon,
name, 0, 0, itemw, h,
ptr, prop, -1, 0, value, std::nullopt);
901 const int w = (is_first) ? itemw :
ceilf(itemw -
U.pixelsize);
903 block, but_type, 0, icon, 0, 0,
w, h,
ptr, prop, -1, 0, value, std::nullopt);
907 block, but_type, 0,
name, 0, 0, itemw, h,
ptr, prop, -1, 0, value, std::nullopt);
932 const std::optional<StringRef> uiname,
935 const bool icon_only)
968 layout_radial = &layout->
menu_pie();
972 if (layout->
type() == uiItemType::LayoutRadial) {
973 layout_radial = layout;
978 else if (
ELEM(layout->
type(), uiItemType::LayoutGridFlow, uiItemType::LayoutColumnFlow) ||
988 const bool is_first = item == item_array;
990 if (!item->identifier[0]) {
1003 else if (radial && layout_radial) {
1014 layout, block,
ptr, prop, uiname, h, but_type, icon_only, item, is_first);
1027 const std::optional<StringRef> uiname,
1029 const bool icon_only)
1040 const std::optional<StringRef> uiname,
1042 const bool icon_only)
1062 const bool use_custom_highlight = (prop_highlight !=
nullptr);
1064 if (use_custom_highlight) {
1068 const int end = std::min<int>(start_size + highlight_array_len, block->
buttons.
size());
1069 for (
int i = start_size;
i < end;
i++) {
1115 int prop_but_width = w_hint;
1116#ifdef UI_PROP_DECORATE
1117 uiLayout *layout_prop_decorate =
nullptr;
1125 RNA_warning(
"Data is not a keymap item struct: %s. Ignoring 'full_event' option.",
1132 if (!
name.is_empty()
1134 || use_prop_decorate
1141 sub = &layout->
row(layout->
align());
1145 if (!
name.is_empty()) {
1146#ifdef UI_PROP_DECORATE
1162 w_label = w_hint / 3;
1164 uiDefBut(block,
ButType::Label, 0,
name,
x,
y, w_label, h,
nullptr, 0.0, 0.0,
"");
1176 if (but !=
nullptr) {
1189 subtype ==
PROP_DIRPATH ?
"BUTTONS_OT_directory_browse" :
1190 "BUTTONS_OT_file_browse",
1216 std::string kmi_str =
1238 std::make_optional<StringRefNull>(
"");
1251 const std::optional<blender::bke::path_templates::VariableMap> variables =
1268#ifdef UI_PROP_DECORATE
1270 if (use_prop_decorate) {
1271 (layout_prop_decorate ? layout_prop_decorate : sub)->label(
nullptr, ICON_BLANK1);
1286 uiBut *prevbut =
nullptr;
1291 *r_is_userdef =
false;
1298 for (
const std::unique_ptr<uiBut> &but : block->buttons) {
1299 if (but && but->rnapoin.data) {
1301 prevbut = but.get();
1327 if (but->
tip ==
nullptr || but->
tip[0] ==
'\0') {
1349 uiBut *but =
uiDefBut(block,
ButType::Label, 0,
name, 0, 0,
w,
UI_UNIT_Y,
nullptr, 0.0, 0.0,
"");
1360 std::optional<StringRef>
name,
1369 std::string operator_name;
1373 name = operator_name.c_str();
1397 if (!
name->is_empty()) {
1399 block,
ButType::But,
ot, context, icon, *
name, 0, 0,
w,
UI_UNIT_Y, std::nullopt);
1470 const char *menu_id =
static_cast<const char *
>(but->
hold_argN);
1477 layout->
label(
RPT_(
"Menu Missing:"), ICON_NONE);
1478 layout->
label(menu_id, ICON_NONE);
1484 std::optional<StringRef>
name,
1495 std::optional<StringRef>
name,
1499 const char *menu_id)
1508 const std::optional<StringRef>
name,
1520 return (layout->
type() == uiItemType::LayoutRadial) ||
1521 ((layout->
type() == uiItemType::LayoutRoot) &&
1573 bool last_iter =
false;
1575 for (
int i = 1; item->
identifier && !last_iter;
i++, item++) {
1583 for (tmp = item + 1; tmp->
identifier; tmp++) {
1620 if (item != item_array && !radial &&
split !=
nullptr) {
1625 if (item->
icon || radial) {
1628 but =
block->buttons.last().get();
1673 if (!
ot || !
ot->srna) {
1675 RNA_warning(
"%s '%s'",
ot ?
"operator missing srna" :
"unknown operator", opname.
c_str());
1768 bool is_checkbox_only =
false;
1769 if (
name.is_empty() && !icon_only) {
1771 name =
"non-empty text";
1774 if (icon == ICON_NONE) {
1776 is_checkbox_only =
true;
1792 if (item->identifier[0]) {
1819 if (
name.is_empty() && icon == ICON_NONE) {
1843 else if (is_checkbox_only) {
1846 else if (type ==
PROP_ENUM && !icon_only) {
1876 for (
uiLayout *parent = cur_layout; parent; parent = parent->
parent()) {
1877 if (!parent->heading().is_empty()) {
1888 bool respect_prop_split)
1896 if (respect_prop_split) {
1921 if (layout_parent->
type() == uiItemType::LayoutRow) {
1928 return layout_split;
1936 const std::optional<StringRef> name_opt,
1938 const std::optional<StringRef> placeholder)
1944 const bool inside_prop_sep = bool(
flag_ & uiItemInternalFlag::InsidePropSep);
1954 bool use_prop_sep_split_label = use_prop_sep;
1957#ifdef UI_PROP_DECORATE
1958 struct DecorateInfo {
1959 bool use_prop_decorate;
1964 DecorateInfo ui_decorate{};
1983 const bool no_icon = (toggle == 0);
1996 if (use_prop_sep ==
false) {
2001 if (use_prop_sep ==
false) {
2010 if (use_prop_sep ==
false) {
2016 if (no_icon ==
false) {
2017 if (icon == ICON_NONE) {
2030 icon = ICON_CHECKBOX_DEHLT;
2032 else if (is_array) {
2034 ICON_CHECKBOX_DEHLT;
2045 icon = ICON_CHECKBOX_DEHLT;
2048 icon = (enum_value & value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
2052 icon = (enum_value == value) ? ICON_RADIOBUT_ON : ICON_RADIOBUT_OFF;
2059#ifdef UI_PROP_SEP_ICON_WIDTH_EXCEPTION
2062 use_prop_sep_split_label =
false;
2065 use_split_empty_name =
true;
2088 uiBut *but =
nullptr;
2095#ifdef UI_PROP_DECORATE
2096 if (ui_decorate.use_prop_decorate) {
2097 layout_row = &layout->
row(
true);
2103 if (
name.is_empty() && !use_split_empty_name) {
2105 layout = &(layout_row ? layout_row : layout)->
column(
true);
2107 if (heading_layout) {
2114 bool label_added =
false;
2122 if (!use_prop_sep_split_label) {
2126 fmt::memory_buffer name_with_suffix;
2127 char str[2] = {
'\0'};
2128 for (
int a = 0; a <
len; a++) {
2130 const bool use_prefix = (a == 0 && !
name.is_empty());
2132 fmt::format_to(fmt::appender(name_with_suffix),
"{} {}",
name,
str[0]);
2137 use_prefix ?
StringRef(name_with_suffix.data(), name_with_suffix.size()) :
2154 but =
uiDefBut(
block,
ButType::Label, 0,
name, 0, 0,
w,
UI_UNIT_Y,
nullptr, 0.0, 0.0,
"");
2161 if (!label_added && heading_layout) {
2174 layout = &layout_split->
row(
true);
2177 layout = &layout_split->
column(
true);
2181 if (use_prop_sep_split_label) {
2184 layout = &layout_split->
column(
true);
2189#ifdef UI_PROP_DECORATE
2190 if (ui_decorate.use_prop_decorate) {
2191 ui_decorate.layout = &layout_row->
column(
true);
2192 ui_decorate.layout->space_ = 0;
2194 ui_decorate.but =
block->last_but();
2197 layout->
flag_ |= uiItemInternalFlag::PropDecorateNoPad;
2202 else if (heading_layout) {
2210 if (inside_prop_sep) {
2213 layout = &layout->
column(
true);
2232 !use_prop_sep_split_label);
2236 if (icon && !
name.is_empty() && !icon_only) {
2238 block,
ButType::Row, 0, icon,
name, 0, 0,
w, h,
ptr,
prop, -1, 0, value, std::nullopt);
2242 block,
ButType::Row, 0, icon, 0, 0,
w, h,
ptr,
prop, -1, 0, value, std::nullopt);
2246 block,
ButType::Row, 0,
name, 0, 0,
w, h,
ptr,
prop, -1, 0, value, std::nullopt);
2255 but =
ui_item_with_label(layout,
block,
name, icon,
ptr,
prop, index, 0, 0,
w, h,
flag);
2257 if (is_id_name_prop) {
2259 ID *
id =
ptr->owner_id;
2261 but, [bmain,
id](
const std::string &new_name) {
ED_id_rename(*bmain, *
id, new_name); });
2264 bool results_are_suggestions =
false;
2268 results_are_suggestions =
true;
2287 const float step_size = number_but->
step_size;
2288 const float precision = number_but->
precision;
2325 if (but && no_icon) {
2326 if ((icon == ICON_NONE) && (but->
icon != ICON_NONE)) {
2347#ifdef UI_PROP_DECORATE
2348 if (ui_decorate.use_prop_decorate) {
2349 uiBut *but_decorate = ui_decorate.but ?
block->next_but(ui_decorate.but) :
block->first_but();
2354 while (but_decorate && but_decorate !=
block->buttons.last().get()) {
2358 uiLayout *layout_col = &ui_decorate.layout->column(
false);
2363 for (
i = 0;
i < ui_decorate.len && but_decorate;
i++) {
2369 but =
block->buttons.last().get();
2373 but_decorate =
block->buttons.last().get();
2376 but_decorate =
nullptr;
2393 if (but && icon_only) {
2401 const std::optional<StringRef>
name,
2420 const std::optional<StringRefNull>
name,
2422 const char *panel_type)
2425 int i =
block->buttons.size();
2427 for (;
i <
block->buttons.size();
i++) {
2434 if (
i ==
block->buttons.size()) {
2437 RNA_warning(
"property could not use a popover: %s.%s (%s)",
2449 const std::optional<StringRefNull>
name,
2451 const char *menu_type)
2454 int i =
block->buttons.size();
2464 if (
i ==
block->buttons.size()) {
2467 RNA_warning(
"property could not use a menu: %s.%s (%s)",
2477 const std::optional<StringRefNull>
name,
2493 const std::optional<StringRefNull>
name,
2515 RNA_warning(
"enum property value not found: %s", value);
2520 if (item[a].identifier[0] ==
'\0') {
2524 if (item[a].value == ivalue) {
2542 const std::optional<StringRefNull>
name,
2582 for (
int i = 0;
i < totitem;
i++) {
2583 if (item[
i].identifier[0]) {
2625 if (ptype == srna) {
2638 MEM_delete(coll_search);
2647 const bool results_are_suggestions)
2650 bool has_search_fn =
false;
2665 if (has_search_fn || searchprop) {
2738 const std::optional<StringRefNull> name_opt,
2740 bool results_are_suggestions)
2748 RNA_warning(
"Property %s.%s must be a pointer, string or enum",
2754 RNA_warning(
"search collection property is not a collection type: %s.%s",
2760 RNA_warning(
"Search collection items' property is not a string type: %s.%s",
2767 if (icon == ICON_NONE) {
2781 if (use_prop_sep ==
false) {
2790 uiBut *but =
ui_item_with_label(
this,
block,
name, icon,
ptr,
prop, 0, 0, 0,
w, h, 0);
2793 but,
ptr,
prop, searchptr, searchprop, item_searchprop, results_are_suggestions);
2800 const std::optional<StringRefNull>
name,
2811 RNA_warning(
"search collection property not found: %s.%s",
2813 searchpropname.
c_str());
2838 const std::optional<StringRef> tip,
2855 if (icon == ICON_NONE && force_menu) {
2858 else if (force_menu) {
2859 pad_factor.
text = 1.85;
2863 pad_factor.
text = 0.75f;
2870 if (heading_layout) {
2875 if (!
name.is_empty() && icon) {
2880 if (force_menu && !
name.is_empty()) {
2891 but->
poin = (
char *)but;
2937 if (mt ==
nullptr) {
2938 RNA_warning(
"not found %s", std::string(menuname).c_str());
2947 if (mt ==
nullptr) {
2948 RNA_warning(
"not found %s", std::string(menuname).c_str());
3003 TIP_(
"Animate property"));
3020 if (
ptr && propname) {
3037 const std::optional<StringRef> name_opt,
3051 const bool ok = (pt->
poll ==
nullptr) || pt->
poll(
C, pt);
3053 layout = &this->
row(
true);
3056 panel.runtime = &panel_runtime;
3058 panel.layout = layout;
3081 std::optional<blender::StringRef> name_opt,
3085 if (pt ==
nullptr) {
3086 RNA_warning(
"Panel type not found '%s'", std::string(panel_type).c_str());
3089 this->popover(
C, pt, name_opt, icon);
3093 bContext *
C,
int space_id,
int region_id,
const char *
context,
const char *category)
3096 if (st ==
nullptr) {
3101 if (art ==
nullptr) {
3102 RNA_warning(
"region type not found %d", region_id);
3111 if (pt->
poll ==
nullptr || pt->
poll(
C, pt)) {
3112 this->
popover(
C, pt, std::nullopt, ICON_NONE);
3127 std::optional<blender::StringRef> tooltip = std::nullopt,
3141 if (icon && !
name.is_empty()) {
3142 but =
uiDefIconTextBut(block, but_type, 0, icon,
name, 0, 0,
w,
UI_UNIT_Y,
nullptr, tooltip);
3145 but =
uiDefIconBut(block, but_type, 0, icon, 0, 0,
w,
UI_UNIT_Y,
nullptr, 0.0, 0.0, tooltip);
3148 but =
uiDefBut(block, but_type, 0,
name, 0, 0,
w,
UI_UNIT_Y,
nullptr, 0.0, 0.0, tooltip);
3205 &layout_row->
column(
true) :
3208 return split_wrapper;
3244 std::function<
void(
bContext &)> func,
3245 std::optional<blender::StringRef> tooltip)
3262 const int space = (is_menu) ?
int(7.0f *
UI_SCALE_FAC * factor) :
3304 const bool has_text = text && text[0];
3311 else if (has_text) {
3348 printf(
"Error: separator_spacer() not supported in popups.\n");
3353 printf(
"Error: separator_spacer() only supported in horizontal blocks.\n");
3359 block,
ButType::SeprSpacer, 0,
"", 0, 0, 0.3f *
UI_UNIT_X,
UI_UNIT_Y,
nullptr, 0.0, 0.0,
"");
3444 std::optional<StringRefNull>
name,
3450 std::string operator_name;
3453 name = operator_name.c_str();
3460 MenuItemLevel *lvl = MEM_new<MenuItemLevel>(
"MenuItemLevel");
3477 but->
opptr = MEM_new<PointerRNA>(
"uiButOpPtr");
3485 C,
ot->idname,
root_->opcontext,
nullptr,
false))
3522 const std::optional<StringRefNull>
name,
3529 MenuItemLevel *lvl = MEM_new<MenuItemLevel>(
"MenuItemLevel");
3587 if (this->
type() == uiItemType::LayoutRoot) {
3591 bool min_size_flag =
true;
3596 if (this->
items().is_empty()) {
3602 const bool is_item_last = (item == item_last);
3605 min_size_flag = min_size_flag && item->fixed_size();
3608 h_ = std::max(itemh,
h_);
3610 if (!is_item_last) {
3615 if (min_size_flag) {
3627 if (this->
items().is_empty()) {
3631 int last_free_item_idx = -1;
3632 int x, neww, newtotw, itemw, minw, itemh, offset;
3633 int freew, fixedx, freex,
flag = 0, lastw = 0;
3670 const bool is_item_last = (item == item_last);
3675 if (
w - lastw > 0) {
3677 itemw,
x, totw,
w - lastw, is_item_last, this->
alignment(), &extra_pixel);
3685 bool min_flag = item->fixed_size();
3687 if (item->type() != uiItemType::Button &&
3696 if ((neww < minw || min_flag) &&
w != 0) {
3699 if (item->type() != uiItemType::Button && item->fixed_size()) {
3725 const bool is_item_last = (item == item_last);
3731 if (item->type() != uiItemType::Button && item->fixed_size()) {
3735 minw, fixedx, fixedw,
min_ii(
w, fixedw), is_item_last, this->
alignment(), &extra_pixel);
3741 itemw, freex, freew,
w - fixedw, is_item_last, this->
alignment(), &extra_pixel);
3743 last_free_item_idx = item_idx;
3749 if (freew + fixedw > 0 && freew + fixedw <
w) {
3750 offset =
w - (fixedw + freew);
3754 if (freew + fixedw > 0 && freew + fixedw <
w) {
3755 offset = (
w - (fixedw + freew)) / 2;
3763 if (!is_item_last) {
3769 int extra_pixel_move =
w_ - (
x -
x_);
3776 for (
uiItem *item : items_after_last_free) {
3777 ui_item_move(item, extra_pixel_move, extra_pixel_move);
3792 if (next_item ==
nullptr) {
3795 if (item->
type() == uiItemType::LayoutPanelHeader &&
3796 next_item->
type() == uiItemType::LayoutPanelHeader)
3801 if (item->
type() == uiItemType::LayoutPanelBody &&
3802 !
ELEM(next_item->
type(), uiItemType::LayoutPanelHeader, uiItemType::LayoutPanelBody))
3810 if (item != litem->
items().first()) {
3819 if (this->
type() == uiItemType::LayoutRoot) {
3822 const bool is_box = this->
type() == uiItemType::LayoutBox;
3824 bool min_size_flag =
true;
3829 for (
auto *iter = this->
items().
begin(); iter != this->
items().end(); iter++) {
3833 min_size_flag = min_size_flag && item->
fixed_size();
3835 w_ = std::max(
w_, itemw);
3838 const uiItem *next_item = (item == this->
items().last()) ?
nullptr : *(iter + 1);
3843 if (min_size_flag) {
3850 const bool is_box = this->
type() == uiItemType::LayoutBox;
3851 const bool is_menu = this->
type() == uiItemType::LayoutRoot &&
3856 for (
auto *iter = this->
items().
begin(); iter != this->
items().end(); iter++) {
3864 const uiItem *next_item = (item == this->
items().last()) ?
nullptr : *(iter + 1);
3884 printf(
"Warning: Pie menus with more than %i items are currently unsupported\n",
3897 if ((item->
type() == uiItemType::Button) &&
3930 int minx =
x, miny =
y, maxx =
x, maxy =
y;
3932 this->
block()->pie_data.pie_dir_mask = 0;
3942 const float factor[2] = {
3943 (vec[0] > 0.01f) ? 0.0f : ((vec[0] < -0.01f) ? -1.0f : -0.5f),
3944 (vec[1] > 0.99f) ? 0.0f : ((vec[1] < -0.99f) ? -1.0f : -0.5f),
3949 bool use_dir =
true;
3951 if (item->type() == uiItemType::Button) {
3971 this->
block()->pie_data.pie_dir_mask |= 1 << int(dir);
3977 x + (vec[0] * pie_radius) + (factor[0] * itemw),
3978 y + (vec[1] * pie_radius) + (factor[1] * itemh),
3982 minx =
min_ii(minx,
x + (vec[0] * pie_radius) - (itemw / 2));
3983 maxx =
max_ii(maxx,
x + (vec[0] * pie_radius) + (itemw / 2));
3984 miny =
min_ii(miny,
y + (vec[1] * pie_radius) - (itemh / 2));
3985 maxy =
max_ii(maxy,
y + (vec[1] * pie_radius) + (itemh / 2));
4008 if (item->
type() == uiItemType::Button) {
4009 int itemh, itemw,
x,
y;
4016 item,
x - itemw / 2,
y +
UI_SCALE_FAC * (
U.pie_menu_threshold + 9.0f), itemw, itemh);
4041 panel->runtime->layout_panels.headers.append(
4051 panel->runtime->layout_panels.bodies.append({
4120 int itemw, itemh, maxw = 0;
4127 maxw = std::max(maxw, itemw);
4153 const int emh = toth / flow->
totcol;
4163 maxw =
max_ii(itemw, maxw);
4182 int col, emh, itemw, itemh;
4197 emh = toth / this->
totcol;
4220 const int remaining_width =
w_ - (
x -
x_);
4222 const int remaining_columns = this->
totcol -
col;
4223 w = (remaining_width - remaining_width_between_columns) / remaining_columns;
4268 float tot_w = 0.0f, tot_h = 0.0f;
4269 float global_avg_w = 0.0f, global_totweight_w = 0.0f;
4270 int global_max_h = 0;
4274 results->
tot_w ==
nullptr));
4277 results->
tot_h ==
nullptr));
4298 for (
const uiItem *item : items) {
4302 global_avg_w +=
float(item_w * item_w);
4303 global_totweight_w +=
float(item_w);
4304 global_max_h =
max_ii(global_max_h, item_h);
4312 avg_w[index_col] +=
float(item_w * item_w);
4313 totweight_w[index_col] +=
float(item_w);
4315 max_h[index_row] =
max_ii(max_h[index_row], item_h);
4325 global_avg_w /= global_totweight_w;
4328 avg_w[
i] /= totweight_w[
i];
4374 for (
int row = 0; row < parameters->
tot_rows; row++) {
4393 if (results->
tot_w) {
4396 if (results->
tot_h) {
4421 input.space_x = space_x;
4422 input.space_y = space_y;
4425 output.global_avg_w = &avg_w;
4426 output.global_max_h = &max_h;
4443 if (avg_w == 0.0f) {
4458 const int step = modulo ? modulo : 1;
4476 if (modulo && gflow->
tot_rows % modulo != 0) {
4511 input.space_x = space_x;
4512 input.space_y = space_y;
4553 input.space_x = space_x;
4554 input.space_y = space_y;
4571 const int w = widths[
col];
4572 const int h = heights[
row];
4595 int itemx, itemy, itemw, itemh;
4599 minx =
min_ii(minx, itemx);
4600 miny =
min_ii(miny, itemy);
4602 w_ = std::max(
w_, itemx + itemw);
4603 h_ = std::max(
h_, itemy + itemh);
4612 float scalex = 1.0f, scaley = 1.0f;
4613 int x,
y, newx, newy, itemx, itemy, itemh, itemw;
4624 minx =
min_ii(minx, itemx);
4625 miny =
min_ii(miny, itemy);
4627 totw =
max_ii(totw, itemx + itemw);
4628 toth =
max_ii(toth, itemy + itemh);
4634 if (
w_ && totw > 0) {
4637 if (
h_ && toth > 0) {
4642 y =
y_ - scaley * toth;
4648 if (scalex != 1.0f) {
4649 newx = (itemx - minx) * scalex;
4650 itemw = (itemx - minx + itemw) * scalex - newx;
4651 itemx = minx + newx;
4654 if (scaley != 1.0f) {
4655 newy = (itemy - miny) * scaley;
4656 itemh = (itemy - miny + itemh) * scaley - newy;
4657 itemy = miny + newy;
4678 float extra_pixel = 0.0f;
4679 const int tot = int(this->
items().
size());
4688 const float percentage = (this->percentage == 0.0f) ? 1.0f /
float(tot) : this->percentage;
4690 const int w = (
w_ - (tot - 1) *
space_);
4692 colw = std::max(colw, 0);
4696 const bool is_item_last = (item == item_last);
4703 if (!is_item_last) {
4707 colw = std::max(colw, 0);
4729 w_ = std::max(itemw,
w_);
4730 h_ = std::max(itemh,
h_);
4745 h_ = std::max(
h_, itemh);
4762 litem->
w_ = layout->
w_;
4779 uiLayout *litem = MEM_new<LayoutRow>(__func__,
nullptr);
4797 const bool is_open = is_real_open || search_filter_active;
4808 row->ui_units_y_set(1.2f);
4811 const int icon = is_open ? ICON_DOWNARROW_HLT : ICON_RIGHTARROW;
4813 uiDefIconTextBut(
block,
ButType::Label, 0, icon,
"", 0, 0,
width,
UI_UNIT_Y,
nullptr,
"");
4819 return panel_layout;
4826 panel_layout.
body = body_litem;
4828 return panel_layout;
4836 const std::optional<StringRef>
label)
4841 panel_header->
flag_ &= ~(uiItemInternalFlag::PropSep | uiItemInternalFlag::PropDecorate |
4842 uiItemInternalFlag::InsidePropSep);
4845 return panel_layout;
4856 return panel_layout.
body;
4868 return this->
panel_prop(
C, &state_ptr,
"is_open");
4873 const bool default_closed,
4879 return panel_layout.
body;
4884 if (layout.
items().is_empty()) {
4888 return item->
type() == uiItemType::LayoutPanelHeader;
4900 uiLayout *litem = MEM_new<LayoutColumn>(__func__,
nullptr);
4931 bool row_major,
int columns_len,
bool even_columns,
bool even_rows,
bool align)
4956 box->
roundbox =
uiDefBut(layout->
block(), type, 0,
"", 0, 0, 0, 0,
nullptr, 0.0, 0.0,
"");
4970 if (item->type() == uiItemType::LayoutRadial) {
4977 uiLayout *litem = MEM_new<LayoutRadial>(__func__);
4993 if (item->type() != uiItemType::Button) {
5025 uiLayout *litem = MEM_new<LayoutAbsolute>(__func__);
5043 uiLayout *litem = MEM_new<LayoutOverlap>(__func__);
5057 split->percentage = percentage;
5071 return bool(
flag_ & uiItemInternalFlag::PropSep);
5081 return bool(
flag_ & uiItemInternalFlag::PropDecorate);
5091 return this->
block()->panel;
5097 return this->
block()->emboss;
5114 block,
ButType::Sepr, 0,
"", 0, 0,
uiLayoutListItemPaddingWidth(), 0,
nullptr, 0.0, 0.0,
"");
5131 if ((block->
panel !=
nullptr) && (block->
panel->
type !=
nullptr)) {
5149 if (but->
optype !=
nullptr) {
5155 if (but->
rnaprop !=
nullptr) {
5159#ifdef PROPERTY_SEARCH_USE_TOOLTIPS
5175 if (items_array ==
nullptr) {
5180 for (
int i = 0;
i < items_len;
i++) {
5182 if (items_array[
i].
name ==
nullptr) {
5227 bool has_result =
false;
5243 if (search_filter ==
nullptr || search_filter[0] ==
'\0') {
5249 if (panel !=
nullptr) {
5259 const bool has_result = (panel_label_matches) ?
5263 if (panel !=
nullptr) {
5282 for (
auto riter = litem->
items().rbegin(); riter != litem->
items().rend(); riter++) {
5284 if (item->
type() != uiItemType::Button) {
5292 if (scale[0] != 0.0f) {
5297 if (scale[1] != 0.0f) {
5308 if (this->
type() != uiItemType::Button) {
5310 if (this->
items().is_empty()) {
5317 if (subitem->type() == uiItemType::Button) {
5340 for (
auto riter = litem->
items().rbegin(); riter != litem->
items().rend(); riter++) {
5342 if (item->
type() == uiItemType::Button) {
5348 else if (item->
type() == uiItemType::LayoutAbsolute) {
5351 else if (item->
type() == uiItemType::LayoutOverlap) {
5354 else if (item->
type() == uiItemType::LayoutBox) {
5362 if (litem->
align()) {
5371 for (
auto riter = litem->
items().rbegin(); riter != litem->
items().rend(); riter++) {
5373 if (item->
type() == uiItemType::Button) {
5386 if (this->
items().is_empty()) {
5390 if (this->
align()) {
5405 if (subitem->type() == uiItemType::Button) {
5424 return {layout->
x_, layout->
y_};
5430 if (item->type() == uiItemType::Button) {
5454 block,
ButType::Sepr, 0,
"", 0, 0, root->
padding, root->
padding,
nullptr, 0.0, 0.0,
"");
5459namespace blender::ui {
5472 root->
style = style;
5473 root->
block = block;
5476 const char *func = __func__;
5480 return MEM_new<LayoutColumn>(func, root);
5482 return MEM_new<LayoutRootPieMenu>(func, root);
5484 return MEM_new<LayoutRow>(func, uiItemType::LayoutRoot, root);
5486 return MEM_new<LayoutColumn>(func, uiItemType::LayoutRoot, root);
5526 return root_->block;
5531 return root_->opcontext;
5579 for (
uiItem *item : child_list) {
5580 if (item->type() == uiItemType::Button) {
5583 if (bitem->
but == but) {
5589 static_cast<uiLayout *
>(item), but);
5605 if (item->type() == uiItemType::Button) {
5607 return (bitem->
but == but);
5624 layout,
static_cast<const uiBut *
>(old_but_ptr));
5629 bitem->
but = new_but;
5640 return bool(
flag_ & uiItemInternalFlag::FixedSize);
5645 root_->opcontext = opcontext;
5654namespace blender::ui {
5672 int2 block_size = {0, 0};
5713 return std::nullopt;
5727 return std::nullopt;
5750 bool arg_used =
false;
5755 if (copy_arg !=
nullptr && arg_used) {
5756 arg = copy_arg(arg);
5759 if (item->type() == uiItemType::Button) {
5773 if (free_arg !=
nullptr && !arg_used) {
5785 bool arg_used =
false;
5790 if (copy_arg !=
nullptr && arg_used) {
5791 arg = copy_arg(arg);
5794 if (item->type() == uiItemType::Button) {
5807 if (free_arg !=
nullptr && !arg_used) {
5829 if (r_prop !=
nullptr) {
5836 if ((
ot !=
nullptr) && (r_prop !=
nullptr)) {
5872 printf(
"%s: opening menu \"%s\"\n", __func__, mt->
idname);
5886 context_store = *layout->
context();
5889 if (previous_context_store) {
5902 if (subitem->type() == uiItemType::Button) {
5968 if (child_pt->
poll ==
nullptr || child_pt->
poll(
C, child_pt)) {
5970 if (!layout->
items().is_empty() && item_last != layout->
items().last()) {
5972 item_last = layout->
items().last();
6038 "'rna':'%s.%s[%d]', ",
6049 for (
const uiItem *item : items) {
6053#define CASE_ITEM(type, name) \
6055 BLI_dynstr_append(ds, "'type': '"); \
6056 BLI_dynstr_append(ds, name); \
6057 BLI_dynstr_append(ds, "', "); \
6062 switch (item->type()) {
6063 CASE_ITEM(uiItemType::Button,
"BUTTON");
6064 CASE_ITEM(uiItemType::LayoutRow,
"LAYOUT_ROW");
6065 CASE_ITEM(uiItemType::LayoutPanelHeader,
"LAYOUT_PANEL_HEADER");
6066 CASE_ITEM(uiItemType::LayoutPanelBody,
"LAYOUT_PANEL_BODY");
6067 CASE_ITEM(uiItemType::LayoutColumn,
"LAYOUT_COLUMN");
6068 CASE_ITEM(uiItemType::LayoutColumnFlow,
"LAYOUT_COLUMN_FLOW");
6069 CASE_ITEM(uiItemType::LayoutRowFlow,
"LAYOUT_ROW_FLOW");
6070 CASE_ITEM(uiItemType::LayoutBox,
"LAYOUT_BOX");
6071 CASE_ITEM(uiItemType::LayoutAbsolute,
"LAYOUT_ABSOLUTE");
6072 CASE_ITEM(uiItemType::LayoutSplit,
"LAYOUT_SPLIT");
6073 CASE_ITEM(uiItemType::LayoutOverlap,
"LAYOUT_OVERLAP");
6074 CASE_ITEM(uiItemType::LayoutRoot,
"LAYOUT_ROOT");
6075 CASE_ITEM(uiItemType::LayoutGridFlow,
"LAYOUT_GRID_FLOW");
6076 CASE_ITEM(uiItemType::LayoutRadial,
"LAYOUT_RADIAL");
6081 switch (item->type()) {
6082 case uiItemType::Button:
6093 if (item != items.
last()) {
6120 const int dialog_width,
6122 const int icon_size)
6129 const float split_factor = (
float(icon_size) + icon_padding) /
6168 layout = &split_block->
column(
false);
bContextStore * CTX_store_add_all(blender::Vector< std::unique_ptr< bContextStore > > &contexts, const bContextStore *context)
std::optional< blender::StringRefNull > CTX_store_string_lookup(const bContextStore *store, blender::StringRef name)
ARegion * CTX_wm_region_popup(const bContext *C)
bContextStore * CTX_store_add(blender::Vector< std::unique_ptr< bContextStore > > &contexts, blender::StringRef name, const PointerRNA *ptr)
wmWindow * CTX_wm_window(const bContext *C)
std::optional< int64_t > CTX_store_int_lookup(const bContextStore *store, blender::StringRef name)
const PointerRNA * CTX_store_ptr_lookup(const bContextStore *store, blender::StringRef name, const StructRNA *type=nullptr)
Main * CTX_data_main(const bContext *C)
const bContextStore * CTX_store_get(const bContext *C)
void CTX_store_set(bContext *C, const bContextStore *store)
ARegion * CTX_wm_region(const bContext *C)
void IDP_CopyPropertyContent(IDProperty *dst, const IDProperty *src) ATTR_NONNULL()
Functions and classes for evaluating template expressions in filepaths.
std::optional< blender::bke::path_templates::VariableMap > BKE_build_template_variables_for_prop(const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
blender::Vector< blender::bke::path_templates::Error > BKE_path_validate_template(blender::StringRef path, const blender::bke::path_templates::VariableMap &template_variables)
bool BKE_path_contains_template_syntax(blender::StringRef path)
SpaceType * BKE_spacetype_from_id(int spaceid)
ARegionType * BKE_regiontype_from_id(const SpaceType *st, int regionid)
void BKE_panel_free(Panel *panel)
Panel * BKE_panel_new(PanelType *panel_type)
LayoutPanelState * BKE_panel_layout_panel_state_ensure(Panel *panel, blender::StringRef idname, bool default_closed)
A dynamically sized string ADT.
char * BLI_dynstr_get_cstring(const DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
DynStr * BLI_dynstr_new(void) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL()
void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format,...) ATTR_PRINTF_FORMAT(2
void BLI_dynstr_append(DynStr *__restrict ds, const char *cstr) ATTR_NONNULL()
void BLI_kdtree_nd_ free(KDTree *tree)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
bool BLI_path_is_rel(const char *path) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC
int char * BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
#define ENUM_OPERATORS(_type, _max)
#define POINTER_FROM_INT(i)
#define UNUSED_VARS_NDEBUG(...)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define POINTER_AS_INT(i)
#define CTX_IFACE_(context, msgid)
#define RGN_ALIGN_ENUM_FROM_MASK(align)
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
static void split(const char *text, const char *seps, char ***str, int *count)
Read Guarded memory(de)allocation.
#define RNA_STRUCT_BEGIN(sptr, prop)
#define RNA_warning(format,...)
eStringPropertySearchFlag
@ PROP_STRING_SEARCH_SUGGESTION
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
@ PROP_PATH_SUPPORTS_TEMPLATES
void UI_but_func_set(uiBut *but, std::function< void(bContext &)> func)
void * but_func_argN_copy(const void *argN)
void but_func_argN_free(void *argN)
void UI_but_disable(uiBut *but, const char *disabled_hint)
uiBut * uiDefIconTextBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, std::optional< blender::StringRef > tip)
void UI_but_placeholder_set(uiBut *but, blender::StringRef placeholder_text)
@ UI_BLOCK_NO_ACCELERATOR_KEYS
void UI_but_func_tooltip_custom_set(uiBut *but, uiButToolTipCustomFunc func, void *arg, uiFreeArgFunc free_arg)
void UI_popup_menu_but_set(uiPopupMenu *pup, ARegion *butregion, uiBut *but)
bool UI_block_can_add_separator(const uiBlock *block)
void UI_but_func_rename_full_set(uiBut *but, std::function< void(std::string &new_name)> rename_full_func)
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiBut * uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_but_func_search_set_results_are_suggestions(uiBut *but, bool value)
@ UI_BUT_ACTIVATE_ON_INIT
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
uiBut * uiDefIconBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_popup_dummy_panel_set(ARegion *region, uiBlock *block)
void UI_but_func_search_set(uiBut *but, uiButSearchCreateFn search_create_fn, uiButSearchUpdateFn search_update_fn, void *arg, bool free_arg, uiFreeArgFunc search_arg_free_fn, uiButHandleFunc search_exec_fn, void *active)
bool UI_but_is_userdef(const uiBut *but)
MenuType * UI_but_menutype_get(const uiBut *but)
const uiStyle * UI_style_get_dpi()
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
void UI_but_drawflag_enable(uiBut *but, int flag)
@ UI_BUT2_FORCE_SEMI_MODAL_ACTIVE
void UI_but_flag2_enable(uiBut *but, int flag)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
uiBut * uiDefIconButO(uiBlock *block, ButType type, blender::StringRefNull opname, blender::wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void *(*)(const void *argN) uiButArgNCopy
void(*)(void *argN) uiButArgNFree
uiBut * uiDefButR_prop(uiBlock *block, ButType type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefIconTextButR_prop(uiBlock *block, ButType type, int retval, int icon, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, std::optional< blender::StringRef > name, int icon, int x, int y, int width, int height)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
void UI_but_type_set_menu_from_pulldown(uiBut *but)
uiBut * uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
PointerRNA * UI_but_operator_ptr_ensure(uiBut *but)
uiBut * uiDefIconButR_prop(uiBlock *block, ButType type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, std::optional< blender::StringRef > tip)
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
uiBut * uiDefIconButO_ptr(uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_but_drawflag_disable(uiBut *but, int flag)
PanelType * UI_but_paneltype_get(const uiBut *but)
void UI_block_align_begin(uiBlock *block)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
uiBut * uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
int int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs, blender::StringRef str, float aspect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
uiButStore * UI_butstore_create(uiBlock *block)
uiBut * uiDefIconTextButO_ptr(uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_block_direction_set(uiBlock *block, char direction)
void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN)
void UI_butstore_free(uiBlock *block, uiButStore *bs_handle)
uiBut * uiDefButO_ptr(uiBlock *block, ButType type, wmOperatorType *ot, blender::wm::OpCallContext opcontext, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_block_flag_enable(uiBlock *block, int flag)
void UI_but_drag_set_id(uiBut *but, ID *id)
@ UI_BUT_HAS_QUICK_TOOLTIP
void UI_but_unit_type_set(uiBut *but, int unit_type)
uiBut * uiDefBut(uiBlock *block, uiButTypeWithPointerType but_and_ptr_type, int retval, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_flag_enable(uiBut *but, int flag)
std::optional< blender::StringRefNull > UI_but_asset_shelf_type_idname_get(const uiBut *but)
wmOperatorType * UI_but_operatortype_get_from_enum_menu(uiBut *but, PropertyRNA **r_prop)
void UI_block_align_end(uiBlock *block)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
@ UI_ITEM_R_TEXT_BUT_FORCE_SEMI_MODAL_ACTIVE
@ UI_ITEM_R_FORCE_BLANK_DECORATE
@ UI_ITEM_R_CHECKBOX_INVERT
bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter)
uiLayout * uiItemsAlertBox(uiBlock *block, const uiStyle *style, const int dialog_width, const eAlertIcon icon, const int icon_size)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, blender::StringRef text, int icon)
void uiLayoutSetTooltipCustomFunc(uiLayout *layout, uiButToolTipCustomFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout)
int uiLayoutListItemPaddingWidth()
void UI_paneltype_draw(bContext *C, PanelType *pt, uiLayout *layout)
void uiLayoutSetTooltipFunc(uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
void UI_menutype_draw(bContext *C, MenuType *mt, uiLayout *layout)
const char * UI_layout_introspect(uiLayout *layout)
void uiLayoutListItemAddPadding(uiLayout *layout)
void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, blender::StringRef name, int icon)
uiBut * uiItemL_ex(uiLayout *layout, blender::StringRef name, int icon, bool highlight, bool redalert)
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
bool uiLayoutEndsWithPanelHeader(const uiLayout &layout)
void(*)(void *arg) uiFreeArgFunc
void(*)(bContext *C, uiLayout *layout, void *arg1) uiMenuCreateFunc
std::string(*)(bContext *C, void *argN, blender::StringRef tip) uiButToolTipFunc
void(*)(bContext &C, uiTooltipData &data, uiBut *but, void *argN) uiButToolTipCustomFunc
void(*)(bContext *C, void *arg, int event) uiMenuHandleFunc
void *(*)(const void *arg) uiCopyArgFunc
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
btMatrix3x3 absolute() const
Return the matrix with all values non negative.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
void append(const T &value)
void extend(Span< T > array)
void fill(const T &value) const
constexpr const T & last(const int64_t n=0) const
constexpr bool is_empty() const
constexpr bool is_empty() const
constexpr const char * c_str() const
int64_t remove_if(Predicate &&predicate)
void append(const T &value)
void reserve(const int64_t min_capacity)
bool ED_id_rename(Main &bmain, ID &id, blender::StringRefNull name)
bool all(VecOp< bool, D >) RET
VecBase< float, D > step(VecOp< float, D >, VecOp< float, D >) RET
void ui_but_update(uiBut *but)
void ui_def_but_icon_clear(uiBut *but)
void ui_block_add_dynamic_listener(uiBlock *block, void(*listener_func)(const wmRegionListenerParams *params))
uiBut * ui_but_change_type(uiBut *but, ButType new_type)
void ui_but_rna_menu_convert_to_panel_type(uiBut *but, const char *panel_type)
void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip)
void ui_but_rna_menu_convert_to_menu_type(uiBut *but, const char *menu_type)
const char ui_radial_dir_order[8]
int ui_but_align_opposite_to_area_align_get(const ARegion *region)
void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void *)
bool ui_block_is_pie_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt)
bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but)
bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
ARegion * ui_searchbox_create_generic(bContext *C, ARegion *butregion, uiButSearch *search_but)
void ui_item_paneltype_func(bContext *C, uiLayout *layout, void *arg_pt)
void ui_panel_tag_search_filter_match(Panel *panel)
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_layout_list_set_labels_active(uiLayout *layout)
std::optional< blender::StringRefNull > UI_asset_shelf_idname_from_button_context(const uiBut *but)
uiBut * ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, PropertyRNA *item_searchprop, bool results_are_suggestions)
void ui_but_pie_dir(RadialDirection dir, float vec[2])
void ui_pie_menu_level_create(uiBlock *block, wmOperatorType *ot, blender::StringRefNull propname, IDProperty *properties, const EnumPropertyItem *items, int totitem, blender::wm::OpCallContext context, eUI_Item_Flag flag)
@ UI_SEARCH_FILTER_NO_MATCH
void ui_rna_collection_search_update_fn(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
void ui_layout_remove_but(uiLayout *layout, const uiBut *but)
void ui_layout_add_but(uiLayout *layout, uiBut *but)
static uiBut * ui_item_menu(uiLayout *layout, const StringRef name, int icon, uiMenuCreateFunc func, void *arg, void *argN, const std::optional< StringRef > tip, bool force_menu, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
static int ui_litem_min_width(int itemw)
#define CASE_ITEM(type, name)
static void ui_item_flag(uiLayout *litem, int flag)
static void ui_item_array(uiLayout *layout, uiBlock *block, const StringRef name, int icon, PointerRNA *ptr, PropertyRNA *prop, const int len, int x, const int y, int w, const int, const bool expand, const bool slider, const int toggle, const bool icon_only, const bool compact, const bool show_text)
static void ui_layout_introspect_items(DynStr *ds, blender::Span< const uiItem * > items)
static uiLayoutItemBx * ui_layout_box(uiLayout *layout, ButType type)
blender::ui::ItemInternalFlag uiItemInternalFlag
static bool button_matches_search_filter(uiBut *but, const char *search_filter)
static bool button_group_has_search_match(const uiButtonGroup &group, const char *search_filter)
static void ui_item_disabled(uiLayout *layout, const char *name)
static int spaces_after_column_item(const uiLayout *litem, const uiItem *item, const uiItem *next_item, const bool is_box)
static uiBut * uiItemFullO_ptr_ex(uiLayout *layout, wmOperatorType *ot, std::optional< StringRef > name, int icon, const blender::wm::OpCallContext context, const eUI_Item_Flag flag, PointerRNA *r_opptr)
static int menu_item_enum_opname_menu_active(bContext *C, uiBut *but, MenuItemLevel *lvl)
static void ui_item_offset(const uiItem *item, int *r_x, int *r_y)
static bool ui_item_rna_is_expand(PropertyRNA *prop, int index, const eUI_Item_Flag item_flag)
#define UI_ITEM_PROP_SEP_DIVIDE
static bool ui_item_is_radial_displayable(uiItem *item)
static int ui_text_icon_width_ex(uiLayout *layout, const StringRef name, int icon, const uiTextIconPadFactor &pad_factor, const uiFontStyle *fstyle)
static void ui_item_enum_expand_elem_exec(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRef > uiname, const int h, const ButType but_type, const bool icon_only, const EnumPropertyItem *item, const bool is_first)
static bool block_search_filter_tag_buttons(uiBlock *block, const char *search_filter)
static void ui_layout_heading_label_add(uiLayout *layout, uiLayout *heading_layout, bool right_align, bool respect_prop_split)
static RadialDirection ui_get_radialbut_vec(float vec[2], short itemnum)
static uiBut * ui_item_with_label(uiLayout *layout, uiBlock *block, const StringRef name, const int icon, PointerRNA *ptr, PropertyRNA *prop, const int index, const int x, const int y, const int w_hint, const int h, const int flag)
BLI_INLINE bool ui_layout_is_radial(const uiLayout *layout)
static void ui_layout_add_padding_button(uiLayoutRoot *root)
static void ui_layout_introspect_button(DynStr *ds, const uiButtonItem *bitem)
static int ui_layout_vary_direction(uiLayout *layout)
static void menu_item_enum_rna_menu(bContext *, uiLayout *layout, void *arg)
constexpr uiTextIconPadFactor ui_text_pad_default
static bool block_search_panel_label_matches(const uiBlock *block, const char *search_string)
static void ui_litem_grid_flow_compute(blender::Span< uiItem * > items, const UILayoutGridFlowInput *parameters, UILayoutGridFlowOutput *results)
void UI_menutype_draw(bContext *C, MenuType *mt, uiLayout *layout)
static void ui_rna_collection_search_arg_free_fn(void *ptr)
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRef > uiname, const int h, const bool icon_only)
void UI_context_active_but_prop_get_filebrowser(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, bool *r_is_undo, bool *r_is_userdef)
static bool ui_layout_has_panel_label(const uiLayout *layout, const PanelType *pt)
static void ui_keymap_but_cb(bContext *, void *but_v, void *)
static void ui_item_rna_size(uiLayout *layout, StringRef name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, bool icon_only, bool compact, int *r_w, int *r_h)
static void ui_item_enum_expand_exec(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const std::optional< StringRef > uiname, const int h, const ButType but_type, const bool icon_only)
static uiLayout * ui_layout_heading_find(uiLayout *cur_layout)
#define UI_OPERATOR_ERROR_RET(_ot, _opname)
constexpr uiTextIconPadFactor ui_text_pad_compact
static void menu_item_enum_opname_menu(bContext *C, uiLayout *layout, void *arg)
static void ui_item_scale(uiLayout *litem, const float scale[2])
static void search_id_collection(StructRNA *ptype, PointerRNA *r_ptr, PropertyRNA **r_prop)
static void ui_but_tip_from_enum_item(uiBut *but, const EnumPropertyItem *item)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, StringRef text, int icon)
static StringRef ui_item_name_add_colon(StringRef name, char namestr[UI_MAX_NAME_STR])
static void ui_item_enum_expand_handle(bContext *C, void *arg1, void *arg2)
static void ui_item_menu_hold(bContext *C, ARegion *butregion, uiBut *but)
static void ui_item_enum_expand_tabs(uiLayout *layout, bContext *C, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, const std::optional< StringRef > uiname, const int h, const bool icon_only)
static bool ui_layout_variable_size(uiLayout *layout)
static void ui_layout_free(uiLayout *layout)
static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
static int ui_text_icon_width(uiLayout *layout, const StringRef name, const int icon, const bool compact)
blender::ui::ItemType uiItemType
static void ui_paneltype_draw_impl(bContext *C, PanelType *pt, uiLayout *layout, bool show_header)
static void ui_item_size(const uiItem *item, int *r_w, int *r_h)
static int ui_item_fit(const int item, const int pos, const int all, const int available, const bool is_last, const blender::ui::LayoutAlign alignment, float *extra_pixel)
static void ui_item_align(uiLayout *litem, short nr)
static blender::int2 ui_layout_end(uiBlock *block, uiLayout *layout)
static void ui_item_position(uiItem *item, const int x, const int y, const int w, const int h)
static uiBut * uiItem_simple(uiLayout *layout, const StringRef name, int icon, std::optional< blender::StringRef > tooltip=std::nullopt, const ButType but_type=ButType::Label)
static uiLayout * ui_item_local_sublayout(uiLayout *test, uiLayout *layout, bool align)
constexpr uiTextIconPadFactor ui_text_pad_none
static void ui_item_move(uiItem *item, const int delta_xmin, const int delta_xmax)
static bool ui_item_is_radial_drawable(uiButtonItem *bitem)
void * MEM_calloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
static void progress_bar(int, const char *)
std::unique_ptr< IDProperty, IDPropertyDeleter > create_group(StringRef prop_name, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_GROUP.
int2 block_layout_resolve(uiBlock *block)
void block_layout_free(uiBlock *block)
uiLayout & block_layout(uiBlock *block, LayoutDirection direction, LayoutType type, int x, int y, int size, int em, int padding, const uiStyle *style)
void block_layout_set_current(uiBlock *block, uiLayout *layout)
bool block_layout_needs_resolving(const uiBlock *block)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
bool RNA_property_array_check(PropertyRNA *prop)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
bool RNA_property_is_unlink(PropertyRNA *prop)
int RNA_enum_from_name(const EnumPropertyItem *item, const char *name)
bool RNA_struct_is_ID(const StructRNA *type)
bool RNA_enum_value_from_id(const EnumPropertyItem *item, const char *identifier, int *r_value)
eStringPropertySearchFlag RNA_property_string_search_flag(PropertyRNA *prop)
int RNA_property_ui_icon(const PropertyRNA *prop)
StructRNA * RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
const char * RNA_property_description(PropertyRNA *prop)
bool RNA_property_animateable(const PointerRNA *ptr, PropertyRNA *prop_orig)
void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, bool *values)
PropertyType RNA_property_type(PropertyRNA *prop)
const PointerRNA PointerRNA_NULL
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
char RNA_property_array_item_char(PropertyRNA *prop, int index)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
const char * RNA_struct_identifier(const StructRNA *type)
void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
const char * RNA_property_translation_context(const PropertyRNA *prop)
const char * RNA_property_ui_name(const PropertyRNA *prop, const PointerRNA *ptr)
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[])
int RNA_property_flag(PropertyRNA *prop)
int RNA_struct_ui_icon(const StructRNA *type)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_enum_items_gettexted_all(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
bool RNA_property_editable(const PointerRNA *ptr, PropertyRNA *prop)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_name_property(const StructRNA *type)
std::string RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
PointerRNA RNA_main_pointer_create(Main *main)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const EnumPropertyItem **r_item, int *r_totitem, bool *r_free)
bool RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
const char * RNA_property_identifier(const PropertyRNA *prop)
void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const bool *values)
ARegionRuntimeHandle * runtime
static bool use_property_decorate_no_pad(const uiItem *item)
void resolve_impl() override
void estimate_impl() override
LayoutColumn(uiItemType type, uiLayoutRoot *root)
void estimate_impl() override
LayoutColumn(uiLayoutRoot *root)
void resolve_impl() override
static uiLayout * ui_item_prop_split_layout_hack(uiLayout *layout_parent, uiLayout *layout_split)
void resolve_impl() override
void estimate_impl() override
void estimate_impl() override
void resolve_impl() override
LayoutRow(uiItemType type, uiLayoutRoot *root)
void resolve_impl() override
void estimate_impl() override
LayoutRow(uiLayoutRoot *root)
void(* draw)(const bContext *C, Panel *panel)
bool(* poll)(const bContext *C, PanelType *pt)
void(* listener)(const wmRegionListenerParams *params)
char context[BKE_ST_MAXNAME]
char translation_context[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
char parent_id[BKE_ST_MAXNAME]
void(* draw_header)(const bContext *C, Panel *panel)
PointerRNA * custom_data_ptr
struct Panel_Runtime * runtime
blender::Vector< bContextStoreEntry > entries
static void box_item_set(uiItem *item, bool box_item)
static bool box_item(const uiItem *item)
static void inside_property_split_set(uiItem *item, bool inside_prop_sep)
static void auto_fixed_size_set(uiItem *item, bool auto_fixed_size)
static bool auto_fixed_size(const uiItem *item)
static bool use_property_decorate_no_pad(const uiItem *item)
static void layout_estimate(uiLayout *layout)
static uiLayout * ui_item_prop_split_layout_hack(uiLayout *layout_parent, uiLayout *layout_split)
static void layout_add_but(uiLayout *layout, uiBut *but)
static uiButtonItem * ui_layout_find_button_item(const uiLayout *layout, const uiBut *but)
static void layout_remove_but(uiLayout *layout, const uiBut *but)
static void layout_resolve(uiLayout *layout)
static void init_from_parent(uiLayout *item, uiLayout *layout, int align)
blender::Vector< std::unique_ptr< uiBut > > buttons
uiPopupBlockHandle * handle
blender::ui::EmbossType emboss
uiBlockAlertLevel alert_level
blender::Vector< uiButtonGroup > button_groups
PointerRNA decorated_rnapoin
PropertyRNA * decorated_rnaprop
wmEventModifierFlag modifier_key
PropertyRNA * rnasearchprop
blender::ui::EmbossType emboss
uiMenuCreateFunc menu_create_func
const bContextStore * context
uiButArgNFree func_argN_free_fn
uiButArgNCopy func_argN_copy_fn
uiItem(blender::ui::ItemType type)
blender::ui::ItemType type() const
void fixed_size_set(bool fixed_size)
blender::ui::ItemType type_
blender::ui::ItemInternalFlag flag_
void estimate_impl() override
void resolve_impl() override
void estimate_impl() override
void resolve_impl() override
void resolve_impl() override
void estimate_impl() override
void resolve_impl() override
void resolve_impl() override
void estimate_impl() override
blender::wm::OpCallContext opcontext
uiMenuHandleFunc handlefunc
blender::ui::LayoutType type
blender::ui::LayoutDirection local_direction() const
PointerRNA op_menu_enum(const bContext *C, wmOperatorType *ot, blender::StringRefNull propname, std::optional< blender::StringRefNull > name, int icon)
void use_property_decorate_set(bool is_sep)
virtual void estimate_impl()
uiLayout * parent() const
void prop_enum(PointerRNA *ptr, PropertyRNA *prop, int value, std::optional< blender::StringRefNull > name, int icon)
void alignment_set(blender::ui::LayoutAlign alignment)
void decorator(PointerRNA *ptr, PropertyRNA *prop, int index)
PanelLayout panel(const bContext *C, blender::StringRef idname, bool default_closed)
void progress_indicator(const char *text, float factor, blender::ui::ButProgressType progress_type)
void menu_fn_argN_free(blender::StringRefNull name, int icon, uiMenuCreateFunc func, void *argN)
void props_enum(PointerRNA *ptr, blender::StringRefNull propname)
void popover(const bContext *C, PanelType *pt, std::optional< blender::StringRef > name_opt, int icon)
uiLayout * child_items_layout_
uiBlock * absolute_block()
uiLayout & column_flow(int number, bool align)
bool use_property_decorate() const
blender::wm::OpCallContext operator_context() const
PanelLayout panel_prop(const bContext *C, PointerRNA *open_prop_owner, blender::StringRefNull open_prop_name)
const bContextStore * context() const
void op_enum(blender::StringRefNull opname, blender::StringRefNull propname, IDProperty *properties, blender::wm::OpCallContext context, eUI_Item_Flag flag, const int active=-1)
blender::ui::LayoutAlign alignment() const
PanelLayout panel_prop_with_bool_header(const bContext *C, PointerRNA *open_prop_owner, blender::StringRefNull open_prop_name, PointerRNA *bool_prop_owner, blender::StringRefNull bool_prop_name, std::optional< blender::StringRef > label)
blender::StringRef heading() const
blender::Vector< uiItem * > items_
uiLayoutRoot * root() const
blender::ui::EmbossType emboss_or_undefined() const
blender::ui::EmbossType emboss_
void operator_context_set(blender::wm::OpCallContext opcontext)
void popover_group(bContext *C, int space_id, int region_id, const char *context, const char *category)
bool variable_size() const
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
bool active_default() const
void prop_search(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, PropertyRNA *item_searchpropname, std::optional< blender::StringRefNull > name, int icon, bool results_are_suggestions)
void active_set(bool active)
std::optional< int64_t > context_int_get(const blender::StringRef name) const
uiLayout & grid_flow(bool row_major, int columns_len, bool even_columns, bool even_rows, bool align)
blender::ui::EmbossType emboss() const
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
void enabled_set(bool enabled)
uiLayout(blender::ui::ItemType type, uiLayoutRoot *root)
void menu_fn(blender::StringRefNull name, int icon, uiMenuCreateFunc func, void *arg)
void context_ptr_set(blender::StringRef name, const PointerRNA *ptr)
uiBut * button(blender::StringRef name, int icon, std::function< void(bContext &)> func, std::optional< blender::StringRef > tooltip=std::nullopt)
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)
void context_copy(const bContextStore *context)
void prop_menu_enum(PointerRNA *ptr, PropertyRNA *prop, std::optional< blender::StringRefNull > name, int icon)
void op_enum_items(wmOperatorType *ot, const PointerRNA &ptr, PropertyRNA *prop, IDProperty *properties, blender::wm::OpCallContext context, eUI_Item_Flag flag, const EnumPropertyItem *item_array, int totitem, int active=-1)
uiLayout & absolute(bool align)
uiLayout & list_box(uiList *ui_list, PointerRNA *actptr, PropertyRNA *actprop)
PointerRNA op_menu_hold(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag, const char *menu_id)
blender::Span< uiItem * > items() const
void prop_with_menu(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRefNull > name, int icon, const char *menu_type)
bool activate_init() const
void context_set_from_but(const uiBut *but)
bool use_property_split() const
void emboss_set(blender::ui::EmbossType emboss)
Panel * root_panel() const
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
void prop_with_popover(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRefNull > name, int icon, const char *panel_type)
void menu(MenuType *mt, std::optional< blender::StringRef > name, int icon)
void context_int_set(blender::StringRef name, int64_t value)
std::optional< blender::StringRefNull > context_string_get(const blender::StringRef name) const
void use_property_split_set(bool value)
void menu_contents(blender::StringRef menuname)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
const PointerRNA * context_ptr_get(const blender::StringRef name, const StructRNA *type) const
virtual void resolve_impl()
void prop_tabs_enum(bContext *C, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, bool icon_only)
void context_string_set(blender::StringRef name, blender::StringRef value)
uiLayout * decorate_column
PropertyRNA * item_search_prop
PropertyRNA * target_prop
PropertyRNA * search_prop
wmEventModifierFlag modifier
std::string(* get_description)(bContext *C, wmOperatorType *ot, PointerRNA *ptr)
struct wmEvent * eventstate
std::optional< std::string > WM_key_event_operator_string(const bContext *C, const char *opname, blender::wm::OpCallContext opcontext, IDProperty *properties, const bool is_strict)
std::optional< std::string > WM_keymap_item_to_string(const wmKeyMapItem *kmi, const bool compact)
std::string WM_operatortype_name(wmOperatorType *ot, PointerRNA *properties)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring)
std::string WM_operator_pystring_ex(bContext *C, wmOperator *op, const bool all_args, const bool macro_args, wmOperatorType *ot, PointerRNA *opptr)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_sanitize(PointerRNA *ptr, const bool no_context)
PanelType * WM_paneltype_find(const StringRef idname, bool quiet)