Blender V4.5
UI_interface_c.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include <functional>
12#include <optional>
13#include <string>
14
15#include "BLI_compiler_attrs.h"
16#include "BLI_string_ref.hh"
18#include "BLI_sys_types.h" /* size_t */
19#include "BLI_utildefines.h"
20
21#include "DNA_userdef_types.h"
22
23#include "UI_interface_icons.hh"
25#include "UI_interface_types.hh"
26
27#include "WM_types.hh"
28
29#include "MEM_guardedalloc.h"
30
31/* Struct Declarations */
32
33struct ARegion;
34struct AutoComplete;
35struct EnumPropertyItem;
36struct FileSelectParams;
37struct ID;
38struct IDProperty;
39struct ImBuf;
40struct Image;
41struct ImageUser;
42struct ListBase;
43struct MTex;
44struct Panel;
45struct PanelType;
46struct PanelCategoryDyn;
48struct PointerRNA;
49struct PropertyRNA;
50struct ReportList;
51struct ResultBLF;
52struct bContext;
53struct bContextStore;
54struct bNode;
55struct bNodeSocket;
56struct bNodeTree;
57struct bScreen;
58struct MenuType;
59struct rctf;
60struct rcti;
61struct uiButSearch;
62struct uiFontStyle;
63struct uiList;
64struct uiStyle;
65struct uiWidgetColors;
66struct wmDrag;
67struct wmDropBox;
68struct wmEvent;
69struct wmGizmo;
70struct wmKeyConfig;
71struct wmKeyMap;
72struct wmKeyMapItem;
73struct wmMsgBus;
74struct wmOperator;
75struct wmOperatorType;
77struct wmWindow;
78namespace blender::ed::asset {
80}
81namespace blender::ui {
82class AbstractView;
84} // namespace blender::ui
85
86struct uiBlock;
87struct uiBut;
88struct uiButExtraOpIcon;
89struct uiLayout;
91struct uiTooltipData;
92
93/* Defines */
94
100#define UI_SEP_CHAR '|'
101#define UI_SEP_CHAR_S "|"
102
106#define UI_VALUE_INDETERMINATE_CHAR BLI_STR_UTF8_EM_DASH
107
112#define UI_MENU_ARROW_SEP BLI_STR_UTF8_BLACK_RIGHT_POINTING_SMALL_TRIANGLE
113
120#define UI_REGION_OVERLAP_MARGIN (U.widget_unit / 3)
121
123#define UI_SCREEN_MARGIN 10
124
125namespace blender::ui {
127enum class EmbossType : uint8_t {
131 None = 1,
143};
144
145} // namespace blender::ui
146
148enum {
149 UI_DIR_UP = 1 << 0,
150 UI_DIR_DOWN = 1 << 1,
151 UI_DIR_LEFT = 1 << 2,
152 UI_DIR_RIGHT = 1 << 3,
155
157};
158
160enum {
175
176 /* #uiBlock::flags bits 14-17 are identical to #uiBut::drawflag bits. */
177
194};
195
197enum {
201 UI_RETURN_OK = 1 << 1,
210};
211
213enum {
214 /* WARNING: the first 8 flags are internal (see #UI_SELECT definition). */
215
218
224
227 UI_BUT_DRIVEN = 1 << 16,
232 UI_BUT_UNDO = 1 << 20,
233 /* UNUSED = 1 << 21, */
234 UI_BUT_NO_UTF8 = 1 << 22,
235
240
247
261
263 UI_BUT_OVERRIDDEN = 1u << 31u,
264};
265
266enum {
279};
280
282enum {
287
288 /* --- Internal flags. --- */
290};
291
293#define UI_DEFAULT_TEXT_POINTS 11.0f
294
296#define UI_DEFAULT_TITLE_POINTS 11.0f
297
299#define UI_DEFAULT_TOOLTIP_POINTS 11.0f
300
301#define UI_PANEL_WIDTH 340
302#define UI_COMPACT_PANEL_WIDTH 160
303#define UI_SIDEBAR_PANEL_WIDTH 280
304#define UI_NAVIGATION_REGION_WIDTH UI_COMPACT_PANEL_WIDTH
305#define UI_NARROW_NAVIGATION_REGION_WIDTH 100
306
308#define UI_TOOLBAR_COLUMN (1.25f * ICON_DEFAULT_HEIGHT_TOOLBAR)
310#define UI_TOOLBAR_MARGIN (0.5f * ICON_DEFAULT_HEIGHT_TOOLBAR)
312#define UI_TOOLBAR_WIDTH UI_TOOLBAR_MARGIN + UI_TOOLBAR_COLUMN
313
314#define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 1.0f)
315
316/* Both these margins should be ignored if the panel doesn't show a background (check
317 * #UI_panel_should_show_background()). */
318#define UI_PANEL_MARGIN_X (U.widget_unit * 0.4f)
319#define UI_PANEL_MARGIN_Y (U.widget_unit * 0.1f)
320
327enum {
342
343 /* Button align flag, for drawing groups together.
344 * Used in 'uiBlock.flag', take care! */
350 /* end bits shared with 'uiBlock.flag' */
351
361
364
369
372
375
378
381
384};
385
395
400 // UI_BUT_POIN_FUNCTION = 192, /* UNUSED */
401 UI_BUT_POIN_BIT = 256, /* OR'd with a bit index. */
402};
403
405#define UI_BUT_POIN_TYPES (UI_BUT_POIN_FLOAT | UI_BUT_POIN_SHORT | UI_BUT_POIN_CHAR)
406
412 UI_BTYPE_BUT = 1 << 9,
413 UI_BTYPE_ROW = 2 << 9,
419 UI_BTYPE_NUM = 6 << 9,
431 UI_BTYPE_COLOR = 15 << 9,
432 UI_BTYPE_TAB = 16 << 9,
435 UI_BTYPE_BLOCK = 19 << 9,
436 UI_BTYPE_LABEL = 20 << 9,
445 UI_BTYPE_CURVE = 32 << 9,
452
455 UI_BTYPE_EXTRA = 42 << 9,
461 UI_BTYPE_IMAGE = 47 << 9,
467 UI_BTYPE_SEPR = 54 << 9,
472 UI_BTYPE_GRIP = 57 << 9,
476};
477
478#define BUTTYPE (63 << 9)
479
493
494/* Drawing
495 *
496 * Functions to draw various shapes, taking theme settings into account.
497 * Used for code that draws its own UI style elements. */
498
499void UI_draw_roundbox_corner_set(int type);
500void UI_draw_roundbox_aa(const rctf *rect, bool filled, float rad, const float color[4]);
501void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4]);
503 const rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha);
505 const rctf *rect, bool filled, float rad, const float col[3], float alpha);
506void UI_draw_roundbox_4fv_ex(const rctf *rect,
507 const float inner1[4],
508 const float inner2[4],
509 float shade_dir,
510 const float outline[4],
511 float outline_width,
512 float rad);
513
514#if 0 /* unused */
515int UI_draw_roundbox_corner_get();
516#endif
517
518void ui_draw_dropshadow(const rctf *rct, float radius, float width, float aspect, float alpha);
519
520void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4]);
521
531 const rctf *rect,
532 const float title_aspect[2],
533 const float action_aspect[2]);
534
536enum {
539};
543void UI_draw_widget_scroll(uiWidgetColors *wcol, const rcti *rect, const rcti *slider, int state);
544
558float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
559 char *str,
560 float okwidth,
561 float minwidth,
562 size_t max_len,
563 char rpart_sep,
564 bool clip_right_if_tight = true);
565
567 const uiFontStyle *fstyle,
568 const char *str,
569 char *clipped_str_buf,
570 const size_t max_len_clipped_str_buf,
571 const float max_line_width,
572 const int max_lines);
573
589
590struct uiSearchItems;
591
592using uiButHandleFunc = void (*)(bContext *C, void *arg1, void *arg2);
593using uiButHandleRenameFunc = void (*)(bContext *C, void *arg, char *origstr);
594using uiButHandleNFunc = void (*)(bContext *C, void *argN, void *arg2);
595using uiButHandleHoldFunc = void (*)(bContext *C, ARegion *butregion, uiBut *but);
596using uiButCompleteFunc = int (*)(bContext *C, char *str, void *arg);
597
602using uiButArgNFree = void (*)(void *argN);
603using uiButArgNCopy = void *(*)(const void *argN);
604
609using uiButIdentityCompareFunc = bool (*)(const uiBut *a, const uiBut *b);
610
611/* Search types. */
612using uiButSearchCreateFn = ARegion *(*)(bContext *C, ARegion *butregion, uiButSearch *search_but);
619 void (*)(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first);
621 void *arg,
622 void *active,
623 const wmEvent *event);
625 ARegion *(*)(bContext *C, ARegion *region, const rcti *item_rect, void *arg, void *active);
626using uiButSearchListenFn = void (*)(const wmRegionListenerParams *params, void *arg);
627
628using uiButToolTipCustomFunc = void (*)(bContext &C, uiTooltipData &data, void *argN);
629
630using uiBlockHandleFunc = void (*)(bContext *C, void *arg, int event);
631
632/* -------------------------------------------------------------------- */
641
655
659 void *arg1);
662 void *arg1,
663 void *user_data);
666 void *arg1,
667 void *user_data);
668
675
677
679
680/* `interface_query.cc` */
681
682bool UI_but_has_quick_tooltip(const uiBut *but);
683bool UI_but_is_tool(const uiBut *but);
685bool UI_but_is_utf8(const uiBut *but);
686#define UI_but_is_decorator(but) ((but)->type == UI_BTYPE_DECORATOR)
687
688bool UI_block_is_empty_ex(const uiBlock *block, bool skip_title);
689bool UI_block_is_empty(const uiBlock *block);
690bool UI_block_can_add_separator(const uiBlock *block);
696
697uiList *UI_list_find_mouse_over(const ARegion *region, const wmEvent *event);
698
699/* `interface_region_menu_popup.cc` */
700
709struct uiPopupMenu;
710
711uiPopupMenu *UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL();
719 const char *title,
720 const char *block_name,
721 int icon) ATTR_NONNULL();
728
731 ATTR_NONNULL(1, 2);
732
738void UI_popup_menu_close(const uiBlock *block, bool is_cancel = false);
743void UI_popup_menu_close_from_but(const uiBut *but, bool is_cancel = false);
744
749void UI_popup_menu_retval_set(const uiBlock *block, int retval, bool enable);
759
760/* `interface_region_popover.cc` */
761
762struct uiPopover;
763
765 const char *idname,
766 bool keep_open,
768
775uiPopover *UI_popover_begin(bContext *C, int ui_menu_width, bool from_active_button)
776 ATTR_NONNULL(1);
783
784/* `interface_region_menu_pie.cc` */
785
786/* Pie menus */
787struct uiPieMenu;
788
789wmOperatorStatus UI_pie_menu_invoke(bContext *C, const char *idname, const wmEvent *event);
793 blender::StringRefNull propname,
794 const wmEvent *event);
796 const char *title,
797 const char *path,
798 const wmEvent *event);
799
800uiPieMenu *UI_pie_menu_begin(bContext *C, const char *title, int icon, const wmEvent *event)
801 ATTR_NONNULL();
804
805/* `interface_region_menu_popup.cc` */
806
807/* Popup Blocks
808 *
809 * Functions used to create popup blocks. These are like popup menus
810 * but allow using all button types and creating their own layout. */
811using uiBlockCreateFunc = uiBlock *(*)(bContext *C, ARegion *region, void *arg1);
812using uiBlockCancelFunc = void (*)(bContext *C, void *arg1);
813
814void UI_popup_block_invoke(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free);
821 bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free, bool can_refresh);
824 uiBlockHandleFunc popup_func,
825 uiBlockCancelFunc cancel_func,
826 void *arg,
827 wmOperator *op);
828
837 bool cancel_default,
838 blender::FunctionRef<uiBut *()> confirm_fn,
839 blender::FunctionRef<uiBut *()> cancel_fn);
849 std::optional<blender::StringRef> confirm_text,
850 std::optional<blender::StringRef> cancel_text,
851 const int icon,
852 bool cancel_default,
853 PointerRNA *r_ptr);
854
855#if 0 /* UNUSED */
856void uiPupBlockOperator(bContext *C,
858 wmOperator *op,
859 wmOperatorCallContext opcontext);
860#endif
861
862void UI_popup_block_close(bContext *C, wmWindow *win, uiBlock *block);
863
865
866/* Blocks
867 *
868 * Functions for creating, drawing and freeing blocks. A Block is a
869 * container of buttons and used for various purposes.
870 *
871 * Begin/Define Buttons/End/Draw is the typical order in which these
872 * function should be called, though for popup blocks Draw is left out.
873 * Freeing blocks is done by the screen/ module automatically.
874 */
875
877 ARegion *region,
878 std::string name,
881 Scene *scene,
882 wmWindow *window,
883 ARegion *region,
884 std::string name,
886void UI_block_end_ex(const bContext *C,
887 Main *bmain,
888 wmWindow *window,
889 Scene *scene,
890 ARegion *region,
891 Depsgraph *depsgraph,
892 uiBlock *block,
893 const int xy[2] = nullptr,
894 int r_xy[2] = nullptr);
895void UI_block_end(const bContext *C, uiBlock *block);
899void UI_block_draw(const bContext *C, uiBlock *block);
902void UI_blocklist_draw(const bContext *C, const ListBase *lb);
903void UI_block_update_from_old(const bContext *C, uiBlock *block);
904
905enum {
908};
909void UI_block_theme_style_set(uiBlock *block, char theme_style);
912bool UI_block_is_search_only(const uiBlock *block);
917void UI_block_set_search_only(uiBlock *block, bool search_only);
918
922void UI_block_set_active_operator(uiBlock *block, wmOperator *op, const bool free);
923
927void UI_block_free(const bContext *C, uiBlock *block);
928
929void UI_block_listen(const uiBlock *block, const wmRegionListenerParams *listener_params);
930
934void UI_blocklist_free(const bContext *C, ARegion *region);
935void UI_blocklist_free_inactive(const bContext *C, ARegion *region);
936
942
943void UI_block_region_set(uiBlock *block, ARegion *region);
944
945void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr);
946void UI_block_lock_clear(uiBlock *block);
947
948#define UI_BUTTON_SECTION_MERGE_DISTANCE (UI_UNIT_X * 3)
949/* Separator line between regions if the #uiButtonSectionsAlign is not #None. */
950#define UI_BUTTON_SECTION_SEPERATOR_LINE_WITH (U.pixelsize * 2)
951
952enum class uiButtonSectionsAlign : int8_t { None = 1, Top, Bottom };
962void UI_region_button_sections_draw(const ARegion *region,
963 int /*THemeColorID*/ colorid,
965bool UI_region_button_sections_is_inside_x(const ARegion *region, const int mval_x);
966
970void UI_block_align_begin(uiBlock *block);
971void UI_block_align_end(uiBlock *block);
972
983
987void UI_block_bounds_set_normal(uiBlock *block, int addval);
991void UI_block_bounds_set_text(uiBlock *block, int addval);
995void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2]);
999void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2]);
1003void UI_block_bounds_set_centered(uiBlock *block, int addval);
1004void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy);
1005
1007
1008void UI_block_direction_set(uiBlock *block, char direction);
1012void UI_block_flag_enable(uiBlock *block, int flag);
1013void UI_block_flag_disable(uiBlock *block, int flag);
1014void UI_block_translate(uiBlock *block, float x, float y);
1015
1017
1025
1026void UI_but_flag_enable(uiBut *but, int flag);
1027void UI_but_flag_disable(uiBut *but, int flag);
1028bool UI_but_flag_is_set(uiBut *but, int flag);
1029void UI_but_flag2_enable(uiBut *but, int flag);
1030
1031void UI_but_drawflag_enable(uiBut *but, int flag);
1032void UI_but_drawflag_disable(uiBut *but, int flag);
1033
1034void UI_but_dragflag_enable(uiBut *but, int flag);
1035void UI_but_dragflag_disable(uiBut *but, int flag);
1036
1037void UI_but_disable(uiBut *but, const char *disabled_hint);
1038
1040
1045void UI_but_color_set(uiBut *but, const uchar color[4]);
1046
1050void UI_but_placeholder_set(uiBut *but, blender::StringRef placeholder_text);
1051
1060 const bContext *C, ARegion *region, uiBlock *block, uiBut *but, bool remove_on_failure);
1061bool UI_but_active_only(const bContext *C, ARegion *region, uiBlock *block, uiBut *but);
1066bool UI_block_active_only_flagged_buttons(const bContext *C, ARegion *region, uiBlock *block);
1067
1071void UI_but_execute(const bContext *C, ARegion *region, uiBut *but);
1072
1073std::optional<std::string> UI_but_online_manual_id(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
1074std::optional<std::string> UI_but_online_manual_id_from_active(const bContext *C)
1076bool UI_but_is_userdef(const uiBut *but);
1077
1078/* Buttons
1079 *
1080 * Functions to define various types of buttons in a block. Postfixes:
1081 * - F: float
1082 * - I: int
1083 * - S: short
1084 * - C: char
1085 * - R: RNA
1086 * - O: operator */
1087
1088uiBut *uiDefBut(uiBlock *block,
1089 int type,
1090 int retval,
1092 int x,
1093 int y,
1094 short width,
1095 short height,
1096 void *poin,
1097 float min,
1098 float max,
1099 std::optional<blender::StringRef> tip);
1100uiBut *uiDefButF(uiBlock *block,
1101 int type,
1102 int retval,
1104 int x,
1105 int y,
1106 short width,
1107 short height,
1108 float *poin,
1109 float min,
1110 float max,
1111 std::optional<blender::StringRef> tip);
1112uiBut *uiDefButI(uiBlock *block,
1113 int type,
1114 int retval,
1116 int x,
1117 int y,
1118 short width,
1119 short height,
1120 int *poin,
1121 float min,
1122 float max,
1123 std::optional<blender::StringRef> tip);
1124uiBut *uiDefButBitI(uiBlock *block,
1125 int type,
1126 int bit,
1127 int retval,
1129 int x,
1130 int y,
1131 short width,
1132 short height,
1133 int *poin,
1134 float min,
1135 float max,
1136 std::optional<blender::StringRef> tip);
1137uiBut *uiDefButS(uiBlock *block,
1138 int type,
1139 int retval,
1141 int x,
1142 int y,
1143 short width,
1144 short height,
1145 short *poin,
1146 float min,
1147 float max,
1148 std::optional<blender::StringRef> tip);
1149uiBut *uiDefButBitS(uiBlock *block,
1150 int type,
1151 int bit,
1152 int retval,
1154 int x,
1155 int y,
1156 short width,
1157 short height,
1158 short *poin,
1159 float min,
1160 float max,
1161 std::optional<blender::StringRef> tip);
1162uiBut *uiDefButC(uiBlock *block,
1163 int type,
1164 int retval,
1166 int x,
1167 int y,
1168 short width,
1169 short height,
1170 char *poin,
1171 float min,
1172 float max,
1173 std::optional<blender::StringRef> tip);
1174uiBut *uiDefButBitC(uiBlock *block,
1175 int type,
1176 int bit,
1177 int retval,
1179 int x,
1180 int y,
1181 short width,
1182 short height,
1183 char *poin,
1184 float min,
1185 float max,
1186 std::optional<blender::StringRef> tip);
1187uiBut *uiDefButR(uiBlock *block,
1188 int type,
1189 int retval,
1190 std::optional<blender::StringRef> str,
1191 int x,
1192 int y,
1193 short width,
1194 short height,
1195 PointerRNA *ptr,
1196 blender::StringRefNull propname,
1197 int index,
1198 float min,
1199 float max,
1200 std::optional<blender::StringRef> tip);
1202 int type,
1203 int retval,
1204 std::optional<blender::StringRef> str,
1205 int x,
1206 int y,
1207 short width,
1208 short height,
1209 PointerRNA *ptr,
1210 PropertyRNA *prop,
1211 int index,
1212 float min,
1213 float max,
1214 std::optional<blender::StringRef> tip);
1215uiBut *uiDefButO(uiBlock *block,
1216 int type,
1218 wmOperatorCallContext opcontext,
1219 const std::optional<blender::StringRef> str,
1220 int x,
1221 int y,
1222 short width,
1223 short height,
1224 std::optional<blender::StringRef> tip);
1226 int type,
1228 wmOperatorCallContext opcontext,
1230 int x,
1231 int y,
1232 short width,
1233 short height,
1234 std::optional<blender::StringRef> tip);
1235
1236uiBut *uiDefIconBut(uiBlock *block,
1237 int type,
1238 int retval,
1239 int icon,
1240 int x,
1241 int y,
1242 short width,
1243 short height,
1244 void *poin,
1245 float min,
1246 float max,
1247 std::optional<blender::StringRef> tip);
1249 int type,
1250 int retval,
1251 int icon,
1252 int x,
1253 int y,
1254 short width,
1255 short height,
1256 int *poin,
1257 float min,
1258 float max,
1259 std::optional<blender::StringRef> tip);
1261 int type,
1262 int bit,
1263 int retval,
1264 int icon,
1265 int x,
1266 int y,
1267 short width,
1268 short height,
1269 int *poin,
1270 float min,
1271 float max,
1272 std::optional<blender::StringRef> tip);
1274 int type,
1275 int retval,
1276 int icon,
1277 int x,
1278 int y,
1279 short width,
1280 short height,
1281 short *poin,
1282 float min,
1283 float max,
1284 std::optional<blender::StringRef> tip);
1286 int type,
1287 int bit,
1288 int retval,
1289 int icon,
1290 int x,
1291 int y,
1292 short width,
1293 short height,
1294 short *poin,
1295 float min,
1296 float max,
1297 std::optional<blender::StringRef> tip);
1299 int type,
1300 int bit,
1301 int retval,
1302 int icon,
1303 int x,
1304 int y,
1305 short width,
1306 short height,
1307 char *poin,
1308 float min,
1309 float max,
1310 std::optional<blender::StringRef> tip);
1312 int type,
1313 int retval,
1314 int icon,
1315 int x,
1316 int y,
1317 short width,
1318 short height,
1319 PointerRNA *ptr,
1320 blender::StringRefNull propname,
1321 int index,
1322 float min,
1323 float max,
1324 std::optional<blender::StringRef> tip);
1326 int type,
1327 int retval,
1328 int icon,
1329 int x,
1330 int y,
1331 short width,
1332 short height,
1333 PointerRNA *ptr,
1334 PropertyRNA *prop,
1335 int index,
1336 float min,
1337 float max,
1338 std::optional<blender::StringRef> tip);
1340 int type,
1342 wmOperatorCallContext opcontext,
1343 int icon,
1344 int x,
1345 int y,
1346 short width,
1347 short height,
1348 std::optional<blender::StringRef> tip);
1350 int type,
1352 wmOperatorCallContext opcontext,
1353 int icon,
1354 int x,
1355 int y,
1356 short width,
1357 short height,
1358 std::optional<blender::StringRef> tip);
1360 int type,
1361 int retval,
1362 int icon,
1363 int x,
1364 int y,
1365 short width,
1366 short height,
1367 void *poin,
1368 float min,
1369 float max,
1370 std::optional<blender::StringRef> tip);
1372 uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]);
1373uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height);
1376 int type,
1377 int retval,
1378 int icon,
1380 int x,
1381 int y,
1382 short width,
1383 short height,
1384 void *poin,
1385 float min,
1386 float max,
1387 std::optional<blender::StringRef> tip);
1389 int type,
1390 int retval,
1391 int icon,
1393 int x,
1394 int y,
1395 short width,
1396 short height,
1397 int *poin,
1398 float min,
1399 float max,
1400 std::optional<blender::StringRef> tip);
1402 int type,
1403 int retval,
1404 int icon,
1406 int x,
1407 int y,
1408 short width,
1409 short height,
1410 short *poin,
1411 float min,
1412 float max,
1413 std::optional<blender::StringRef> tip);
1415 int type,
1416 int retval,
1417 int icon,
1418 std::optional<blender::StringRefNull> str,
1419 int x,
1420 int y,
1421 short width,
1422 short height,
1423 PointerRNA *ptr,
1424 blender::StringRefNull propname,
1425 int index,
1426 float min,
1427 float max,
1428 std::optional<blender::StringRef> tip);
1430 int type,
1431 int retval,
1432 int icon,
1433 std::optional<blender::StringRef> str,
1434 int x,
1435 int y,
1436 short width,
1437 short height,
1438 PointerRNA *ptr,
1439 PropertyRNA *prop,
1440 int index,
1441 float min,
1442 float max,
1443 std::optional<blender::StringRef> tip);
1445 int type,
1447 wmOperatorCallContext opcontext,
1448 int icon,
1450 int x,
1451 int y,
1452 short width,
1453 short height,
1454 std::optional<blender::StringRef> tip);
1456 int type,
1458 wmOperatorCallContext opcontext,
1459 int icon,
1461 int x,
1462 int y,
1463 short width,
1464 short height,
1465 std::optional<blender::StringRef> tip);
1466
1467void UI_but_operator_set(uiBut *but,
1468 wmOperatorType *optype,
1469 wmOperatorCallContext opcontext,
1470 const PointerRNA *opptr = nullptr);
1477
1480
1482 uiBut *but,
1483 blender::StringRef name,
1484 const PointerRNA *ptr);
1485void UI_but_context_int_set(uiBlock *block, uiBut *but, blender::StringRef name, int64_t value);
1486const PointerRNA *UI_but_context_ptr_get(const uiBut *but,
1487 blender::StringRef name,
1488 const StructRNA *type = nullptr);
1489std::optional<blender::StringRefNull> UI_but_context_string_get(const uiBut *but,
1490 blender::StringRef name);
1491std::optional<int64_t> UI_but_context_int_get(const uiBut *but, blender::StringRef name);
1492const bContextStore *UI_but_context_get(const uiBut *but);
1493
1494void UI_but_unit_type_set(uiBut *but, int unit_type);
1495int UI_but_unit_type_get(const uiBut *but);
1496
1497std::optional<EnumPropertyItem> UI_but_rna_enum_item_get(bContext &C, uiBut &but);
1498
1499std::string UI_but_string_get_rna_property_identifier(const uiBut &but);
1500std::string UI_but_string_get_rna_struct_identifier(const uiBut &but);
1501std::string UI_but_string_get_label(uiBut &but);
1507std::string UI_but_string_get_tooltip_label(const uiBut &but);
1508std::string UI_but_string_get_rna_label(uiBut &but);
1510std::string UI_but_string_get_rna_label_context(const uiBut &but);
1511std::string UI_but_string_get_tooltip(bContext &C, uiBut &but);
1512std::string UI_but_string_get_rna_tooltip(bContext &C, uiBut &but);
1517
1518std::string UI_but_extra_icon_string_get_label(const uiButExtraOpIcon &extra_icon);
1519std::string UI_but_extra_icon_string_get_tooltip(bContext &C, const uiButExtraOpIcon &extra_icon);
1521 const uiButExtraOpIcon &extra_icon);
1522
1534enum {
1539 UI_ID_ALONE = 1 << 4,
1540 UI_ID_OPEN = 1 << 3,
1542 UI_ID_LOCAL = 1 << 6,
1545 UI_ID_PIN = 1 << 9,
1550};
1551
1556enum {
1559};
1560
1561/***************************** ID Utilities *******************************/
1562
1563int UI_icon_from_id(const ID *id);
1565int UI_icon_from_report_type(int type);
1568
1569int UI_icon_from_event_type(short event_type, short event_value);
1570int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[KM_MOD_NUM]);
1571
1572uiBut *uiDefMenuBut(uiBlock *block,
1573 uiMenuCreateFunc func,
1574 void *arg,
1576 int x,
1577 int y,
1578 short width,
1579 short height,
1580 std::optional<blender::StringRef> tip);
1582 uiMenuCreateFunc func,
1583 void *arg,
1584 int icon,
1586 int x,
1587 int y,
1588 short width,
1589 short height,
1590 std::optional<blender::StringRef> tip);
1592 uiMenuCreateFunc func,
1593 void *arg,
1594 int icon,
1595 int x,
1596 int y,
1597 short width,
1598 short height,
1599 std::optional<blender::StringRef> tip);
1600
1602 uiBlockCreateFunc func,
1603 void *arg,
1605 int x,
1606 int y,
1607 short width,
1608 short height,
1609 std::optional<blender::StringRef> tip);
1611 uiBlockCreateFunc func,
1612 void *argN,
1614 int x,
1615 int y,
1616 short width,
1617 short height,
1618 std::optional<blender::StringRef> tip,
1619 uiButArgNFree func_argN_free_fn = MEM_freeN,
1620 uiButArgNCopy func_argN_copy_fn = MEM_dupallocN);
1621
1626 uiBlockCreateFunc func,
1627 void *arg,
1628 int retval,
1629 int icon,
1630 int x,
1631 int y,
1632 short width,
1633 short height,
1634 std::optional<blender::StringRef> tip);
1635
1640 void *arg,
1641 int retval,
1642 int icon,
1643 int maxncpy,
1644 int x,
1645 int y,
1646 short width,
1647 short height,
1648 std::optional<blender::StringRef> tip);
1655 IDProperty *properties,
1656 void *arg,
1657 int retval,
1658 int icon,
1659 int maxncpy,
1660 int x,
1661 int y,
1662 short width,
1663 short height,
1664 std::optional<blender::StringRef> tip);
1665
1675
1683
1685
1687 PointerRNA *ptr,
1688 PropertyRNA *prop,
1689 int index,
1690 std::optional<blender::StringRef> name,
1691 int icon,
1692 int x,
1693 int y,
1694 int width,
1695 int height);
1696void uiDefAutoButsArrayR(uiBlock *block,
1697 PointerRNA *ptr,
1698 PropertyRNA *prop,
1699 const int icon,
1700 const int x,
1701 const int y,
1702 const int tot_width,
1703 const int height);
1711 PointerRNA *ptr,
1712 bool (*check_prop)(PointerRNA *ptr,
1713 PropertyRNA *prop,
1714 void *user_data),
1715 void *user_data,
1716 PropertyRNA *prop_activate_init,
1717 eButLabelAlign label_align,
1718 bool compact);
1719
1731
1747 blender::StringRef name,
1748 void *poin,
1749 int iconid,
1750 int but_flag,
1751 uint8_t name_prefix_offset);
1752
1769 uiButSearchCreateFn search_create_fn,
1770 uiButSearchUpdateFn search_update_fn,
1771 void *arg,
1772 bool free_arg,
1773 uiFreeArgFunc search_arg_free_fn,
1774 uiButHandleFunc search_exec_fn,
1775 void *active);
1783void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string);
1785
1786#define UI_SEARCHBOX_BOUNDS (6.0f * UI_SCALE_FAC)
1787#define UI_SEARCHBOX_TRIA_H (12.0f * UI_SCALE_FAC)
1799int UI_searchbox_size_x_guess(const bContext *C, const uiButSearchUpdateFn update_fn, void *arg);
1803int UI_search_items_find_index(const uiSearchItems *items, const char *name);
1804
1808void UI_but_hint_drawstr_set(uiBut *but, const char *string);
1809void UI_but_icon_indicator_number_set(uiBut *but, const int indicator_number);
1810void UI_but_icon_indicator_set(uiBut *but, const char *string);
1811void UI_but_icon_indicator_color_set(uiBut *but, const uchar color[4]);
1812
1813void UI_but_node_link_set(uiBut *but, bNodeSocket *socket, const float draw_color[4]);
1814
1815void UI_but_number_step_size_set(uiBut *but, float step_size);
1816void UI_but_number_precision_set(uiBut *but, float precision);
1817
1818void UI_but_number_slider_step_size_set(uiBut *but, float step_size);
1819void UI_but_number_slider_precision_set(uiBut *but, float precision);
1820
1821void UI_but_label_alpha_factor_set(uiBut *but, float alpha_factor);
1822
1823void UI_but_search_preview_grid_size_set(uiBut *but, int rows, int cols);
1824
1826 const std::optional<int> draw_width = std::nullopt,
1827 const std::optional<int> draw_height = std::nullopt);
1828
1829void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg);
1830void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2);
1831void UI_block_funcN_set(uiBlock *block,
1832 uiButHandleNFunc funcN,
1833 void *argN,
1834 void *arg2,
1835 uiButArgNFree func_argN_free_fn = MEM_freeN,
1836 uiButArgNCopy func_argN_copy_fn = MEM_dupallocN);
1837
1838void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1);
1840 std::function<void(std::string &new_name)> rename_full_func);
1841void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2);
1842void UI_but_funcN_set(uiBut *but,
1843 uiButHandleNFunc funcN,
1844 void *argN,
1845 void *arg2,
1846 uiButArgNFree func_argN_free_fn = MEM_freeN,
1847 uiButArgNCopy func_argN_copy_fn = MEM_dupallocN);
1848
1849void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg);
1850
1852 std::function<void(const bContext *C, rcti *rect)> func);
1853
1855
1862
1863void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg);
1873void UI_but_func_quick_tooltip_set(uiBut *but, std::function<std::string(const uiBut *but)> func);
1874
1876 UI_TIP_STYLE_NORMAL = 0, /* Regular text. */
1877 UI_TIP_STYLE_HEADER, /* Header text. */
1878 UI_TIP_STYLE_MONO, /* Mono-spaced text. */
1879 UI_TIP_STYLE_IMAGE, /* Image field. */
1880 UI_TIP_STYLE_SPACER, /* Padding to separate sections. */
1881};
1882
1884 UI_TIP_LC_MAIN = 0, /* Color of primary text. */
1885 UI_TIP_LC_VALUE, /* Color for the value of buttons (also shortcuts). */
1886 UI_TIP_LC_ACTIVE, /* Color of titles of active enum values. */
1887 UI_TIP_LC_NORMAL, /* Color of regular text. */
1888 UI_TIP_LC_PYTHON, /* Color of python snippets. */
1889 UI_TIP_LC_ALERT, /* Warning text color, eg: why operator can't run. */
1891};
1892
1898
1908
1911 void *arg,
1912 uiFreeArgFunc free_arg);
1913
1919 std::string text,
1920 std::string suffix,
1921 const uiTooltipStyle style,
1922 const uiTooltipColorID color_id,
1923 const bool is_pad = false);
1924
1930
1940
1942 ARegion *region,
1943 const void *rna_poin_data,
1944 const char *rna_prop_id);
1945bool UI_textbutton_activate_but(const bContext *C, uiBut *actbut);
1946
1952
1953void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN);
1954
1957 wmOperatorCallContext opcontext,
1958 int icon);
1961
1966int UI_preview_tile_size_x(const int size_px = 96);
1967int UI_preview_tile_size_y(const int size_px = 96);
1968int UI_preview_tile_size_y_no_label(const int size_px = 96);
1969
1970/* Autocomplete
1971 *
1972 * Tab complete helper functions, for use in uiButCompleteFunc callbacks.
1973 * Call begin once, then multiple times do_name with all possibilities,
1974 * and finally end to finish and get the completed name. */
1975
1976struct AutoComplete;
1977
1978#define AUTOCOMPLETE_NO_MATCH 0
1979#define AUTOCOMPLETE_FULL_MATCH 1
1980#define AUTOCOMPLETE_PARTIAL_MATCH 2
1981
1984int UI_autocomplete_end(AutoComplete *autocpl, char *autoname);
1985
1986/* Button drag-data (interface_drag.cc).
1987 *
1988 * Functions to set drag data for buttons. This enables dragging support, whereby the drag data is
1989 * "dragged", not the button itself. */
1990
1991void UI_but_drag_set_id(uiBut *but, ID *id);
1998void UI_but_drag_attach_image(uiBut *but, const ImBuf *imb, float scale);
1999
2009 const AssetImportSettings &import_settings,
2010 int icon,
2011 int preview_icon);
2012
2018void UI_but_drag_set_path(uiBut *but, const char *path);
2019void UI_but_drag_set_name(uiBut *but, const char *name);
2020
2025void UI_but_drag_set_image(uiBut *but, const char *path, int icon, const ImBuf *imb, float scale);
2026
2027/* Panels
2028 *
2029 * Functions for creating, freeing and drawing panels. The API here
2030 * could use a good cleanup, though how they will function in 2.5 is
2031 * not clear yet so we postpone that. */
2032
2033void UI_panels_begin(const bContext *C, ARegion *region);
2034void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y);
2038void UI_panels_draw(const bContext *C, ARegion *region);
2039
2045 ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open);
2056void UI_panel_end(Panel *panel, int width, int height);
2057
2060
2066void UI_panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr);
2067
2072bool UI_panel_is_closed(const Panel *panel);
2073bool UI_panel_is_active(const Panel *panel);
2077void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y);
2078bool UI_panel_should_show_background(const ARegion *region, const PanelType *panel_type);
2079int UI_panel_size_y(const Panel *panel);
2080bool UI_panel_is_dragging(const Panel *panel);
2085bool UI_panel_matches_search_filter(const Panel *panel);
2086bool UI_panel_can_be_pinned(const Panel *panel);
2087
2088bool UI_panel_category_is_visible(const ARegion *region);
2089void UI_panel_category_add(ARegion *region, const char *name);
2090PanelCategoryDyn *UI_panel_category_find(const ARegion *region, const char *idname);
2091int UI_panel_category_index_find(ARegion *region, const char *idname);
2092PanelCategoryStack *UI_panel_category_active_find(ARegion *region, const char *idname);
2093const char *UI_panel_category_active_get(ARegion *region, bool set_fallback);
2094void UI_panel_category_active_set(ARegion *region, const char *idname);
2096void UI_panel_category_index_active_set(ARegion *region, const int index);
2097void UI_panel_category_active_set_default(ARegion *region, const char *idname);
2102void UI_panel_category_draw_all(ARegion *region, const char *category_id_active);
2103
2104void UI_panel_stop_animation(const bContext *C, Panel *panel);
2105
2106/* Panel custom data. */
2109void UI_panel_custom_data_set(Panel *panel, PointerRNA *custom_data);
2110
2111/* Poly-instantiated panels for representing a list of data. */
2117 ARegion *region,
2118 ListBase *panels,
2119 const char *panel_idname,
2120 PointerRNA *custom_data);
2127void UI_panels_free_instanced(const bContext *C, ARegion *region);
2128
2129#define INSTANCED_PANEL_UNIQUE_STR_SIZE 16
2134void UI_list_panel_unique_str(Panel *panel, char *r_name);
2135
2136using uiListPanelIDFromDataFunc = void (*)(void *data_link, char *r_idname);
2147 ListBase *data,
2148 uiListPanelIDFromDataFunc panel_idname_func);
2149
2150/* Handlers
2151 *
2152 * Handlers that can be registered in regions, areas and windows for
2153 * handling WM events. Mostly this is done automatic by modules such
2154 * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */
2155
2156void UI_region_handlers_add(ListBase *handlers);
2157void UI_popup_handlers_add(bContext *C, ListBase *handlers, uiPopupBlockHandle *popup, char flag);
2160
2161/* Module
2162 *
2163 * init and exit should be called before using this module. init_userdef must
2164 * be used to reinitialize some internal state if user preferences change. */
2165
2166void UI_init();
2167/* after reading userdef file */
2168void UI_init_userdef();
2169void UI_reinit_font();
2170void UI_exit();
2171
2172/* When changing UI font, update text style weights with default font weight
2173 * if non-variable. Therefore fixed weight bold font will look bold. */
2175
2176#define UI_UNIT_X ((void)0, U.widget_unit)
2177#define UI_UNIT_Y ((void)0, U.widget_unit)
2178
2179#define UI_HEADER_OFFSET ((void)0, 0.4f * UI_UNIT_X)
2180
2181#define UI_AZONESPOTW UI_HEADER_OFFSET /* Width of corner action zone #AZone. */
2182#define UI_AZONESPOTH (0.6f * U.widget_unit) /* Height of corner action zone #AZone. */
2183
2184/* uiLayoutOperatorButs flags */
2185enum {
2190 /* Disable property split for the default layout (custom ui callbacks still have full control
2191 * over the layout and can enable it). */
2202};
2203
2204/* Used for transparent checkers shown under color buttons that have an alpha component. */
2205#define UI_ALPHA_CHECKER_DARK 100
2206#define UI_ALPHA_CHECKER_LIGHT 160
2207
2208/* flags to set which corners will become rounded:
2209 *
2210 * 1------2
2211 * | |
2212 * 8------4 */
2213
2214enum {
2219 /* just for convenience */
2222};
2223
2224void UI_region_message_subscribe(ARegion *region, wmMsgBus *mbus);
2225
2241std::optional<blender::StringRefNull> UI_but_asset_shelf_type_idname_get(const uiBut *but);
2242
2243/* templates */
2244void uiTemplateHeader(uiLayout *layout, bContext *C);
2245void uiTemplateID(uiLayout *layout,
2246 const bContext *C,
2247 PointerRNA *ptr,
2248 blender::StringRefNull propname,
2249 const char *newop,
2250 const char *openop,
2251 const char *unlinkop,
2253 bool live_icon = false,
2254 std::optional<blender::StringRef> text = std::nullopt);
2255void uiTemplateIDBrowse(uiLayout *layout,
2256 bContext *C,
2257 PointerRNA *ptr,
2258 blender::StringRefNull propname,
2259 const char *newop,
2260 const char *openop,
2261 const char *unlinkop,
2263 const char *text = nullptr);
2264void uiTemplateIDPreview(uiLayout *layout,
2265 bContext *C,
2266 PointerRNA *ptr,
2267 blender::StringRefNull propname,
2268 const char *newop,
2269 const char *openop,
2270 const char *unlinkop,
2271 int rows,
2272 int cols,
2274 bool hide_buttons = false);
2278void uiTemplateIDTabs(uiLayout *layout,
2279 bContext *C,
2280 PointerRNA *ptr,
2281 blender::StringRefNull propname,
2282 const char *newop,
2283 const char *menu,
2293void uiTemplateAnyID(uiLayout *layout,
2294 PointerRNA *ptr,
2295 blender::StringRefNull propname,
2296 blender::StringRefNull proptypename,
2297 std::optional<blender::StringRef> text);
2298
2308void uiTemplateAction(uiLayout *layout,
2309 const bContext *C,
2310 ID *id,
2311 const char *newop,
2312 const char *unlinkop,
2313 std::optional<blender::StringRef> text);
2314
2319void uiTemplateSearch(uiLayout *layout,
2320 const bContext *C,
2321 PointerRNA *ptr,
2322 blender::StringRefNull propname,
2323 PointerRNA *searchptr,
2324 const char *searchpropname,
2325 const char *newop,
2326 const char *unlinkop,
2327 std::optional<blender::StringRef> text = std::nullopt);
2329 bContext *C,
2330 PointerRNA *ptr,
2331 blender::StringRefNull propname,
2332 PointerRNA *searchptr,
2333 const char *searchpropname,
2334 const char *newop,
2335 const char *unlinkop,
2336 int rows,
2337 int cols,
2338 std::optional<blender::StringRef> text = std::nullopt);
2346void uiTemplatePathBuilder(uiLayout *layout,
2347 PointerRNA *ptr,
2348 blender::StringRefNull propname,
2349 PointerRNA *root_ptr,
2350 std::optional<blender::StringRefNull> text);
2351void uiTemplateModifiers(uiLayout *layout, bContext *C);
2355void uiTemplateShaderFx(uiLayout *layout, bContext *C);
2359void uiTemplateConstraints(uiLayout *layout, bContext *C, bool use_bone_constraints);
2360
2363 bContext *C,
2364 PointerRNA *ptr,
2365 blender::StringRefNull propname,
2366 int rows,
2367 int cols,
2368 float scale,
2369 int filter);
2370
2372
2374void uiTemplatePreview(uiLayout *layout,
2375 bContext *C,
2376 ID *id,
2377 bool show_buttons,
2378 ID *parent,
2379 MTex *slot,
2380 const char *preview_id);
2381void uiTemplateColorRamp(uiLayout *layout,
2382 PointerRNA *ptr,
2383 blender::StringRefNull propname,
2384 bool expand);
2388void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale);
2392void uiTemplateIconView(uiLayout *layout,
2393 PointerRNA *ptr,
2394 blender::StringRefNull propname,
2395 bool show_labels,
2396 float icon_scale,
2397 float icon_scale_popup);
2401void uiTemplateCurveMapping(uiLayout *layout,
2402 PointerRNA *ptr,
2403 blender::StringRefNull propname,
2404 int type,
2405 bool levels,
2406 bool brush,
2407 bool neg_slope,
2408 bool tone);
2417void uiTemplateColorPicker(uiLayout *layout,
2418 PointerRNA *ptr,
2419 blender::StringRefNull propname,
2420 bool value_slider,
2421 bool lock,
2422 bool lock_luminosity,
2423 bool cubic);
2424void uiTemplatePalette(uiLayout *layout,
2425 PointerRNA *ptr,
2426 blender::StringRefNull propname,
2427 bool colors);
2428void uiTemplateCryptoPicker(uiLayout *layout,
2429 PointerRNA *ptr,
2430 blender::StringRefNull propname,
2431 int icon);
2436void uiTemplateLayers(uiLayout *layout,
2437 PointerRNA *ptr,
2438 blender::StringRefNull propname,
2439 PointerRNA *used_ptr,
2440 const char *used_propname,
2441 int active_layer);
2442void uiTemplateImage(uiLayout *layout,
2443 bContext *C,
2444 PointerRNA *ptr,
2445 blender::StringRefNull propname,
2446 PointerRNA *userptr,
2447 bool compact,
2448 bool multiview);
2449void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_management);
2450void uiTemplateImageStereo3d(uiLayout *layout, PointerRNA *stereo3d_format_ptr);
2451void uiTemplateImageViews(uiLayout *layout, PointerRNA *imaptr);
2453void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser);
2454void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser);
2458
2459void UI_but_func_menu_search(uiBut *but, const char *single_menu_idname = nullptr);
2460void uiTemplateMenuSearch(uiLayout *layout);
2461
2468 const bContext *C, uiLayout *layout, wmOperator *op, eButLabelAlign label_align, short flag);
2473void uiTemplateStatusInfo(uiLayout *layout, bContext *C);
2475
2478 const wmKeyMapItem *kmi,
2479 bool text_fallback);
2480
2481/* Draw keymap item for status bar. Returns number of items consumed,
2482 * as X/Y/Z items may get merged to use less space. */
2484 const wmKeyMap *keymap,
2485 const EnumPropertyItem *item);
2486
2488 PointerRNA *ptr,
2489 blender::StringRefNull propname,
2490 blender::StringRef name);
2491void uiTemplateNodeSocket(uiLayout *layout, bContext *C, const float color[4]);
2492
2497void uiTemplateCacheFile(uiLayout *layout,
2498 const bContext *C,
2499 PointerRNA *ptr,
2500 blender::StringRefNull propname);
2501
2508 blender::StringRefNull propname,
2509 PointerRNA *r_file_ptr);
2510
2514void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr);
2515
2519void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerRNA *fileptr);
2520
2525
2529void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA *fileptr);
2530
2532#define UI_UL_DEFAULT_CLASS_NAME "UI_UL_list"
2548
2549void uiTemplateList(uiLayout *layout,
2550 const bContext *C,
2551 const char *listtype_name,
2552 const char *list_id,
2553 PointerRNA *dataptr,
2554 blender::StringRefNull propname,
2555 PointerRNA *active_dataptr,
2556 const char *active_propname,
2557 const char *item_dyntip_propname,
2558 int rows,
2559 int maxrows,
2560 int layout_type,
2561 int columns,
2562 enum uiTemplateListFlags flags);
2564 const bContext *C,
2565 const char *listtype_name,
2566 const char *list_id,
2567 PointerRNA *dataptr,
2568 blender::StringRefNull propname,
2569 PointerRNA *active_dataptr,
2570 blender::StringRefNull active_propname,
2571 const char *item_dyntip_propname,
2572 int rows,
2573 int maxrows,
2574 int layout_type,
2575 int columns,
2576 enum uiTemplateListFlags flags,
2577 void *customdata);
2578
2580 uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input);
2582 uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input);
2587void uiTemplateTextureShow(uiLayout *layout,
2588 const bContext *C,
2589 PointerRNA *ptr,
2590 PropertyRNA *prop);
2591
2593 uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, bool compact);
2595void uiTemplateMarker(uiLayout *layout,
2596 PointerRNA *ptr,
2597 blender::StringRefNull propname,
2598 PointerRNA *userptr,
2599 PointerRNA *trackptr,
2600 bool compact);
2602 PointerRNA *ptr,
2603 blender::StringRefNull propname,
2604 PointerRNA *userptr);
2605
2607 PointerRNA *ptr,
2608 blender::StringRefNull propname);
2610 bContext *C,
2611 PointerRNA *ptr,
2612 blender::StringRefNull propname);
2613
2614int uiTemplateRecentFiles(uiLayout *layout, int rows);
2616
2617enum {
2621};
2622void uiTemplateAssetView(uiLayout *layout,
2623 const bContext *C,
2624 const char *list_id,
2625 PointerRNA *asset_library_dataptr,
2626 const char *asset_library_propname,
2627 PointerRNA *assets_dataptr,
2628 const char *assets_propname,
2629 PointerRNA *active_dataptr,
2630 const char *active_propname,
2631 const blender::ed::asset::AssetFilterSettings *filter_settings,
2632 int display_flags,
2633 const char *activate_opname,
2634 PointerRNA *r_activate_op_properties,
2635 const char *drag_opname,
2636 PointerRNA *r_drag_op_properties);
2637
2638namespace blender::ui {
2639
2641 uiLayout &layout, const bContext &C, StringRefNull asset_shelf_id, StringRef name, int icon);
2642
2643}
2644
2646 bContext *C,
2647 uiLayout *context_layout,
2648 PointerRNA *ptr,
2649 blender::StringRefNull propname);
2650
2653
2659
2661
2666bool UI_list_item_index_is_filtered_visible(const struct uiList *ui_list, int item_idx);
2667
2673 bool create_properties);
2679 bool create_properties);
2680
2681/* UI Operators */
2687
2688void ED_operatortypes_ui();
2692void ED_keymap_ui(wmKeyConfig *keyconf);
2693void ED_dropboxes_ui();
2694void ED_uilisttypes_ui();
2695
2696void UI_drop_color_copy(bContext *C, wmDrag *drag, wmDropBox *drop);
2697bool UI_drop_color_poll(bContext *C, wmDrag *drag, const wmEvent *event);
2698
2700 PointerRNA *ptr,
2701 PropertyRNA *prop,
2703 bool *r_use_path_from_id,
2704 std::optional<std::string> *r_path);
2706 PointerRNA *ptr_link,
2707 PropertyRNA *prop,
2708 const char *path,
2709 bool use_path_from_id,
2710 PointerRNA *r_ptr,
2711 PropertyRNA **r_prop);
2712
2713/* Helpers for Operators */
2727 PointerRNA *r_ptr,
2728 PropertyRNA **r_prop,
2729 int *r_index);
2730
2737 PointerRNA *r_ptr,
2738 PropertyRNA **r_prop,
2739 int *r_index);
2740
2741void UI_context_active_but_prop_handle(bContext *C, bool handle_undo);
2743
2750 PointerRNA *r_ptr,
2751 PropertyRNA **r_prop,
2752 bool *r_is_undo,
2753 bool *r_is_userdef);
2760 PointerRNA *r_ptr,
2761 PropertyRNA **r_prop);
2763
2764uiBut *UI_region_active_but_get(const ARegion *region);
2765uiBut *UI_region_but_find_rect_over(const ARegion *region, const rcti *rect_px);
2766uiBlock *UI_region_block_find_mouse_over(const ARegion *region, const int xy[2], bool only_clip);
2770ARegion *UI_region_searchbox_region_get(const ARegion *button_region);
2771
2778
2783
2784/* Styled text draw */
2785void UI_fontstyle_set(const uiFontStyle *fs);
2786void UI_fontstyle_draw_ex(const uiFontStyle *fs,
2787 const rcti *rect,
2788 const char *str,
2789 size_t str_len,
2790 const uchar col[4],
2791 const uiFontStyleDraw_Params *fs_params,
2792 int *r_xofs,
2793 int *r_yofs,
2794 ResultBLF *r_info);
2795
2796void UI_fontstyle_draw(const uiFontStyle *fs,
2797 const rcti *rect,
2798 const char *str,
2799 size_t str_len,
2800 const uchar col[4],
2801 const uiFontStyleDraw_Params *fs_params);
2802
2804 const rcti *rect,
2805 const char *str,
2806 const uchar col[4],
2807 eFontStyle_Align align,
2808 int *r_xofs,
2809 int *r_yofs,
2810 ResultBLF *r_info);
2815 const rcti *rect,
2816 const char *str,
2817 const uchar col[4],
2818 eFontStyle_Align align);
2819
2824 const rcti *rect,
2825 const char *str,
2826 const uchar col[4]);
2834 const uiFontStyle *fs, float x, float y, const char *str, const uchar col[4]);
2839 float x,
2840 float y,
2842 const float col_fg[4],
2843 const float col_bg[4]);
2844
2846 ATTR_NONNULL(1, 2);
2859 float aspect) ATTR_WARN_UNUSED_RESULT
2860 ATTR_NONNULL(1);
2862
2866void UI_draw_icon_tri(float x, float y, char dir, const float[4]);
2867
2871const uiStyle *UI_style_get(); /* use for fonts etc */
2875const uiStyle *UI_style_get_dpi();
2876
2877/* #UI_OT_editsource helpers. */
2884void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but);
2885
2896void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but);
2897
2898/* UI_butstore_ helpers */
2899struct uiButStore;
2900
2913void UI_butstore_free(uiBlock *block, uiButStore *bs_handle);
2914bool UI_butstore_is_valid(uiButStore *bs_handle);
2916void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p);
2920bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src);
2921void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p);
2922
2930std::optional<std::string> UI_key_event_operator_string(const bContext *C,
2932 IDProperty *properties,
2933 bool is_strict);
2934
2935/* ui_interface_region_tooltip.c */
2936
2941 ARegion *butregion,
2942 uiBut *but,
2943 bool is_quick_tip);
2945 bContext *C, ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_quick_tip);
2947void UI_tooltip_free(bContext *C, bScreen *screen, ARegion *region);
2948
2957 const ARegion *searchbox_region,
2958 const rcti *item_rect,
2959 ID *id);
2960
2961/* How long before a tool-tip shows. */
2962#define UI_TOOLTIP_DELAY 0.5
2963#define UI_TOOLTIP_DELAY_QUICK 0.2
2964
2965/* Float precision helpers */
2966
2967/* Maximum number of digits of precision (not number of decimal places)
2968 * to display for float values. Note that the UI_FLOAT_VALUE_DISPLAY_*
2969 * defines that follow depend on this. */
2970#define UI_PRECISION_FLOAT_MAX 6
2971
2972/* Values exceeding this range are displayed as "inf" / "-inf".
2973 * This range is almost FLT_MAX to -FLT_MAX, but each is truncated
2974 * to our display precision, set by UI_PRECISION_FLOAT_MAX. Each
2975 * is approximately `FLT_MAX / 1.000001` but that calculation does
2976 * not give us the explicit zeros needed for this exact range. */
2977#define UI_FLOAT_VALUE_DISPLAY_MAX 3.402820000e+38F
2978#define UI_FLOAT_VALUE_DISPLAY_MIN -3.402820000e+38F
2979
2980/* For float buttons the 'step', is scaled */
2981#define UI_PRECISION_FLOAT_SCALE 0.01f
2982
2983/* Typical UI text */
2984#define UI_FSTYLE_WIDGET (const uiFontStyle *)&(UI_style_get()->widget)
2985#define UI_FSTYLE_TOOLTIP (const uiFontStyle *)&(UI_style_get()->tooltip)
2986
2991int UI_calc_float_precision(int prec, double value);
2992
2993/* widget batched drawing */
2997
2998/* Use for resetting the theme. */
3007
3009
3011#define USE_UI_TOOLBAR_HACK
3012
3014#define USE_UI_POPOVER_ONCE
3015
3025
3035
3040blender::ui::AbstractView *UI_region_view_find_at(const ARegion *region, const int xy[2], int pad);
3045 const int xy[2]);
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
void BLI_kdtree_nd_ free(KDTree *tree)
unsigned char uchar
unsigned int uint
#define ENUM_OPERATORS(_type, _max)
void(*)(void *data_link, char *r_idname) uiListPanelIDFromDataFunc
Read Guarded memory(de)allocation.
#define C
Definition RandGen.cpp:29
void UI_block_update_from_old(const bContext *C, uiBlock *block)
void UI_context_update_anim_flag(const bContext *C)
void UI_region_button_sections_draw(const ARegion *region, int colorid, uiButtonSectionsAlign align)
int UI_text_colorid_from_report_type(int type)
void UI_but_flag_disable(uiBut *but, int flag)
void UI_but_disable(uiBut *but, const char *disabled_hint)
bool UI_view_item_can_rename(const blender::ui::AbstractViewItem &item)
ARegion * UI_tooltip_create_from_gizmo(bContext *C, wmGizmo *gz)
void UI_region_views_clear_search_highlight(const ARegion *region)
eAutoPropButsReturn
@ UI_PROP_BUTS_ANY_FAILED_CHECK
@ UI_PROP_BUTS_NONE_ADDED
void UI_blocklist_update_window_matrix(const bContext *C, const ListBase *lb)
uiBut * uiDefIconTextButR_prop(uiBlock *block, int 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)
void UI_draw_roundbox_3ub_alpha(const rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha)
void UI_panel_stop_animation(const bContext *C, Panel *panel)
void UI_but_placeholder_set(uiBut *but, blender::StringRef placeholder_text)
bool UI_panel_is_closed(const Panel *panel)
uiBut * uiDefButBitI(uiBlock *block, int type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
bool UI_textbutton_activate_rna(const bContext *C, ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
void uiTemplateLightLinkingCollection(uiLayout *layout, bContext *C, uiLayout *context_layout, PointerRNA *ptr, blender::StringRefNull propname)
void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr, PointerRNA *trackptr, bool compact)
void UI_but_drag_attach_image(uiBut *but, const ImBuf *imb, float scale)
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void uiTemplateInputStatus(uiLayout *layout, bContext *C)
void ui_draw_dropshadow(const rctf *rct, float radius, float width, float aspect, float alpha)
uiLayout * UI_pie_menu_layout(uiPieMenu *pie)
void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *used_ptr, const char *used_propname, int active_layer)
uiList * UI_list_find_mouse_over(const ARegion *region, const wmEvent *event)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_init_userdef()
void UI_block_emboss_set(uiBlock *block, blender::ui::EmbossType emboss)
void UI_popover_end(bContext *C, uiPopover *pup, wmKeyMap *keymap)
void UI_panel_category_draw_all(ARegion *region, const char *category_id_active)
void uiTemplateIconView(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool show_labels, float icon_scale, float icon_scale_popup)
void uiTemplateStatusInfo(uiLayout *layout, bContext *C)
void uiTemplateNodeTreeInterface(uiLayout *layout, bContext *C, PointerRNA *ptr)
bool UI_but_active_drop_name(const bContext *C)
void UI_fontstyle_draw_simple(const uiFontStyle *fs, float x, float y, const char *str, const uchar col[4])
void UI_popup_menu_retval_set(const uiBlock *block, int retval, bool enable)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
uiBut * uiDefButS(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
PanelCategoryDyn * UI_panel_category_find(const ARegion *region, const char *idname)
void UI_init()
bool UI_panel_can_be_pinned(const Panel *panel)
void UI_but_focus_on_enter_event(wmWindow *win, uiBut *but)
void uiTemplateComponentMenu(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, blender::StringRef name)
void uiTemplateNodeView(uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
void UI_but_func_drawextra_set(uiBlock *block, std::function< void(const bContext *C, rcti *rect)> func)
void UI_but_func_tooltip_custom_set(uiBut *but, uiButToolTipCustomFunc func, void *arg, uiFreeArgFunc free_arg)
uiBut * uiDefButR_prop(uiBlock *block, int 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)
std::string UI_but_string_get_property_keymap(bContext &C, uiBut &but)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, blender::ui::EmbossType emboss)
int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[KM_MOD_NUM])
void UI_but_icon_indicator_number_set(uiBut *but, const int indicator_number)
void UI_draw_icon_tri(float x, float y, char dir, const float[4])
void ED_dropboxes_ui()
void UI_popup_menu_but_set(uiPopupMenu *pup, ARegion *butregion, uiBut *but)
void UI_draw_safe_areas(uint pos, const rctf *rect, const float title_aspect[2], const float action_aspect[2])
bool UI_block_can_add_separator(const uiBlock *block)
int UI_icon_from_report_type(int type)
void UI_tooltip_free(bContext *C, bScreen *screen, ARegion *region)
void UI_block_interaction_set(uiBlock *block, uiBlockInteraction_CallbackData *callbacks)
@ UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED
@ UI_TEMPLATE_OP_PROPS_SHOW_EMPTY
@ UI_TEMPLATE_OP_PROPS_ALLOW_UNDO_PUSH
@ UI_TEMPLATE_OP_PROPS_SHOW_TITLE
@ UI_TEMPLATE_OP_PROPS_HIDE_PRESETS
@ UI_TEMPLATE_OP_PROPS_COMPACT
@ UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT
void UI_popup_block_template_confirm(uiBlock *block, bool cancel_default, blender::FunctionRef< uiBut *()> confirm_fn, blender::FunctionRef< uiBut *()> cancel_fn)
void UI_tooltip_image_field_add(uiTooltipData &data, const uiTooltipImage &image_data)
uiPopover * UI_popover_begin(bContext *C, int ui_menu_width, bool from_active_button) ATTR_NONNULL(1)
void UI_but_func_rename_full_set(uiBut *but, std::function< void(std::string &new_name)> rename_full_func)
uiPopupMenu * UI_popup_menu_begin_ex(bContext *C, const char *title, const char *block_name, int icon) ATTR_NONNULL()
bool UI_but_has_quick_tooltip(const uiBut *but)
void uiTemplateTextureUser(uiLayout *layout, bContext *C)
void UI_blocklist_free(const bContext *C, ARegion *region)
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale)
void uiTemplateModifiers(uiLayout *layout, bContext *C)
void(*)(bContext *C, const uiBlockInteraction_Params *params, void *arg1, void *user_data) uiBlockInteractionUpdateFn
void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
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)
bool(*)(const uiBut *a, const uiBut *b) uiButIdentityCompareFunc
void UI_but_color_set(uiBut *but, const uchar color[4])
void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
wmOperatorStatus UI_pie_menu_invoke(bContext *C, const char *idname, const wmEvent *event)
std::string UI_but_string_get_rna_label_context(const uiBut &but)
void UI_block_lock_clear(uiBlock *block)
void UI_but_func_search_set_results_are_suggestions(uiBut *but, bool value)
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
void UI_panel_drawname_set(Panel *panel, blender::StringRef name)
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
Definition interface.cc:641
void UI_interface_tag_script_reload()
bool UI_view_item_popup_keep_open(const blender::ui::AbstractViewItem &item)
@ UI_RETURN_UPDATE
@ UI_RETURN_OUT_PARENT
@ UI_RETURN_CANCEL
@ UI_RETURN_POPUP_OK
@ UI_RETURN_OK
@ UI_RETURN_OUT
void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4])
void UI_popup_dummy_panel_set(ARegion *region, uiBlock *block)
int UI_but_unit_type_get(const uiBut *but)
std::optional< std::string > UI_key_event_operator_string(const bContext *C, blender::StringRefNull opname, IDProperty *properties, bool is_strict)
void(*)(bContext *C, void *arg, char *origstr) uiButHandleRenameFunc
uiBlock * UI_region_block_find_mouse_over(const ARegion *region, const int xy[2], bool only_clip)
PointerRNA * UI_list_custom_drag_operator_set(uiList *ui_list, blender::StringRefNull opname, bool create_properties)
void uiTemplateNodeLink(uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
uiBut * UI_region_active_but_get(const ARegion *region)
uiBut * uiDefSearchButO_ptr(uiBlock *block, wmOperatorType *ot, IDProperty *properties, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiBut * uiDefIconButO_ptr(uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiBut * uiDefBut(uiBlock *block, int 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_popup_block_invoke(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
void UI_but_menu_disable_hover_open(uiBut *but)
uiBut * uiDefButO(uiBlock *block, int type, blender::StringRefNull opname, wmOperatorCallContext opcontext, const std::optional< blender::StringRef > str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_block_bounds_set_normal(uiBlock *block, int addval)
Definition interface.cc:625
void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerRNA *fileptr)
Panel * UI_panel_find_by_type(ListBase *lb, const PanelType *pt)
void uiTemplateConstraintHeader(uiLayout *layout, PointerRNA *ptr)
blender::ui::AbstractView * UI_region_view_find_at(const ARegion *region, const int xy[2], int pad)
void UI_draw_roundbox_4fv_ex(const rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad)
void uiTemplateAssetView(uiLayout *layout, const bContext *C, const char *list_id, PointerRNA *asset_library_dataptr, const char *asset_library_propname, PointerRNA *assets_dataptr, const char *assets_propname, PointerRNA *active_dataptr, const char *active_propname, const blender::ed::asset::AssetFilterSettings *filter_settings, int display_flags, const char *activate_opname, PointerRNA *r_activate_op_properties, const char *drag_opname, PointerRNA *r_drag_op_properties)
ARegion * UI_region_searchbox_region_get(const ARegion *button_region)
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)
std::optional< int64_t > UI_but_context_int_get(const uiBut *but, blender::StringRef name)
bool UI_but_is_userdef(const uiBut *but)
bool UI_panel_matches_search_filter(const Panel *panel)
void UI_blocklist_update_view_for_buttons(const bContext *C, const ListBase *lb)
void UI_panel_header_buttons_begin(Panel *panel)
uiBut * UI_region_but_find_rect_over(const ARegion *region, const rcti *rect_px)
uiTooltipImageBackground
void UI_panels_free_instanced(const bContext *C, ARegion *region)
bool UI_list_item_index_is_filtered_visible(const struct uiList *ui_list, int item_idx)
MenuType * UI_but_menutype_get(const uiBut *but)
void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA *fileptr)
void UI_tooltip_text_field_add(uiTooltipData &data, std::string text, std::string suffix, const uiTooltipStyle style, const uiTooltipColorID color_id, const bool is_pad=false)
void UI_fontstyle_draw_simple_backdrop(const uiFontStyle *fs, float x, float y, blender::StringRef str, const float col_fg[4], const float col_bg[4])
bool UI_but_is_utf8(const uiBut *but)
const uiStyle * UI_style_get_dpi()
uiLayout * uiTemplateGpencilModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr)
void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_management)
bool UI_block_is_empty(const uiBlock *block)
int UI_preview_tile_size_y(const int size_px=96)
std::optional< std::string > UI_but_online_manual_id_from_active(const bContext *C) ATTR_WARN_UNUSED_RESULT
void uiTemplateIDTabs(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *menu, int filter=UI_TEMPLATE_ID_FILTER_ALL)
void UI_but_func_menu_step_set(uiBut *but, uiMenuStepFunc func)
bool UI_drop_color_poll(bContext *C, wmDrag *drag, const wmEvent *event)
bool UI_panel_category_is_visible(const ARegion *region)
int UI_icon_from_id(const ID *id)
void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
void UI_popup_block_ex(bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg, wmOperator *op)
bool UI_editsource_enable_check()
int UI_icon_colorid_from_report_type(int type)
void(*)(bContext *C, void *arg1) uiBlockCancelFunc
uiList * uiTemplateList_ex(uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, blender::StringRefNull propname, PointerRNA *active_dataptr, blender::StringRefNull active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, enum uiTemplateListFlags flags, void *customdata)
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
void UI_popup_block_invoke_ex(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free, bool can_refresh)
void UI_block_listen(const uiBlock *block, const wmRegionListenerParams *listener_params)
void UI_block_translate(uiBlock *block, float x, float y)
Definition interface.cc:390
void UI_but_operator_set(uiBut *but, wmOperatorType *optype, wmOperatorCallContext opcontext, const PointerRNA *opptr=nullptr)
void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, bool compact)
PointerRNA * UI_but_extra_operator_icon_add(uiBut *but, blender::StringRefNull opname, wmOperatorCallContext opcontext, int icon)
void UI_block_flag_disable(uiBlock *block, int flag)
std::optional< EnumPropertyItem > UI_but_rna_enum_item_get(bContext &C, uiBut &but)
uiBut * uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
void UI_popover_once_clear(uiPopover *pup)
void UI_widgetbase_draw_cache_end()
std::string UI_but_context_menu_title_from_button(uiBut &but)
bool UI_view_item_drag_start(bContext &C, const blender::ui::AbstractViewItem &item)
void UI_but_drawflag_enable(uiBut *but, int flag)
void UI_butstore_update(uiBlock *block)
void uiTemplateHeader3D_mode(uiLayout *layout, bContext *C)
int UI_but_return_value_get(uiBut *but)
void uiTemplateColormanagedViewSettings(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname)
void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn)
void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
void uiDefAutoButsArrayR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const int icon, const int x, const int y, const int tot_width, const int height)
PointerRNA * UI_but_extra_operator_icon_opptr_get(const uiButExtraOpIcon *extra_icon)
uiBut * uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
ARegion * UI_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but, bool is_quick_tip)
void UI_but_flag2_enable(uiBut *but, int flag)
void UI_but_drag_set_image(uiBut *but, const char *path, int icon, const ImBuf *imb, float scale)
void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, blender::StringRefNull proptypename, std::optional< blender::StringRef > text)
void UI_but_tooltip_timer_remove(bContext *C, uiBut *but)
void UI_draw_roundbox_corner_set(int type)
void UI_reinit_font()
void UI_but_number_step_size_set(uiBut *but, float step_size)
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
void UI_panels_begin(const bContext *C, ARegion *region)
Panel * UI_panel_begin(ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open)
bool uiTemplateCacheFilePointer(PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *r_file_ptr)
std::string UI_but_string_get_operator_keymap(bContext &C, uiBut &but)
void uiTemplateMenuSearch(uiLayout *layout)
std::string UI_but_string_get_rna_tooltip(bContext &C, uiBut &but)
void UI_but_func_identity_compare_set(uiBut *but, uiButIdentityCompareFunc cmp_fn)
eButLabelAlign
@ UI_BUT_LABEL_ALIGN_SPLIT_COLUMN
@ UI_BUT_LABEL_ALIGN_NONE
@ UI_BUT_LABEL_ALIGN_COLUMN
uiPieMenu * UI_pie_menu_begin(bContext *C, const char *title, int icon, const wmEvent *event) ATTR_NONNULL()
wmOperatorStatus UI_popover_panel_invoke(bContext *C, const char *idname, bool keep_open, ReportList *reports)
bool UI_block_active_only_flagged_buttons(const bContext *C, ARegion *region, uiBlock *block)
void UI_popup_block_close(bContext *C, wmWindow *win, uiBlock *block)
void uiTemplateOperatorSearch(uiLayout *layout)
std::string UI_but_string_get_label(uiBut &but)
void ED_operatortypes_ui()
uiBut * UI_context_active_but_get(const bContext *C)
std::string UI_but_string_get_rna_label(uiBut &but)
bool UI_popup_block_name_exists(const bScreen *screen, blender::StringRef name)
void uiTemplateImageViews(uiLayout *layout, PointerRNA *imaptr)
@ UI_CNR_BOTTOM_LEFT
@ UI_CNR_BOTTOM_RIGHT
@ UI_CNR_ALL
@ UI_CNR_TOP_LEFT
@ UI_CNR_TOP_RIGHT
@ UI_CNR_NONE
int UI_searchbox_size_x_guess(const bContext *C, const uiButSearchUpdateFn update_fn, void *arg)
@ UI_BUT2_FORCE_SEMI_MODAL_ACTIVE
@ UI_BUT2_ACTIVATE_ON_INIT_NO_SELECT
int UI_fontstyle_height_max(const uiFontStyle *fs)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, bool(*check_prop)(PointerRNA *ptr, PropertyRNA *prop, void *user_data), void *user_data, PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
void UI_but_context_int_set(uiBlock *block, uiBut *but, blender::StringRef name, int64_t value)
void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but)
void *(*)(const void *argN) uiButArgNCopy
int UI_panel_size_y(const Panel *panel)
void UI_fontstyle_draw_ex(const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const uiFontStyleDraw_Params *fs_params, int *r_xofs, int *r_yofs, ResultBLF *r_info)
void(*)(void *argN) uiButArgNFree
wmOperatorStatus UI_pie_menu_invoke_from_rna_enum(bContext *C, const char *title, const char *path, const wmEvent *event)
void UI_but_execute(const bContext *C, ARegion *region, uiBut *but)
void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y)
int UI_searchbox_size_x()
bool UI_block_has_active_default_button(const uiBlock *block)
void UI_fontstyle_draw_rotated(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4])
uiLayout * UI_popover_layout(uiPopover *pup)
void UI_update_text_styles()
@ UI_ID_FULL
@ UI_ID_BROWSE
@ UI_ID_DELETE
@ UI_ID_ADD_NEW
@ UI_ID_OPEN
@ UI_ID_PIN
@ UI_ID_RENAME
@ UI_ID_NOP
@ UI_ID_PREVIEWS
@ UI_ID_AUTO_NAME
@ UI_ID_OVERRIDE
@ UI_ID_LOCAL
@ UI_ID_FAKE_USER
@ UI_ID_ALONE
void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p)
blender::Vector< blender::StringRef > UI_text_clip_multiline_middle(const uiFontStyle *fstyle, const char *str, char *clipped_str_buf, const size_t max_len_clipped_str_buf, const float max_line_width, const int max_lines)
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)
uiBut * uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
uiBut * uiDefButBitC(uiBlock *block, int type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_view_item_begin_rename(blender::ui::AbstractViewItem &item)
void(*)(bContext *C, const uiBlockInteraction_Params *params, void *arg1, void *user_data) uiBlockInteractionEndFn
uiBut * uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, std::optional< blender::StringRefNull > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src)
void UI_region_message_subscribe(ARegion *region, wmMsgBus *mbus)
void UI_panel_category_active_set(ARegion *region, const char *idname)
@ UI_BLOCK_THEME_STYLE_REGULAR
@ UI_BLOCK_THEME_STYLE_POPUP
ID * UI_context_active_but_get_tab_ID(bContext *C)
eFontStyle_Align
@ UI_STYLE_TEXT_LEFT
@ UI_STYLE_TEXT_CENTER
@ UI_STYLE_TEXT_RIGHT
void uiTemplateFileSelectPath(uiLayout *layout, bContext *C, FileSelectParams *params)
ARegion * UI_tooltip_create_from_button_or_extra_icon(bContext *C, ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_quick_tip)
void(*)(bContext *C, void *arg, int event) uiBlockHandleFunc
void uiTemplateBoneCollectionTree(uiLayout *layout, bContext *C)
void UI_panel_custom_data_set(Panel *panel, PointerRNA *custom_data)
void uiTemplatePreview(uiLayout *layout, bContext *C, ID *id, bool show_buttons, ID *parent, MTex *slot, const char *preview_id)
bool UI_search_item_add(uiSearchItems *items, blender::StringRef name, void *poin, int iconid, int but_flag, uint8_t name_prefix_offset)
void UI_but_number_slider_precision_set(uiBut *but, float precision)
void uiTemplateConstraints(uiLayout *layout, bContext *C, bool use_bone_constraints)
void UI_but_func_operator_search(uiBut *but)
int UI_autocomplete_end(AutoComplete *autocpl, char *autoname)
void UI_editsource_active_but_test(uiBut *but)
uiBut * uiDefIconPreviewBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
bool UI_panel_is_active(const Panel *panel)
const uiStyle * UI_style_get()
bool UI_panel_should_show_background(const ARegion *region, const PanelType *panel_type)
void UI_but_dragflag_enable(uiBut *but, int flag)
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
void uiTemplateOperatorPropertyButs(const bContext *C, uiLayout *layout, wmOperator *op, eButLabelAlign label_align, short flag)
bool UI_block_is_search_only(const uiBlock *block)
bool UI_but_active_only_ex(const bContext *C, ARegion *region, uiBlock *block, uiBut *but, bool remove_on_failure)
void UI_but_type_set_menu_from_pulldown(uiBut *but)
void UI_fontstyle_set(const uiFontStyle *fs)
void UI_draw_roundbox_3fv_alpha(const rctf *rect, bool filled, float rad, const float col[3], float alpha)
void UI_but_drag_set_path(uiBut *but, const char *path)
uiBut * uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiBut * uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
eBlockBoundsCalc
@ UI_BLOCK_BOUNDS_PIE_CENTER
@ UI_BLOCK_BOUNDS_POPUP_MOUSE
@ UI_BLOCK_BOUNDS_POPUP_CENTER
@ UI_BLOCK_BOUNDS_POPUP_MENU
@ UI_BLOCK_BOUNDS_TEXT
@ UI_BLOCK_BOUNDS
@ UI_BLOCK_BOUNDS_NONE
uiBut * uiDefIconButO(uiBlock *block, int type, blender::StringRefNull opname, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiBut * uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
uiBut * uiDefButC(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_panel_category_clear_all(ARegion *region)
bool uiTemplateEventFromKeymapItem(uiLayout *layout, blender::StringRefNull text, const wmKeyMapItem *kmi, bool text_fallback)
void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool expand)
std::optional< std::string > UI_but_online_manual_id(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void UI_pie_menu_end(bContext *C, uiPieMenu *pie)
blender::ui::AbstractViewItem * UI_region_views_find_active_item(const ARegion *region)
void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr)
uiBut * UI_context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
PointerRNA * UI_but_operator_ptr_ensure(uiBut *but)
uiTooltipStyle
@ UI_TIP_STYLE_IMAGE
@ UI_TIP_STYLE_MONO
@ UI_TIP_STYLE_NORMAL
@ UI_TIP_STYLE_SPACER
@ UI_TIP_STYLE_HEADER
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
int(*)(bContext *C, char *str, void *arg) uiButCompleteFunc
PanelCategoryStack * UI_panel_category_active_find(ARegion *region, const char *idname)
void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn context_menu_fn)
float UI_text_clip_middle_ex(const uiFontStyle *fstyle, char *str, float okwidth, float minwidth, size_t max_len, char rpart_sep, bool clip_right_if_tight=true)
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)
@ UI_SCROLL_PRESSED
@ UI_SCROLL_ARROWS
void UI_but_number_slider_step_size_set(uiBut *but, float step_size)
uiBut * uiDefButI(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2])
Definition interface.cc:655
void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1)
bool UI_view_item_matches(const blender::ui::AbstractViewItem &a, const blender::ui::AbstractViewItem &b)
std::string UI_but_string_get_rna_property_identifier(const uiBut &but)
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
bool UI_block_is_empty_ex(const uiBlock *block, bool skip_title)
void UI_but_drawflag_disable(uiBut *but, int flag)
void UI_block_draw(const bContext *C, uiBlock *block)
bool(*)(bContext *C, void *arg, void *active, const wmEvent *event) uiButSearchContextMenuFn
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< blender::StringRef > text=std::nullopt)
void UI_but_dragflag_disable(uiBut *but, int flag)
int UI_search_items_find_index(const uiSearchItems *items, const char *name)
std::string UI_but_extra_icon_string_get_tooltip(bContext &C, const uiButExtraOpIcon &extra_icon)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, std::optional< blender::StringRef > tip)
bool UI_textbutton_activate_but(const bContext *C, uiBut *actbut)
void UI_drop_color_copy(bContext *C, wmDrag *drag, wmDropBox *drop)
void uiTemplateIDBrowse(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, const char *text=nullptr)
void uiTemplateSearchPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, int rows, int cols, std::optional< blender::StringRef > text=std::nullopt)
uiBut * uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_context_active_but_clear(bContext *C, wmWindow *win, ARegion *region)
void uiTemplateNodeSocket(uiLayout *layout, bContext *C, const float color[4])
void UI_exit()
void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
bool UI_butstore_is_registered(uiBlock *block, uiBut *but)
void uiTemplatePalette(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool colors)
void UI_block_bounds_set_text(uiBlock *block, int addval)
Definition interface.cc:635
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
void uiTemplateIDPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool hide_buttons=false)
PanelType * UI_but_paneltype_get(const uiBut *but)
bool UI_popup_menu_end_or_cancel(bContext *C, uiPopupMenu *pup)
void UI_block_align_begin(uiBlock *block)
int UI_searchbox_size_y()
void UI_style_init_default()
void UI_but_drag_set_asset(uiBut *but, const blender::asset_system::AssetRepresentation *asset, const AssetImportSettings &import_settings, int icon, int preview_icon)
void UI_but_context_ptr_set(uiBlock *block, uiBut *but, blender::StringRef name, const PointerRNA *ptr)
bool UI_butstore_is_valid(uiButStore *bs_handle)
wmOperatorStatus UI_pie_menu_invoke_from_operator_enum(bContext *C, blender::StringRefNull title, blender::StringRefNull opname, blender::StringRefNull propname, const wmEvent *event)
void uiTemplateCollectionExporters(uiLayout *layout, bContext *C)
void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
void UI_blocklist_free_inactive(const bContext *C, ARegion *region)
@ UI_BUT_TEXT_RIGHT
@ UI_BUT_ICON_LEFT
@ UI_BUT_ALIGN_ALL
@ UI_BUT_INDETERMINATE
@ UI_BUT_ICON_INVERT
@ UI_BUT_HAS_QUICK_TOOLTIP
@ UI_BUT_ALIGN_DOWN
@ UI_BUT_ALIGN_TOP
@ UI_BUT_ALIGN
@ UI_BUT_NO_TEXT_PADDING
@ UI_BUT_NO_TOOLTIP
@ UI_BUT_CHECKBOX_INVERT
@ UI_BUT_NO_PREVIEW_PADDING
@ UI_BUT_HOVER_RIGHT
@ UI_BUT_ALIGN_STITCH_TOP
@ UI_BUT_HOVER_LEFT
@ UI_BUT_ANIMATED_CHANGED
@ UI_BUT_TEXT_LEFT
@ UI_BUT_BOX_ITEM
@ UI_BUT_ALIGN_STITCH_LEFT
@ UI_BUT_ALIGN_RIGHT
@ UI_BUT_ALIGN_LEFT
@ UI_BUT_ICON_REVERSE
void uiTemplateOperatorRedoProperties(uiLayout *layout, const bContext *C)
void UI_butstore_clear(uiBlock *block)
uiBut * uiDefIconButR_prop(uiBlock *block, int 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)
uiBut * UI_but_active_drop_name_button(const bContext *C)
uiBut * uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
void(*)(bContext *C, ARegion *butregion, uiBut *but) uiButHandleHoldFunc
uiBut * UI_context_active_but_get_respect_popup(const bContext *C)
void UI_but_icon_indicator_set(uiBut *but, const char *string)
int UI_panel_category_index_find(ARegion *region, const char *idname)
int UI_fontstyle_string_width(const uiFontStyle *fs, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void UI_context_active_but_prop_get_templateID(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop)
void uiTemplateNodeInputs(uiLayout *layout, bContext *C, PointerRNA *ptr)
void UI_autocomplete_update_name(AutoComplete *autocpl, blender::StringRef name)
void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string)
void UI_but_hint_drawstr_set(uiBut *but, const char *string)
void UI_popup_handlers_add(bContext *C, ListBase *handlers, uiPopupBlockHandle *popup, char flag)
wmOperatorType * UI_but_extra_operator_icon_optype_get(const uiButExtraOpIcon *extra_icon)
int uiTemplateRecentFiles(uiLayout *layout, int rows)
void UI_panel_category_active_set_default(ARegion *region, const char *idname)
uiBut * uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void UI_but_operator_set_never_call(uiBut *but)
void UI_fontstyle_draw_multiline_clipped(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4], eFontStyle_Align align)
uiBut * uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, char *poin, float min, float max, std::optional< blender::StringRef > tip)
blender::ui::EmbossType UI_block_emboss_get(uiBlock *block)
void UI_blocklist_draw(const bContext *C, const ListBase *lb)
PointerRNA * UI_list_custom_activate_operator_set(uiList *ui_list, blender::StringRefNull opname, bool create_properties)
int UI_blocklist_min_y_get(ListBase *lb)
int int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs, blender::StringRef str, float aspect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
uiBut * uiDefIconTextButO_ptr(uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void uiTemplateGpencilColorPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, int rows, int cols, float scale, int filter)
eButGradientType
@ UI_GRAD_L_ALT
@ UI_GRAD_SV
@ UI_GRAD_V_ALT
@ UI_GRAD_S
@ UI_GRAD_HV
@ UI_GRAD_HS
@ UI_GRAD_V
@ UI_GRAD_H
@ UI_GRAD_NONE
void uiTemplateEditModeSelection(uiLayout *layout, bContext *C)
uiBut * uiDefButImage(uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4])
void UI_context_active_but_prop_handle(bContext *C, bool handle_undo)
uiButStore * UI_butstore_create(uiBlock *block)
void UI_draw_widget_scroll(uiWidgetColors *wcol, const rcti *rect, const rcti *slider, int state)
bool UI_context_copy_to_selected_list(bContext *C, PointerRNA *ptr, PropertyRNA *prop, blender::Vector< PointerRNA > *r_lb, bool *r_use_path_from_id, std::optional< std::string > *r_path)
void UI_block_funcN_set(uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
wmOperatorStatus UI_popup_menu_invoke(bContext *C, const char *idname, ReportList *reports) ATTR_NONNULL(1
void(*)(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first) uiButSearchUpdateFn
uiBut * uiDefButBitS(uiBlock *block, int type, int bit, int retval, blender::StringRef str, int x, int y, short width, short height, short *poin, float min, float max, std::optional< blender::StringRef > tip)
bool UI_popup_block_template_confirm_is_supported(const uiBlock *block)
void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y)
@ UI_DIR_CENTER_X
@ UI_DIR_CENTER_Y
@ UI_DIR_ALL
@ UI_DIR_DOWN
@ UI_DIR_RIGHT
@ UI_DIR_LEFT
@ UI_DIR_UP
void UI_but_number_precision_set(uiBut *but, float precision)
void UI_block_bounds_set_centered(uiBlock *block, int addval)
Definition interface.cc:667
void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *root_ptr, std::optional< blender::StringRefNull > text)
void uiTemplateImageStereo3d(uiLayout *layout, PointerRNA *stereo3d_format_ptr)
bool UI_but_active_only(const bContext *C, ARegion *region, uiBlock *block, uiBut *but)
void UI_but_drag_set_rna(uiBut *but, PointerRNA *ptr)
uiBut * UI_region_active_but_prop_get(const ARegion *region, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
void UI_fontstyle_draw(const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const uiFontStyleDraw_Params *fs_params)
void UI_popup_block_template_confirm_op(uiLayout *layout, wmOperatorType *ot, std::optional< blender::StringRef > confirm_text, std::optional< blender::StringRef > cancel_text, const int icon, bool cancel_default, PointerRNA *r_ptr)
void uiTemplateTextureShow(uiLayout *layout, const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void(*)(bContext *C, void *argN, void *arg2) uiButHandleNFunc
ARegion *(*)(bContext *C, ARegion *region, const rcti *item_rect, void *arg, void *active) uiButSearchTooltipFn
void uiTemplateGreasePencilLayerTree(uiLayout *layout, bContext *C)
int UI_icon_from_event_type(short event_type, short event_value)
void UI_but_tooltip_refresh(bContext *C, uiBut *but)
@ UI_BUT_DRAGPOIN_FREE
@ UI_BUT_DRAG_FULL_BUT
void uiTemplateList(uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, blender::StringRefNull propname, PointerRNA *active_dataptr, const char *active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, enum uiTemplateListFlags flags)
int UI_preview_tile_size_x(const int size_px=96)
void UI_popup_menu_reports(bContext *C, ReportList *reports) ATTR_NONNULL()
uiBut * uiDefButO_ptr(uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
void ED_keymap_ui(wmKeyConfig *keyconf)
User Interface Keymap.
void uiTemplateCurveProfile(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
std::string UI_but_extra_icon_string_get_label(const uiButExtraOpIcon &extra_icon)
void UI_block_free(const bContext *C, uiBlock *block)
void(*)(bContext *C, void *arg1, void *arg2) uiButHandleFunc
bool UI_but_active_drop_color(bContext *C)
void UI_but_func_menu_search(uiBut *but, const char *single_menu_idname=nullptr)
bool UI_region_button_sections_is_inside_x(const ARegion *region, const int mval_x)
void UI_but_label_alpha_factor_set(uiBut *but, float alpha_factor)
uiButtonSectionsAlign
void uiTemplateImageFormatViews(uiLayout *layout, PointerRNA *imfptr, PointerRNA *ptr)
bool UI_view_item_supports_drag(const blender::ui::AbstractViewItem &item)
void UI_popup_menu_close_from_but(const uiBut *but, bool is_cancel=false)
void uiTemplateAction(uiLayout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, std::optional< blender::StringRef > text)
uiTooltipColorID
@ UI_TIP_LC_ALERT
@ UI_TIP_LC_PYTHON
@ UI_TIP_LC_MAIN
@ UI_TIP_LC_VALUE
@ UI_TIP_LC_NORMAL
@ UI_TIP_LC_ACTIVE
@ UI_TIP_LC_MAX
void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr)
void UI_panel_end(Panel *panel, int width, int height)
void UI_block_region_set(uiBlock *block, ARegion *region)
void UI_panel_category_index_active_set(ARegion *region, const int index)
bool UI_panel_list_matches_data(ARegion *region, ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
void UI_block_direction_set(uiBlock *block, char direction)
void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN)
ARegion *(*)(bContext *C, ARegion *butregion, uiButSearch *search_but) uiButSearchCreateFn
const PointerRNA * UI_but_context_ptr_get(const uiBut *but, blender::StringRef name, const StructRNA *type=nullptr)
void UI_butstore_free(uiBlock *block, uiButStore *bs_handle)
void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but)
void UI_screen_free_active_but_highlight(const bContext *C, bScreen *screen)
void UI_block_set_active_operator(uiBlock *block, wmOperator *op, const bool free)
void UI_but_icon_indicator_color_set(uiBut *but, const uchar color[4])
eButPointerType
@ UI_BUT_POIN_SHORT
@ UI_BUT_POIN_NONE
@ UI_BUT_POIN_INT
@ UI_BUT_POIN_BIT
@ UI_BUT_POIN_CHAR
@ UI_BUT_POIN_FLOAT
void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg)
void *(*)(bContext *C, const uiBlockInteraction_Params *params, void *arg1) uiBlockInteractionBeginFn
void UI_panel_header_buttons_end(Panel *panel)
bool UI_panel_is_dragging(const Panel *panel)
void UI_but_func_search_set_listen(uiBut *but, uiButSearchListenFn listen_fn)
void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
std::string UI_but_string_get_tooltip_label(const uiBut &but)
std::string UI_but_string_get_tooltip(bContext &C, uiBut &but)
void UI_panels_draw(const bContext *C, ARegion *region)
int uiTemplateStatusBarModalItem(uiLayout *layout, const wmKeyMap *keymap, const EnumPropertyItem *item)
uiBlock *(*)(bContext *C, ARegion *region, void *arg1) uiBlockCreateFunc
void UI_block_flag_enable(uiBlock *block, int flag)
uiBut * uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
std::string UI_but_string_get_rna_struct_identifier(const uiBut &but)
@ UI_BTYPE_BUT
@ UI_BTYPE_TOGGLE
@ UI_BTYPE_PROGRESS
@ UI_BTYPE_EXTRA
@ UI_BTYPE_TAB
@ UI_BTYPE_HOTKEY_EVENT
@ UI_BTYPE_LISTBOX
@ UI_BTYPE_VECTORSCOPE
@ UI_BTYPE_SEPR_SPACER
@ UI_BTYPE_NODE_SOCKET
@ UI_BTYPE_ROUNDBOX
@ UI_BTYPE_COLORBAND
@ UI_BTYPE_BUT_MENU
@ UI_BTYPE_TOGGLE_N
@ UI_BTYPE_HISTOGRAM
@ UI_BTYPE_WAVEFORM
@ UI_BTYPE_BLOCK
@ UI_BTYPE_NUM_SLIDER
@ UI_BTYPE_HSVCIRCLE
@ UI_BTYPE_LISTROW
@ UI_BTYPE_TEXT
@ UI_BTYPE_BUT_TOGGLE
@ UI_BTYPE_VIEW_ITEM
@ UI_BTYPE_HSVCUBE
@ UI_BTYPE_PREVIEW_TILE
@ UI_BTYPE_LABEL
@ UI_BTYPE_CURVE
@ UI_BTYPE_ICON_TOGGLE_N
@ UI_BTYPE_DECORATOR
@ UI_BTYPE_ROW
@ UI_BTYPE_SEARCH_MENU
@ UI_BTYPE_UNITVEC
@ UI_BTYPE_SEPR_LINE
@ UI_BTYPE_KEY_EVENT
@ UI_BTYPE_POPOVER
@ UI_BTYPE_CHECKBOX_N
@ UI_BTYPE_SEPR
@ UI_BTYPE_NUM
@ UI_BTYPE_PULLDOWN
@ UI_BTYPE_CURVEPROFILE
@ UI_BTYPE_TRACK_PREVIEW
@ UI_BTYPE_COLOR
@ UI_BTYPE_CHECKBOX
@ UI_BTYPE_GRIP
@ UI_BTYPE_MENU
@ UI_BTYPE_ICON_TOGGLE
@ UI_BTYPE_IMAGE
@ UI_BTYPE_SCROLL
const bContextStore * UI_but_context_get(const uiBut *but)
void UI_but_drag_set_id(uiBut *but, ID *id)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
ARegion * UI_tooltip_create_from_search_item_generic(bContext *C, const ARegion *searchbox_region, const rcti *item_rect, ID *id)
@ UI_TEMPLATE_ID_FILTER_AVAILABLE
@ UI_TEMPLATE_ID_FILTER_ALL
void ED_uilisttypes_ui()
int UI_preview_tile_size_y_no_label(const int size_px=96)
void UI_theme_init_default()
void uiTemplateColorspaceSettings(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname)
@ UI_BUT_DRAG_LOCK
@ UI_BUT_LIST_ITEM
@ UI_BUT_REDALERT
@ UI_BUT_UNDO
@ UI_BUT_ACTIVE_DEFAULT
@ UI_BUT_ACTIVATE_ON_INIT
@ UI_BUT_ANIMATED
@ UI_BUT_DISABLED
@ UI_BUT_INACTIVE
@ UI_BUT_OVERRIDDEN
@ UI_BUT_NO_UTF8
@ UI_BUT_HAS_SEP_CHAR
@ UI_BUT_NODE_LINK
@ UI_BUT_ICON_PREVIEW
@ UI_BUT_NODE_ACTIVE
@ UI_BUT_DRIVEN
@ UI_BUT_DRAG_MULTI
@ UI_BUT_UPDATE_DELAY
@ UI_BUT_ICON_SUBMENU
@ UI_BUT_VALUE_CLEAR
@ UI_BUT_TEXTEDIT_UPDATE
@ UI_BUT_ANIMATED_KEY
@ UI_BUT_LAST_ACTIVE
void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr, bool compact, bool multiview)
uiBut * uiDefButR(uiBlock *block, int type, int retval, std::optional< blender::StringRef > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
void UI_draw_roundbox_aa(const rctf *rect, bool filled, float rad, const float color[4])
void UI_list_panel_unique_str(Panel *panel, char *r_name)
void UI_popup_handlers_remove(ListBase *handlers, uiPopupBlockHandle *popup)
void UI_panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr)
wmOperator * UI_context_active_operator_get(const bContext *C)
int UI_calc_float_precision(int prec, double value)
@ UI_BLOCK_SEARCH_MENU
@ UI_BLOCK_CLIP_EVENTS
@ UI_BLOCK_SEARCH_ONLY
@ UI_BLOCK_CLIPBOTTOM
@ UI_BLOCK_POPOVER_ONCE
@ UI_BLOCK_NUMSELECT
@ UI_BLOCK_LOOP
@ UI_BLOCK_POPUP_MEMORY
@ UI_BLOCK_MOVEMOUSE_QUIT
@ UI_BLOCK_NO_ACCELERATOR_KEYS
@ UI_BLOCK_PIE_MENU
@ UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE
@ UI_BLOCK_KEEP_OPEN
@ UI_BLOCK_POPUP
@ UI_BLOCK_CLIPTOP
@ UI_BLOCK_SHOW_SHORTCUT_ALWAYS
@ UI_BLOCK_LIST_ITEM
@ UI_BLOCK_POPOVER
@ UI_BLOCK_OUT_1
@ UI_BLOCK_POPUP_HOLD
@ UI_BLOCK_QUICK_SETUP
@ UI_BLOCK_NO_WIN_CLIP
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
@ UI_TEMPLATE_ASSET_DRAW_NO_NAMES
@ UI_TEMPLATE_ASSET_DRAW_NO_LIBRARY
@ UI_TEMPLATE_ASSET_DRAW_NO_FILTER
Panel * UI_panel_add_instanced(const bContext *C, ARegion *region, ListBase *panels, const char *panel_idname, PointerRNA *custom_data)
std::string UI_but_extra_icon_string_get_operator_keymap(const bContext &C, const uiButExtraOpIcon &extra_icon)
void UI_panel_category_add(ARegion *region, const char *name)
void uiTemplateCacheFileTimeSettings(uiLayout *layout, PointerRNA *fileptr)
uiBut * uiDefButF(uiBlock *block, int type, int retval, blender::StringRef str, int x, int y, short width, short height, float *poin, float min, float max, std::optional< blender::StringRef > tip)
void uiTemplateShaderFx(uiLayout *layout, bContext *C)
void UI_but_unit_type_set(uiBut *but, int unit_type)
void UI_block_end_ex(const bContext *C, Main *bmain, wmWindow *window, Scene *scene, ARegion *region, Depsgraph *depsgraph, uiBlock *block, const int xy[2]=nullptr, int r_xy[2]=nullptr)
bool UI_but_is_tool(const uiBut *but)
std::optional< blender::StringRefNull > UI_but_context_string_get(const uiBut *but, blender::StringRef name)
void UI_widgetbase_draw_cache_flush()
void UI_region_handlers_add(ListBase *handlers)
void UI_block_end(const bContext *C, uiBlock *block)
uiBut * uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, blender::StringRef str, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_search_preview_grid_size_set(uiBut *but, int rows, int cols)
void UI_block_set_search_only(uiBlock *block, bool search_only)
void UI_but_node_link_set(uiBut *but, bNodeSocket *socket, const float draw_color[4])
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr)
AutoComplete * UI_autocomplete_begin(const char *startname, size_t maxncpy)
uiBut * uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_func_quick_tooltip_set(uiBut *but, std::function< std::string(const uiBut *but)> func)
void UI_widgetbase_draw_cache_begin()
PointerRNA * UI_region_panel_custom_data_under_cursor(const bContext *C, const wmEvent *event)
const char * UI_panel_category_active_get(ARegion *region, bool set_fallback)
wmOperatorStatus void UI_popup_menu_close(const uiBlock *block, bool is_cancel=false)
void uiTemplateSearch(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, std::optional< blender::StringRef > text=std::nullopt)
bool UI_context_copy_to_selected_check(PointerRNA *ptr, PointerRNA *ptr_link, PropertyRNA *prop, const char *path, bool use_path_from_id, PointerRNA *r_ptr, PropertyRNA **r_prop)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_region_free_active_but_all(bContext *C, ARegion *region)
uiBut * uiDefIconTextButO(uiBlock *block, int type, blender::StringRefNull, wmOperatorCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip)
uiTemplateListFlags
@ UI_TEMPLATE_LIST_SORT_LOCK
@ UI_TEMPLATE_LIST_SORT_REVERSE
@ UI_TEMPLATE_LIST_NO_NAMES
@ UI_TEMPLATE_LIST_FLAGS_LAST
@ UI_TEMPLATE_LIST_FLAG_NONE
@ UI_TEMPLATE_LIST_NO_FILTER_OPTIONS
@ UI_TEMPLATE_LIST_NO_GRIP
void(*)(bContext &C, uiTooltipData &data, void *argN) uiButToolTipCustomFunc
uiBut * uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, blender::StringRef str, int x, int y, short width, short height, std::optional< blender::StringRef > tip, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
void(*)(const wmRegionListenerParams *params, void *arg) uiButSearchListenFn
void UI_but_view_item_draw_size_set(uiBut *but, const std::optional< int > draw_width=std::nullopt, const std::optional< int > draw_height=std::nullopt)
std::optional< blender::StringRefNull > UI_but_asset_shelf_type_idname_get(const uiBut *but)
uiBut * UI_region_views_find_active_item_but(const ARegion *region)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
void UI_fontstyle_draw_multiline_clipped_ex(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4], eFontStyle_Align align, int *r_xofs, int *r_yofs, ResultBLF *r_info)
void uiTemplateCacheFile(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname)
bool UI_but_flag_is_set(uiBut *but, int flag)
wmOperatorType * UI_but_operatortype_get_from_enum_menu(uiBut *but, PropertyRNA **r_prop)
void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int icon)
blender::ui::AbstractViewItem * UI_region_views_find_item_at(const ARegion &region, const int xy[2])
void UI_popup_handlers_remove_all(bContext *C, ListBase *handlers)
void uiTemplateHeader(uiLayout *layout, bContext *C)
void UI_but_drag_set_name(uiBut *but, const char *name)
void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy)
Definition interface.cc:673
void UI_block_align_end(uiBlock *block)
void(*)(void *arg) uiFreeArgFunc
void(*)(bContext *C, uiLayout *layout, void *arg1) uiMenuCreateFunc
std::string(*)(bContext *C, void *argN, blender::StringRef tip) uiButToolTipFunc
bool(*)(bContext *C, int direction, void *arg1) uiMenuStepFunc
ReportList * reports
Definition WM_types.hh:1025
wmOperatorCallContext
Definition WM_types.hh:236
#define KM_MOD_NUM
Definition WM_types.hh:294
int pad[32 - sizeof(int)]
volatile int lock
BMesh const char void * data
BPy_StructRNA * depsgraph
long long int int64_t
#define str(s)
uint pos
uint col
#define input
#define active
#define filter
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void * MEM_dupallocN(const void *vmemh)
Definition mallocn.cc:143
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
static ulong state[N]
void template_asset_shelf_popover(uiLayout &layout, const bContext &C, StringRefNull asset_shelf_id, StringRef name, int icon)
#define min(a, b)
Definition sort.cc:36
const char * startname
Definition DNA_ID.h:404
uiBlockInteractionBeginFn begin_fn
uiBlockInteractionEndFn end_fn
uiBlockInteractionUpdateFn update_fn
uiBlock * block
uiTooltipImageBackground background
max
Definition text_draw.cc:251
uint len
int xy[2]
Definition wm_draw.cc:174
PointerRNA * ptr
Definition wm_files.cc:4227
wmOperatorType * ot
Definition wm_files.cc:4226
uint8_t flag
Definition wm_window.cc:139