Blender V4.3
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#include "UI_interface_icons.hh"
21#include "WM_types.hh"
22
23#include "MEM_guardedalloc.h"
24
25/* Struct Declarations */
26
27struct ARegion;
28struct AutoComplete;
29struct EnumPropertyItem;
30struct FileSelectParams;
31struct ID;
32struct IDProperty;
33struct ImBuf;
34struct Image;
35struct ImageUser;
36struct ListBase;
37struct MTex;
38struct Panel;
39struct PanelType;
40struct PanelCategoryDyn;
42struct PointerRNA;
43struct PropertyRNA;
44struct ReportList;
45struct ResultBLF;
46struct bContext;
47struct bContextStore;
48struct bNode;
49struct bNodeSocket;
50struct bNodeTree;
51struct bScreen;
52struct MenuType;
53struct rctf;
54struct rcti;
55struct uiButSearch;
56struct uiFontStyle;
57struct uiList;
58struct uiStyle;
59struct uiWidgetColors;
60struct wmDrag;
61struct wmDropBox;
62struct wmEvent;
63struct wmGizmo;
64struct wmKeyConfig;
65struct wmKeyMap;
66struct wmKeyMapItem;
67struct wmMsgBus;
68struct wmOperator;
69struct wmOperatorType;
71struct wmWindow;
72namespace blender::ed::asset {
74}
75namespace blender::ui {
76class AbstractView;
78} // namespace blender::ui
79
80struct uiBlock;
81struct uiBut;
82struct uiButExtraOpIcon;
83struct uiLayout;
85struct uiTooltipData;
86
87/* Defines */
88
94#define UI_SEP_CHAR '|'
95#define UI_SEP_CHAR_S "|"
96
100#define UI_VALUE_INDETERMINATE_CHAR BLI_STR_UTF8_EM_DASH
101
106#define UI_MENU_ARROW_SEP BLI_STR_UTF8_BLACK_RIGHT_POINTING_SMALL_TRIANGLE
107
108/* names */
109#define UI_MAX_DRAW_STR 400
110#define UI_MAX_NAME_STR 128
111#define UI_MAX_SHORTCUT_STR 64
112
119#define UI_REGION_OVERLAP_MARGIN (U.widget_unit / 3)
120
122#define UI_SCREEN_MARGIN 10
123
142
144enum {
145 UI_DIR_UP = 1 << 0,
146 UI_DIR_DOWN = 1 << 1,
147 UI_DIR_LEFT = 1 << 2,
148 UI_DIR_RIGHT = 1 << 3,
151
153};
154
156enum {
171
172 /* #uiBlock::flags bits 14-17 are identical to #uiBut::drawflag bits. */
173
190};
191
193enum {
197 UI_RETURN_OK = 1 << 1,
206};
207
209enum {
210 /* WARNING: the first 8 flags are internal (see #UI_SELECT definition). */
211
214
220
223 UI_BUT_DRIVEN = 1 << 16,
228 UI_BUT_UNDO = 1 << 20,
229 /* UNUSED = 1 << 21, */
230 UI_BUT_NO_UTF8 = 1 << 22,
231
236
243
257
259 UI_BUT_OVERRIDDEN = 1u << 31u,
260};
261
262enum {
275};
276
278enum {
283
284 /* --- Internal flags. --- */
286};
287
289#define UI_DEFAULT_TEXT_POINTS 11.0f
290
292#define UI_DEFAULT_TITLE_POINTS 11.0f
293
295#define UI_DEFAULT_TOOLTIP_POINTS 11.0f
296
297#define UI_PANEL_WIDTH 340
298#define UI_COMPACT_PANEL_WIDTH 160
299#define UI_SIDEBAR_PANEL_WIDTH 280
300#define UI_NAVIGATION_REGION_WIDTH UI_COMPACT_PANEL_WIDTH
301#define UI_NARROW_NAVIGATION_REGION_WIDTH 100
302
304#define UI_TOOLBAR_COLUMN (1.25f * ICON_DEFAULT_HEIGHT_TOOLBAR)
306#define UI_TOOLBAR_MARGIN (0.5f * ICON_DEFAULT_HEIGHT_TOOLBAR)
308#define UI_TOOLBAR_WIDTH UI_TOOLBAR_MARGIN + UI_TOOLBAR_COLUMN
309
310#define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 1.0f)
311
312/* Both these margins should be ignored if the panel doesn't show a background (check
313 * #UI_panel_should_show_background()). */
314#define UI_PANEL_MARGIN_X (U.widget_unit * 0.4f)
315#define UI_PANEL_MARGIN_Y (U.widget_unit * 0.1f)
316
323enum {
337
338 /* Button align flag, for drawing groups together.
339 * Used in 'uiBlock.flag', take care! */
345 /* end bits shared with 'uiBlock.flag' */
346
356
359
364
367
370
373
376
379};
380
390
395 // UI_BUT_POIN_FUNCTION = 192, /* UNUSED */
396 UI_BUT_POIN_BIT = 256, /* OR'd with a bit index. */
397};
398
400#define UI_BUT_POIN_TYPES (UI_BUT_POIN_FLOAT | UI_BUT_POIN_SHORT | UI_BUT_POIN_CHAR)
401
407 UI_BTYPE_BUT = 1 << 9,
408 UI_BTYPE_ROW = 2 << 9,
414 UI_BTYPE_NUM = 6 << 9,
426 UI_BTYPE_COLOR = 15 << 9,
427 UI_BTYPE_TAB = 16 << 9,
430 UI_BTYPE_BLOCK = 19 << 9,
431 UI_BTYPE_LABEL = 20 << 9,
440 UI_BTYPE_CURVE = 32 << 9,
447
450 UI_BTYPE_EXTRA = 42 << 9,
456 UI_BTYPE_IMAGE = 47 << 9,
462 UI_BTYPE_SEPR = 54 << 9,
467 UI_BTYPE_GRIP = 57 << 9,
471};
472
473#define BUTTYPE (63 << 9)
474
488
489/* Drawing
490 *
491 * Functions to draw various shapes, taking theme settings into account.
492 * Used for code that draws its own UI style elements. */
493
494void UI_draw_roundbox_corner_set(int type);
495void UI_draw_roundbox_aa(const rctf *rect, bool filled, float rad, const float color[4]);
496void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4]);
498 const rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha);
500 const rctf *rect, bool filled, float rad, const float col[3], float alpha);
501void UI_draw_roundbox_4fv_ex(const rctf *rect,
502 const float inner1[4],
503 const float inner2[4],
504 float shade_dir,
505 const float outline[4],
506 float outline_width,
507 float rad);
508
509#if 0 /* unused */
510int UI_draw_roundbox_corner_get();
511#endif
512
513void ui_draw_dropshadow(const rctf *rct, float radius, float width, float aspect, float alpha);
514
515void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4]);
516
526 const rctf *rect,
527 const float title_aspect[2],
528 const float action_aspect[2]);
529
531enum {
534};
538void UI_draw_widget_scroll(uiWidgetColors *wcol, const rcti *rect, const rcti *slider, int state);
539
554 char *str,
555 float okwidth,
556 float minwidth,
557 size_t max_len,
558 char rpart_sep);
559
575
576struct uiSearchItems;
577
578using uiButHandleFunc = void (*)(bContext *C, void *arg1, void *arg2);
579using uiButHandleRenameFunc = void (*)(bContext *C, void *arg, char *origstr);
580using uiButHandleNFunc = void (*)(bContext *C, void *argN, void *arg2);
581using uiButHandleHoldFunc = void (*)(bContext *C, ARegion *butregion, uiBut *but);
582using uiButCompleteFunc = int (*)(bContext *C, char *str, void *arg);
583
588using uiButArgNFree = void (*)(void *argN);
589using uiButArgNCopy = void *(*)(const void *argN);
590
595using uiButIdentityCompareFunc = bool (*)(const uiBut *a, const uiBut *b);
596
597/* Search types. */
598using uiButSearchCreateFn = ARegion *(*)(bContext *C, ARegion *butregion, uiButSearch *search_but);
605 void (*)(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first);
607 void *arg,
608 void *active,
609 const wmEvent *event);
611 ARegion *(*)(bContext *C, ARegion *region, const rcti *item_rect, void *arg, void *active);
612using uiButSearchListenFn = void (*)(const wmRegionListenerParams *params, void *arg);
613
615using uiButToolTipFunc = std::string (*)(bContext *C, void *argN, const char *tip);
616
617using uiButToolTipCustomFunc = void (*)(bContext &C, uiTooltipData &data, void *argN);
618
619using uiBlockHandleFunc = void (*)(bContext *C, void *arg, int event);
620
621/* -------------------------------------------------------------------- */
630
644
648 void *arg1);
651 void *arg1,
652 void *user_data);
655 void *arg1,
656 void *user_data);
657
664
666
668
669/* Menu Callbacks */
670
671using uiMenuCreateFunc = void (*)(bContext *C, uiLayout *layout, void *arg1);
672using uiMenuHandleFunc = void (*)(bContext *C, void *arg, int event);
679using uiMenuStepFunc = bool (*)(bContext *C, int direction, void *arg1);
680
681using uiCopyArgFunc = void *(*)(const void *arg);
682using uiFreeArgFunc = void (*)(void *arg);
683
684/* `interface_query.cc` */
685
686bool UI_but_has_tooltip_label(const uiBut *but);
687bool UI_but_is_tool(const uiBut *but);
688/* file selectors are exempt from utf-8 checks */
689bool UI_but_is_utf8(const uiBut *but);
690#define UI_but_is_decorator(but) ((but)->type == UI_BTYPE_DECORATOR)
691
692bool UI_block_is_empty_ex(const uiBlock *block, bool skip_title);
693bool UI_block_is_empty(const uiBlock *block);
694bool UI_block_can_add_separator(const uiBlock *block);
700
701uiList *UI_list_find_mouse_over(const ARegion *region, const wmEvent *event);
702
703/* `interface_region_menu_popup.cc` */
704
713struct uiPopupMenu;
714
715uiPopupMenu *UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL();
723 const char *title,
724 const char *block_name,
725 int icon) ATTR_NONNULL();
732
734int UI_popup_menu_invoke(bContext *C, const char *idname, ReportList *reports) ATTR_NONNULL(1, 2);
735
741void UI_popup_menu_close(const uiBlock *block, bool is_cancel = false);
746void UI_popup_menu_close_from_but(const uiBut *but, bool is_cancel = false);
747
752void UI_popup_menu_retval_set(const uiBlock *block, int retval, bool enable);
762
763/* `interface_region_popover.cc` */
764
765struct uiPopover;
766
767int UI_popover_panel_invoke(bContext *C, const char *idname, bool keep_open, ReportList *reports);
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
789int UI_pie_menu_invoke(bContext *C, const char *idname, const wmEvent *event);
791 const char *title,
792 const char *opname,
793 const char *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 const char *confirm_text,
850 const char *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,
879 eUIEmbossType emboss);
880void UI_block_end_ex(const bContext *C, uiBlock *block, const int xy[2], int r_xy[2]);
881void UI_block_end(const bContext *C, uiBlock *block);
885void UI_block_draw(const bContext *C, uiBlock *block);
888void UI_blocklist_draw(const bContext *C, const ListBase *lb);
889void UI_block_update_from_old(const bContext *C, uiBlock *block);
890
891enum {
894};
895void UI_block_theme_style_set(uiBlock *block, char theme_style);
897void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss);
898bool UI_block_is_search_only(const uiBlock *block);
903void UI_block_set_search_only(uiBlock *block, bool search_only);
904
908void UI_block_set_active_operator(uiBlock *block, wmOperator *op, const bool free);
909
913void UI_block_free(const bContext *C, uiBlock *block);
914
915void UI_block_listen(const uiBlock *block, const wmRegionListenerParams *listener_params);
916
920void UI_blocklist_free(const bContext *C, ARegion *region);
921void UI_blocklist_free_inactive(const bContext *C, ARegion *region);
922
928
929void UI_block_region_set(uiBlock *block, ARegion *region);
930
931void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr);
932void UI_block_lock_clear(uiBlock *block);
933
934#define UI_BUTTON_SECTION_MERGE_DISTANCE (UI_UNIT_X * 3)
935/* Separator line between regions if the #uiButtonSectionsAlign is not #None. */
936#define UI_BUTTON_SECTION_SEPERATOR_LINE_WITH (U.pixelsize * 2)
937
948void UI_region_button_sections_draw(const ARegion *region,
949 int /*THemeColorID*/ colorid,
951bool UI_region_button_sections_is_inside_x(const ARegion *region, const int mval_x);
952
956void UI_block_align_begin(uiBlock *block);
957void UI_block_align_end(uiBlock *block);
958
969
973void UI_block_bounds_set_normal(uiBlock *block, int addval);
977void UI_block_bounds_set_text(uiBlock *block, int addval);
981void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2]);
985void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2]);
989void UI_block_bounds_set_centered(uiBlock *block, int addval);
990void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy);
991
993
994void UI_block_direction_set(uiBlock *block, char direction);
998void UI_block_flag_enable(uiBlock *block, int flag);
999void UI_block_flag_disable(uiBlock *block, int flag);
1000void UI_block_translate(uiBlock *block, float x, float y);
1001
1003
1011
1012void UI_but_flag_enable(uiBut *but, int flag);
1013void UI_but_flag_disable(uiBut *but, int flag);
1014bool UI_but_flag_is_set(uiBut *but, int flag);
1015void UI_but_flag2_enable(uiBut *but, int flag);
1016
1017void UI_but_drawflag_enable(uiBut *but, int flag);
1018void UI_but_drawflag_disable(uiBut *but, int flag);
1019
1020void UI_but_dragflag_enable(uiBut *but, int flag);
1021void UI_but_dragflag_disable(uiBut *but, int flag);
1022
1023void UI_but_disable(uiBut *but, const char *disabled_hint);
1024
1026
1031void UI_but_color_set(uiBut *but, const uchar color[4]);
1032
1036void UI_but_placeholder_set(uiBut *but, const char *placeholder_text) ATTR_NONNULL(1);
1037
1046 const bContext *C, ARegion *region, uiBlock *block, uiBut *but, bool remove_on_failure);
1047bool UI_but_active_only(const bContext *C, ARegion *region, uiBlock *block, uiBut *but);
1052bool UI_block_active_only_flagged_buttons(const bContext *C, ARegion *region, uiBlock *block);
1053
1057void UI_but_execute(const bContext *C, ARegion *region, uiBut *but);
1058
1059std::optional<std::string> UI_but_online_manual_id(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
1060std::optional<std::string> UI_but_online_manual_id_from_active(const bContext *C)
1062bool UI_but_is_userdef(const uiBut *but);
1063
1064/* Buttons
1065 *
1066 * Functions to define various types of buttons in a block. Postfixes:
1067 * - F: float
1068 * - I: int
1069 * - S: short
1070 * - C: char
1071 * - R: RNA
1072 * - O: operator */
1073
1074uiBut *uiDefBut(uiBlock *block,
1075 int type,
1076 int retval,
1078 int x,
1079 int y,
1080 short width,
1081 short height,
1082 void *poin,
1083 float min,
1084 float max,
1085 const char *tip);
1086uiBut *uiDefButF(uiBlock *block,
1087 int type,
1088 int retval,
1090 int x,
1091 int y,
1092 short width,
1093 short height,
1094 float *poin,
1095 float min,
1096 float max,
1097 const char *tip);
1098uiBut *uiDefButI(uiBlock *block,
1099 int type,
1100 int retval,
1102 int x,
1103 int y,
1104 short width,
1105 short height,
1106 int *poin,
1107 float min,
1108 float max,
1109 const char *tip);
1110uiBut *uiDefButBitI(uiBlock *block,
1111 int type,
1112 int bit,
1113 int retval,
1115 int x,
1116 int y,
1117 short width,
1118 short height,
1119 int *poin,
1120 float min,
1121 float max,
1122 const char *tip);
1123uiBut *uiDefButS(uiBlock *block,
1124 int type,
1125 int retval,
1127 int x,
1128 int y,
1129 short width,
1130 short height,
1131 short *poin,
1132 float min,
1133 float max,
1134 const char *tip);
1135uiBut *uiDefButBitS(uiBlock *block,
1136 int type,
1137 int bit,
1138 int retval,
1140 int x,
1141 int y,
1142 short width,
1143 short height,
1144 short *poin,
1145 float min,
1146 float max,
1147 const char *tip);
1148uiBut *uiDefButC(uiBlock *block,
1149 int type,
1150 int retval,
1152 int x,
1153 int y,
1154 short width,
1155 short height,
1156 char *poin,
1157 float min,
1158 float max,
1159 const char *tip);
1160uiBut *uiDefButBitC(uiBlock *block,
1161 int type,
1162 int bit,
1163 int retval,
1165 int x,
1166 int y,
1167 short width,
1168 short height,
1169 char *poin,
1170 float min,
1171 float max,
1172 const char *tip);
1173uiBut *uiDefButR(uiBlock *block,
1174 int type,
1175 int retval,
1176 const char *str,
1177 int x,
1178 int y,
1179 short width,
1180 short height,
1181 PointerRNA *ptr,
1182 const char *propname,
1183 int index,
1184 float min,
1185 float max,
1186 const char *tip);
1188 int type,
1189 int retval,
1190 const char *str,
1191 int x,
1192 int y,
1193 short width,
1194 short height,
1195 PointerRNA *ptr,
1196 PropertyRNA *prop,
1197 int index,
1198 float min,
1199 float max,
1200 const char *tip);
1201uiBut *uiDefButO(uiBlock *block,
1202 int type,
1203 const char *opname,
1204 wmOperatorCallContext opcontext,
1205 const char *str,
1206 int x,
1207 int y,
1208 short width,
1209 short height,
1210 const char *tip);
1212 int type,
1214 wmOperatorCallContext opcontext,
1216 int x,
1217 int y,
1218 short width,
1219 short height,
1220 const char *tip);
1221
1222uiBut *uiDefIconBut(uiBlock *block,
1223 int type,
1224 int retval,
1225 int icon,
1226 int x,
1227 int y,
1228 short width,
1229 short height,
1230 void *poin,
1231 float min,
1232 float max,
1233 const char *tip);
1235 int type,
1236 int retval,
1237 int icon,
1238 int x,
1239 int y,
1240 short width,
1241 short height,
1242 int *poin,
1243 float min,
1244 float max,
1245 const char *tip);
1247 int type,
1248 int bit,
1249 int retval,
1250 int icon,
1251 int x,
1252 int y,
1253 short width,
1254 short height,
1255 int *poin,
1256 float min,
1257 float max,
1258 const char *tip);
1260 int type,
1261 int retval,
1262 int icon,
1263 int x,
1264 int y,
1265 short width,
1266 short height,
1267 short *poin,
1268 float min,
1269 float max,
1270 const char *tip);
1272 int type,
1273 int bit,
1274 int retval,
1275 int icon,
1276 int x,
1277 int y,
1278 short width,
1279 short height,
1280 short *poin,
1281 float min,
1282 float max,
1283 const char *tip);
1285 int type,
1286 int bit,
1287 int retval,
1288 int icon,
1289 int x,
1290 int y,
1291 short width,
1292 short height,
1293 char *poin,
1294 float min,
1295 float max,
1296 const char *tip);
1298 int type,
1299 int retval,
1300 int icon,
1301 int x,
1302 int y,
1303 short width,
1304 short height,
1305 PointerRNA *ptr,
1306 const char *propname,
1307 int index,
1308 float min,
1309 float max,
1310 const char *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 PropertyRNA *prop,
1321 int index,
1322 float min,
1323 float max,
1324 const char *tip);
1326 int type,
1327 const char *opname,
1328 wmOperatorCallContext opcontext,
1329 int icon,
1330 int x,
1331 int y,
1332 short width,
1333 short height,
1334 const char *tip);
1336 int type,
1338 wmOperatorCallContext opcontext,
1339 int icon,
1340 int x,
1341 int y,
1342 short width,
1343 short height,
1344 const char *tip);
1346 uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]);
1347uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height);
1350 int type,
1351 int retval,
1352 int icon,
1354 int x,
1355 int y,
1356 short width,
1357 short height,
1358 void *poin,
1359 float min,
1360 float max,
1361 const char *tip);
1363 int type,
1364 int retval,
1365 int icon,
1367 int x,
1368 int y,
1369 short width,
1370 short height,
1371 int *poin,
1372 float min,
1373 float max,
1374 const char *tip);
1376 int type,
1377 int retval,
1378 int icon,
1379 const char *str,
1380 int x,
1381 int y,
1382 short width,
1383 short height,
1384 PointerRNA *ptr,
1385 const char *propname,
1386 int index,
1387 float min,
1388 float max,
1389 const char *tip);
1391 int type,
1392 int retval,
1393 int icon,
1394 const char *str,
1395 int x,
1396 int y,
1397 short width,
1398 short height,
1399 PointerRNA *ptr,
1400 PropertyRNA *prop,
1401 int index,
1402 float min,
1403 float max,
1404 const char *tip);
1406 int type,
1407 const char *opname,
1408 wmOperatorCallContext opcontext,
1409 int icon,
1411 int x,
1412 int y,
1413 short width,
1414 short height,
1415 const char *tip);
1417 int type,
1419 wmOperatorCallContext opcontext,
1420 int icon,
1422 int x,
1423 int y,
1424 short width,
1425 short height,
1426 const char *tip);
1427
1428void UI_but_operator_set(uiBut *but,
1429 wmOperatorType *optype,
1430 wmOperatorCallContext opcontext,
1431 const PointerRNA *opptr = nullptr);
1438
1441
1442void UI_but_context_ptr_set(uiBlock *block, uiBut *but, const char *name, const PointerRNA *ptr);
1443const PointerRNA *UI_but_context_ptr_get(const uiBut *but,
1444 const char *name,
1445 const StructRNA *type = nullptr);
1446std::optional<blender::StringRefNull> UI_but_context_string_get(const uiBut *but,
1447 const char *name);
1448const bContextStore *UI_but_context_get(const uiBut *but);
1449
1450void UI_but_unit_type_set(uiBut *but, int unit_type);
1451int UI_but_unit_type_get(const uiBut *but);
1452
1453std::optional<EnumPropertyItem> UI_but_rna_enum_item_get(bContext &C, uiBut &but);
1454
1455std::string UI_but_string_get_rna_property_identifier(const uiBut &but);
1456std::string UI_but_string_get_rna_struct_identifier(const uiBut &but);
1457std::string UI_but_string_get_label(uiBut &but);
1463std::string UI_but_string_get_tooltip_label(const uiBut &but);
1464std::string UI_but_string_get_rna_label(uiBut &but);
1466std::string UI_but_string_get_rna_label_context(const uiBut &but);
1467std::string UI_but_string_get_tooltip(bContext &C, uiBut &but);
1468std::string UI_but_string_get_rna_tooltip(bContext &C, uiBut &but);
1473
1474std::string UI_but_extra_icon_string_get_label(const uiButExtraOpIcon &extra_icon);
1475std::string UI_but_extra_icon_string_get_tooltip(bContext &C, const uiButExtraOpIcon &extra_icon);
1477 const uiButExtraOpIcon &extra_icon);
1478
1490enum {
1495 UI_ID_ALONE = 1 << 4,
1496 UI_ID_OPEN = 1 << 3,
1498 UI_ID_LOCAL = 1 << 6,
1501 UI_ID_PIN = 1 << 9,
1506};
1507
1512enum {
1515};
1516
1521
1527
1528/***************************** ID Utilities *******************************/
1529
1530int UI_icon_from_id(const ID *id);
1532int UI_icon_from_report_type(int type);
1535
1536int UI_icon_from_event_type(short event_type, short event_value);
1537int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[4]);
1538
1539uiBut *uiDefMenuBut(uiBlock *block,
1540 uiMenuCreateFunc func,
1541 void *arg,
1543 int x,
1544 int y,
1545 short width,
1546 short height,
1547 const char *tip);
1549 uiMenuCreateFunc func,
1550 void *arg,
1551 int icon,
1553 int x,
1554 int y,
1555 short width,
1556 short height,
1557 const char *tip);
1559 uiMenuCreateFunc func,
1560 void *arg,
1561 int icon,
1562 int x,
1563 int y,
1564 short width,
1565 short height,
1566 const char *tip);
1567
1569 uiBlockCreateFunc func,
1570 void *arg,
1572 int x,
1573 int y,
1574 short width,
1575 short height,
1576 const char *tip);
1578 uiBlockCreateFunc func,
1579 void *argN,
1581 int x,
1582 int y,
1583 short width,
1584 short height,
1585 const char *tip,
1586 uiButArgNFree func_argN_free_fn = MEM_freeN,
1587 uiButArgNCopy func_argN_copy_fn = MEM_dupallocN);
1588
1593 uiBlockCreateFunc func,
1594 void *arg,
1595 int retval,
1596 int icon,
1597 int x,
1598 int y,
1599 short width,
1600 short height,
1601 const char *tip);
1602
1607 void *arg,
1608 int retval,
1609 int icon,
1610 int maxncpy,
1611 int x,
1612 int y,
1613 short width,
1614 short height,
1615 const char *tip);
1622 IDProperty *properties,
1623 void *arg,
1624 int retval,
1625 int icon,
1626 int maxncpy,
1627 int x,
1628 int y,
1629 short width,
1630 short height,
1631 const char *tip);
1632
1642
1650
1652
1654 PointerRNA *ptr,
1655 PropertyRNA *prop,
1656 int index,
1657 const char *name,
1658 int icon,
1659 int x,
1660 int y,
1661 int width,
1662 int height);
1663void uiDefAutoButsArrayR(uiBlock *block,
1664 PointerRNA *ptr,
1665 PropertyRNA *prop,
1666 const int icon,
1667 const int x,
1668 const int y,
1669 const int tot_width,
1670 const int height);
1678 PointerRNA *ptr,
1679 bool (*check_prop)(PointerRNA *ptr,
1680 PropertyRNA *prop,
1681 void *user_data),
1682 void *user_data,
1683 PropertyRNA *prop_activate_init,
1684 eButLabelAlign label_align,
1685 bool compact);
1686
1698
1714 const char *name,
1715 void *poin,
1716 int iconid,
1717 int but_flag,
1718 uint8_t name_prefix_offset);
1719
1736 uiButSearchCreateFn search_create_fn,
1737 uiButSearchUpdateFn search_update_fn,
1738 void *arg,
1739 bool free_arg,
1740 uiFreeArgFunc search_arg_free_fn,
1741 uiButHandleFunc search_exec_fn,
1742 void *active);
1750void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string);
1752
1761int UI_search_items_find_index(const uiSearchItems *items, const char *name);
1762
1766void UI_but_hint_drawstr_set(uiBut *but, const char *string);
1767void UI_but_icon_indicator_number_set(uiBut *but, const int indicator_number);
1768void UI_but_icon_indicator_set(uiBut *but, const char *string);
1770
1771void UI_but_node_link_set(uiBut *but, bNodeSocket *socket, const float draw_color[4]);
1772
1773void UI_but_number_step_size_set(uiBut *but, float step_size);
1774void UI_but_number_precision_set(uiBut *but, float precision);
1775
1776void UI_but_number_slider_step_size_set(uiBut *but, float step_size);
1777void UI_but_number_slider_precision_set(uiBut *but, float precision);
1778
1779void UI_but_label_alpha_factor_set(uiBut *but, float alpha_factor);
1780
1781void UI_but_search_preview_grid_size_set(uiBut *but, int rows, int cols);
1782
1784 const std::optional<int> draw_width = std::nullopt,
1785 const std::optional<int> draw_height = std::nullopt);
1786
1787void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg);
1788void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2);
1789void UI_block_funcN_set(uiBlock *block,
1790 uiButHandleNFunc funcN,
1791 void *argN,
1792 void *arg2,
1793 uiButArgNFree func_argN_free_fn = MEM_freeN,
1794 uiButArgNCopy func_argN_copy_fn = MEM_dupallocN);
1795
1796void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1);
1798 std::function<void(std::string &new_name)> rename_full_func);
1799void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2);
1800void UI_but_funcN_set(uiBut *but,
1801 uiButHandleNFunc funcN,
1802 void *argN,
1803 void *arg2,
1804 uiButArgNFree func_argN_free_fn = MEM_freeN,
1805 uiButArgNCopy func_argN_copy_fn = MEM_dupallocN);
1806
1807void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg);
1808
1810 std::function<void(const bContext *C, rcti *rect)> func);
1811
1813
1814void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg);
1820void UI_but_func_tooltip_label_set(uiBut *but, std::function<std::string(const uiBut *but)> func);
1821
1823 UI_TIP_STYLE_NORMAL = 0, /* Regular text. */
1824 UI_TIP_STYLE_HEADER, /* Header text. */
1825 UI_TIP_STYLE_MONO, /* Mono-spaced text. */
1826 UI_TIP_STYLE_IMAGE, /* Image field. */
1827 UI_TIP_STYLE_SPACER, /* Padding to separate sections. */
1828};
1829
1831 UI_TIP_LC_MAIN = 0, /* Color of primary text. */
1832 UI_TIP_LC_VALUE, /* Color for the value of buttons (also shortcuts). */
1833 UI_TIP_LC_ACTIVE, /* Color of titles of active enum values. */
1834 UI_TIP_LC_NORMAL, /* Color of regular text. */
1835 UI_TIP_LC_PYTHON, /* Color of python snippets. */
1836 UI_TIP_LC_ALERT, /* Warning text color, eg: why operator can't run. */
1838};
1839
1845
1855
1858 void *arg,
1859 uiFreeArgFunc free_arg);
1860
1866 std::string text,
1867 std::string suffix,
1868 const uiTooltipStyle style,
1869 const uiTooltipColorID color_id,
1870 const bool is_pad = false);
1871
1877
1887
1889 ARegion *region,
1890 const void *rna_poin_data,
1891 const char *rna_prop_id);
1892bool UI_textbutton_activate_but(const bContext *C, uiBut *actbut);
1893
1899
1900void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN);
1901
1903 const char *opname,
1904 wmOperatorCallContext opcontext,
1905 int icon);
1908
1913int UI_preview_tile_size_x(const int size_px = 96);
1914int UI_preview_tile_size_y(const int size_px = 96);
1915int UI_preview_tile_size_y_no_label(const int size_px = 96);
1916
1917/* Autocomplete
1918 *
1919 * Tab complete helper functions, for use in uiButCompleteFunc callbacks.
1920 * Call begin once, then multiple times do_name with all possibilities,
1921 * and finally end to finish and get the completed name. */
1922
1923struct AutoComplete;
1924
1925#define AUTOCOMPLETE_NO_MATCH 0
1926#define AUTOCOMPLETE_FULL_MATCH 1
1927#define AUTOCOMPLETE_PARTIAL_MATCH 2
1928
1930void UI_autocomplete_update_name(AutoComplete *autocpl, const char *name);
1931int UI_autocomplete_end(AutoComplete *autocpl, char *autoname);
1932
1933/* Button drag-data (interface_drag.cc).
1934 *
1935 * Functions to set drag data for buttons. This enables dragging support, whereby the drag data is
1936 * "dragged", not the button itself. */
1937
1938void UI_but_drag_set_id(uiBut *but, ID *id);
1945void UI_but_drag_attach_image(uiBut *but, const ImBuf *imb, float scale);
1946
1953 int import_method, /* eAssetImportMethod */
1954 int icon,
1955 const ImBuf *imb,
1956 float scale);
1957
1963void UI_but_drag_set_path(uiBut *but, const char *path);
1964void UI_but_drag_set_name(uiBut *but, const char *name);
1965
1970void UI_but_drag_set_image(uiBut *but, const char *path, int icon, const ImBuf *imb, float scale);
1971
1972/* Panels
1973 *
1974 * Functions for creating, freeing and drawing panels. The API here
1975 * could use a good cleanup, though how they will function in 2.5 is
1976 * not clear yet so we postpone that. */
1977
1978void UI_panels_begin(const bContext *C, ARegion *region);
1979void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y);
1983void UI_panels_draw(const bContext *C, ARegion *region);
1984
1990 ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open);
2001void UI_panel_end(Panel *panel, int width, int height);
2002
2005
2011void UI_panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr);
2012
2017bool UI_panel_is_closed(const Panel *panel);
2018bool UI_panel_is_active(const Panel *panel);
2022void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y);
2023bool UI_panel_should_show_background(const ARegion *region, const PanelType *panel_type);
2024int UI_panel_size_y(const Panel *panel);
2025bool UI_panel_is_dragging(const Panel *panel);
2030bool UI_panel_matches_search_filter(const Panel *panel);
2031bool UI_panel_can_be_pinned(const Panel *panel);
2032
2033bool UI_panel_category_is_visible(const ARegion *region);
2034void UI_panel_category_add(ARegion *region, const char *name);
2035PanelCategoryDyn *UI_panel_category_find(const ARegion *region, const char *idname);
2036int UI_panel_category_index_find(ARegion *region, const char *idname);
2037PanelCategoryStack *UI_panel_category_active_find(ARegion *region, const char *idname);
2038const char *UI_panel_category_active_get(ARegion *region, bool set_fallback);
2039void UI_panel_category_active_set(ARegion *region, const char *idname);
2041void UI_panel_category_index_active_set(ARegion *region, const int index);
2042void UI_panel_category_active_set_default(ARegion *region, const char *idname);
2047void UI_panel_category_draw_all(ARegion *region, const char *category_id_active);
2048
2049/* Panel custom data. */
2052void UI_panel_custom_data_set(Panel *panel, PointerRNA *custom_data);
2053
2054/* Poly-instantiated panels for representing a list of data. */
2060 ARegion *region,
2061 ListBase *panels,
2062 const char *panel_idname,
2063 PointerRNA *custom_data);
2070void UI_panels_free_instanced(const bContext *C, ARegion *region);
2071
2072#define INSTANCED_PANEL_UNIQUE_STR_SIZE 16
2077void UI_list_panel_unique_str(Panel *panel, char *r_name);
2078
2079using uiListPanelIDFromDataFunc = void (*)(void *data_link, char *r_idname);
2090 ListBase *data,
2091 uiListPanelIDFromDataFunc panel_idname_func);
2092
2093/* Handlers
2094 *
2095 * Handlers that can be registered in regions, areas and windows for
2096 * handling WM events. Mostly this is done automatic by modules such
2097 * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */
2098
2099void UI_region_handlers_add(ListBase *handlers);
2100void UI_popup_handlers_add(bContext *C, ListBase *handlers, uiPopupBlockHandle *popup, char flag);
2103
2104/* Module
2105 *
2106 * init and exit should be called before using this module. init_userdef must
2107 * be used to reinitialize some internal state if user preferences change. */
2108
2109void UI_init();
2110/* after reading userdef file */
2111void UI_init_userdef();
2112void UI_reinit_font();
2113void UI_exit();
2114
2115/* When changing UI font, update text style weights with default font weight
2116 * if non-variable. Therefore fixed weight bold font will look bold. */
2118
2119/* Layout
2120 *
2121 * More automated layout of buttons. Has three levels:
2122 * - Layout: contains a number templates, within a bounded width or height.
2123 * - Template: predefined layouts for buttons with a number of slots, each
2124 * slot can contain multiple items.
2125 * - Item: item to put in a template slot, being either an RNA property,
2126 * operator, label or menu. Also regular buttons can be used when setting
2127 * uiBlockCurLayout. */
2128
2129/* layout */
2130enum {
2133};
2134
2135enum {
2142};
2143
2144#define UI_UNIT_X ((void)0, U.widget_unit)
2145#define UI_UNIT_Y ((void)0, U.widget_unit)
2146
2147enum {
2152};
2153
2155 /* UI_ITEM_O_RETURN_PROPS = 1 << 0, */ /* UNUSED */
2182 /* Even create the property split layout if there's no name to show there. */
2189};
2191#define UI_ITEM_NONE eUI_Item_Flag(0)
2192
2193#define UI_HEADER_OFFSET ((void)0, 0.4f * UI_UNIT_X)
2194
2195/* uiLayoutOperatorButs flags */
2196enum {
2201 /* Disable property split for the default layout (custom ui callbacks still have full control
2202 * over the layout and can enable it). */
2205};
2206
2207/* Used for transparent checkers shown under color buttons that have an alpha component. */
2208#define UI_ALPHA_CHECKER_DARK 100
2209#define UI_ALPHA_CHECKER_LIGHT 160
2210
2211/* flags to set which corners will become rounded:
2212 *
2213 * 1------2
2214 * | |
2215 * 8------4 */
2216
2217enum {
2222 /* just for convenience */
2225};
2226
2228 int dir,
2229 int type,
2230 int x,
2231 int y,
2232 int size,
2233 int em,
2234 int padding,
2235 const uiStyle *style);
2236void UI_block_layout_set_current(uiBlock *block, uiLayout *layout);
2237void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y);
2238bool UI_block_layout_needs_resolving(const uiBlock *block);
2244void UI_block_layout_free(uiBlock *block);
2245
2251bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter);
2252
2253void UI_region_message_subscribe(ARegion *region, wmMsgBus *mbus);
2254
2256
2257void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv);
2258void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr);
2259void uiLayoutSetContextString(uiLayout *layout, const char *name, blender::StringRef value);
2261void uiLayoutContextCopy(uiLayout *layout, const bContextStore *context);
2262
2274void uiLayoutSetTooltipFunc(uiLayout *layout,
2275 uiButToolTipFunc func,
2276 void *arg,
2277 uiCopyArgFunc copy_arg,
2278 uiFreeArgFunc free_arg);
2279
2295std::optional<blender::StringRefNull> UI_but_asset_shelf_type_idname_get(const uiBut *but);
2296void UI_menutype_draw(bContext *C, MenuType *mt, uiLayout *layout);
2300void UI_paneltype_draw(bContext *C, PanelType *pt, uiLayout *layout);
2301
2302/* Only for convenience. */
2303void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but);
2304
2306void uiLayoutSetActive(uiLayout *layout, bool active);
2307void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default);
2308void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init);
2309void uiLayoutSetEnabled(uiLayout *layout, bool enabled);
2310void uiLayoutSetRedAlert(uiLayout *layout, bool redalert);
2311void uiLayoutSetAlignment(uiLayout *layout, char alignment);
2312void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size);
2313void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect);
2314void uiLayoutSetScaleX(uiLayout *layout, float scale);
2315void uiLayoutSetScaleY(uiLayout *layout, float scale);
2316void uiLayoutSetUnitsX(uiLayout *layout, float unit);
2317void uiLayoutSetUnitsY(uiLayout *layout, float unit);
2318void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss);
2319void uiLayoutSetPropSep(uiLayout *layout, bool is_sep);
2320void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep);
2321int uiLayoutGetLocalDir(const uiLayout *layout);
2322void uiLayoutSetSearchWeight(uiLayout *layout, float weight);
2323
2325bool uiLayoutGetActive(uiLayout *layout);
2327bool uiLayoutGetActivateInit(uiLayout *layout);
2328bool uiLayoutGetEnabled(uiLayout *layout);
2329bool uiLayoutGetRedAlert(uiLayout *layout);
2330int uiLayoutGetAlignment(uiLayout *layout);
2331bool uiLayoutGetFixedSize(uiLayout *layout);
2332bool uiLayoutGetKeepAspect(uiLayout *layout);
2333int uiLayoutGetWidth(uiLayout *layout);
2334float uiLayoutGetScaleX(uiLayout *layout);
2335float uiLayoutGetScaleY(uiLayout *layout);
2336float uiLayoutGetUnitsX(uiLayout *layout);
2337float uiLayoutGetUnitsY(uiLayout *layout);
2339bool uiLayoutGetPropSep(uiLayout *layout);
2340bool uiLayoutGetPropDecorate(uiLayout *layout);
2342float uiLayoutGetSearchWeight(uiLayout *layout);
2343
2346
2347/* Layout create functions. */
2348
2349uiLayout *uiLayoutRow(uiLayout *layout, bool align);
2350
2355
2374 uiLayout *layout,
2375 PointerRNA *open_prop_owner,
2376 const char *open_prop_name);
2377
2388 uiLayout *layout,
2389 PointerRNA *open_prop_owner,
2390 const char *open_prop_name,
2391 const char *label);
2392
2401 uiLayout *layout,
2402 const char *idname,
2403 bool default_closed);
2404
2415 uiLayout *layout,
2416 const char *idname,
2417 bool default_closed,
2418 const char *label);
2419
2420bool uiLayoutEndsWithPanelHeader(const uiLayout &layout);
2421
2425uiLayout *uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading);
2426uiLayout *uiLayoutColumn(uiLayout *layout, bool align);
2433uiLayout *uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading);
2434uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, bool align);
2436 bool row_major,
2437 int columns_len,
2438 bool even_columns,
2439 bool even_rows,
2440 bool align);
2441uiLayout *uiLayoutBox(uiLayout *layout);
2443 uiList *ui_list,
2444 PointerRNA *actptr,
2445 PropertyRNA *actprop);
2446uiLayout *uiLayoutAbsolute(uiLayout *layout, bool align);
2447uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, bool align);
2452
2453/* templates */
2454void uiTemplateHeader(uiLayout *layout, bContext *C);
2455void uiTemplateID(uiLayout *layout,
2456 const bContext *C,
2457 PointerRNA *ptr,
2458 const char *propname,
2459 const char *newop,
2460 const char *openop,
2461 const char *unlinkop,
2463 bool live_icon = false,
2464 const char *text = nullptr);
2465void uiTemplateIDBrowse(uiLayout *layout,
2466 bContext *C,
2467 PointerRNA *ptr,
2468 const char *propname,
2469 const char *newop,
2470 const char *openop,
2471 const char *unlinkop,
2473 const char *text = nullptr);
2474void uiTemplateIDPreview(uiLayout *layout,
2475 bContext *C,
2476 PointerRNA *ptr,
2477 const char *propname,
2478 const char *newop,
2479 const char *openop,
2480 const char *unlinkop,
2481 int rows,
2482 int cols,
2484 bool hide_buttons = false);
2488void uiTemplateIDTabs(uiLayout *layout,
2489 bContext *C,
2490 PointerRNA *ptr,
2491 const char *propname,
2492 const char *newop,
2493 const char *menu,
2503void uiTemplateAnyID(uiLayout *layout,
2504 PointerRNA *ptr,
2505 const char *propname,
2506 const char *proptypename,
2507 const char *text);
2508
2518void uiTemplateAction(uiLayout *layout,
2519 const bContext *C,
2520 ID *id,
2521 const char *newop,
2522 const char *unlinkop,
2523 const char *text);
2524
2529void uiTemplateSearch(uiLayout *layout,
2530 const bContext *C,
2531 PointerRNA *ptr,
2532 const char *propname,
2533 PointerRNA *searchptr,
2534 const char *searchpropname,
2535 const char *newop,
2536 const char *unlinkop,
2537 const char *text = nullptr);
2539 bContext *C,
2540 PointerRNA *ptr,
2541 const char *propname,
2542 PointerRNA *searchptr,
2543 const char *searchpropname,
2544 const char *newop,
2545 const char *unlinkop,
2546 int rows,
2547 int cols,
2548 const char *text = nullptr);
2556void uiTemplatePathBuilder(uiLayout *layout,
2557 PointerRNA *ptr,
2558 const char *propname,
2559 PointerRNA *root_ptr,
2560 const char *text);
2561void uiTemplateModifiers(uiLayout *layout, bContext *C);
2565void uiTemplateShaderFx(uiLayout *layout, bContext *C);
2569void uiTemplateConstraints(uiLayout *layout, bContext *C, bool use_bone_constraints);
2570
2573 bContext *C,
2574 PointerRNA *ptr,
2575 const char *propname,
2576 int rows,
2577 int cols,
2578 float scale,
2579 int filter);
2580
2582
2584void uiTemplatePreview(uiLayout *layout,
2585 bContext *C,
2586 ID *id,
2587 bool show_buttons,
2588 ID *parent,
2589 MTex *slot,
2590 const char *preview_id);
2591void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname, bool expand);
2595void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale);
2599void uiTemplateIconView(uiLayout *layout,
2600 PointerRNA *ptr,
2601 const char *propname,
2602 bool show_labels,
2603 float icon_scale,
2604 float icon_scale_popup);
2605void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname);
2606void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname);
2607void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propname);
2608void uiTemplateCurveMapping(uiLayout *layout,
2609 PointerRNA *ptr,
2610 const char *propname,
2611 int type,
2612 bool levels,
2613 bool brush,
2614 bool neg_slope,
2615 bool tone);
2620void uiTemplateCurveProfile(uiLayout *layout, PointerRNA *ptr, const char *propname);
2624void uiTemplateColorPicker(uiLayout *layout,
2625 PointerRNA *ptr,
2626 const char *propname,
2627 bool value_slider,
2628 bool lock,
2629 bool lock_luminosity,
2630 bool cubic);
2631void uiTemplatePalette(uiLayout *layout, PointerRNA *ptr, const char *propname, bool colors);
2632void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, const char *propname, int icon);
2637void uiTemplateLayers(uiLayout *layout,
2638 PointerRNA *ptr,
2639 const char *propname,
2640 PointerRNA *used_ptr,
2641 const char *used_propname,
2642 int active_layer);
2643void uiTemplateImage(uiLayout *layout,
2644 bContext *C,
2645 PointerRNA *ptr,
2646 const char *propname,
2647 PointerRNA *userptr,
2648 bool compact,
2649 bool multiview);
2650void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_management);
2651void uiTemplateImageStereo3d(uiLayout *layout, PointerRNA *stereo3d_format_ptr);
2652void uiTemplateImageViews(uiLayout *layout, PointerRNA *imaptr);
2654void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser);
2655void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser);
2659
2660void UI_but_func_menu_search(uiBut *but, const char *single_menu_idname = nullptr);
2661void uiTemplateMenuSearch(uiLayout *layout);
2662
2669 const bContext *C, uiLayout *layout, wmOperator *op, eButLabelAlign label_align, short flag);
2674void uiTemplateStatusInfo(uiLayout *layout, bContext *C);
2676
2678 const char *text,
2679 const wmKeyMapItem *kmi,
2680 bool text_fallback);
2681
2682/* Draw keymap item for status bar. Returns number of items consumed,
2683 * as X/Y/Z items may get merged to use less space. */
2685 const wmKeyMap *keymap,
2686 const EnumPropertyItem *item);
2687
2689 PointerRNA *ptr,
2690 const char *propname,
2691 const char *name);
2692void uiTemplateNodeSocket(uiLayout *layout, bContext *C, const float color[4]);
2693
2698void uiTemplateCacheFile(uiLayout *layout,
2699 const bContext *C,
2700 PointerRNA *ptr,
2701 const char *propname);
2702
2708bool uiTemplateCacheFilePointer(PointerRNA *ptr, const char *propname, PointerRNA *r_file_ptr);
2709
2713void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr);
2714
2718void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerRNA *fileptr);
2719
2724
2728void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA *fileptr);
2729
2731#define UI_UL_DEFAULT_CLASS_NAME "UI_UL_list"
2747
2748void uiTemplateList(uiLayout *layout,
2749 const bContext *C,
2750 const char *listtype_name,
2751 const char *list_id,
2752 PointerRNA *dataptr,
2753 const char *propname,
2754 PointerRNA *active_dataptr,
2755 const char *active_propname,
2756 const char *item_dyntip_propname,
2757 int rows,
2758 int maxrows,
2759 int layout_type,
2760 int columns,
2761 enum uiTemplateListFlags flags);
2763 const bContext *C,
2764 const char *listtype_name,
2765 const char *list_id,
2766 PointerRNA *dataptr,
2767 const char *propname,
2768 PointerRNA *active_dataptr,
2769 const char *active_propname,
2770 const char *item_dyntip_propname,
2771 int rows,
2772 int maxrows,
2773 int layout_type,
2774 int columns,
2775 enum uiTemplateListFlags flags,
2776 void *customdata);
2777
2779 uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input);
2781 uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input);
2786void uiTemplateTextureShow(uiLayout *layout,
2787 const bContext *C,
2788 PointerRNA *ptr,
2789 PropertyRNA *prop);
2790
2792 uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, bool compact);
2793void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname);
2794void uiTemplateMarker(uiLayout *layout,
2795 PointerRNA *ptr,
2796 const char *propname,
2797 PointerRNA *userptr,
2798 PointerRNA *trackptr,
2799 bool compact);
2801 PointerRNA *ptr,
2802 const char *propname,
2803 PointerRNA *userptr);
2804
2805void uiTemplateColorspaceSettings(uiLayout *layout, PointerRNA *ptr, const char *propname);
2807 bContext *C,
2808 PointerRNA *ptr,
2809 const char *propname);
2810
2811int uiTemplateRecentFiles(uiLayout *layout, int rows);
2813
2814enum {
2818};
2819void uiTemplateAssetView(uiLayout *layout,
2820 const bContext *C,
2821 const char *list_id,
2822 PointerRNA *asset_library_dataptr,
2823 const char *asset_library_propname,
2824 PointerRNA *assets_dataptr,
2825 const char *assets_propname,
2826 PointerRNA *active_dataptr,
2827 const char *active_propname,
2828 const blender::ed::asset::AssetFilterSettings *filter_settings,
2829 int display_flags,
2830 const char *activate_opname,
2831 PointerRNA *r_activate_op_properties,
2832 const char *drag_opname,
2833 PointerRNA *r_drag_op_properties);
2834
2835namespace blender::ui {
2836
2837void template_asset_shelf_popover(uiLayout &layout,
2838 const bContext &C,
2839 StringRefNull asset_shelf_id,
2840 StringRefNull name,
2841 int icon);
2842
2843}
2844
2846 uiLayout *context_layout,
2847 PointerRNA *ptr,
2848 const char *propname);
2849
2852
2858
2860
2865bool UI_list_item_index_is_filtered_visible(const struct uiList *ui_list, int item_idx);
2866
2871 const char *opname,
2872 bool create_properties);
2877 const char *opname,
2878 bool create_properties);
2879
2880/* items */
2881void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);
2882void uiItemEnumO_ptr(uiLayout *layout,
2884 const char *name,
2885 int icon,
2886 const char *propname,
2887 int value);
2888void uiItemEnumO(uiLayout *layout,
2889 const char *opname,
2890 const char *name,
2891 int icon,
2892 const char *propname,
2893 int value);
2897void uiItemEnumO_value(uiLayout *layout,
2898 const char *name,
2899 int icon,
2900 const char *opname,
2901 const char *propname,
2902 int value);
2903void uiItemEnumO_string(uiLayout *layout,
2904 const char *name,
2905 int icon,
2906 const char *opname,
2907 const char *propname,
2908 const char *value_str);
2909void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname);
2910void uiItemBooleanO(uiLayout *layout,
2911 const char *name,
2912 int icon,
2913 const char *opname,
2914 const char *propname,
2915 int value);
2916void uiItemIntO(uiLayout *layout,
2917 const char *name,
2918 int icon,
2919 const char *opname,
2920 const char *propname,
2921 int value);
2922void uiItemFloatO(uiLayout *layout,
2923 const char *name,
2924 int icon,
2925 const char *opname,
2926 const char *propname,
2927 float value);
2928void uiItemStringO(uiLayout *layout,
2929 const char *name,
2930 int icon,
2931 const char *opname,
2932 const char *propname,
2933 const char *value);
2934
2935void uiItemFullO_ptr(uiLayout *layout,
2937 const char *name,
2938 int icon,
2939 IDProperty *properties,
2940 wmOperatorCallContext context,
2942 PointerRNA *r_opptr);
2943void uiItemFullO(uiLayout *layout,
2944 const char *opname,
2945 const char *name,
2946 int icon,
2947 IDProperty *properties,
2948 wmOperatorCallContext context,
2950 PointerRNA *r_opptr);
2953 const char *name,
2954 int icon,
2955 IDProperty *properties,
2956 wmOperatorCallContext context,
2958 const char *menu_id, /* extra menu arg. */
2959 PointerRNA *r_opptr);
2960
2961void uiItemR(uiLayout *layout,
2962 PointerRNA *ptr,
2963 const char *propname,
2965 const char *name,
2966 int icon);
2967void uiItemFullR(uiLayout *layout,
2968 PointerRNA *ptr,
2969 PropertyRNA *prop,
2970 int index,
2971 int value,
2973 const char *name,
2974 int icon,
2975 const char *placeholder = nullptr);
2980 PointerRNA *ptr,
2981 PropertyRNA *prop,
2982 int index,
2983 int value,
2985 const char *name,
2986 int icon,
2987 const char *panel_type);
2988void uiItemFullR_with_menu(uiLayout *layout,
2989 PointerRNA *ptr,
2990 PropertyRNA *prop,
2991 int index,
2992 int value,
2994 const char *name,
2995 int icon,
2996 const char *menu_type);
2997void uiItemEnumR_prop(
2998 uiLayout *layout, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int value);
2999void uiItemEnumR(uiLayout *layout,
3000 const char *name,
3001 int icon,
3002 PointerRNA *ptr,
3003 const char *propname,
3004 int value);
3006 PointerRNA *ptr,
3007 PropertyRNA *prop,
3008 const char *value,
3009 const char *name,
3010 int icon);
3011void uiItemEnumR_string(uiLayout *layout,
3012 PointerRNA *ptr,
3013 const char *propname,
3014 const char *value,
3015 const char *name,
3016 int icon);
3017void uiItemsEnumR(uiLayout *layout, PointerRNA *ptr, const char *propname);
3018void uiItemPointerR_prop(uiLayout *layout,
3019 PointerRNA *ptr,
3020 PropertyRNA *prop,
3021 PointerRNA *searchptr,
3022 PropertyRNA *searchprop,
3023 const char *name,
3024 int icon,
3025 bool results_are_suggestions);
3026void uiItemPointerR(uiLayout *layout,
3027 PointerRNA *ptr,
3028 const char *propname,
3029 PointerRNA *searchptr,
3030 const char *searchpropname,
3031 const char *name,
3032 int icon);
3033
3039void uiItemsFullEnumO(uiLayout *layout,
3040 const char *opname,
3041 const char *propname,
3042 IDProperty *properties,
3043 wmOperatorCallContext context,
3045 const int active = -1);
3052void uiItemsFullEnumO_items(uiLayout *layout,
3054 const PointerRNA &ptr,
3055 PropertyRNA *prop,
3056 IDProperty *properties,
3057 wmOperatorCallContext context,
3059 const EnumPropertyItem *item_array,
3060 int totitem,
3061 int active = -1);
3062
3071
3081
3082void uiItemL(uiLayout *layout, const char *name, int icon); /* label */
3083uiBut *uiItemL_ex(uiLayout *layout, const char *name, int icon, bool highlight, bool redalert);
3091uiLayout *uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon);
3095void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, const char *name, int icon);
3099void uiItemM_ptr(uiLayout *layout, MenuType *mt, const char *name, int icon);
3100void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon);
3104void uiItemMContents(uiLayout *layout, const char *menuname);
3105
3106/* Decorators. */
3107
3112void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index);
3117void uiItemDecoratorR(uiLayout *layout, PointerRNA *ptr, const char *propname, int index);
3119void uiItemS(uiLayout *layout);
3121void uiItemS_ex(uiLayout *layout,
3122 float factor,
3125void uiItemSpacer(uiLayout *layout);
3126
3128 const char *text,
3129 float factor,
3130 enum eButProgressType progress_type);
3131
3132/* popover */
3134 uiLayout *layout, const bContext *C, PanelType *pt, const char *name, int icon);
3136 uiLayout *layout, const bContext *C, const char *panel_type, const char *name, int icon);
3138 bContext *C,
3139 int space_id,
3140 int region_id,
3141 const char *context,
3142 const char *category);
3143
3147void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg);
3151void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN);
3153 const bContext *C,
3155 const char *propname,
3156 const char *name,
3157 int icon,
3158 PointerRNA *r_opptr);
3159void uiItemMenuEnumFullO(uiLayout *layout,
3160 const bContext *C,
3161 const char *opname,
3162 const char *propname,
3163 const char *name,
3164 int icon,
3165 PointerRNA *r_opptr);
3166void uiItemMenuEnumO(uiLayout *layout,
3167 const bContext *C,
3168 const char *opname,
3169 const char *propname,
3170 const char *name,
3171 int icon);
3173 uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, const char *name, int icon);
3174void uiItemMenuEnumR(
3175 uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name, int icon);
3176void uiItemTabsEnumR_prop(uiLayout *layout,
3177 bContext *C,
3178 PointerRNA *ptr,
3179 PropertyRNA *prop,
3180 PointerRNA *ptr_highlight,
3181 PropertyRNA *prop_highlight,
3182 bool icon_only);
3183
3184/* Only for testing, inspecting layouts. */
3188const char *UI_layout_introspect(uiLayout *layout);
3189
3195 const uiStyle *style,
3196 const int dialog_width,
3197 const eAlertIcon icon,
3198 const int icon_size);
3199uiLayout *uiItemsAlertBox(uiBlock *block, const int size, const eAlertIcon icon);
3200
3201/* UI Operators */
3203 float color[3];
3205};
3206
3207void ED_operatortypes_ui();
3211void ED_keymap_ui(wmKeyConfig *keyconf);
3212void ED_dropboxes_ui();
3213void ED_uilisttypes_ui();
3214
3215void UI_drop_color_copy(bContext *C, wmDrag *drag, wmDropBox *drop);
3216bool UI_drop_color_poll(bContext *C, wmDrag *drag, const wmEvent *event);
3217
3219 PointerRNA *ptr,
3220 PropertyRNA *prop,
3222 bool *r_use_path_from_id,
3223 std::optional<std::string> *r_path);
3225 PointerRNA *ptr_link,
3226 PropertyRNA *prop,
3227 const char *path,
3228 bool use_path_from_id,
3229 PointerRNA *r_ptr,
3230 PropertyRNA **r_prop);
3231
3232/* Helpers for Operators */
3246 PointerRNA *r_ptr,
3247 PropertyRNA **r_prop,
3248 int *r_index);
3249
3256 PointerRNA *r_ptr,
3257 PropertyRNA **r_prop,
3258 int *r_index);
3259
3260void UI_context_active_but_prop_handle(bContext *C, bool handle_undo);
3262
3269 PointerRNA *r_ptr,
3270 PropertyRNA **r_prop,
3271 bool *r_is_undo,
3272 bool *r_is_userdef);
3279 PointerRNA *r_ptr,
3280 PropertyRNA **r_prop);
3282
3283uiBut *UI_region_active_but_get(const ARegion *region);
3284uiBut *UI_region_but_find_rect_over(const ARegion *region, const rcti *rect_px);
3285uiBlock *UI_region_block_find_mouse_over(const ARegion *region, const int xy[2], bool only_clip);
3289ARegion *UI_region_searchbox_region_get(const ARegion *button_region);
3290
3297
3302
3303/* Styled text draw */
3304void UI_fontstyle_set(const uiFontStyle *fs);
3305void UI_fontstyle_draw_ex(const uiFontStyle *fs,
3306 const rcti *rect,
3307 const char *str,
3308 size_t str_len,
3309 const uchar col[4],
3310 const uiFontStyleDraw_Params *fs_params,
3311 int *r_xofs,
3312 int *r_yofs,
3313 ResultBLF *r_info);
3314
3315void UI_fontstyle_draw(const uiFontStyle *fs,
3316 const rcti *rect,
3317 const char *str,
3318 size_t str_len,
3319 const uchar col[4],
3320 const uiFontStyleDraw_Params *fs_params);
3325 const rcti *rect,
3326 const char *str,
3327 const uchar col[4]);
3335 const uiFontStyle *fs, float x, float y, const char *str, const uchar col[4]);
3340 float x,
3341 float y,
3343 const float col_fg[4],
3344 const float col_bg[4]);
3345
3347 ATTR_NONNULL(1, 2);
3359 const char *str,
3360 float aspect) ATTR_WARN_UNUSED_RESULT
3361 ATTR_NONNULL(1, 2);
3363
3367void UI_draw_icon_tri(float x, float y, char dir, const float[4]);
3368
3372const uiStyle *UI_style_get(); /* use for fonts etc */
3376const uiStyle *UI_style_get_dpi();
3377
3378/* UI_OT_editsource helpers */
3385void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but);
3386
3397void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but);
3398
3399/* UI_butstore_ helpers */
3400struct uiButStore;
3401
3414void UI_butstore_free(uiBlock *block, uiButStore *bs_handle);
3415bool UI_butstore_is_valid(uiButStore *bs_handle);
3417void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p);
3421bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src);
3422void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p);
3423
3431std::optional<std::string> UI_key_event_operator_string(const bContext *C,
3432 const char *opname,
3433 IDProperty *properties,
3434 bool is_strict);
3435
3436/* ui_interface_region_tooltip.c */
3437
3442ARegion *UI_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but, bool is_label);
3444 bContext *C, ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_label);
3446void UI_tooltip_free(bContext *C, bScreen *screen, ARegion *region);
3447
3456 const ARegion *searchbox_region,
3457 const rcti *item_rect,
3458 ID *id);
3459
3460/* How long before a tool-tip shows. */
3461#define UI_TOOLTIP_DELAY 0.5
3462#define UI_TOOLTIP_DELAY_LABEL 0.2
3463
3464/* Float precision helpers */
3465#define UI_PRECISION_FLOAT_MAX 6
3466/* For float buttons the 'step', is scaled */
3467#define UI_PRECISION_FLOAT_SCALE 0.01f
3468
3469/* Typical UI text */
3470#define UI_FSTYLE_WIDGET (const uiFontStyle *)&(UI_style_get()->widget)
3471#define UI_FSTYLE_TOOLTIP (const uiFontStyle *)&(UI_style_get()->tooltip)
3472
3477int UI_calc_float_precision(int prec, double value);
3478
3479/* widget batched drawing */
3483
3484/* Use for resetting the theme. */
3493
3495
3497#define USE_UI_TOOLBAR_HACK
3498
3500#define USE_UI_POPOVER_ONCE
3501
3511
3521
3526blender::ui::AbstractView *UI_region_view_find_at(const ARegion *region, const int xy[2], int pad);
3531 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.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
#define C
Definition RandGen.cpp:29
void UI_block_update_from_old(const bContext *C, uiBlock *block)
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
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)
@ UI_BLOCK_THEME_STYLE_REGULAR
@ UI_BLOCK_THEME_STYLE_POPUP
void uiTemplateIconView(uiLayout *layout, PointerRNA *ptr, const char *propname, bool show_labels, float icon_scale, float icon_scale_popup)
void UI_but_flag_disable(uiBut *but, int flag)
void UI_but_disable(uiBut *but, const char *disabled_hint)
void uiItemEnumR(uiLayout *layout, const char *name, int icon, PointerRNA *ptr, const char *propname, int value)
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)
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, const char *tip)
bool uiLayoutGetActivateInit(uiLayout *layout)
eAutoPropButsReturn
@ UI_PROP_BUTS_ANY_FAILED_CHECK
@ UI_PROP_BUTS_NONE_ADDED
void UI_blocklist_update_window_matrix(const bContext *C, const ListBase *lb)
uiLayout * uiLayoutColumnFlow(uiLayout *layout, int number, bool align)
int UI_pie_menu_invoke_from_operator_enum(bContext *C, const char *title, const char *opname, const char *propname, const wmEvent *event)
void UI_draw_roundbox_3ub_alpha(const rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha)
void(*)(void *arg) uiFreeArgFunc
bool UI_panel_is_closed(const Panel *panel)
PointerRNA * UI_list_custom_drag_operator_set(uiList *ui_list, const char *opname, bool create_properties)
Panel * uiLayoutGetRootPanel(uiLayout *layout)
uiBut * uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, blender::StringRef str, int x, int y, short width, short height, const char *tip)
void uiLayoutSetActive(uiLayout *layout, bool active)
bool UI_textbutton_activate_rna(const bContext *C, ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
void UI_but_drag_attach_image(uiBut *but, const ImBuf *imb, float scale)
eUIEmbossType UI_block_emboss_get(uiBlock *block)
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, const int active=-1)
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)
bool uiLayoutGetPropDecorate(uiLayout *layout)
void uiTemplateColorspaceSettings(uiLayout *layout, PointerRNA *ptr, const char *propname)
uiList * UI_list_find_mouse_over(const ARegion *region, const wmEvent *event)
void uiTemplateNodeTreeInterface(uiLayout *layout, PointerRNA *ptr)
int uiLayoutGetAlignment(uiLayout *layout)
void UI_init_userdef()
uiBut * uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, PointerRNA *ptr, const char *propname, int index, float min, float max, const char *tip)
void UI_popover_end(bContext *C, uiPopover *pup, wmKeyMap *keymap)
void UI_panel_category_draw_all(ARegion *region, const char *category_id_active)
void uiTemplateStatusInfo(uiLayout *layout, bContext *C)
void uiLayoutSetUnitsY(uiLayout *layout, float unit)
void uiTemplateSearch(uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const char *text=nullptr)
uiLayout * uiLayoutBox(uiLayout *layout)
eUIEmbossType
@ UI_EMBOSS_UNDEFINED
@ UI_EMBOSS_NONE
@ UI_EMBOSS_PIE_MENU
@ UI_EMBOSS
@ UI_EMBOSS_PULLDOWN
@ UI_EMBOSS_NONE_OR_STATUS
bool UI_but_active_drop_name(const bContext *C)
void uiItemsEnumR(uiLayout *layout, PointerRNA *ptr, const char *propname)
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)
ARegion * UI_tooltip_create_from_button_or_extra_icon(bContext *C, ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_label)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
std::string(*)(bContext *C, void *argN, const char *tip) uiButToolTipFunc
PanelCategoryDyn * UI_panel_category_find(const ARegion *region, const char *idname)
int void UI_popup_menu_close(const uiBlock *block, bool is_cancel=false)
void UI_init()
bool UI_panel_can_be_pinned(const Panel *panel)
void UI_but_focus_on_enter_event(wmWindow *win, uiBut *but)
void uiTemplateNodeView(uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
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)
std::string UI_but_string_get_property_keymap(bContext &C, uiBut &but)
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, const char *tip)
void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname)
uiBut * uiDefIconTextButO(uiBlock *block, int type, const char *opname, wmOperatorCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, const char *tip)
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 uiLayoutSetSearchWeight(uiLayout *layout, float weight)
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_apply_search_filter(uiBlock *block, const char *search_filter)
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)
uiLayout * uiItemsAlertBox(uiBlock *block, const uiStyle *style, const int dialog_width, const eAlertIcon icon, const int icon_size)
void UI_block_interaction_set(uiBlock *block, uiBlockInteraction_CallbackData *callbacks)
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)
int int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs, const char *str, float aspect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
uiPopupMenu * UI_popup_menu_begin_ex(bContext *C, const char *title, const char *block_name, int icon) ATTR_NONNULL()
void uiTemplateTextureUser(uiLayout *layout, bContext *C)
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, const char *tip)
void UI_blocklist_free(const bContext *C, ARegion *region)
void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size)
int UI_pie_menu_invoke_from_rna_enum(bContext *C, const char *title, const char *path, const wmEvent *event)
void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale)
void uiTemplateModifiers(uiLayout *layout, bContext *C)
void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
bool(*)(const uiBut *a, const uiBut *b) uiButIdentityCompareFunc
void UI_but_color_set(uiBut *but, const uchar color[4])
void uiItemMenuEnumO(uiLayout *layout, const bContext *C, const char *opname, const char *propname, const char *name, int icon)
float uiLayoutGetUnitsY(uiLayout *layout)
void(*)(bContext *C, uiLayout *layout, void *arg1) uiMenuCreateFunc
uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout)
void UI_but_placeholder_set(uiBut *but, const char *placeholder_text) ATTR_NONNULL(1)
std::string UI_but_string_get_rna_label_context(const uiBut &but)
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void UI_block_lock_clear(uiBlock *block)
void UI_but_func_search_set_results_are_suggestions(uiBut *but, bool value)
void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value_str)
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)
uiBut * uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, const char *tip)
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
Definition interface.cc:590
void UI_interface_tag_script_reload()
bool UI_view_item_popup_keep_open(const blender::ui::AbstractViewItem &item)
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)
void(*)(const bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first) uiButSearchUpdateFn
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, const char *tip)
void(*)(bContext *C, void *arg, char *origstr) uiButHandleRenameFunc
void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
uiBlock * UI_region_block_find_mouse_over(const ARegion *region, const int xy[2], bool only_clip)
void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *userptr, bool compact, bool multiview)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *used_ptr, const char *used_propname, int active_layer)
void uiTemplateNodeLink(uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
uiBut * UI_region_active_but_get(const ARegion *region)
void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default)
void UI_popup_block_invoke(bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
void UI_block_bounds_set_normal(uiBlock *block, int addval)
Definition interface.cc:574
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)
void uiItemFullR_with_popover(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, const char *name, int icon, const char *panel_type)
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)
void uiItemsFullEnumO_items(uiLayout *layout, wmOperatorType *ot, const PointerRNA &ptr, PropertyRNA *prop, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, const EnumPropertyItem *item_array, int totitem, int active=-1)
ARegion * UI_region_searchbox_region_get(const ARegion *button_region)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
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)
@ UI_TEMPLATE_ASSET_DRAW_NO_NAMES
@ UI_TEMPLATE_ASSET_DRAW_NO_LIBRARY
@ UI_TEMPLATE_ASSET_DRAW_NO_FILTER
void *(*)(bContext *C, const uiBlockInteraction_Params *params, void *arg1) uiBlockInteractionBeginFn
@ UI_BUT_TEXT_RIGHT
@ UI_BUT_ICON_LEFT
@ UI_BUT_ALIGN_ALL
@ UI_BUT_INDETERMINATE
@ UI_BUT_ICON_INVERT
@ UI_BUT_ALIGN_DOWN
@ UI_BUT_ALIGN_TOP
@ UI_BUT_HAS_TOOLTIP_LABEL
@ UI_BUT_ALIGN
@ UI_BUT_NO_TEXT_PADDING
@ UI_BUT_NO_TOOLTIP
@ UI_BUT_CHECKBOX_INVERT
@ 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
bool UI_but_is_userdef(const uiBut *but)
bool UI_panel_matches_search_filter(const Panel *panel)
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, const char *tip)
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)
bool UI_search_item_add(uiSearchItems *items, const char *name, void *poin, int iconid, int but_flag, uint8_t name_prefix_offset)
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)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
void UI_popup_block_template_confirm_op(uiLayout *layout, wmOperatorType *ot, const char *confirm_text, const char *cancel_text, const int icon, bool cancel_default, PointerRNA *r_ptr)
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)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void(*)(bContext *C, const uiBlockInteraction_Params *params, void *arg1, void *user_data) uiBlockInteractionEndFn
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const uiStyle *style)
const uiStyle * UI_style_get_dpi()
uiLayout * uiTemplateGpencilModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
void uiLayoutSetScaleX(uiLayout *layout, float scale)
void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, bool color_management)
bool UI_block_is_empty(const uiBlock *block)
@ UI_DIR_CENTER_X
@ UI_DIR_CENTER_Y
@ UI_DIR_ALL
@ UI_DIR_DOWN
@ UI_DIR_RIGHT
@ UI_DIR_LEFT
@ UI_DIR_UP
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 UI_but_func_menu_step_set(uiBut *but, uiMenuStepFunc func)
void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, const char *name, int icon, const char *placeholder=nullptr)
bool uiTemplateCacheFilePointer(PointerRNA *ptr, const char *propname, PointerRNA *r_file_ptr)
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 uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propname)
float uiLayoutGetUnitsX(uiLayout *layout)
eButProgressType
@ UI_BUT_PROGRESS_TYPE_BAR
@ UI_BUT_PROGRESS_TYPE_RING
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
@ UI_LAYOUT_PIEMENU
@ UI_LAYOUT_MENU
@ UI_LAYOUT_PANEL
@ UI_LAYOUT_VERT_BAR
@ UI_LAYOUT_TOOLBAR
@ UI_LAYOUT_HEADER
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:348
void UI_but_operator_set(uiBut *but, wmOperatorType *optype, wmOperatorCallContext opcontext, const PointerRNA *opptr=nullptr)
std::optional< blender::StringRefNull > UI_but_context_string_get(const uiBut *but, const char *name)
void UI_block_flag_disable(uiBlock *block, int flag)
std::optional< EnumPropertyItem > UI_but_rna_enum_item_get(bContext &C, uiBut &but)
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)
uiBut * uiDefButO(uiBlock *block, int type, const char *opname, wmOperatorCallContext opcontext, const char *str, int x, int y, short width, short height, const char *tip)
void uiTemplateHeader3D_mode(uiLayout *layout, bContext *C)
uiBut * uiDefIconTextButO_ptr(uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, blender::StringRef str, int x, int y, short width, short height, const char *tip)
void uiTemplateAction(uiLayout *layout, const bContext *C, ID *id, const char *newop, const char *unlinkop, const char *text)
int UI_but_return_value_get(uiBut *but)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, const char *tip)
void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn)
void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiDefAutoButsArrayR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, const int icon, const int x, const int y, const int tot_width, const int height)
bool uiLayoutGetEnabled(uiLayout *layout)
void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *userptr)
@ UI_RETURN_UPDATE
@ UI_RETURN_OUT_PARENT
@ UI_RETURN_CANCEL
@ UI_RETURN_POPUP_OK
@ UI_RETURN_OK
@ UI_RETURN_OUT
PointerRNA * UI_but_extra_operator_icon_opptr_get(const uiButExtraOpIcon *extra_icon)
void UI_but_flag2_enable(uiBut *but, int flag)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void UI_but_drag_set_image(uiBut *but, const char *path, int icon, const ImBuf *imb, float scale)
uiBlock * UI_block_begin(const bContext *C, ARegion *region, std::string name, eUIEmbossType emboss)
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)
void uiItemS(uiLayout *layout)
int uiLayoutListItemPaddingWidth()
std::string UI_but_string_get_operator_keymap(bContext &C, uiBut &but)
void uiTemplateMenuSearch(uiLayout *layout)
uiLayout * uiLayoutAbsolute(uiLayout *layout, bool align)
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()
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, const char *tip)
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)
float uiLayoutGetScaleY(uiLayout *layout)
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)
uiBut * uiDefButO_ptr(uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, blender::StringRef str, int x, int y, short width, short height, const char *tip)
void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, bool compact)
bool UI_popup_block_name_exists(const bScreen *screen, blender::StringRef name)
void uiTemplateIDBrowse(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, const char *text=nullptr)
wmOperatorCallContext uiLayoutGetOperatorContext(uiLayout *layout)
void uiItemDecoratorR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index)
uiLayout * uiLayoutListBox(uiLayout *layout, uiList *ui_list, PointerRNA *actptr, PropertyRNA *actprop)
void uiTemplateImageViews(uiLayout *layout, PointerRNA *imaptr)
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, const char *tip)
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 uiItemPopoverPanelFromGroup(uiLayout *layout, bContext *C, int space_id, int region_id, const char *context, const char *category)
void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value)
void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but)
void uiItemEnumR_string(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon)
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
bool uiLayoutGetActive(uiLayout *layout)
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)
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void UI_fontstyle_draw_rotated(const uiFontStyle *fs, const rcti *rect, const char *str, const uchar col[4])
void uiItemS_ex(uiLayout *layout, float factor, LayoutSeparatorType type=LayoutSeparatorType::Auto)
uiLayout * UI_popover_layout(uiPopover *pup)
void UI_update_text_styles()
PointerRNA * UI_but_extra_operator_icon_add(uiBut *but, const char *opname, wmOperatorCallContext opcontext, int icon)
void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p)
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, const char *tip)
void UI_view_item_begin_rename(blender::ui::AbstractViewItem &item)
@ UI_SCROLL_PRESSED
@ UI_SCROLL_ARROWS
void uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, PointerRNA *r_opptr)
bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src)
float uiLayoutGetSearchWeight(uiLayout *layout)
bool uiLayoutGetKeepAspect(uiLayout *layout)
void UI_region_message_subscribe(ARegion *region, wmMsgBus *mbus)
void UI_panel_category_active_set(ARegion *region, const char *idname)
ID * UI_context_active_but_get_tab_ID(bContext *C)
void uiItemMenuEnumR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, const char *name, int icon)
eFontStyle_Align
@ UI_STYLE_TEXT_LEFT
@ UI_STYLE_TEXT_CENTER
@ UI_STYLE_TEXT_RIGHT
void uiTemplateFileSelectPath(uiLayout *layout, bContext *C, FileSelectParams *params)
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, const char *tip)
bool uiLayoutGetPropSep(uiLayout *layout)
void(*)(bContext *C, void *arg, int event) uiBlockHandleFunc
void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname, bool expand)
void uiTemplateList(uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, const char *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)
void UI_but_context_ptr_set(uiBlock *block, uiBut *but, const char *name, const PointerRNA *ptr)
void uiItemProgressIndicator(uiLayout *layout, const char *text, float factor, enum eButProgressType progress_type)
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)
void uiItemMenuEnumFullO(uiLayout *layout, const bContext *C, const char *opname, const char *propname, const char *name, int icon, PointerRNA *r_opptr)
void UI_but_number_slider_precision_set(uiBut *but, float precision)
void UI_paneltype_draw(bContext *C, PanelType *pt, uiLayout *layout)
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 uiItemLDrag(uiLayout *layout, PointerRNA *ptr, const char *name, int icon)
void uiLayoutSetUnitsX(uiLayout *layout, float unit)
void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, float value)
void UI_editsource_active_but_test(uiBut *but)
bool UI_panel_is_active(const Panel *panel)
void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, const char *propname, int icon)
const uiStyle * UI_style_get()
@ 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
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)
eUIEmbossType uiLayoutGetEmboss(uiLayout *layout)
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 uiItemPointerR(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
uiBut * uiDefIconButO(uiBlock *block, int type, const char *opname, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const char *tip)
LayoutSeparatorType
void UI_draw_roundbox_3fv_alpha(const rctf *rect, bool filled, float rad, const float col[3], float alpha)
void uiTemplateGpencilColorPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, int rows, int cols, float scale, int filter)
void uiLayoutSetTooltipFunc(uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
int uiLayoutGetLocalDir(const uiLayout *layout)
void UI_but_drag_set_path(uiBut *but, const char *path)
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, const char *tip)
uiBut * uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, const char *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
@ UI_CNR_BOTTOM_LEFT
@ UI_CNR_BOTTOM_RIGHT
@ UI_CNR_ALL
@ UI_CNR_TOP_LEFT
@ UI_CNR_TOP_RIGHT
@ UI_CNR_NONE
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
uiBut * uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
bool(*)(bContext *C, void *arg, void *active, const wmEvent *event) uiButSearchContextMenuFn
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, const char *tip)
void UI_panel_category_clear_all(ARegion *region)
void uiItemSpacer(uiLayout *layout)
void uiItemM_ptr(uiLayout *layout, MenuType *mt, const char *name, int icon)
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)
@ 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 uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr)
void UI_menutype_draw(bContext *C, MenuType *mt, uiLayout *layout)
uiBut * UI_context_active_but_prop_get(const bContext *C, PointerRNA *r_ptr, PropertyRNA **r_prop, int *r_index)
uiBut * uiDefIconButO_ptr(uiBlock *block, int type, wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const char *tip)
void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect)
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
bool uiLayoutGetFixedSize(uiLayout *layout)
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
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, const char *tip)
int(*)(bContext *C, char *str, void *arg) uiButCompleteFunc
PanelCategoryStack * UI_panel_category_active_find(ARegion *region, const char *idname)
PanelLayout uiLayoutPanel(const bContext *C, uiLayout *layout, const char *idname, bool default_closed)
void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn context_menu_fn)
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)
void UI_but_number_slider_step_size_set(uiBut *but, float step_size)
void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2])
Definition interface.cc:604
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 uiItemMContents(uiLayout *layout, const char *menuname)
void UI_but_drawflag_disable(uiBut *but, int flag)
bool uiLayoutGetActiveDefault(uiLayout *layout)
void UI_block_draw(const bContext *C, uiBlock *block)
void UI_but_dragflag_disable(uiBut *but, int flag)
void uiItemFullR_with_menu(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, const char *name, int icon, const char *menu_type)
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)
bool UI_textbutton_activate_but(const bContext *C, uiBut *actbut)
void UI_drop_color_copy(bContext *C, wmDrag *drag, wmDropBox *drop)
int UI_popover_panel_invoke(bContext *C, const char *idname, bool keep_open, ReportList *reports)
void UI_context_active_but_clear(bContext *C, wmWindow *win, ARegion *region)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
void uiTemplateNodeSocket(uiLayout *layout, bContext *C, const float color[4])
void UI_exit()
uiList * uiTemplateList_ex(uiLayout *layout, const bContext *C, const char *listtype_name, const char *list_id, PointerRNA *dataptr, const char *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, void *customdata)
int UI_icon_from_keymap_item(const wmKeyMapItem *kmi, int r_icon_mod[4])
bool UI_butstore_is_registered(uiBlock *block, uiBut *but)
void UI_block_end_ex(const bContext *C, uiBlock *block, const int xy[2], int r_xy[2])
void UI_block_bounds_set_text(uiBlock *block, int addval)
Definition interface.cc:584
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
PanelType * UI_but_paneltype_get(const uiBut *but)
void uiItemEnumR_string_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, const char *value, const char *name, int icon)
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()
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, blender::StringRef str, int x, int y, short width, short height, const char *tip)
uiBut * uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxncpy, int x, int y, short width, short height, const char *tip)
void uiTemplateColormanagedViewSettings(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname)
bool UI_butstore_is_valid(uiButStore *bs_handle)
void uiItemDecoratorR(uiLayout *layout, PointerRNA *ptr, const char *propname, int index)
int int int UI_fontstyle_height_max(const uiFontStyle *fs)
void uiTemplateCollectionExporters(uiLayout *layout, bContext *C)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void UI_blocklist_free_inactive(const bContext *C, ARegion *region)
int uiLayoutGetWidth(uiLayout *layout)
void uiTemplateOperatorRedoProperties(uiLayout *layout, const bContext *C)
ARegion *(*)(bContext *C, ARegion *region, const rcti *item_rect, void *arg, void *active) uiButSearchTooltipFn
void UI_butstore_clear(uiBlock *block)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiTemplateIDPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *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)
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
@ UI_BUT_DRAGPOIN_FREE
@ UI_BUT_DRAG_FULL_BUT
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, const char *tip)
uiBut * UI_but_active_drop_name_button(const bContext *C)
bool uiTemplateEventFromKeymapItem(uiLayout *layout, const char *text, const wmKeyMapItem *kmi, bool text_fallback)
void(*)(bContext *C, ARegion *butregion, uiBut *but) uiButHandleHoldFunc
uiBut * UI_context_active_but_get_respect_popup(const bContext *C)
uiLayout * uiLayoutGridFlow(uiLayout *layout, bool row_major, int columns_len, bool even_columns, bool even_rows, bool align)
const char * UI_layout_introspect(uiLayout *layout)
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)
uiBut * uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, PointerRNA *ptr, const char *propname, int index, float min, float max, const char *tip)
void uiTemplateNodeInputs(uiLayout *layout, bContext *C, PointerRNA *ptr)
void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void(*)(bContext *C, void *arg, int event) uiMenuHandleFunc
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)
float uiLayoutGetScaleX(uiLayout *layout)
bool UI_block_layout_needs_resolving(const uiBlock *block)
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)
float UI_text_clip_middle_ex(const uiFontStyle *fstyle, char *str, float okwidth, float minwidth, size_t max_len, char rpart_sep)
PanelLayout uiLayoutPanelProp(const bContext *C, uiLayout *layout, PointerRNA *open_prop_owner, const char *open_prop_name)
int uiTemplateRecentFiles(uiLayout *layout, int rows)
@ 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_panel_category_active_set_default(ARegion *region, const char *idname)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void UI_but_operator_set_never_call(uiBut *but)
void uiLayoutListItemAddPadding(uiLayout *layout)
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
void UI_blocklist_draw(const bContext *C, const ListBase *lb)
uiLayout * uiLayoutRadial(uiLayout *layout)
int UI_blocklist_min_y_get(ListBase *lb)
void uiTemplateCurveProfile(uiLayout *layout, PointerRNA *ptr, const char *propname)
uiBut * uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, const char *tip)
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)
void UI_block_layout_free(uiBlock *block)
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 uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
uiLayout * uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon)
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)
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)
void UI_but_number_precision_set(uiBut *but, float precision)
void UI_block_bounds_set_centered(uiBlock *block, int addval)
Definition interface.cc:616
void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, const char *text=nullptr)
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 uiItemFullOMenuHold_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, wmOperatorCallContext context, eUI_Item_Flag flag, const char *menu_id, PointerRNA *r_opptr)
int UI_pie_menu_invoke(bContext *C, const char *idname, const wmEvent *event)
uiBut * uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, const char *tip)
void uiTemplateTextureShow(uiLayout *layout, const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void(*)(bContext *C, void *argN, void *arg2) uiButHandleNFunc
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemPointerR_prop(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, const char *name, int icon, bool results_are_suggestions)
void uiTemplateGreasePencilLayerTree(uiLayout *layout, bContext *C)
int UI_icon_from_event_type(short event_type, short event_value)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void UI_but_tooltip_refresh(bContext *C, uiBut *but)
void uiItemEnumO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, const char *propname, int value)
int UI_preview_tile_size_x(const int size_px=96)
void UI_popup_menu_reports(bContext *C, ReportList *reports) ATTR_NONNULL()
void uiItemEnumR_prop(uiLayout *layout, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int value)
void UI_but_func_tooltip_label_set(uiBut *but, std::function< std::string(const uiBut *but)> func)
void ED_keymap_ui(wmKeyConfig *keyconf)
User Interface Keymap.
std::string UI_but_extra_icon_string_get_label(const uiButExtraOpIcon &extra_icon)
void UI_block_free(const bContext *C, uiBlock *block)
uiBut * uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, const char *tip)
uiBlock * uiLayoutAbsoluteBlock(uiLayout *layout)
void(*)(bContext *C, void *arg1, void *arg2) uiButHandleFunc
bool UI_but_active_drop_color(bContext *C)
@ UI_BUT2_FORCE_SEMI_MODAL_ACTIVE
@ UI_BUT2_ACTIVATE_ON_INIT_NO_SELECT
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
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)
@ UI_TEMPLATE_ID_FILTER_AVAILABLE
@ UI_TEMPLATE_ID_FILTER_ALL
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 uiTemplateSearchPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, int rows, int cols, const char *text=nullptr)
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
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
void UI_butstore_free(uiBlock *block, uiButStore *bs_handle)
void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but)
bool(*)(bContext *C, int direction, void *arg1) uiMenuStepFunc
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)
uiLayout * uiLayoutOverlap(uiLayout *layout)
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)
uiBut * uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, const char *tip)
void UI_panel_header_buttons_end(Panel *panel)
void UI_block_layout_set_current(uiBlock *block, uiLayout *layout)
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, const char *tip)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
ARegion * UI_tooltip_create_from_button(bContext *C, ARegion *butregion, uiBut *but, bool is_label)
bool UI_panel_is_dragging(const Panel *panel)
void uiTemplateLightLinkingCollection(uiLayout *layout, uiLayout *context_layout, PointerRNA *ptr, const char *propname)
uiBut * uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, blender::StringRef str, int x, int y, short width, short height, const char *tip, uiButArgNFree func_argN_free_fn=MEM_freeN, uiButArgNCopy func_argN_copy_fn=MEM_dupallocN)
void uiLayoutSetContextString(uiLayout *layout, const char *name, blender::StringRef value)
PointerRNA * UI_list_custom_activate_operator_set(uiList *ui_list, const char *opname, bool create_properties)
void UI_but_func_search_set_listen(uiBut *but, uiButSearchListenFn listen_fn)
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, const char *tip)
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)
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)
void uiTemplateCacheFile(uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname)
void uiTemplateIDTabs(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *menu, int filter=UI_TEMPLATE_ID_FILTER_ALL)
void ED_uilisttypes_ui()
void *(*)(const void *arg) uiCopyArgFunc
void(*)(bContext *C, const uiBlockInteraction_Params *params, void *arg1, void *user_data) uiBlockInteractionUpdateFn
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
int UI_preview_tile_size_y_no_label(const int size_px=96)
void UI_theme_init_default()
void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propname, PointerRNA *root_ptr, const char *text)
bContextStore * uiLayoutGetContextStore(uiLayout *layout)
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 uiItemPopoverPanel_ptr(uiLayout *layout, const bContext *C, PanelType *pt, const char *name, int icon)
void UI_popup_handlers_remove(ListBase *handlers, uiPopupBlockHandle *popup)
bool uiLayoutGetRedAlert(uiLayout *layout)
uiBut * uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, const char *tip)
void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, bool compact)
void UI_panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr)
void uiItemMenuEnumFullO_ptr(uiLayout *layout, const bContext *C, wmOperatorType *ot, const char *propname, const char *name, int icon, PointerRNA *r_opptr)
void uiItemMenuEnumR(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name, int icon)
int UI_popup_menu_invoke(bContext *C, const char *idname, ReportList *reports) ATTR_NONNULL(1
void UI_but_drag_set_asset(uiBut *but, const blender::asset_system::AssetRepresentation *asset, int import_method, int icon, const ImBuf *imb, float scale)
uiBut * uiDefButR(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, PointerRNA *ptr, const char *propname, int index, float min, float max, const char *tip)
wmOperator * UI_context_active_operator_get(const bContext *C)
int UI_calc_float_precision(int prec, double value)
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)
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)
void uiTemplateShaderFx(uiLayout *layout, bContext *C)
void UI_but_unit_type_set(uiBut *but, int unit_type)
bool UI_but_is_tool(const uiBut *but)
void UI_widgetbase_draw_cache_flush()
void UI_region_handlers_add(ListBase *handlers)
void UI_block_end(const bContext *C, uiBlock *block)
void UI_but_search_preview_grid_size_set(uiBut *but, int rows, int cols)
void uiLayoutContextCopy(uiLayout *layout, const bContextStore *context)
@ UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED
@ UI_TEMPLATE_OP_PROPS_SHOW_EMPTY
@ 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_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)
void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN)
void uiItemTabsEnumR_prop(uiLayout *layout, bContext *C, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *ptr_highlight, PropertyRNA *prop_highlight, bool icon_only)
void UI_widgetbase_draw_cache_begin()
void UI_autocomplete_update_name(AutoComplete *autocpl, const char *name)
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)
uiBut * uiItemL_ex(uiLayout *layout, const char *name, int icon, bool highlight, bool redalert)
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)
@ UI_LAYOUT_VERTICAL
@ UI_LAYOUT_HORIZONTAL
void uiItemPopoverPanel(uiLayout *layout, const bContext *C, const char *panel_type, const char *name, int icon)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_region_free_active_but_all(bContext *C, ARegion *region)
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
void(*)(const wmRegionListenerParams *params, void *arg) uiButSearchListenFn
uiBut * uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, const char *name, int icon, int x, int y, int width, int height)
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)
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
uiBut * UI_region_views_find_active_item_but(const ARegion *region)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
bool UI_but_flag_is_set(uiBut *but, int flag)
bool UI_but_has_tooltip_label(const uiBut *but)
wmOperatorType * UI_but_operatortype_get_from_enum_menu(uiBut *but, PropertyRNA **r_prop)
eUI_Item_Flag
@ UI_ITEM_R_EVENT
@ UI_ITEM_R_TOGGLE
@ UI_ITEM_O_DEPRESS
@ UI_ITEM_R_SPLIT_EMPTY_NAME
@ UI_ITEM_R_ICON_NEVER
@ UI_ITEM_R_TEXT_BUT_FORCE_SEMI_MODAL_ACTIVE
@ UI_ITEM_R_IMMEDIATE
@ UI_ITEM_R_FORCE_BLANK_DECORATE
@ UI_ITEM_R_COMPACT
@ UI_ITEM_R_EXPAND
@ UI_ITEM_R_NO_BG
@ UI_ITEM_R_CHECKBOX_INVERT
@ UI_ITEM_R_ICON_ONLY
@ UI_ITEM_R_FULL_EVENT
@ UI_ITEM_R_SLIDER
std::optional< std::string > UI_key_event_operator_string(const bContext *C, const char *opname, IDProperty *properties, bool is_strict)
void uiTemplateComponentMenu(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name)
void uiTemplatePalette(uiLayout *layout, PointerRNA *ptr, const char *propname, bool colors)
@ UI_LAYOUT_ALIGN_LEFT
@ UI_LAYOUT_ALIGN_CENTER
@ UI_LAYOUT_ALIGN_RIGHT
@ UI_LAYOUT_ALIGN_EXPAND
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr)
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)
bool uiLayoutEndsWithPanelHeader(const uiLayout &layout)
const PointerRNA * UI_but_context_ptr_get(const uiBut *but, const char *name, const StructRNA *type=nullptr)
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:622
void UI_block_align_end(uiBlock *block)
wmOperatorCallContext
Definition WM_types.hh:216
int pad[32 - sizeof(int)]
volatile int lock
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
local_group_size(16, 16) .push_constant(Type b
int len
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
#define str(s)
uint col
uint padding(uint offset, uint alignment)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
bool enabled
void MEM_freeN(void *vmemh)
Definition mallocn.cc:105
void *(* MEM_dupallocN)(const void *vmemh)
Definition mallocn.cc:39
static ulong state[N]
void template_asset_shelf_popover(uiLayout &layout, const bContext &C, StringRefNull asset_shelf_id, StringRefNull name, int icon)
#define min(a, b)
Definition sort.c:32
unsigned char uint8_t
Definition stdint.h:78
signed char int8_t
Definition stdint.h:75
const char * startname
Definition DNA_ID.h:413
uiLayout * header
uiLayout * body
uiBlockInteractionBeginFn begin_fn
uiBlockInteractionEndFn end_fn
uiBlockInteractionUpdateFn update_fn
uiBlock * block
uiTooltipImageBackground background
float max
static int cmp_fn(const void *a, const void *b)
int xy[2]
Definition wm_draw.cc:170
PointerRNA * ptr
Definition wm_files.cc:4126
wmOperatorType * ot
Definition wm_files.cc:4125
uint8_t flag
Definition wm_window.cc:138