Blender  V3.3
UI_interface.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
8 #pragma once
9 
10 #include "BLI_compiler_attrs.h"
11 #include "BLI_sys_types.h" /* size_t */
12 #include "BLI_utildefines.h"
13 #include "UI_interface_icons.h"
14 #include "WM_types.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 /* Struct Declarations */
21 
22 struct ARegion;
23 struct AssetFilterSettings;
24 struct AssetHandle;
25 struct AssetMetaData;
26 struct AutoComplete;
27 struct EnumPropertyItem;
28 struct FileDirEntry;
29 struct FileSelectParams;
30 struct ID;
31 struct IDProperty;
32 struct ImBuf;
33 struct Image;
34 struct ImageUser;
35 struct ListBase;
36 struct MTex;
37 struct Panel;
38 struct PanelType;
39 struct PointerRNA;
40 struct PropertyRNA;
41 struct ReportList;
42 struct ResultBLF;
43 struct bContext;
44 struct bContextStore;
45 struct bNode;
46 struct bNodeSocket;
47 struct bNodeTree;
48 struct bScreen;
49 struct rctf;
50 struct rcti;
52 struct uiButSearch;
53 struct uiFontStyle;
54 struct uiList;
55 struct uiStyle;
56 struct uiWidgetColors;
57 struct wmDrag;
58 struct wmDropBox;
59 struct wmEvent;
60 struct wmGizmo;
61 struct wmKeyConfig;
62 struct wmKeyMap;
63 struct wmKeyMapItem;
64 struct wmMsgBus;
65 struct wmOperator;
66 struct wmOperatorType;
68 struct wmWindow;
69 
70 typedef struct uiBlock uiBlock;
71 typedef struct uiBut uiBut;
72 typedef struct uiButExtraOpIcon uiButExtraOpIcon;
73 typedef struct uiLayout uiLayout;
75 /* C handle for C++ #ui::AbstractView type. */
76 typedef struct uiViewHandle uiViewHandle;
77 /* C handle for C++ #ui::AbstractViewItem type. */
78 typedef struct uiViewItemHandle uiViewItemHandle;
79 
80 /* Defines */
81 
82 /* char for splitting strings, aligning shortcuts in menus, users never see */
83 #define UI_SEP_CHAR '|'
84 #define UI_SEP_CHAR_S "|"
85 
86 /* Separator for text in search menus (right pointing arrow).
87  * keep in sync with `string_search.cc`. */
88 #define UI_MENU_ARROW_SEP "\xe2\x96\xb6"
89 
90 /* names */
91 #define UI_MAX_DRAW_STR 400
92 #define UI_MAX_NAME_STR 128
93 #define UI_MAX_SHORTCUT_STR 64
94 
101 #define UI_REGION_OVERLAP_MARGIN (U.widget_unit / 3)
102 
103 /* use for clamping popups within the screen */
104 #define UI_SCREEN_MARGIN 10
105 
107 typedef enum eUIEmbossType {
108  UI_EMBOSS = 0, /* use widget style for drawing */
109  UI_EMBOSS_NONE = 1, /* Nothing, only icon and/or text */
110  UI_EMBOSS_PULLDOWN = 2, /* Pull-down menu style */
111  UI_EMBOSS_RADIAL = 3, /* Pie Menu */
117 
118  UI_EMBOSS_UNDEFINED = 255, /* For layout engine, use emboss from block. */
120 
121 /* uiBlock->direction */
122 enum {
123  UI_DIR_UP = 1 << 0,
124  UI_DIR_DOWN = 1 << 1,
125  UI_DIR_LEFT = 1 << 2,
126  UI_DIR_RIGHT = 1 << 3,
127  UI_DIR_CENTER_X = 1 << 4,
128  UI_DIR_CENTER_Y = 1 << 5,
129 
131 };
132 
134 enum {
135  UI_BLOCK_LOOP = 1 << 0,
145  UI_BLOCK_POPUP = 1 << 9,
146  UI_BLOCK_OUT_1 = 1 << 10,
149  /* Stop handling mouse events. */
151 
152  /* block->flag bits 14-17 are identical to but->drawflag bits */
153 
156  UI_BLOCK_RADIAL = 1 << 20,
157  UI_BLOCK_POPOVER = 1 << 21,
168 };
169 
171 enum {
175  UI_RETURN_OK = 1 << 1,
177  UI_RETURN_OUT = 1 << 2,
184 };
185 
187 enum {
188  /* WARNING: the first 8 flags are internal (see #UI_SELECT definition). */
191 
192  UI_BUT_NODE_LINK = 1 << 10,
194  UI_BUT_DRAG_LOCK = 1 << 12,
196  UI_BUT_DISABLED = 1 << 13,
197 
198  UI_BUT_ANIMATED = 1 << 14,
200  UI_BUT_DRIVEN = 1 << 16,
201  UI_BUT_REDALERT = 1 << 17,
203  UI_BUT_INACTIVE = 1 << 18,
205  UI_BUT_UNDO = 1 << 20,
206  /* UNUSED = 1 << 21, */
207  UI_BUT_NO_UTF8 = 1 << 22,
208 
213 
215  UI_BUT_LIST_ITEM = 1 << 24,
217  UI_BUT_DRAG_MULTI = 1 << 25,
220 
229 
231  UI_BUT_OVERRIDDEN = 1u << 31u,
232 };
233 
234 /* Default font size for normal text. */
235 #define UI_DEFAULT_TEXT_POINTS 11.0f
236 
237 /* Larger size used for title text. */
238 #define UI_DEFAULT_TITLE_POINTS 11.0f
239 
240 #define UI_PANEL_WIDTH 340
241 #define UI_COMPACT_PANEL_WIDTH 160
242 #define UI_SIDEBAR_PANEL_WIDTH 220
243 #define UI_NAVIGATION_REGION_WIDTH UI_COMPACT_PANEL_WIDTH
244 #define UI_NARROW_NAVIGATION_REGION_WIDTH 100
245 
246 #define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 1.0f)
247 
248 /* Both these margins should be ignored if the panel doesn't show a background (check
249  * #UI_panel_should_show_background()). */
250 #define UI_PANEL_MARGIN_X (U.widget_unit * 0.4f)
251 #define UI_PANEL_MARGIN_Y (U.widget_unit * 0.1f)
252 
253 /* but->drawflag - these flags should only affect how the button is drawn. */
254 /* NOTE: currently, these flags *are not passed* to the widget's state() or draw() functions
255  * (except for the 'align' ones)!
256  */
257 enum {
266 
267  /* Button align flag, for drawing groups together.
268  * Used in 'uiBlock.flag', take care! */
269  UI_BUT_ALIGN_TOP = 1 << 14,
270  UI_BUT_ALIGN_LEFT = 1 << 15,
272  UI_BUT_ALIGN_DOWN = 1 << 17,
274  /* end bits shared with 'uiBlock.flag' */
275 
284 
286  UI_BUT_BOX_ITEM = 1 << 20,
287 
292 
295 
298 
299  /* Draw the checkbox buttons inverted. */
301 };
302 
303 /* scale fixed button widths by this to account for DPI */
304 
305 #define UI_DPI_FAC (U.dpi_fac)
306 /* 16 to copy ICON_DEFAULT_HEIGHT */
307 #define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_FAC)
308 
316 typedef enum {
321  // UI_BUT_POIN_FUNCTION = 192, /* UNUSED */
322  UI_BUT_POIN_BIT = 256, /* OR'd with a bit index. */
324 
325 /* requires (but->poin != NULL) */
326 #define UI_BUT_POIN_TYPES (UI_BUT_POIN_FLOAT | UI_BUT_POIN_SHORT | UI_BUT_POIN_CHAR)
327 
328 /* assigned to but->type, OR'd with the flags above when passing args */
329 typedef enum {
330  UI_BTYPE_BUT = 1 << 9,
331  UI_BTYPE_ROW = 2 << 9,
332  UI_BTYPE_TEXT = 3 << 9,
334  UI_BTYPE_MENU = 4 << 9,
337  UI_BTYPE_NUM = 6 << 9,
340  UI_BTYPE_TOGGLE = 8 << 9,
347  UI_BTYPE_CHECKBOX = 13 << 9,
349  UI_BTYPE_COLOR = 15 << 9,
350  UI_BTYPE_TAB = 16 << 9,
351  UI_BTYPE_POPOVER = 17 << 9,
352  UI_BTYPE_SCROLL = 18 << 9,
353  UI_BTYPE_BLOCK = 19 << 9,
354  UI_BTYPE_LABEL = 20 << 9,
356  UI_BTYPE_HSVCUBE = 26 << 9,
358  UI_BTYPE_PULLDOWN = 27 << 9,
359  UI_BTYPE_ROUNDBOX = 28 << 9,
362  UI_BTYPE_UNITVEC = 31 << 9,
363  UI_BTYPE_CURVE = 32 << 9,
366  UI_BTYPE_LISTBOX = 36 << 9,
367  UI_BTYPE_LISTROW = 37 << 9,
370 
373  UI_BTYPE_EXTRA = 42 << 9,
379  UI_BTYPE_IMAGE = 47 << 9,
381  UI_BTYPE_WAVEFORM = 49 << 9,
385  UI_BTYPE_SEPR = 54 << 9,
390  UI_BTYPE_GRIP = 57 << 9,
392  /* An item a view (see #ui::AbstractViewItem). */
394 } eButType;
395 
396 #define BUTTYPE (63 << 9)
397 
399 typedef enum eButGradientType {
406 
410 
411 /* Drawing
412  *
413  * Functions to draw various shapes, taking theme settings into account.
414  * Used for code that draws its own UI style elements. */
415 
417 void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4]);
418 void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4]);
419 void UI_draw_roundbox_3ub_alpha(const struct rctf *rect,
420  bool filled,
421  float rad,
422  const unsigned char col[3],
423  unsigned char alpha);
425  const struct rctf *rect, bool filled, float rad, const float col[3], float alpha);
426 void UI_draw_roundbox_4fv_ex(const struct rctf *rect,
427  const float inner1[4],
428  const float inner2[4],
429  float shade_dir,
430  const float outline[4],
431  float outline_width,
432  float rad);
433 
434 #if 0 /* unused */
435 int UI_draw_roundbox_corner_get(void);
436 #endif
437 
438 void UI_draw_box_shadow(const struct rctf *rect, unsigned char alpha);
439 void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4]);
440 
450  const struct rctf *rect,
451  const float title_aspect[2],
452  const float action_aspect[2]);
453 
455 enum {
458 };
463  const struct rcti *rect,
464  const struct rcti *slider,
465  int state);
466 
480 float UI_text_clip_middle_ex(const struct uiFontStyle *fstyle,
481  char *str,
482  float okwidth,
483  float minwidth,
484  size_t max_len,
485  char rpart_sep);
486 
503 typedef struct uiSearchItems uiSearchItems;
504 
505 typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2);
506 typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr);
507 typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2);
508 typedef void (*uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but);
509 typedef int (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg);
510 
513 typedef bool (*uiButIdentityCompareFunc)(const uiBut *a, const uiBut *b);
514 
515 /* Search types. */
516 typedef struct ARegion *(*uiButSearchCreateFn)(struct bContext *C,
517  struct ARegion *butregion,
518  struct uiButSearch *search_but);
525  const struct bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first);
527  void *arg,
528  void *active,
529  const struct wmEvent *event);
530 typedef struct ARegion *(*uiButSearchTooltipFn)(struct bContext *C,
531  struct ARegion *region,
532  const struct rcti *item_rect,
533  void *arg,
534  void *active);
535 
536 /* Must return allocated string. */
537 typedef char *(*uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip);
538 typedef int (*uiButPushedStateFunc)(struct uiBut *but, const void *arg);
539 
540 typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
541 
542 /* -------------------------------------------------------------------- */
557  bool is_click;
564 };
565 
567 typedef void *(*uiBlockInteractionBeginFn)(struct bContext *C,
568  const struct uiBlockInteraction_Params *params,
569  void *arg1);
571  const struct uiBlockInteraction_Params *params,
572  void *arg1,
573  void *user_data);
575  const struct uiBlockInteraction_Params *params,
576  void *arg1,
577  void *user_data);
578 
583  void *arg1;
585 
587 
590 /* Menu Callbacks */
591 
592 typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1);
593 typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event);
600 typedef bool (*uiMenuStepFunc)(struct bContext *C, int direction, void *arg1);
601 
602 typedef void *(*uiCopyArgFunc)(const void *arg);
603 typedef void (*uiFreeArgFunc)(void *arg);
604 
605 /* interface_query.c */
606 
607 bool UI_but_has_tooltip_label(const uiBut *but);
608 bool UI_but_is_tool(const uiBut *but);
609 /* file selectors are exempt from utf-8 checks */
610 bool UI_but_is_utf8(const uiBut *but);
611 #define UI_but_is_decorator(but) ((but)->type == UI_BTYPE_DECORATOR)
612 
613 bool UI_block_is_empty_ex(const uiBlock *block, bool skip_title);
614 bool UI_block_is_empty(const uiBlock *block);
615 bool UI_block_can_add_separator(const uiBlock *block);
616 
617 struct uiList *UI_list_find_mouse_over(const struct ARegion *region, const struct wmEvent *event);
618 
619 /* interface_region_menu_popup.c */
620 
629 typedef struct uiPopupMenu uiPopupMenu;
630 
631 uiPopupMenu *UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL();
637  const char *title,
638  const char *block_name,
639  int icon) ATTR_NONNULL();
643 void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup);
644 bool UI_popup_menu_end_or_cancel(struct bContext *C, struct uiPopupMenu *pup);
646 
647 void UI_popup_menu_reports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL();
648 int UI_popup_menu_invoke(struct bContext *C, const char *idname, struct ReportList *reports)
649  ATTR_NONNULL(1, 2);
650 
655 void UI_popup_menu_retval_set(const uiBlock *block, int retval, bool enable);
659 void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *but);
660 
661 /* interface_region_popover.c */
662 
663 typedef struct uiPopover uiPopover;
664 
666  const char *idname,
667  bool keep_open,
668  struct ReportList *reports);
669 
676 uiPopover *UI_popover_begin(struct bContext *C, int menu_width, bool from_active_button)
677  ATTR_NONNULL(1);
681 void UI_popover_end(struct bContext *C, struct uiPopover *pup, struct wmKeyMap *keymap);
682 struct uiLayout *UI_popover_layout(uiPopover *pup);
684 
685 /* interface_region_menu_pie.c */
686 
687 /* Pie menus */
688 typedef struct uiPieMenu uiPieMenu;
689 
690 int UI_pie_menu_invoke(struct bContext *C, const char *idname, const struct wmEvent *event);
692  const char *title,
693  const char *opname,
694  const char *propname,
695  const struct wmEvent *event);
697  const char *title,
698  const char *path,
699  const struct wmEvent *event);
700 
702  const char *title,
703  int icon,
704  const struct wmEvent *event) ATTR_NONNULL();
705 void UI_pie_menu_end(struct bContext *C, uiPieMenu *pie);
706 struct uiLayout *UI_pie_menu_layout(struct uiPieMenu *pie);
707 
708 /* interface_region_menu_popup.c */
709 
710 /* Popup Blocks
711  *
712  * Functions used to create popup blocks. These are like popup menus
713  * but allow using all button types and creating an own layout. */
714 typedef uiBlock *(*uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1);
715 typedef void (*uiBlockCancelFunc)(struct bContext *C, void *arg1);
716 
717 void UI_popup_block_invoke(struct bContext *C,
718  uiBlockCreateFunc func,
719  void *arg,
720  uiFreeArgFunc arg_free);
721 void UI_popup_block_invoke_ex(struct bContext *C,
722  uiBlockCreateFunc func,
723  void *arg,
724  uiFreeArgFunc arg_free,
725  bool can_refresh);
726 void UI_popup_block_ex(struct bContext *C,
727  uiBlockCreateFunc func,
728  uiBlockHandleFunc popup_func,
729  uiBlockCancelFunc cancel_func,
730  void *arg,
731  struct wmOperator *op);
732 #if 0 /* UNUSED */
733 void uiPupBlockOperator(struct bContext *C,
734  uiBlockCreateFunc func,
735  struct wmOperator *op,
736  wmOperatorCallContext opcontext);
737 #endif
738 
739 void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *block);
740 
741 bool UI_popup_block_name_exists(const struct bScreen *screen, const char *name);
742 
743 /* Blocks
744  *
745  * Functions for creating, drawing and freeing blocks. A Block is a
746  * container of buttons and used for various purposes.
747  *
748  * Begin/Define Buttons/End/Draw is the typical order in which these
749  * function should be called, though for popup blocks Draw is left out.
750  * Freeing blocks is done by the screen/ module automatically.
751  */
752 
754  struct ARegion *region,
755  const char *name,
756  eUIEmbossType emboss);
757 void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2], int r_xy[2]);
758 void UI_block_end(const struct bContext *C, uiBlock *block);
762 void UI_block_draw(const struct bContext *C, struct uiBlock *block);
763 void UI_blocklist_update_window_matrix(const struct bContext *C, const struct ListBase *lb);
764 void UI_blocklist_update_view_for_buttons(const struct bContext *C, const struct ListBase *lb);
765 void UI_blocklist_draw(const struct bContext *C, const struct ListBase *lb);
766 void UI_block_update_from_old(const struct bContext *C, struct uiBlock *block);
767 
768 enum {
771 };
772 void UI_block_theme_style_set(uiBlock *block, char theme_style);
774 void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss);
775 bool UI_block_is_search_only(const uiBlock *block);
780 void UI_block_set_search_only(uiBlock *block, bool search_only);
781 
785 void UI_block_free(const struct bContext *C, uiBlock *block);
789 void UI_blocklist_free(const struct bContext *C, struct ARegion *region);
790 void UI_blocklist_free_inactive(const struct bContext *C, struct ARegion *region);
791 
797 
798 void UI_block_region_set(uiBlock *block, struct ARegion *region);
799 
800 void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr);
801 void UI_block_lock_clear(uiBlock *block);
802 
806 void UI_block_align_begin(uiBlock *block);
807 void UI_block_align_end(uiBlock *block);
808 
809 /* block bounds/position calculation */
810 typedef enum {
819 
823 void UI_block_bounds_set_normal(struct uiBlock *block, int addval);
827 void UI_block_bounds_set_text(uiBlock *block, int addval);
831 void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2]);
835 void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2]);
839 void UI_block_bounds_set_centered(uiBlock *block, int addval);
840 void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy);
841 
842 int UI_blocklist_min_y_get(struct ListBase *lb);
843 
844 void UI_block_direction_set(uiBlock *block, char direction);
848 void UI_block_order_flip(uiBlock *block);
849 void UI_block_flag_enable(uiBlock *block, int flag);
850 void UI_block_flag_disable(uiBlock *block, int flag);
851 void UI_block_translate(uiBlock *block, int x, int y);
852 
854 
860 bool UI_but_active_drop_name(const struct bContext *C);
861 bool UI_but_active_drop_color(struct bContext *C);
862 
863 void UI_but_flag_enable(uiBut *but, int flag);
864 void UI_but_flag_disable(uiBut *but, int flag);
865 bool UI_but_flag_is_set(uiBut *but, int flag);
866 
867 void UI_but_drawflag_enable(uiBut *but, int flag);
868 void UI_but_drawflag_disable(uiBut *but, int flag);
869 
870 void UI_but_disable(uiBut *but, const char *disabled_hint);
871 
873 
881 bool UI_but_active_only_ex(const struct bContext *C,
882  struct ARegion *region,
883  uiBlock *block,
884  uiBut *but,
885  bool remove_on_failure);
886 bool UI_but_active_only(const struct bContext *C,
887  struct ARegion *region,
888  uiBlock *block,
889  uiBut *but);
895  struct ARegion *region,
896  struct uiBlock *block);
897 
901 void UI_but_execute(const struct bContext *C, struct ARegion *region, uiBut *but);
902 
903 bool UI_but_online_manual_id(const uiBut *but,
904  char *r_str,
905  size_t maxlength) ATTR_WARN_UNUSED_RESULT;
907  char *r_str,
908  size_t maxlength) ATTR_WARN_UNUSED_RESULT;
909 bool UI_but_is_userdef(const uiBut *but);
910 
911 /* Buttons
912  *
913  * Functions to define various types of buttons in a block. Postfixes:
914  * - F: float
915  * - I: int
916  * - S: short
917  * - C: char
918  * - R: RNA
919  * - O: operator */
920 
921 uiBut *uiDefBut(uiBlock *block,
922  int type,
923  int retval,
924  const char *str,
925  int x,
926  int y,
927  short width,
928  short height,
929  void *poin,
930  float min,
931  float max,
932  float a1,
933  float a2,
934  const char *tip);
935 uiBut *uiDefButF(uiBlock *block,
936  int type,
937  int retval,
938  const char *str,
939  int x,
940  int y,
941  short width,
942  short height,
943  float *poin,
944  float min,
945  float max,
946  float a1,
947  float a2,
948  const char *tip);
949 uiBut *uiDefButI(uiBlock *block,
950  int type,
951  int retval,
952  const char *str,
953  int x,
954  int y,
955  short width,
956  short height,
957  int *poin,
958  float min,
959  float max,
960  float a1,
961  float a2,
962  const char *tip);
963 uiBut *uiDefButBitI(uiBlock *block,
964  int type,
965  int bit,
966  int retval,
967  const char *str,
968  int x,
969  int y,
970  short width,
971  short height,
972  int *poin,
973  float min,
974  float max,
975  float a1,
976  float a2,
977  const char *tip);
978 uiBut *uiDefButS(uiBlock *block,
979  int type,
980  int retval,
981  const char *str,
982  int x,
983  int y,
984  short width,
985  short height,
986  short *poin,
987  float min,
988  float max,
989  float a1,
990  float a2,
991  const char *tip);
992 uiBut *uiDefButBitS(uiBlock *block,
993  int type,
994  int bit,
995  int retval,
996  const char *str,
997  int x,
998  int y,
999  short width,
1000  short height,
1001  short *poin,
1002  float min,
1003  float max,
1004  float a1,
1005  float a2,
1006  const char *tip);
1007 uiBut *uiDefButC(uiBlock *block,
1008  int type,
1009  int retval,
1010  const char *str,
1011  int x,
1012  int y,
1013  short width,
1014  short height,
1015  char *poin,
1016  float min,
1017  float max,
1018  float a1,
1019  float a2,
1020  const char *tip);
1021 uiBut *uiDefButBitC(uiBlock *block,
1022  int type,
1023  int bit,
1024  int retval,
1025  const char *str,
1026  int x,
1027  int y,
1028  short width,
1029  short height,
1030  char *poin,
1031  float min,
1032  float max,
1033  float a1,
1034  float a2,
1035  const char *tip);
1036 uiBut *uiDefButR(uiBlock *block,
1037  int type,
1038  int retval,
1039  const char *str,
1040  int x,
1041  int y,
1042  short width,
1043  short height,
1044  struct PointerRNA *ptr,
1045  const char *propname,
1046  int index,
1047  float min,
1048  float max,
1049  float a1,
1050  float a2,
1051  const char *tip);
1052 uiBut *uiDefButR_prop(uiBlock *block,
1053  int type,
1054  int retval,
1055  const char *str,
1056  int x,
1057  int y,
1058  short width,
1059  short height,
1060  struct PointerRNA *ptr,
1061  struct PropertyRNA *prop,
1062  int index,
1063  float min,
1064  float max,
1065  float a1,
1066  float a2,
1067  const char *tip);
1068 uiBut *uiDefButO(uiBlock *block,
1069  int type,
1070  const char *opname,
1071  wmOperatorCallContext opcontext,
1072  const char *str,
1073  int x,
1074  int y,
1075  short width,
1076  short height,
1077  const char *tip);
1078 uiBut *uiDefButO_ptr(uiBlock *block,
1079  int type,
1080  struct wmOperatorType *ot,
1081  wmOperatorCallContext opcontext,
1082  const char *str,
1083  int x,
1084  int y,
1085  short width,
1086  short height,
1087  const char *tip);
1088 
1092 uiBut *uiDefIconBut(uiBlock *block,
1093  int type,
1094  int retval,
1095  int icon,
1096  int x,
1097  int y,
1098  short width,
1099  short height,
1100  void *poin,
1101  float min,
1102  float max,
1103  float a1,
1104  float a2,
1105  const char *tip);
1106 uiBut *uiDefIconButI(uiBlock *block,
1107  int type,
1108  int retval,
1109  int icon,
1110  int x,
1111  int y,
1112  short width,
1113  short height,
1114  int *poin,
1115  float min,
1116  float max,
1117  float a1,
1118  float a2,
1119  const char *tip);
1121  int type,
1122  int bit,
1123  int retval,
1124  int icon,
1125  int x,
1126  int y,
1127  short width,
1128  short height,
1129  int *poin,
1130  float min,
1131  float max,
1132  float a1,
1133  float a2,
1134  const char *tip);
1135 uiBut *uiDefIconButS(uiBlock *block,
1136  int type,
1137  int retval,
1138  int icon,
1139  int x,
1140  int y,
1141  short width,
1142  short height,
1143  short *poin,
1144  float min,
1145  float max,
1146  float a1,
1147  float a2,
1148  const char *tip);
1150  int type,
1151  int bit,
1152  int retval,
1153  int icon,
1154  int x,
1155  int y,
1156  short width,
1157  short height,
1158  short *poin,
1159  float min,
1160  float max,
1161  float a1,
1162  float a2,
1163  const char *tip);
1165  int type,
1166  int bit,
1167  int retval,
1168  int icon,
1169  int x,
1170  int y,
1171  short width,
1172  short height,
1173  char *poin,
1174  float min,
1175  float max,
1176  float a1,
1177  float a2,
1178  const char *tip);
1179 uiBut *uiDefIconButR(uiBlock *block,
1180  int type,
1181  int retval,
1182  int icon,
1183  int x,
1184  int y,
1185  short width,
1186  short height,
1187  struct PointerRNA *ptr,
1188  const char *propname,
1189  int index,
1190  float min,
1191  float max,
1192  float a1,
1193  float a2,
1194  const char *tip);
1196  int type,
1197  int retval,
1198  int icon,
1199  int x,
1200  int y,
1201  short width,
1202  short height,
1203  struct PointerRNA *ptr,
1204  struct PropertyRNA *prop,
1205  int index,
1206  float min,
1207  float max,
1208  float a1,
1209  float a2,
1210  const char *tip);
1211 uiBut *uiDefIconButO(uiBlock *block,
1212  int type,
1213  const char *opname,
1214  wmOperatorCallContext opcontext,
1215  int icon,
1216  int x,
1217  int y,
1218  short width,
1219  short height,
1220  const char *tip);
1222  int type,
1223  struct wmOperatorType *ot,
1224  wmOperatorCallContext opcontext,
1225  int icon,
1226  int x,
1227  int y,
1228  short width,
1229  short height,
1230  const char *tip);
1232  uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]);
1233 uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height);
1234 /* Button containing both string label and icon */
1236  int type,
1237  int retval,
1238  int icon,
1239  const char *str,
1240  int x,
1241  int y,
1242  short width,
1243  short height,
1244  void *poin,
1245  float min,
1246  float max,
1247  float a1,
1248  float a2,
1249  const char *tip);
1251  int type,
1252  int retval,
1253  int icon,
1254  const char *str,
1255  int x,
1256  int y,
1257  short width,
1258  short height,
1259  float *poin,
1260  float min,
1261  float max,
1262  float a1,
1263  float a2,
1264  const char *tip);
1266  int type,
1267  int retval,
1268  int icon,
1269  const char *str,
1270  int x,
1271  int y,
1272  short width,
1273  short height,
1274  int *poin,
1275  float min,
1276  float max,
1277  float a1,
1278  float a2,
1279  const char *tip);
1281  int type,
1282  int retval,
1283  int icon,
1284  const char *str,
1285  int x,
1286  int y,
1287  short width,
1288  short height,
1289  struct PointerRNA *ptr,
1290  const char *propname,
1291  int index,
1292  float min,
1293  float max,
1294  float a1,
1295  float a2,
1296  const char *tip);
1298  int type,
1299  int retval,
1300  int icon,
1301  const char *str,
1302  int x,
1303  int y,
1304  short width,
1305  short height,
1306  struct PointerRNA *ptr,
1307  struct PropertyRNA *prop,
1308  int index,
1309  float min,
1310  float max,
1311  float a1,
1312  float a2,
1313  const char *tip);
1315  int type,
1316  const char *opname,
1317  wmOperatorCallContext opcontext,
1318  int icon,
1319  const char *str,
1320  int x,
1321  int y,
1322  short width,
1323  short height,
1324  const char *tip);
1326  int type,
1327  struct wmOperatorType *ot,
1328  wmOperatorCallContext opcontext,
1329  int icon,
1330  const char *str,
1331  int x,
1332  int y,
1333  short width,
1334  short height,
1335  const char *tip);
1336 
1337 /* for passing inputs to ButO buttons */
1339 
1341  uiBut *but,
1342  const char *name,
1343  const struct PointerRNA *ptr);
1344 const struct PointerRNA *UI_but_context_ptr_get(const uiBut *but,
1345  const char *name,
1346  const StructRNA *type CPP_ARG_DEFAULT(nullptr));
1347 struct bContextStore *UI_but_context_get(const uiBut *but);
1348 
1349 void UI_but_unit_type_set(uiBut *but, int unit_type);
1350 int UI_but_unit_type_get(const uiBut *but);
1351 
1352 typedef enum uiStringInfoType {
1359  BUT_GET_RNA_LABEL_CONTEXT, /* Context specified in CTX_XXX_ macros are just unreachable! */
1366 
1367 typedef struct uiStringInfo {
1369  char *strinfo;
1371 
1372 /* NOTE: Expects pointers to uiStringInfo structs as parameters.
1373  * Will fill them with translated strings, when possible.
1374  * Strings in uiStringInfo must be MEM_freeN'ed by caller. */
1375 void UI_but_string_info_get(struct bContext *C, uiBut *but, ...) ATTR_SENTINEL(0);
1376 void UI_but_extra_icon_string_info_get(struct bContext *C, uiButExtraOpIcon *extra_icon, ...)
1377  ATTR_SENTINEL(0);
1378 
1379 /* Edit i18n stuff. */
1380 /* Name of the main py op from i18n addon. */
1381 #define EDTSRC_I18N_OP_NAME "UI_OT_edittranslation"
1382 
1394 enum {
1396  UI_ID_RENAME = 1 << 0,
1397  UI_ID_BROWSE = 1 << 1,
1398  UI_ID_ADD_NEW = 1 << 2,
1399  UI_ID_ALONE = 1 << 4,
1400  UI_ID_OPEN = 1 << 3,
1401  UI_ID_DELETE = 1 << 5,
1402  UI_ID_LOCAL = 1 << 6,
1405  UI_ID_PIN = 1 << 9,
1406  UI_ID_PREVIEWS = 1 << 10,
1407  UI_ID_OVERRIDE = 1 << 11,
1410 };
1411 
1416 enum {
1419 };
1420 
1421 /***************************** ID Utilities *******************************/
1422 
1423 int UI_icon_from_id(const struct ID *id);
1428 
1429 int UI_icon_from_event_type(short event_type, short event_value);
1430 int UI_icon_from_keymap_item(const struct wmKeyMapItem *kmi, int r_icon_mod[4]);
1431 
1433  uiBlockCreateFunc func,
1434  void *arg,
1435  const char *str,
1436  int x,
1437  int y,
1438  short width,
1439  short height,
1440  const char *tip);
1441 uiBut *uiDefMenuBut(uiBlock *block,
1442  uiMenuCreateFunc func,
1443  void *arg,
1444  const char *str,
1445  int x,
1446  int y,
1447  short width,
1448  short height,
1449  const char *tip);
1451  uiMenuCreateFunc func,
1452  void *arg,
1453  int icon,
1454  const char *str,
1455  int x,
1456  int y,
1457  short width,
1458  short height,
1459  const char *tip);
1461  uiMenuCreateFunc func,
1462  void *arg,
1463  int icon,
1464  int x,
1465  int y,
1466  short width,
1467  short height,
1468  const char *tip);
1469 
1470 uiBut *uiDefBlockBut(uiBlock *block,
1471  uiBlockCreateFunc func,
1472  void *arg,
1473  const char *str,
1474  int x,
1475  int y,
1476  short width,
1477  short height,
1478  const char *tip);
1479 uiBut *uiDefBlockButN(uiBlock *block,
1480  uiBlockCreateFunc func,
1481  void *argN,
1482  const char *str,
1483  int x,
1484  int y,
1485  short width,
1486  short height,
1487  const char *tip);
1488 
1493  uiBlockCreateFunc func,
1494  void *arg,
1495  int retval,
1496  int icon,
1497  int x,
1498  int y,
1499  short width,
1500  short height,
1501  const char *tip);
1506  uiBlockCreateFunc func,
1507  void *arg,
1508  int icon,
1509  const char *str,
1510  int x,
1511  int y,
1512  short width,
1513  short height,
1514  const char *tip);
1515 
1520 uiBut *uiDefSearchBut(uiBlock *block,
1521  void *arg,
1522  int retval,
1523  int icon,
1524  int maxlen,
1525  int x,
1526  int y,
1527  short width,
1528  short height,
1529  float a1,
1530  float a2,
1531  const char *tip);
1537  struct wmOperatorType *ot,
1538  struct IDProperty *properties,
1539  void *arg,
1540  int retval,
1541  int icon,
1542  int maxlen,
1543  int x,
1544  int y,
1545  short width,
1546  short height,
1547  float a1,
1548  float a2,
1549  const char *tip);
1550 
1551 /* For uiDefAutoButsRNA */
1552 typedef enum {
1553  /* Keep current layout for aligning label with property button. */
1555  /* Align label and property button vertically. */
1557  /* Split layout into a column for the label and one for property button. */
1559 } eButLabelAlign;
1560 
1561 /* Return info for uiDefAutoButsRNA */
1562 typedef enum eAutoPropButsReturn {
1563  /* Returns when no buttons were added */
1565  /* Returned when any property failed the custom check callback (check_prop) */
1568 
1570 
1571 uiBut *uiDefAutoButR(uiBlock *block,
1572  struct PointerRNA *ptr,
1573  struct PropertyRNA *prop,
1574  int index,
1575  const char *name,
1576  int icon,
1577  int x,
1578  int y,
1579  int width,
1580  int height);
1581 void uiDefAutoButsArrayR(uiBlock *block,
1582  PointerRNA *ptr,
1583  PropertyRNA *prop,
1584  const int icon,
1585  const int x,
1586  const int y,
1587  const int tot_width,
1588  const int height);
1596  struct PointerRNA *ptr,
1597  bool (*check_prop)(struct PointerRNA *ptr,
1598  struct PropertyRNA *prop,
1599  void *user_data),
1600  void *user_data,
1601  struct PropertyRNA *prop_activate_init,
1602  eButLabelAlign label_align,
1603  bool compact);
1604 
1616 
1631 bool UI_search_item_add(uiSearchItems *items,
1632  const char *name,
1633  void *poin,
1634  int iconid,
1635  int but_flag,
1636  uint8_t name_prefix_offset);
1637 
1653 void UI_but_func_search_set(uiBut *but,
1654  uiButSearchCreateFn search_create_fn,
1655  uiButSearchUpdateFn search_update_fn,
1656  void *arg,
1657  bool free_arg,
1658  uiFreeArgFunc search_arg_free_fn,
1659  uiButHandleFunc search_exec_fn,
1660  void *active);
1667 void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string);
1669 
1673 int UI_searchbox_size_y(void);
1674 int UI_searchbox_size_x(void);
1678 int UI_search_items_find_index(uiSearchItems *items, const char *name);
1679 
1683 void UI_but_hint_drawstr_set(uiBut *but, const char *string);
1684 
1685 void UI_but_node_link_set(uiBut *but, struct bNodeSocket *socket, const float draw_color[4]);
1686 
1687 void UI_but_number_step_size_set(uiBut *but, float step_size);
1688 void UI_but_number_precision_set(uiBut *but, float precision);
1689 
1690 void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg);
1691 void UI_block_func_butmenu_set(uiBlock *block, uiMenuHandleFunc func, void *arg);
1692 void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2);
1693 void UI_block_funcN_set(uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2);
1694 
1695 void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1);
1696 void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2);
1697 void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2);
1698 
1699 void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg);
1700 
1702  uiBlock *block,
1703  void (*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect),
1704  void *arg1,
1705  void *arg2);
1706 
1708 
1709 void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg);
1713 void UI_but_tooltip_refresh(struct bContext *C, uiBut *but);
1718 void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but);
1719 
1721  struct ARegion *region,
1722  const void *rna_poin_data,
1723  const char *rna_prop_id);
1724 bool UI_textbutton_activate_but(const struct bContext *C, uiBut *but);
1725 
1730 void UI_but_focus_on_enter_event(struct wmWindow *win, uiBut *but);
1731 
1732 void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN);
1733 
1734 void UI_but_func_pushed_state_set(uiBut *but, uiButPushedStateFunc func, const void *arg);
1735 
1737  const char *opname,
1738  wmOperatorCallContext opcontext,
1739  int icon);
1742 
1747 int UI_preview_tile_size_x(void);
1748 int UI_preview_tile_size_y(void);
1750 
1751 /* Autocomplete
1752  *
1753  * Tab complete helper functions, for use in uiButCompleteFunc callbacks.
1754  * Call begin once, then multiple times do_name with all possibilities,
1755  * and finally end to finish and get the completed name. */
1756 
1757 typedef struct AutoComplete AutoComplete;
1758 
1759 #define AUTOCOMPLETE_NO_MATCH 0
1760 #define AUTOCOMPLETE_FULL_MATCH 1
1761 #define AUTOCOMPLETE_PARTIAL_MATCH 2
1762 
1763 AutoComplete *UI_autocomplete_begin(const char *startname, size_t maxlen);
1764 void UI_autocomplete_update_name(AutoComplete *autocpl, const char *name);
1765 int UI_autocomplete_end(AutoComplete *autocpl, char *autoname);
1766 
1767 /* Button drag-data (interface_drag.cc).
1768  *
1769  * Functions to set drag data for buttons. This enables dragging support, whereby the drag data is
1770  * "dragged", not the button itself. */
1771 
1772 void UI_but_drag_set_id(uiBut *but, struct ID *id);
1777 void UI_but_drag_attach_image(uiBut *but, struct ImBuf *imb, float scale);
1782  const struct AssetHandle *asset,
1783  const char *path,
1784  struct AssetMetaData *metadata,
1785  int import_type, /* eFileAssetImportType */
1786  int icon,
1787  struct ImBuf *imb,
1788  float scale);
1789 void UI_but_drag_set_rna(uiBut *but, struct PointerRNA *ptr);
1790 void UI_but_drag_set_path(uiBut *but, const char *path, bool use_free);
1791 void UI_but_drag_set_name(uiBut *but, const char *name);
1795 void UI_but_drag_set_value(uiBut *but);
1797  uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, bool use_free);
1798 
1799 /* Panels
1800  *
1801  * Functions for creating, freeing and drawing panels. The API here
1802  * could use a good cleanup, though how they will function in 2.5 is
1803  * not clear yet so we postpone that. */
1804 
1805 void UI_panels_begin(const struct bContext *C, struct ARegion *region);
1806 void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y);
1810 void UI_panels_draw(const struct bContext *C, struct ARegion *region);
1811 
1812 struct Panel *UI_panel_find_by_type(struct ListBase *lb, const struct PanelType *pt);
1816 struct Panel *UI_panel_begin(struct ARegion *region,
1817  struct ListBase *lb,
1818  uiBlock *block,
1819  struct PanelType *pt,
1820  struct Panel *panel,
1821  bool *r_open);
1827 void UI_panel_header_buttons_begin(struct Panel *panel);
1831 void UI_panel_header_buttons_end(struct Panel *panel);
1832 void UI_panel_end(struct Panel *panel, int width, int height);
1833 
1839 void UI_panel_context_pointer_set(struct Panel *panel, const char *name, struct PointerRNA *ptr);
1840 
1845 bool UI_panel_is_closed(const struct Panel *panel);
1846 bool UI_panel_is_active(const struct Panel *panel);
1850 void UI_panel_label_offset(const struct uiBlock *block, int *r_x, int *r_y);
1851 bool UI_panel_should_show_background(const struct ARegion *region,
1852  const struct PanelType *panel_type);
1853 int UI_panel_size_y(const struct Panel *panel);
1854 bool UI_panel_is_dragging(const struct Panel *panel);
1859 bool UI_panel_matches_search_filter(const struct Panel *panel);
1860 bool UI_panel_can_be_pinned(const struct Panel *panel);
1861 
1862 bool UI_panel_category_is_visible(const struct ARegion *region);
1863 void UI_panel_category_add(struct ARegion *region, const char *name);
1864 struct PanelCategoryDyn *UI_panel_category_find(const struct ARegion *region, const char *idname);
1866  const char *idname);
1867 const char *UI_panel_category_active_get(struct ARegion *region, bool set_fallback);
1868 void UI_panel_category_active_set(struct ARegion *region, const char *idname);
1869 void UI_panel_category_active_set_default(struct ARegion *region, const char *idname);
1870 void UI_panel_category_clear_all(struct ARegion *region);
1874 void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active);
1875 
1876 /* Panel custom data. */
1877 struct PointerRNA *UI_panel_custom_data_get(const struct Panel *panel);
1879  const struct wmEvent *event);
1880 void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data);
1881 
1882 /* Poly-instantiated panels for representing a list of data. */
1887 struct Panel *UI_panel_add_instanced(const struct bContext *C,
1888  struct ARegion *region,
1889  struct ListBase *panels,
1890  const char *panel_idname,
1891  struct PointerRNA *custom_data);
1898 void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region);
1899 
1900 #define INSTANCED_PANEL_UNIQUE_STR_LEN 16
1905 void UI_list_panel_unique_str(struct Panel *panel, char *r_name);
1906 
1907 typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname);
1917 bool UI_panel_list_matches_data(struct ARegion *region,
1918  struct ListBase *data,
1919  uiListPanelIDFromDataFunc panel_idname_func);
1920 
1921 /* Handlers
1922  *
1923  * Handlers that can be registered in regions, areas and windows for
1924  * handling WM events. Mostly this is done automatic by modules such
1925  * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */
1926 
1927 void UI_region_handlers_add(struct ListBase *handlers);
1928 void UI_popup_handlers_add(struct bContext *C,
1929  struct ListBase *handlers,
1930  uiPopupBlockHandle *popup,
1931  char flag);
1932 void UI_popup_handlers_remove(struct ListBase *handlers, uiPopupBlockHandle *popup);
1933 void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers);
1934 
1935 /* Module
1936  *
1937  * init and exit should be called before using this module. init_userdef must
1938  * be used to reinitialize some internal state if user preferences change. */
1939 
1940 void UI_init(void);
1941 /* after reading userdef file */
1942 void UI_init_userdef(void);
1943 void UI_reinit_font(void);
1944 void UI_exit(void);
1945 
1946 /* Layout
1947  *
1948  * More automated layout of buttons. Has three levels:
1949  * - Layout: contains a number templates, within a bounded width or height.
1950  * - Template: predefined layouts for buttons with a number of slots, each
1951  * slot can contain multiple items.
1952  * - Item: item to put in a template slot, being either an RNA property,
1953  * operator, label or menu. Also regular buttons can be used when setting
1954  * uiBlockCurLayout. */
1955 
1956 /* layout */
1957 enum {
1960 };
1961 
1962 enum {
1969 };
1970 
1971 #define UI_UNIT_X ((void)0, U.widget_unit)
1972 #define UI_UNIT_Y ((void)0, U.widget_unit)
1973 
1974 enum {
1979 };
1980 
1981 enum {
1982  /* UI_ITEM_O_RETURN_PROPS = 1 << 0, */ /* UNUSED */
2009  /* Even create the property split layout if there's no name to show there. */
2011 };
2012 
2013 #define UI_HEADER_OFFSET ((void)0, 0.4f * UI_UNIT_X)
2014 
2015 /* uiLayoutOperatorButs flags */
2016 enum {
2021  /* Disable property split for the default layout (custom ui callbacks still have full control
2022  * over the layout and can enable it). */
2024 };
2025 
2026 /* used for transp checkers */
2027 #define UI_ALPHA_CHECKER_DARK 100
2028 #define UI_ALPHA_CHECKER_LIGHT 160
2029 
2030 /* flags to set which corners will become rounded:
2031  *
2032  * 1------2
2033  * | |
2034  * 8------4 */
2035 
2036 enum {
2041  /* just for convenience */
2044 };
2045 
2047  int dir,
2048  int type,
2049  int x,
2050  int y,
2051  int size,
2052  int em,
2053  int padding,
2054  const struct uiStyle *style);
2056 void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y);
2057 bool UI_block_layout_needs_resolving(const uiBlock *block);
2063 void UI_block_layout_free(uiBlock *block);
2064 
2070 bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter);
2071 
2072 void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus);
2073 
2075 
2076 void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv);
2077 void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr);
2079 void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context);
2080 
2092 void uiLayoutSetTooltipFunc(uiLayout *layout,
2093  uiButToolTipFunc func,
2094  void *arg,
2095  uiCopyArgFunc copy_arg,
2096  uiFreeArgFunc free_arg);
2097 
2102  struct PropertyRNA **r_prop);
2106 struct MenuType *UI_but_menutype_get(uiBut *but);
2110 struct PanelType *UI_but_paneltype_get(uiBut *but);
2111 void UI_menutype_draw(struct bContext *C, struct MenuType *mt, struct uiLayout *layout);
2115 void UI_paneltype_draw(struct bContext *C, struct PanelType *pt, struct uiLayout *layout);
2116 
2117 /* Only for convenience. */
2118 void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but);
2119 
2121 void uiLayoutSetActive(uiLayout *layout, bool active);
2122 void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default);
2123 void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init);
2124 void uiLayoutSetEnabled(uiLayout *layout, bool enabled);
2125 void uiLayoutSetRedAlert(uiLayout *layout, bool redalert);
2126 void uiLayoutSetAlignment(uiLayout *layout, char alignment);
2127 void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size);
2128 void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect);
2129 void uiLayoutSetScaleX(uiLayout *layout, float scale);
2130 void uiLayoutSetScaleY(uiLayout *layout, float scale);
2131 void uiLayoutSetUnitsX(uiLayout *layout, float unit);
2132 void uiLayoutSetUnitsY(uiLayout *layout, float unit);
2133 void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss);
2134 void uiLayoutSetPropSep(uiLayout *layout, bool is_sep);
2135 void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep);
2136 int uiLayoutGetLocalDir(const uiLayout *layout);
2137 
2139 bool uiLayoutGetActive(uiLayout *layout);
2140 bool uiLayoutGetActiveDefault(uiLayout *layout);
2141 bool uiLayoutGetActivateInit(uiLayout *layout);
2142 bool uiLayoutGetEnabled(uiLayout *layout);
2143 bool uiLayoutGetRedAlert(uiLayout *layout);
2144 int uiLayoutGetAlignment(uiLayout *layout);
2145 bool uiLayoutGetFixedSize(uiLayout *layout);
2146 bool uiLayoutGetKeepAspect(uiLayout *layout);
2147 int uiLayoutGetWidth(uiLayout *layout);
2148 float uiLayoutGetScaleX(uiLayout *layout);
2149 float uiLayoutGetScaleY(uiLayout *layout);
2150 float uiLayoutGetUnitsX(uiLayout *layout);
2151 float uiLayoutGetUnitsY(uiLayout *layout);
2153 bool uiLayoutGetPropSep(uiLayout *layout);
2154 bool uiLayoutGetPropDecorate(uiLayout *layout);
2155 
2156 /* Layout create functions. */
2157 
2158 uiLayout *uiLayoutRow(uiLayout *layout, bool align);
2162 uiLayout *uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading);
2163 uiLayout *uiLayoutColumn(uiLayout *layout, bool align);
2170 uiLayout *uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading);
2171 uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, bool align);
2173  bool row_major,
2174  int columns_len,
2175  bool even_columns,
2176  bool even_rows,
2177  bool align);
2178 uiLayout *uiLayoutBox(uiLayout *layout);
2180  struct uiList *ui_list,
2181  struct PointerRNA *actptr,
2182  struct PropertyRNA *actprop);
2183 uiLayout *uiLayoutAbsolute(uiLayout *layout, bool align);
2184 uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, bool align);
2187 uiLayout *uiLayoutRadial(uiLayout *layout);
2188 
2189 /* templates */
2190 void uiTemplateHeader(uiLayout *layout, struct bContext *C);
2191 void uiTemplateID(uiLayout *layout,
2192  const struct bContext *C,
2193  struct PointerRNA *ptr,
2194  const char *propname,
2195  const char *newop,
2196  const char *openop,
2197  const char *unlinkop,
2198  int filter,
2199  bool live_icon,
2200  const char *text);
2201 void uiTemplateIDBrowse(uiLayout *layout,
2202  struct bContext *C,
2203  struct PointerRNA *ptr,
2204  const char *propname,
2205  const char *newop,
2206  const char *openop,
2207  const char *unlinkop,
2208  int filter,
2209  const char *text);
2210 void uiTemplateIDPreview(uiLayout *layout,
2211  struct bContext *C,
2212  struct PointerRNA *ptr,
2213  const char *propname,
2214  const char *newop,
2215  const char *openop,
2216  const char *unlinkop,
2217  int rows,
2218  int cols,
2219  int filter,
2220  bool hide_buttons);
2224 void uiTemplateIDTabs(uiLayout *layout,
2225  struct bContext *C,
2226  struct PointerRNA *ptr,
2227  const char *propname,
2228  const char *newop,
2229  const char *menu,
2230  int filter);
2239 void uiTemplateAnyID(uiLayout *layout,
2240  struct PointerRNA *ptr,
2241  const char *propname,
2242  const char *proptypename,
2243  const char *text);
2248 void uiTemplateSearch(uiLayout *layout,
2249  struct bContext *C,
2250  struct PointerRNA *ptr,
2251  const char *propname,
2252  struct PointerRNA *searchptr,
2253  const char *searchpropname,
2254  const char *newop,
2255  const char *unlinkop);
2256 void uiTemplateSearchPreview(uiLayout *layout,
2257  struct bContext *C,
2258  struct PointerRNA *ptr,
2259  const char *propname,
2260  struct PointerRNA *searchptr,
2261  const char *searchpropname,
2262  const char *newop,
2263  const char *unlinkop,
2264  int rows,
2265  int cols);
2274  struct PointerRNA *ptr,
2275  const char *propname,
2276  struct PointerRNA *root_ptr,
2277  const char *text);
2278 void uiTemplateModifiers(uiLayout *layout, struct bContext *C);
2283 void uiTemplateShaderFx(uiLayout *layout, struct bContext *C);
2287 void uiTemplateConstraints(uiLayout *layout, struct bContext *C, bool use_bone_constraints);
2288 
2291  struct bContext *C,
2292  struct PointerRNA *ptr,
2293  const char *propname,
2294  int rows,
2295  int cols,
2296  float scale,
2297  int filter);
2298 
2300 
2301 void uiTemplateConstraintHeader(uiLayout *layout, struct PointerRNA *ptr);
2302 void uiTemplatePreview(uiLayout *layout,
2303  struct bContext *C,
2304  struct ID *id,
2305  bool show_buttons,
2306  struct ID *parent,
2307  struct MTex *slot,
2308  const char *preview_id);
2309 void uiTemplateColorRamp(uiLayout *layout,
2310  struct PointerRNA *ptr,
2311  const char *propname,
2312  bool expand);
2316 void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale);
2320 void uiTemplateIconView(uiLayout *layout,
2321  struct PointerRNA *ptr,
2322  const char *propname,
2323  bool show_labels,
2324  float icon_scale,
2325  float icon_scale_popup);
2326 void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2327 void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2328 void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2329 void uiTemplateCurveMapping(uiLayout *layout,
2330  struct PointerRNA *ptr,
2331  const char *propname,
2332  int type,
2333  bool levels,
2334  bool brush,
2335  bool neg_slope,
2336  bool tone);
2341 void uiTemplateCurveProfile(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2345 void uiTemplateColorPicker(uiLayout *layout,
2346  struct PointerRNA *ptr,
2347  const char *propname,
2348  bool value_slider,
2349  bool lock,
2350  bool lock_luminosity,
2351  bool cubic);
2353  struct PointerRNA *ptr,
2354  const char *propname,
2355  bool colors);
2356 void uiTemplateCryptoPicker(uiLayout *layout,
2357  struct PointerRNA *ptr,
2358  const char *propname,
2359  int icon);
2364 void uiTemplateLayers(uiLayout *layout,
2365  struct PointerRNA *ptr,
2366  const char *propname,
2367  struct PointerRNA *used_ptr,
2368  const char *used_propname,
2369  int active_layer);
2370 void uiTemplateImage(uiLayout *layout,
2371  struct bContext *C,
2372  struct PointerRNA *ptr,
2373  const char *propname,
2374  struct PointerRNA *userptr,
2375  bool compact,
2376  bool multiview);
2377 void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management);
2378 void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr);
2379 void uiTemplateImageViews(uiLayout *layout, struct PointerRNA *imaptr);
2381  struct PointerRNA *imfptr,
2382  struct PointerRNA *ptr);
2383 void uiTemplateImageLayers(uiLayout *layout,
2384  struct bContext *C,
2385  struct Image *ima,
2386  struct ImageUser *iuser);
2387 void uiTemplateImageInfo(uiLayout *layout,
2388  struct bContext *C,
2389  struct Image *ima,
2390  struct ImageUser *iuser);
2391 void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
2393 void uiTemplateOperatorSearch(uiLayout *layout);
2394 
2395 void UI_but_func_menu_search(uiBut *but);
2396 void uiTemplateMenuSearch(uiLayout *layout);
2397 
2404  uiLayout *layout,
2405  struct wmOperator *op,
2406  eButLabelAlign label_align,
2407  short flag);
2408 void uiTemplateHeader3D_mode(uiLayout *layout, struct bContext *C);
2409 void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C);
2410 void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);
2411 void uiTemplateInputStatus(uiLayout *layout, struct bContext *C);
2412 void uiTemplateStatusInfo(uiLayout *layout, struct bContext *C);
2413 void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
2414 
2415 bool uiTemplateEventFromKeymapItem(struct uiLayout *layout,
2416  const char *text,
2417  const struct wmKeyMapItem *kmi,
2418  bool text_fallback);
2419 
2420 void uiTemplateComponentMenu(uiLayout *layout,
2421  struct PointerRNA *ptr,
2422  const char *propname,
2423  const char *name);
2424 void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float color[4]);
2425 
2431  const struct bContext *C,
2432  struct PointerRNA *ptr,
2433  const char *propname);
2434 
2441  const char *propname,
2442  struct PointerRNA *r_file_ptr);
2443 
2447 void uiTemplateCacheFileVelocity(uiLayout *layout, struct PointerRNA *fileptr);
2448 
2453  const struct bContext *C,
2454  struct PointerRNA *fileptr);
2455 
2459 void uiTemplateCacheFileTimeSettings(uiLayout *layout, struct PointerRNA *fileptr);
2460 
2465  const struct bContext *C,
2466  struct PointerRNA *fileptr);
2467 
2468 /* Default UIList class name, keep in sync with its declaration in bl_ui/__init__.py */
2469 #define UI_UL_DEFAULT_CLASS_NAME "UI_UL_list"
2474  /* Don't allow resizing the list, i.e. don't add the grip button. */
2481 
2483 };
2485 
2486 void uiTemplateList(uiLayout *layout,
2487  struct bContext *C,
2488  const char *listtype_name,
2489  const char *list_id,
2490  struct PointerRNA *dataptr,
2491  const char *propname,
2492  struct PointerRNA *active_dataptr,
2493  const char *active_propname,
2494  const char *item_dyntip_propname,
2495  int rows,
2496  int maxrows,
2497  int layout_type,
2498  int columns,
2499  enum uiTemplateListFlags flags);
2500 struct uiList *uiTemplateList_ex(uiLayout *layout,
2501  struct bContext *C,
2502  const char *listtype_name,
2503  const char *list_id,
2504  struct PointerRNA *dataptr,
2505  const char *propname,
2506  struct PointerRNA *active_dataptr,
2507  const char *active_propname,
2508  const char *item_dyntip_propname,
2509  int rows,
2510  int maxrows,
2511  int layout_type,
2512  int columns,
2513  enum uiTemplateListFlags flags,
2514  void *customdata);
2515 
2516 void uiTemplateNodeLink(uiLayout *layout,
2517  struct bContext *C,
2518  struct bNodeTree *ntree,
2519  struct bNode *node,
2520  struct bNodeSocket *input);
2521 void uiTemplateNodeView(uiLayout *layout,
2522  struct bContext *C,
2523  struct bNodeTree *ntree,
2524  struct bNode *node,
2525  struct bNodeSocket *input);
2526 void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
2531  const struct bContext *C,
2532  struct PointerRNA *ptr,
2533  struct PropertyRNA *prop);
2534 
2535 void uiTemplateMovieClip(struct uiLayout *layout,
2536  struct bContext *C,
2537  struct PointerRNA *ptr,
2538  const char *propname,
2539  bool compact);
2540 void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2541 void uiTemplateMarker(struct uiLayout *layout,
2542  struct PointerRNA *ptr,
2543  const char *propname,
2544  struct PointerRNA *userptr,
2545  struct PointerRNA *trackptr,
2546  bool compact);
2547 void uiTemplateMovieclipInformation(struct uiLayout *layout,
2548  struct PointerRNA *ptr,
2549  const char *propname,
2550  struct PointerRNA *userptr);
2551 
2552 void uiTemplateColorspaceSettings(struct uiLayout *layout,
2553  struct PointerRNA *ptr,
2554  const char *propname);
2556  struct bContext *C,
2557  struct PointerRNA *ptr,
2558  const char *propname);
2559 
2560 int uiTemplateRecentFiles(struct uiLayout *layout, int rows);
2561 void uiTemplateFileSelectPath(uiLayout *layout,
2562  struct bContext *C,
2563  struct FileSelectParams *params);
2564 
2565 enum {
2569 };
2570 void uiTemplateAssetView(struct uiLayout *layout,
2571  struct bContext *C,
2572  const char *list_id,
2573  struct PointerRNA *asset_library_dataptr,
2574  const char *asset_library_propname,
2575  struct PointerRNA *assets_dataptr,
2576  const char *assets_propname,
2577  struct PointerRNA *active_dataptr,
2578  const char *active_propname,
2579  const struct AssetFilterSettings *filter_settings,
2580  int display_flags,
2581  const char *activate_opname,
2582  struct PointerRNA *r_activate_op_properties,
2583  const char *drag_opname,
2584  struct PointerRNA *r_drag_op_properties);
2585 
2590  const char *opname,
2591  bool create_properties);
2595 struct PointerRNA *UI_list_custom_drag_operator_set(struct uiList *ui_list,
2596  const char *opname,
2597  bool create_properties);
2598 
2599 /* items */
2600 void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);
2601 void uiItemEnumO_ptr(uiLayout *layout,
2602  struct wmOperatorType *ot,
2603  const char *name,
2604  int icon,
2605  const char *propname,
2606  int value);
2607 void uiItemEnumO(uiLayout *layout,
2608  const char *opname,
2609  const char *name,
2610  int icon,
2611  const char *propname,
2612  int value);
2616 void uiItemEnumO_value(uiLayout *layout,
2617  const char *name,
2618  int icon,
2619  const char *opname,
2620  const char *propname,
2621  int value);
2622 void uiItemEnumO_string(uiLayout *layout,
2623  const char *name,
2624  int icon,
2625  const char *opname,
2626  const char *propname,
2627  const char *value);
2628 void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname);
2629 void uiItemBooleanO(uiLayout *layout,
2630  const char *name,
2631  int icon,
2632  const char *opname,
2633  const char *propname,
2634  int value);
2635 void uiItemIntO(uiLayout *layout,
2636  const char *name,
2637  int icon,
2638  const char *opname,
2639  const char *propname,
2640  int value);
2641 void uiItemFloatO(uiLayout *layout,
2642  const char *name,
2643  int icon,
2644  const char *opname,
2645  const char *propname,
2646  float value);
2647 void uiItemStringO(uiLayout *layout,
2648  const char *name,
2649  int icon,
2650  const char *opname,
2651  const char *propname,
2652  const char *value);
2653 
2654 void uiItemFullO_ptr(uiLayout *layout,
2655  struct wmOperatorType *ot,
2656  const char *name,
2657  int icon,
2658  struct IDProperty *properties,
2660  int flag,
2661  struct PointerRNA *r_opptr);
2662 void uiItemFullO(uiLayout *layout,
2663  const char *opname,
2664  const char *name,
2665  int icon,
2666  struct IDProperty *properties,
2668  int flag,
2669  struct PointerRNA *r_opptr);
2670 void uiItemFullOMenuHold_ptr(uiLayout *layout,
2671  struct wmOperatorType *ot,
2672  const char *name,
2673  int icon,
2674  struct IDProperty *properties,
2676  int flag,
2677  const char *menu_id, /* extra menu arg. */
2678  struct PointerRNA *r_opptr);
2679 
2680 void uiItemR(uiLayout *layout,
2681  struct PointerRNA *ptr,
2682  const char *propname,
2683  int flag,
2684  const char *name,
2685  int icon);
2686 void uiItemFullR(uiLayout *layout,
2687  struct PointerRNA *ptr,
2688  struct PropertyRNA *prop,
2689  int index,
2690  int value,
2691  int flag,
2692  const char *name,
2693  int icon);
2697 void uiItemFullR_with_popover(uiLayout *layout,
2698  struct PointerRNA *ptr,
2699  struct PropertyRNA *prop,
2700  int index,
2701  int value,
2702  int flag,
2703  const char *name,
2704  int icon,
2705  const char *panel_type);
2706 void uiItemFullR_with_menu(uiLayout *layout,
2707  struct PointerRNA *ptr,
2708  struct PropertyRNA *prop,
2709  int index,
2710  int value,
2711  int flag,
2712  const char *name,
2713  int icon,
2714  const char *menu_type);
2715 void uiItemEnumR_prop(uiLayout *layout,
2716  const char *name,
2717  int icon,
2718  struct PointerRNA *ptr,
2719  struct PropertyRNA *prop,
2720  int value);
2721 void uiItemEnumR(uiLayout *layout,
2722  const char *name,
2723  int icon,
2724  struct PointerRNA *ptr,
2725  const char *propname,
2726  int value);
2727 void uiItemEnumR_string_prop(uiLayout *layout,
2728  struct PointerRNA *ptr,
2729  struct PropertyRNA *prop,
2730  const char *value,
2731  const char *name,
2732  int icon);
2733 void uiItemEnumR_string(uiLayout *layout,
2734  struct PointerRNA *ptr,
2735  const char *propname,
2736  const char *value,
2737  const char *name,
2738  int icon);
2739 void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2740 void uiItemPointerR_prop(uiLayout *layout,
2741  struct PointerRNA *ptr,
2742  struct PropertyRNA *prop,
2743  struct PointerRNA *searchptr,
2744  struct PropertyRNA *searchprop,
2745  const char *name,
2746  int icon,
2747  bool results_are_suggestions);
2748 void uiItemPointerR(uiLayout *layout,
2749  struct PointerRNA *ptr,
2750  const char *propname,
2751  struct PointerRNA *searchptr,
2752  const char *searchpropname,
2753  const char *name,
2754  int icon);
2755 void uiItemsFullEnumO(uiLayout *layout,
2756  const char *opname,
2757  const char *propname,
2758  struct IDProperty *properties,
2760  int flag);
2767  struct wmOperatorType *ot,
2768  struct PointerRNA ptr,
2769  struct PropertyRNA *prop,
2770  struct IDProperty *properties,
2772  int flag,
2773  const struct EnumPropertyItem *item_array,
2774  int totitem);
2775 
2776 typedef struct uiPropertySplitWrapper {
2781 
2788 
2789 void uiItemL(uiLayout *layout, const char *name, int icon); /* label */
2790 void uiItemL_ex(uiLayout *layout, const char *name, int icon, bool highlight, bool redalert);
2794 uiLayout *uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon);
2798 void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, const char *name, int icon);
2802 void uiItemM_ptr(uiLayout *layout, struct MenuType *mt, const char *name, int icon);
2803 void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon);
2807 void uiItemMContents(uiLayout *layout, const char *menuname);
2808 
2809 /* Decorators. */
2810 
2815 void uiItemDecoratorR_prop(uiLayout *layout,
2816  struct PointerRNA *ptr,
2817  struct PropertyRNA *prop,
2818  int index);
2823 void uiItemDecoratorR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int index);
2825 void uiItemV(uiLayout *layout, const char *name, int icon, int argval);
2827 void uiItemS(uiLayout *layout);
2829 void uiItemS_ex(uiLayout *layout, float factor);
2831 void uiItemSpacer(uiLayout *layout);
2832 
2833 /* popover */
2835  uiLayout *layout, const struct bContext *C, struct PanelType *pt, const char *name, int icon);
2837  const struct bContext *C,
2838  const char *panel_type,
2839  const char *name,
2840  int icon);
2842  struct bContext *C,
2843  int space_id,
2844  int region_id,
2845  const char *context,
2846  const char *category);
2847 
2851 void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg);
2855 void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN);
2856 void uiItemMenuEnumFullO_ptr(uiLayout *layout,
2857  struct bContext *C,
2858  struct wmOperatorType *ot,
2859  const char *propname,
2860  const char *name,
2861  int icon,
2862  struct PointerRNA *r_opptr);
2863 void uiItemMenuEnumFullO(uiLayout *layout,
2864  struct bContext *C,
2865  const char *opname,
2866  const char *propname,
2867  const char *name,
2868  int icon,
2869  struct PointerRNA *r_opptr);
2870 void uiItemMenuEnumO(uiLayout *layout,
2871  struct bContext *C,
2872  const char *opname,
2873  const char *propname,
2874  const char *name,
2875  int icon);
2876 void uiItemMenuEnumR_prop(uiLayout *layout,
2877  struct PointerRNA *ptr,
2878  struct PropertyRNA *prop,
2879  const char *name,
2880  int icon);
2881 void uiItemMenuEnumR(
2882  uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon);
2883 void uiItemTabsEnumR_prop(uiLayout *layout,
2884  struct bContext *C,
2885  struct PointerRNA *ptr,
2886  struct PropertyRNA *prop,
2887  struct PointerRNA *ptr_highlight,
2888  struct PropertyRNA *prop_highlight,
2889  bool icon_only);
2890 
2891 /* Only for testing, inspecting layouts. */
2895 const char *UI_layout_introspect(uiLayout *layout);
2896 
2901 uiLayout *uiItemsAlertBox(uiBlock *block, int size, eAlertIcon icon);
2902 
2903 /* UI Operators */
2904 typedef struct uiDragColorHandle {
2905  float color[3];
2908 
2909 void ED_operatortypes_ui(void);
2913 void ED_keymap_ui(struct wmKeyConfig *keyconf);
2914 void ED_dropboxes_ui(void);
2915 void ED_uilisttypes_ui(void);
2916 
2917 void UI_drop_color_copy(struct bContext *C, struct wmDrag *drag, struct wmDropBox *drop);
2918 bool UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
2919 
2921  struct PointerRNA *ptr,
2922  struct PropertyRNA *prop,
2923  struct ListBase *r_lb,
2924  bool *r_use_path_from_id,
2925  char **r_path);
2927  struct PointerRNA *ptr_link,
2928  struct PropertyRNA *prop,
2929  const char *path,
2930  bool use_path_from_id,
2931  struct PointerRNA *r_ptr,
2932  struct PropertyRNA **r_prop);
2933 
2934 /* Helpers for Operators */
2949  struct PointerRNA *r_ptr,
2950  struct PropertyRNA **r_prop,
2951  int *r_index);
2952 void UI_context_active_but_prop_handle(struct bContext *C, bool handle_undo);
2953 void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region);
2954 
2955 struct wmOperator *UI_context_active_operator_get(const struct bContext *C);
2961  struct PointerRNA *r_ptr,
2962  struct PropertyRNA **r_prop,
2963  bool *r_is_undo,
2964  bool *r_is_userdef);
2969  struct PointerRNA *r_ptr,
2970  struct PropertyRNA **r_prop);
2972 
2973 uiBut *UI_region_active_but_get(const struct ARegion *region);
2974 uiBut *UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *rect_px);
2975 uiBlock *UI_region_block_find_mouse_over(const struct ARegion *region,
2976  const int xy[2],
2977  bool only_clip);
2981 struct ARegion *UI_region_searchbox_region_get(const struct ARegion *button_region);
2982 
2984 typedef enum eFontStyle_Align {
2989 
2993 };
2994 
2995 /* Styled text draw */
2996 void UI_fontstyle_set(const struct uiFontStyle *fs);
2997 void UI_fontstyle_draw_ex(const struct uiFontStyle *fs,
2998  const struct rcti *rect,
2999  const char *str,
3000  size_t str_len,
3001  const uchar col[4],
3002  const struct uiFontStyleDraw_Params *fs_params,
3003  int *r_xofs,
3004  int *r_yofs,
3005  struct ResultBLF *r_info);
3006 
3007 void UI_fontstyle_draw(const struct uiFontStyle *fs,
3008  const struct rcti *rect,
3009  const char *str,
3010  size_t str_len,
3011  const uchar col[4],
3012  const struct uiFontStyleDraw_Params *fs_params);
3017  const struct rcti *rect,
3018  const char *str,
3019  const uchar col[4]);
3027  const struct uiFontStyle *fs, float x, float y, const char *str, const uchar col[4]);
3032  float x,
3033  float y,
3034  const char *str,
3035  const float col_fg[4],
3036  const float col_bg[4]);
3037 
3039  const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1, 2);
3051  const char *str,
3052  float aspect) ATTR_WARN_UNUSED_RESULT
3053  ATTR_NONNULL(1, 2);
3054 int UI_fontstyle_height_max(const struct uiFontStyle *fs);
3055 
3059 void UI_draw_icon_tri(float x, float y, char dir, const float[4]);
3060 
3061 /* XXX: read a style configure */
3062 const struct uiStyle *UI_style_get(void); /* use for fonts etc */
3063 /* for drawing, scaled with DPI setting */
3064 const struct uiStyle *UI_style_get_dpi(void); /* DPI scaled settings for drawing */
3065 
3066 /* linker workaround ack! */
3067 void UI_template_fix_linking(void);
3068 
3069 /* UI_OT_editsource helpers */
3076 void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but);
3077 
3088 void UI_but_ensure_in_view(const struct bContext *C, struct ARegion *region, const uiBut *but);
3089 
3090 /* UI_butstore_ helpers */
3091 typedef struct uiButStore uiButStore;
3092 typedef struct uiButStoreElem uiButStoreElem;
3093 
3101 void UI_butstore_clear(uiBlock *block);
3105 void UI_butstore_update(uiBlock *block);
3106 void UI_butstore_free(uiBlock *block, uiButStore *bs);
3108 bool UI_butstore_is_registered(uiBlock *block, uiBut *but);
3109 void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p);
3113 bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src);
3114 void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p);
3115 
3116 /* ui_interface_region_tooltip.c */
3117 
3123  struct ARegion *butregion,
3124  uiBut *but,
3125  bool is_label);
3127  struct ARegion *butregion,
3128  uiBut *but,
3129  uiButExtraOpIcon *extra_icon,
3130  bool is_label);
3131 struct ARegion *UI_tooltip_create_from_gizmo(struct bContext *C, struct wmGizmo *gz);
3132 void UI_tooltip_free(struct bContext *C, struct bScreen *screen, struct ARegion *region);
3133 
3134 typedef struct {
3136  char description[UI_MAX_DRAW_STR];
3137  /* The full name of the item, without prefixes or suffixes (e.g. hint with UI_SEP_CHARP). */
3138  const char *name;
3140  char hint[UI_MAX_DRAW_STR];
3142 
3151  struct bContext *C,
3152  const struct ARegion *searchbox_region,
3153  const struct rcti *item_rect,
3154  const uiSearchItemTooltipData *item_tooltip_data);
3155 
3156 /* How long before a tool-tip shows. */
3157 #define UI_TOOLTIP_DELAY 0.5
3158 #define UI_TOOLTIP_DELAY_LABEL 0.2
3159 
3160 /* Float precision helpers */
3161 #define UI_PRECISION_FLOAT_MAX 6
3162 /* For float buttons the 'step' (or a1), is scaled */
3163 #define UI_PRECISION_FLOAT_SCALE 0.01f
3164 
3165 /* Typical UI text */
3166 #define UI_FSTYLE_WIDGET (const uiFontStyle *)&(UI_style_get()->widget)
3167 
3172 int UI_calc_float_precision(int prec, double value);
3173 
3174 /* widget batched drawing */
3177 void UI_widgetbase_draw_cache_end(void);
3178 
3179 /* Use for resetting the theme. */
3186 void UI_theme_init_default(void);
3187 void UI_style_init_default(void);
3188 
3190 
3191 /* Special drawing for toolbar, mainly workarounds for inflexible icon sizing. */
3192 #define USE_UI_TOOLBAR_HACK
3193 
3194 /* Support click-drag motion which presses the button and closes a popover (like a menu). */
3195 #define USE_UI_POPOVER_ONCE
3196 
3197 void UI_block_views_listen(const uiBlock *block,
3198  const struct wmRegionListenerParams *listener_params);
3199 
3200 bool UI_view_item_is_active(const uiViewItemHandle *item_handle);
3201 bool UI_view_item_matches(const uiViewItemHandle *a_handle, const uiViewItemHandle *b_handle);
3207 bool UI_view_item_can_rename(const uiViewItemHandle *item_handle);
3208 void UI_view_item_begin_rename(uiViewItemHandle *item_handle);
3209 
3211  const uiViewItemHandle *item_handle,
3212  uiLayout *column);
3213 
3219 bool UI_view_item_drag_start(struct bContext *C, const uiViewItemHandle *item_);
3221  const struct wmDrag *drag,
3222  const char **r_disabled_hint);
3223 char *UI_view_item_drop_tooltip(const uiViewItemHandle *item, const struct wmDrag *drag);
3229  const uiViewItemHandle *item_,
3230  const struct ListBase *drags);
3231 
3235 uiViewItemHandle *UI_region_views_find_item_at(const struct ARegion *region, const int xy[2])
3236  ATTR_NONNULL();
3238 
3239 #ifdef __cplusplus
3240 }
3241 #endif
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
size_t ATTR_SENTINEL(0)
unsigned char uchar
Definition: BLI_sys_types.h:70
unsigned int uint
Definition: BLI_sys_types.h:67
#define CPP_ARG_DEFAULT(default_value)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
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 Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input 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 a color
#define C
Definition: RandGen.cpp:25
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
int UI_text_colorid_from_report_type(int type)
struct wmOperator * UI_context_active_operator_get(const struct bContext *C)
@ UI_LAYOUT_ALIGN_LEFT
@ UI_LAYOUT_ALIGN_CENTER
@ UI_LAYOUT_ALIGN_RIGHT
@ UI_LAYOUT_ALIGN_EXPAND
void uiItemS_ex(uiLayout *layout, float factor)
bool UI_but_online_manual_id(const uiBut *but, char *r_str, size_t maxlength) ATTR_WARN_UNUSED_RESULT
@ UI_BUT_TEXT_RIGHT
Definition: UI_interface.h:261
@ UI_BUT_ACTIVE_RIGHT
Definition: UI_interface.h:291
@ UI_BUT_ICON_LEFT
Definition: UI_interface.h:260
@ UI_BUT_ALIGN_ALL
Definition: UI_interface.h:283
@ UI_BUT_ALIGN_DOWN
Definition: UI_interface.h:272
@ UI_BUT_ALIGN_TOP
Definition: UI_interface.h:269
@ UI_BUT_ALIGN
Definition: UI_interface.h:273
@ UI_BUT_NO_TEXT_PADDING
Definition: UI_interface.h:265
@ UI_BUT_NO_TOOLTIP
Definition: UI_interface.h:263
@ UI_BUT_CHECKBOX_INVERT
Definition: UI_interface.h:300
@ UI_BUT_ALIGN_STITCH_TOP
Definition: UI_interface.h:281
@ UI_BUT_ANIMATED_CHANGED
Definition: UI_interface.h:297
@ UI_BUT_TEXT_LEFT
Definition: UI_interface.h:259
@ UI_BUT_ACTIVE_LEFT
Definition: UI_interface.h:289
@ UI_BUT_BOX_ITEM
Definition: UI_interface.h:286
@ UI_BUT_ALIGN_STITCH_LEFT
Definition: UI_interface.h:282
@ UI_BUT_ALIGN_RIGHT
Definition: UI_interface.h:271
@ UI_BUT_ALIGN_LEFT
Definition: UI_interface.h:270
@ UI_BUT_ICON_REVERSE
Definition: UI_interface.h:294
void UI_but_flag_disable(uiBut *but, int flag)
Definition: interface.cc:5863
void UI_but_disable(uiBut *but, const char *disabled_hint)
Definition: interface.cc:5883
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter, bool hide_buttons)
void UI_but_func_pushed_state_set(uiBut *but, uiButPushedStateFunc func, const void *arg)
Definition: interface.cc:6039
@ UI_LAYOUT_VERTICAL
@ UI_LAYOUT_HORIZONTAL
uiBut * uiDefButC(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5196
bool uiLayoutGetActivateInit(uiLayout *layout)
void UI_panel_category_active_set_default(struct ARegion *region, const char *idname)
eAutoPropButsReturn
@ UI_PROP_BUTS_ANY_FAILED_CHECK
@ UI_PROP_BUTS_NONE_ADDED
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5623
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void UI_but_drag_set_rna(uiBut *but, struct PointerRNA *ptr)
void UI_widgetbase_draw_cache_begin(void)
bool UI_context_copy_to_selected_check(struct PointerRNA *ptr, struct PointerRNA *ptr_link, struct PropertyRNA *prop, const char *path, bool use_path_from_id, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop)
uiBut * uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5102
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiItemEnumR_string_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, const char *value, const char *name, int icon)
void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
void uiItemFullR_with_popover(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon, const char *panel_type)
uiBut * uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5733
void UI_paneltype_draw(struct bContext *C, struct PanelType *pt, struct uiLayout *layout)
eUIEmbossType UI_block_emboss_get(uiBlock *block)
Definition: interface.cc:3624
void UI_panel_category_clear_all(struct ARegion *region)
int UI_searchbox_size_x(void)
uiBlock * UI_region_block_find_mouse_over(const struct ARegion *region, const int xy[2], bool only_clip)
bool UI_view_item_drop_handle(struct bContext *C, const uiViewItemHandle *item_, const struct ListBase *drags)
bool uiLayoutGetPropDecorate(uiLayout *layout)
void UI_style_init_default(void)
Definition: resources.c:1038
void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, bool compact)
Definition: clip_buttons.c:87
struct bContextStore * uiLayoutGetContextStore(uiLayout *layout)
int uiLayoutGetAlignment(uiLayout *layout)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
void uiItemPopoverPanelFromGroup(uiLayout *layout, struct bContext *C, int space_id, int region_id, const char *context, const char *category)
void uiLayoutSetUnitsY(uiLayout *layout, float unit)
@ UI_BUT_DRAG_LOCK
Definition: UI_interface.h:194
@ UI_BUT_LIST_ITEM
Definition: UI_interface.h:215
@ UI_BUT_REDALERT
Definition: UI_interface.h:201
@ UI_BUT_UNDO
Definition: UI_interface.h:205
@ UI_BUT_ACTIVE_DEFAULT
Definition: UI_interface.h:212
@ UI_BUT_ACTIVATE_ON_INIT
Definition: UI_interface.h:219
@ UI_BUT_ANIMATED
Definition: UI_interface.h:198
@ UI_BUT_DISABLED
Definition: UI_interface.h:196
@ UI_BUT_INACTIVE
Definition: UI_interface.h:203
@ UI_BUT_OVERRIDDEN
Definition: UI_interface.h:231
@ UI_BUT_NO_UTF8
Definition: UI_interface.h:207
@ UI_BUT_HAS_SEP_CHAR
Definition: UI_interface.h:222
@ UI_BUT_NODE_LINK
Definition: UI_interface.h:192
@ UI_BUT_ICON_PREVIEW
Definition: UI_interface.h:190
@ UI_BUT_NODE_ACTIVE
Definition: UI_interface.h:193
@ UI_BUT_DRIVEN
Definition: UI_interface.h:200
@ UI_BUT_DRAG_MULTI
Definition: UI_interface.h:217
@ UI_BUT_UPDATE_DELAY
Definition: UI_interface.h:224
@ UI_BUT_ICON_SUBMENU
Definition: UI_interface.h:189
@ UI_BUT_VALUE_CLEAR
Definition: UI_interface.h:228
@ UI_BUT_TEXTEDIT_UPDATE
Definition: UI_interface.h:226
@ UI_BUT_ANIMATED_KEY
Definition: UI_interface.h:199
@ UI_BUT_LAST_ACTIVE
Definition: UI_interface.h:204
uiBut * uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6084
uiBut * uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6118
void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active)
void uiTemplateOperatorPropertyButs(const struct bContext *C, uiLayout *layout, struct wmOperator *op, eButLabelAlign label_align, short flag)
eUIEmbossType
Definition: UI_interface.h:107
@ UI_EMBOSS_UNDEFINED
Definition: UI_interface.h:118
@ UI_EMBOSS_NONE
Definition: UI_interface.h:109
@ UI_EMBOSS
Definition: UI_interface.h:108
@ UI_EMBOSS_RADIAL
Definition: UI_interface.h:111
@ UI_EMBOSS_PULLDOWN
Definition: UI_interface.h:110
@ UI_EMBOSS_NONE_OR_STATUS
Definition: UI_interface.h:116
void UI_fontstyle_set(const struct uiFontStyle *fs)
void UI_panels_begin(const struct bContext *C, struct ARegion *region)
void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input)
void uiTemplateColormanagedViewSettings(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname)
void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *but)
@ UI_SCROLL_PRESSED
Definition: UI_interface.h:456
@ UI_SCROLL_ARROWS
Definition: UI_interface.h:457
void uiTemplateConstraints(uiLayout *layout, struct bContext *C, bool use_bone_constraints)
const struct uiStyle * UI_style_get_dpi(void)
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5336
void UI_block_theme_style_set(uiBlock *block, char theme_style)
Definition: interface.cc:3634
int UI_pie_menu_invoke_from_rna_enum(struct bContext *C, const char *title, const char *path, const struct wmEvent *event)
void uiTemplateSearch(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop)
uiBut * uiDefButImage(uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4])
Definition: interface.cc:4829
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
int UI_searchbox_size_y(void)
bool UI_panel_can_be_pinned(const struct Panel *panel)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
void UI_panel_context_pointer_set(struct Panel *panel, const char *name, struct PointerRNA *ptr)
void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *block)
void UI_panel_header_buttons_begin(struct Panel *panel)
void uiTemplateCacheFileLayers(uiLayout *layout, const struct bContext *C, struct PointerRNA *fileptr)
void UI_draw_icon_tri(float x, float y, char dir, const float[4])
void UI_popup_block_invoke_ex(struct bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free, bool can_refresh)
void UI_but_node_link_set(uiBut *but, struct bNodeSocket *socket, const float draw_color[4])
Definition: interface.cc:6448
struct ARegion * UI_tooltip_create_from_button(struct bContext *C, struct ARegion *butregion, uiBut *but, bool is_label)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
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_blocklist_free(const struct bContext *C, struct ARegion *region)
struct ARegion *(* uiButSearchCreateFn)(struct bContext *C, struct ARegion *butregion, struct uiButSearch *search_but)
Definition: UI_interface.h:516
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, float a1, float a2, const char *tip)
Definition: interface.cc:5516
void UI_drop_color_copy(struct bContext *C, struct wmDrag *drag, struct wmDropBox *drop)
void UI_block_interaction_set(uiBlock *block, uiBlockInteraction_CallbackData *callbacks)
uiLayout * uiLayoutGridFlow(uiLayout *layout, bool row_major, int columns_len, bool even_columns, bool even_rows, bool align)
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C)
uiLayout * uiLayoutOverlap(uiLayout *layout)
void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4])
void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *root_ptr, const char *text)
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)
Definition: interface.cc:5318
@ UI_RETURN_UPDATE
Definition: UI_interface.h:181
@ UI_RETURN_OUT_PARENT
Definition: UI_interface.h:179
@ UI_RETURN_CANCEL
Definition: UI_interface.h:173
@ UI_RETURN_POPUP_OK
Definition: UI_interface.h:183
@ UI_RETURN_OK
Definition: UI_interface.h:175
@ UI_RETURN_OUT
Definition: UI_interface.h:177
void uiTemplateCacheFileVelocity(uiLayout *layout, struct PointerRNA *fileptr)
void UI_panel_label_offset(const struct uiBlock *block, int *r_x, int *r_y)
int(* uiButCompleteFunc)(struct bContext *C, char *str, void *arg)
Definition: UI_interface.h:509
void UI_menutype_draw(struct bContext *C, struct MenuType *mt, struct uiLayout *layout)
void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size)
void(* uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2)
Definition: UI_interface.h:507
void uiItemPopoverPanel_ptr(uiLayout *layout, const struct bContext *C, struct PanelType *pt, const char *name, int icon)
void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale)
void UI_init(void)
Definition: interface.cc:6771
void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers)
const struct PointerRNA * UI_but_context_ptr_get(const uiBut *but, const char *name, const StructRNA *type CPP_ARG_DEFAULT(nullptr))
uiBut * uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:4806
int UI_blocklist_min_y_get(struct ListBase *lb)
Definition: interface.cc:5797
void(* uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but)
Definition: UI_interface.h:508
uiBut * uiDefButF(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5042
float uiLayoutGetUnitsY(uiLayout *layout)
uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout)
void uiTemplateHeader3D_mode(uiLayout *layout, struct bContext *C)
uiBut * uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5392
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void UI_block_lock_clear(uiBlock *block)
Definition: interface.cc:2281
void(* uiBlockHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:540
void UI_but_func_search_set_results_are_suggestions(uiBut *but, bool value)
Definition: interface.cc:6324
uiLayout * uiTemplateGpencilModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr)
void UI_block_bounds_set_normal(struct uiBlock *block, int addval)
Definition: interface.cc:582
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
Definition: interface.cc:6029
void *(* uiBlockInteractionBeginFn)(struct bContext *C, const struct uiBlockInteraction_Params *params, void *arg1)
Definition: UI_interface.h:567
void UI_blocklist_update_window_matrix(const struct bContext *C, const struct ListBase *lb)
const char * UI_panel_category_active_get(struct ARegion *region, bool set_fallback)
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
Definition: interface.cc:598
bool UI_but_active_only_ex(const struct bContext *C, struct ARegion *region, uiBlock *block, uiBut *but, bool remove_on_failure)
struct PointerRNA * UI_but_operator_ptr_get(uiBut *but)
Definition: interface.cc:5908
void UI_fontstyle_draw_ex(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, size_t str_len, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params, int *r_xofs, int *r_yofs, struct ResultBLF *r_info)
void uiTemplateGpencilModifiers(uiLayout *layout, struct bContext *C)
struct uiLayout * UI_pie_menu_layout(struct uiPieMenu *pie)
struct PointerRNA * UI_but_extra_operator_icon_opptr_get(struct uiButExtraOpIcon *extra_icon)
Definition: interface.cc:1701
void uiTemplateShaderFx(uiLayout *layout, struct bContext *C)
void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4])
int UI_but_unit_type_get(const uiBut *but)
Definition: interface.cc:5939
int UI_panel_size_y(const struct Panel *panel)
uiBut * uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5677
uiBut * uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6165
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void uiTemplateColorspaceSettings(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname)
bool UI_butstore_is_valid(uiButStore *bs)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemMenuEnumO(uiLayout *layout, struct bContext *C, const char *opname, const char *propname, const char *name, int icon)
void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default)
const struct uiStyle * UI_style_get(void)
uiBut * uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x, int y, int width, int height)
uiLayout * uiItemsAlertBox(uiBlock *block, int size, eAlertIcon icon)
int(* uiButPushedStateFunc)(struct uiBut *but, const void *arg)
Definition: UI_interface.h:538
void uiItemFullR_with_menu(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon, const char *menu_type)
ENUM_OPERATORS(eAutoPropButsReturn, UI_PROP_BUTS_ANY_FAILED_CHECK)
@ UI_BLOCK_THEME_STYLE_REGULAR
Definition: UI_interface.h:769
@ UI_BLOCK_THEME_STYLE_POPUP
Definition: UI_interface.h:770
uiBut * uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5548
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
void uiItemMenuEnumFullO_ptr(uiLayout *layout, struct bContext *C, struct wmOperatorType *ot, const char *propname, const char *name, int icon, struct PointerRNA *r_opptr)
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)
Definition: interface.cc:6242
uiBut * uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5570
uiBut * UI_context_active_but_get(const struct bContext *C)
bool UI_but_is_userdef(const uiBut *but)
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
struct ARegion * UI_tooltip_create_from_button_or_extra_icon(struct bContext *C, struct ARegion *butregion, uiBut *but, uiButExtraOpIcon *extra_icon, bool is_label)
bool UI_view_item_is_active(const uiViewItemHandle *item_handle)
void uiTemplateCacheFileProcedural(uiLayout *layout, const struct bContext *C, struct PointerRNA *fileptr)
struct Panel * UI_panel_find_by_type(struct ListBase *lb, const struct PanelType *pt)
struct PointerRNA * UI_panel_custom_data_get(const struct Panel *panel)
bool UI_search_item_add(uiSearchItems *items, const char *name, void *poin, int iconid, int but_flag, uint8_t name_prefix_offset)
void uiItemsFullEnumO_items(uiLayout *layout, struct wmOperatorType *ot, struct PointerRNA ptr, struct PropertyRNA *prop, struct IDProperty *properties, wmOperatorCallContext context, int flag, const struct EnumPropertyItem *item_array, int totitem)
void uiItemFullOMenuHold_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, struct IDProperty *properties, wmOperatorCallContext context, int flag, const char *menu_id, struct PointerRNA *r_opptr)
uiBut * uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6193
bool UI_but_is_utf8(const uiBut *but)
uiLayout * uiLayoutAbsolute(uiLayout *layout, bool align)
void(* uiBlockInteractionUpdateFn)(struct bContext *C, const struct uiBlockInteraction_Params *params, void *arg1, void *user_data)
Definition: UI_interface.h:574
uiViewItemHandle * UI_region_views_find_active_item(const struct ARegion *region)
void uiItemPopoverPanel(uiLayout *layout, const struct bContext *C, const char *panel_type, const char *name, int icon)
void uiTemplateImageViews(uiLayout *layout, struct PointerRNA *imaptr)
void uiLayoutSetScaleX(uiLayout *layout, float scale)
bool UI_block_is_empty(const uiBlock *block)
struct uiLayout * UI_popover_layout(uiPopover *pup)
void UI_but_func_menu_step_set(uiBut *but, uiMenuStepFunc func)
Definition: interface.cc:6024
uiViewItemHandle * UI_region_views_find_item_at(const struct ARegion *region, const int xy[2]) ATTR_NONNULL()
void uiTemplateIconView(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool show_labels, float icon_scale, float icon_scale_popup)
@ UI_LAYOUT_PIEMENU
@ UI_LAYOUT_MENU
@ UI_LAYOUT_PANEL
@ UI_LAYOUT_VERT_BAR
@ UI_LAYOUT_TOOLBAR
@ UI_LAYOUT_HEADER
void UI_panel_category_active_set(struct ARegion *region, const char *idname)
struct ARegion * UI_tooltip_create_from_search_item_generic(struct bContext *C, const struct ARegion *searchbox_region, const struct rcti *item_rect, const uiSearchItemTooltipData *item_tooltip_data)
float uiLayoutGetUnitsX(uiLayout *layout)
int UI_icon_colorid_from_report_type(int type)
bool UI_but_active_drop_name(const struct bContext *C)
void UI_fontstyle_draw_simple(const struct uiFontStyle *fs, float x, float y, const char *str, const uchar col[4])
void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
Definition: view3d_header.c:84
void ED_dropboxes_ui(void)
void UI_block_flag_disable(uiBlock *block, int flag)
Definition: interface.cc:5853
bool UI_but_active_drop_color(struct bContext *C)
char *(* uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip)
Definition: UI_interface.h:537
void *(* uiCopyArgFunc)(const void *arg)
Definition: UI_interface.h:602
void UI_draw_roundbox_3fv_alpha(const struct rctf *rect, bool filled, float rad, const float col[3], float alpha)
void UI_popover_once_clear(uiPopover *pup)
void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
struct Panel * UI_panel_add_instanced(const struct bContext *C, struct ARegion *region, struct ListBase *panels, const char *panel_idname, struct PointerRNA *custom_data)
struct uiBlockInteraction_CallbackData uiBlockInteraction_CallbackData
void UI_but_drawflag_enable(uiBut *but, int flag)
Definition: interface.cc:5873
uiLayout * uiLayoutBox(uiLayout *layout)
void UI_butstore_update(uiBlock *block)
void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context)
void UI_blocklist_free_inactive(const struct bContext *C, struct ARegion *region)
void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management)
int UI_but_return_value_get(uiBut *but)
Definition: interface.cc:5903
void UI_but_tooltip_refresh(struct bContext *C, uiBut *but)
void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn)
Definition: interface.cc:6316
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)
@ UI_DIR_CENTER_X
Definition: UI_interface.h:127
@ UI_DIR_CENTER_Y
Definition: UI_interface.h:128
@ UI_DIR_ALL
Definition: UI_interface.h:130
@ UI_DIR_DOWN
Definition: UI_interface.h:124
@ UI_DIR_RIGHT
Definition: UI_interface.h:126
@ UI_DIR_LEFT
Definition: UI_interface.h:125
@ UI_DIR_UP
Definition: UI_interface.h:123
bool UI_textbutton_activate_but(const struct bContext *C, uiBut *but)
void uiItemV(uiLayout *layout, const char *name, int icon, int argval)
void UI_butstore_free(uiBlock *block, uiButStore *bs)
void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but)
struct PanelCategoryStack * UI_panel_category_active_find(struct ARegion *region, const char *idname)
uiBlock * uiLayoutAbsoluteBlock(uiLayout *layout)
@ UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED
@ UI_TEMPLATE_OP_PROPS_SHOW_EMPTY
@ UI_TEMPLATE_OP_PROPS_SHOW_TITLE
@ UI_TEMPLATE_OP_PROPS_COMPACT
@ UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT
void uiTemplateIDTabs(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *menu, int filter)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void(* uiButSearchUpdateFn)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
Definition: UI_interface.h:524
bool UI_view_item_drag_start(struct bContext *C, const uiViewItemHandle *item_)
void UI_draw_roundbox_corner_set(int type)
struct PointerRNA * UI_region_panel_custom_data_under_cursor(const struct bContext *C, const struct wmEvent *event)
void UI_but_number_step_size_set(uiBut *but, float step_size)
Definition: interface.cc:6455
AutoComplete * UI_autocomplete_begin(const char *startname, size_t maxlen)
Definition: interface.cc:4901
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
Definition: interface.cc:5953
void uiItemS(uiLayout *layout)
void ED_operatortypes_ui(void)
void UI_but_func_menu_search(uiBut *but)
bool(* uiButIdentityCompareFunc)(const uiBut *a, const uiBut *b)
Definition: UI_interface.h:513
void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon)
void uiTemplateMenuSearch(uiLayout *layout)
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
void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus)
Definition: interface.cc:2147
int uiTemplateRecentFiles(struct uiLayout *layout, int rows)
void UI_region_free_active_but_all(struct bContext *context, struct ARegion *region)
void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop)
struct PanelCategoryDyn * UI_panel_category_find(const struct ARegion *region, const char *idname)
float uiLayoutGetScaleY(uiLayout *layout)
void uiTemplateOperatorSearch(uiLayout *layout)
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
struct PanelType * UI_but_paneltype_get(uiBut *but)
bool UI_panel_is_active(const struct Panel *panel)
void uiTemplateCryptoPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int icon)
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C)
void uiTemplateFileSelectPath(uiLayout *layout, struct bContext *C, struct FileSelectParams *params)
struct uiStringInfo uiStringInfo
float UI_text_clip_middle_ex(const struct uiFontStyle *fstyle, char *str, float okwidth, float minwidth, size_t max_len, char rpart_sep)
void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value)
void UI_popup_menu_reports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL()
void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but)
void UI_panel_end(struct Panel *panel, int width, int height)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
bool uiLayoutGetActive(uiLayout *layout)
uiLayout * uiLayoutColumnFlow(uiLayout *layout, int number, bool align)
void UI_list_panel_unique_str(struct Panel *panel, char *r_name)
void uiItemFullO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, struct IDProperty *properties, wmOperatorCallContext context, int flag, struct PointerRNA *r_opptr)
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
void UI_blocklist_update_view_for_buttons(const struct bContext *C, const struct ListBase *lb)
void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region)
void uiTemplateImageInfo(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser)
bool UI_panel_list_matches_data(struct ARegion *region, struct ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
void(* uiFreeArgFunc)(void *arg)
Definition: UI_interface.h:603
void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p)
void UI_but_drag_set_id(uiBut *but, struct ID *id)
@ 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_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src)
bool uiLayoutGetKeepAspect(uiLayout *layout)
void ED_keymap_ui(struct wmKeyConfig *keyconf)
User Interface Keymap.
eFontStyle_Align
@ UI_STYLE_TEXT_LEFT
@ UI_STYLE_TEXT_CENTER
@ UI_STYLE_TEXT_RIGHT
uiBut * uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5454
bool uiLayoutGetPropSep(uiLayout *layout)
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, float a1, float a2, const char *tip)
Definition: interface.cc:5484
void uiTemplateCurveProfile(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
int UI_pie_menu_invoke_from_operator_enum(struct bContext *C, const char *title, const char *opname, const char *propname, const struct wmEvent *event)
bool UI_popup_menu_end_or_cancel(struct bContext *C, struct uiPopupMenu *pup)
void uiTemplatePalette(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool colors)
void UI_but_drag_set_image(uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, bool use_free)
uiLayout * uiLayoutListBox(uiLayout *layout, struct uiList *ui_list, struct PointerRNA *actptr, struct PropertyRNA *actprop)
void UI_but_func_operator_search(uiBut *but)
int UI_autocomplete_end(AutoComplete *autocpl, char *autoname)
Definition: interface.cc:4948
void UI_widgetbase_draw_cache_end(void)
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)
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *used_ptr, const char *used_propname, int active_layer)
void UI_panel_category_add(struct ARegion *region, const char *name)
eUIEmbossType uiLayoutGetEmboss(uiLayout *layout)
void UI_block_end(const struct bContext *C, uiBlock *block)
@ 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_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
bool UI_block_is_search_only(const uiBlock *block)
Definition: interface.cc:3639
int int UI_fontstyle_string_width_with_block_aspect(const struct uiFontStyle *fs, const char *str, float aspect) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
uiBut * uiDefButR(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5258
@ UI_TEMPLATE_ASSET_DRAW_NO_NAMES
@ UI_TEMPLATE_ASSET_DRAW_NO_LIBRARY
@ UI_TEMPLATE_ASSET_DRAW_NO_FILTER
void UI_but_type_set_menu_from_pulldown(uiBut *but)
Definition: interface.cc:5895
void UI_context_active_but_prop_handle(struct bContext *C, bool handle_undo)
int UI_icon_from_id(const struct ID *id)
void uiLayoutSetTooltipFunc(uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
uiBut * uiDefSearchButO_ptr(uiBlock *block, struct wmOperatorType *ot, struct IDProperty *properties, void *arg, int retval, int icon, int maxlen, int x, int y, short width, short height, float a1, float a2, const char *tip)
Definition: interface.cc:6406
bool UI_view_item_can_drop(const uiViewItemHandle *item_, const struct wmDrag *drag, const char **r_disabled_hint)
int uiLayoutGetLocalDir(const uiLayout *layout)
#define UI_MAX_DRAW_STR
Definition: UI_interface.h:91
eBlockBoundsCalc
Definition: UI_interface.h:810
@ UI_BLOCK_BOUNDS_PIE_CENTER
Definition: UI_interface.h:817
@ UI_BLOCK_BOUNDS_POPUP_MOUSE
Definition: UI_interface.h:814
@ UI_BLOCK_BOUNDS_POPUP_CENTER
Definition: UI_interface.h:816
@ UI_BLOCK_BOUNDS_POPUP_MENU
Definition: UI_interface.h:815
@ UI_BLOCK_BOUNDS_TEXT
Definition: UI_interface.h:813
@ UI_BLOCK_BOUNDS
Definition: UI_interface.h:812
@ UI_BLOCK_BOUNDS_NONE
Definition: UI_interface.h:811
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
Definition: interface.cc:3629
void UI_popup_block_ex(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg, struct wmOperator *op)
uiBut * uiDefButS(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5134
void uiItemSpacer(uiLayout *layout)
struct uiPropertySplitWrapper uiPropertySplitWrapper
void UI_but_drag_set_path(uiBut *but, const char *path, bool use_free)
uiBut * uiDefIconTextButO(uiBlock *block, int type, const char *opname, wmOperatorCallContext opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:5774
void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect)
int UI_icon_from_keymap_item(const struct wmKeyMapItem *kmi, int r_icon_mod[4])
void UI_popup_handlers_add(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup, char flag)
void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr)
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
uiBut * uiDefIconTextButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:5757
bool uiLayoutGetFixedSize(uiLayout *layout)
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
Definition: interface.cc:5965
struct ARegion *(* uiButSearchTooltipFn)(struct bContext *C, struct ARegion *region, const struct rcti *item_rect, void *arg, void *active)
Definition: UI_interface.h:530
struct uiList * uiTemplateList_ex(uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id, struct PointerRNA *dataptr, const char *propname, struct 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)
void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn context_menu_fn)
Definition: interface.cc:6300
struct uiViewHandle uiViewHandle
Definition: UI_interface.h:76
void uiItemMenuEnumFullO(uiLayout *layout, struct bContext *C, const char *opname, const char *propname, const char *name, int icon, struct PointerRNA *r_opptr)
void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2])
Definition: interface.cc:612
void(* uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr)
Definition: UI_interface.h:506
bool UI_but_active_only(const struct bContext *C, struct ARegion *region, uiBlock *block, uiBut *but)
void uiItemEnumR_prop(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int value)
bool UI_editsource_enable_check(void)
void uiTemplateOperatorRedoProperties(uiLayout *layout, const struct bContext *C)
void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1)
Definition: interface.cc:5983
uiBut * uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6063
void UI_tooltip_free(struct bContext *C, struct bScreen *screen, struct ARegion *region)
uiPopupMenu * UI_popup_menu_begin_ex(struct bContext *C, const char *title, const char *block_name, int icon) ATTR_NONNULL()
bool UI_block_is_empty_ex(const uiBlock *block, bool skip_title)
void uiItemMContents(uiLayout *layout, const char *menuname)
void UI_popover_end(struct bContext *C, struct uiPopover *pup, struct wmKeyMap *keymap)
void UI_but_drawflag_disable(uiBut *but, int flag)
Definition: interface.cc:5878
bool uiLayoutGetActiveDefault(uiLayout *layout)
void(* uiListPanelIDFromDataFunc)(void *data_link, char *r_idname)
int uiLayoutGetOperatorContext(uiLayout *layout)
uiBut * uiDefIconButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, wmOperatorCallContext opcontext, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:5593
bool UI_view_item_matches(const uiViewItemHandle *a_handle, const uiViewItemHandle *b_handle)
struct wmOperatorType * UI_but_operatortype_get_from_enum_menu(struct uiBut *but, struct PropertyRNA **r_prop)
int UI_preview_tile_size_x(void)
Definition: interface.cc:4973
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const struct uiStyle *style)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void UI_panel_header_buttons_end(struct Panel *panel)
void UI_fontstyle_draw(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, size_t str_len, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params)
bool uiTemplateCacheFilePointer(struct PointerRNA *ptr, const char *propname, struct PointerRNA *r_file_ptr)
void(* uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2)
Definition: UI_interface.h:505
bool UI_butstore_is_registered(uiBlock *block, uiBut *but)
void UI_block_bounds_set_text(uiBlock *block, int addval)
Definition: interface.cc:592
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
Definition: interface.cc:6000
void uiTemplateModifiers(uiLayout *layout, struct bContext *C)
void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float color[4])
struct MenuType * UI_but_menutype_get(uiBut *but)
void uiItemM_ptr(uiLayout *layout, struct MenuType *mt, const char *name, int icon)
void UI_draw_roundbox_3ub_alpha(const struct rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha)
uiBut * uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5280
uiBut * uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5164
uiButStore * UI_butstore_create(uiBlock *block)
void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y)
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, bool compact, bool multiview)
void UI_block_align_begin(uiBlock *block)
Definition: interface.cc:3910
uiLayout * uiLayoutRadial(uiLayout *layout)
bool UI_panel_category_is_visible(const struct ARegion *region)
uiBut * uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6046
uiStringInfoType
@ BUT_GET_RNA_TIP
@ BUT_GET_RNA_LABEL
@ BUT_GET_LABEL
@ BUT_GET_PROP_KEYMAP
@ BUT_GET_TIP
@ BUT_GET_RNAENUM_TIP
@ BUT_GET_RNASTRUCT_IDENTIFIER
@ BUT_GET_RNAENUM_LABEL
@ BUT_GET_RNAPROP_IDENTIFIER
@ BUT_GET_RNA_LABEL_CONTEXT
@ BUT_GET_RNAENUM_IDENTIFIER
@ BUT_GET_OP_KEYMAP
uiBut * uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6143
uiBut * UI_region_active_but_get(const struct ARegion *region)
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser)
void UI_but_execute(const struct bContext *C, struct ARegion *region, uiBut *but)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void UI_pie_menu_end(struct bContext *C, uiPieMenu *pie)
bool UI_panel_should_show_background(const struct ARegion *region, const struct PanelType *panel_type)
void UI_view_item_context_menu_build(struct bContext *C, const uiViewItemHandle *item_handle, uiLayout *column)
int uiLayoutGetWidth(uiLayout *layout)
void uiItemPointerR_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, struct PointerRNA *searchptr, struct PropertyRNA *searchprop, const char *name, int icon, bool results_are_suggestions)
void UI_butstore_clear(uiBlock *block)
uiBut * uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5709
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon)
void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4])
void uiTemplateMovieclipInformation(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr)
Definition: clip_buttons.c:757
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
void uiTemplateStatusInfo(uiLayout *layout, struct bContext *C)
void UI_block_free(const struct bContext *C, uiBlock *block)
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region)
void ED_uilisttypes_ui(void)
void uiItemTabsEnumR_prop(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, struct PointerRNA *ptr_highlight, struct PropertyRNA *prop_highlight, bool icon_only)
@ UI_CNR_BOTTOM_LEFT
@ UI_CNR_BOTTOM_RIGHT
@ UI_CNR_ALL
@ UI_CNR_TOP_LEFT
@ UI_CNR_TOP_RIGHT
@ UI_CNR_NONE
bool UI_view_item_can_rename(const uiViewItemHandle *item_handle)
bool UI_block_active_only_flagged_buttons(const struct bContext *C, struct ARegion *region, struct uiBlock *block)
void uiTemplateAssetView(struct uiLayout *layout, struct bContext *C, const char *list_id, struct PointerRNA *asset_library_dataptr, const char *asset_library_propname, struct PointerRNA *assets_dataptr, const char *assets_propname, struct PointerRNA *active_dataptr, const char *active_propname, const struct AssetFilterSettings *filter_settings, int display_flags, const char *activate_opname, struct PointerRNA *r_activate_op_properties, const char *drag_opname, struct PointerRNA *r_drag_op_properties)
void uiTemplatePreview(uiLayout *layout, struct bContext *C, struct ID *id, bool show_buttons, struct ID *parent, struct MTex *slot, const char *preview_id)
void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string)
Definition: interface.cc:6308
void UI_but_hint_drawstr_set(uiBut *but, const char *string)
Definition: interface.cc:6443
void UI_interface_tag_script_reload(void)
Definition: interface.cc:6793
float uiLayoutGetScaleX(uiLayout *layout)
bool UI_block_layout_needs_resolving(const uiBlock *block)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname)
Definition: clip_buttons.c:146
void uiTemplateCacheFileTimeSettings(uiLayout *layout, struct PointerRNA *fileptr)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
bool uiTemplateEventFromKeymapItem(struct uiLayout *layout, const char *text, const struct wmKeyMapItem *kmi, bool text_fallback)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiTemplateHeader(uiLayout *layout, struct bContext *C)
void(* uiBlockInteractionEndFn)(struct bContext *C, const struct uiBlockInteraction_Params *params, void *arg1, void *user_data)
Definition: UI_interface.h:570
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, struct IDProperty *properties, wmOperatorCallContext context, int flag, struct PointerRNA *r_opptr)
void UI_block_order_flip(uiBlock *block)
Definition: interface.cc:5815
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
void uiTemplateList(uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id, struct PointerRNA *dataptr, const char *propname, struct 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 uiTemplateGpencilColorPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int rows, int cols, float scale, int filter)
uiBut * uiDefButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, wmOperatorCallContext opcontext, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:5303
eButGradientType
Definition: UI_interface.h:399
@ UI_GRAD_L_ALT
Definition: UI_interface.h:408
@ UI_GRAD_SV
Definition: UI_interface.h:400
@ UI_GRAD_V_ALT
Definition: UI_interface.h:407
@ UI_GRAD_S
Definition: UI_interface.h:404
@ UI_GRAD_HV
Definition: UI_interface.h:401
@ UI_GRAD_HS
Definition: UI_interface.h:402
@ UI_GRAD_V
Definition: UI_interface.h:405
@ UI_GRAD_H
Definition: UI_interface.h:403
struct PointerRNA * UI_list_custom_drag_operator_set(struct uiList *ui_list, const char *opname, bool create_properties)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, bool compact)
void UI_block_layout_free(uiBlock *block)
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.cc:6101
void UI_block_func_butmenu_set(uiBlock *block, uiMenuHandleFunc func, void *arg)
Definition: interface.cc:5959
void UI_blocklist_draw(const struct bContext *C, const struct ListBase *lb)
void UI_but_number_precision_set(uiBut *but, float precision)
Definition: interface.cc:6464
void UI_block_bounds_set_centered(uiBlock *block, int addval)
Definition: interface.cc:624
void uiItemDecoratorR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int index)
bool(* uiButSearchContextMenuFn)(struct bContext *C, void *arg, void *active, const struct wmEvent *event)
Definition: UI_interface.h:526
void uiItemMenuEnumR_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, const char *name, int icon)
void UI_context_active_but_prop_get_filebrowser(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo, bool *r_is_userdef)
void uiTemplateTextureUser(uiLayout *layout, struct bContext *C)
void uiTemplateNodeLink(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input)
void UI_draw_roundbox_4fv_ex(const struct rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad)
void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const char *text)
void uiTemplateInputStatus(uiLayout *layout, struct bContext *C)
struct ARegion * UI_tooltip_create_from_gizmo(struct bContext *C, struct wmGizmo *gz)
void UI_panels_draw(const struct bContext *C, struct ARegion *region)
int UI_icon_from_event_type(short event_type, short event_value)
void uiTemplateID(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, bool live_icon, const char *text)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void UI_but_extra_icon_string_info_get(struct bContext *C, uiButExtraOpIcon *extra_icon,...) ATTR_SENTINEL(0)
Definition: interface.cc:6733
uiBut * uiDefButI(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5072
uiLayout * uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon)
uiBut * UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
void UI_region_handlers_add(struct ListBase *handlers)
void uiTemplateTextureShow(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
void uiItemDecoratorR_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index)
bool UI_textbutton_activate_rna(const struct bContext *C, struct ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
Definition: UI_interface.h:592
void UI_but_drag_set_value(uiBut *but)
struct PointerRNA * UI_but_extra_operator_icon_add(uiBut *but, const char *opname, wmOperatorCallContext opcontext, int icon)
Definition: interface.cc:1682
struct uiDragColorHandle uiDragColorHandle
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool expand)
void(* uiMenuHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:593
struct uiPieMenu * UI_pie_menu_begin(struct bContext *C, const char *title, int icon, const struct wmEvent *event) ATTR_NONNULL()
bool(* uiMenuStepFunc)(struct bContext *C, int direction, void *arg1)
Definition: UI_interface.h:600
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
void UI_block_views_listen(const uiBlock *block, const struct wmRegionListenerParams *listener_params)
int int int UI_fontstyle_height_max(const struct uiFontStyle *fs)
void UI_but_ensure_in_view(const struct bContext *C, struct ARegion *region, const uiBut *but)
uiBut * uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x, int y, short width, short height, float a1, float a2, const char *tip)
Definition: interface.cc:6217
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
uiBut * uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5226
void UI_block_direction_set(uiBlock *block, char direction)
Definition: interface.cc:5810
void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN)
Definition: interface.cc:6488
bool UI_context_copy_to_selected_list(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, struct ListBase *r_lb, bool *r_use_path_from_id, char **r_path)
void UI_draw_box_shadow(const struct rctf *rect, unsigned char alpha)
void UI_but_focus_on_enter_event(struct wmWindow *win, uiBut *but)
Definition: interface.cc:6474
void UI_but_drag_set_asset(uiBut *but, const struct AssetHandle *asset, const char *path, struct AssetMetaData *metadata, int import_type, int icon, struct ImBuf *imb, float scale)
int UI_search_items_find_index(uiSearchItems *items, const char *name)
struct uiList * UI_list_find_mouse_over(const struct ARegion *region, const struct wmEvent *event)
int UI_preview_tile_size_y(void)
Definition: interface.cc:4979
void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, const char *propname, int value)
void UI_but_drag_attach_image(uiBut *but, struct ImBuf *imb, float scale)
eButPointerType
Definition: UI_interface.h:316
@ UI_BUT_POIN_SHORT
Definition: UI_interface.h:318
@ UI_BUT_POIN_INT
Definition: UI_interface.h:319
@ UI_BUT_POIN_BIT
Definition: UI_interface.h:322
@ UI_BUT_POIN_CHAR
Definition: UI_interface.h:317
@ UI_BUT_POIN_FLOAT
Definition: UI_interface.h:320
bool UI_panel_matches_search_filter(const struct Panel *panel)
void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg)
Definition: interface.cc:6018
void UI_fontstyle_draw_simple_backdrop(const struct uiFontStyle *fs, float x, float y, const char *str, const float col_fg[4], const float col_bg[4])
struct ARegion * UI_region_searchbox_region_get(const struct ARegion *button_region)
void UI_exit(void)
Definition: interface.cc:6787
struct Panel * UI_panel_begin(struct ARegion *region, struct ListBase *lb, uiBlock *block, struct PanelType *pt, struct Panel *panel, bool *r_open)
void UI_but_func_drawextra_set(uiBlock *block, void(*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect), void *arg1, void *arg2)
void UI_block_layout_set_current(uiBlock *block, uiLayout *layout)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon)
void uiTemplateCacheFile(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname)
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2)
Definition: interface.cc:6007
void UI_view_item_begin_rename(uiViewItemHandle *item_handle)
void UI_theme_init_default(void)
Definition: resources.c:1022
void UI_widgetbase_draw_cache_flush(void)
void UI_reinit_font(void)
Definition: interface.cc:6782
int UI_popover_panel_invoke(struct bContext *C, const char *idname, bool keep_open, struct ReportList *reports)
void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2], int r_xy[2])
struct uiViewItemHandle uiViewItemHandle
Definition: UI_interface.h:78
void UI_block_flag_enable(uiBlock *block, int flag)
Definition: interface.cc:5848
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, float a1, float a2, const char *tip)
Definition: interface.cc:5422
eButType
Definition: UI_interface.h:329
@ UI_BTYPE_BUT
Definition: UI_interface.h:330
@ UI_BTYPE_TOGGLE
Definition: UI_interface.h:340
@ UI_BTYPE_EXTRA
Definition: UI_interface.h:373
@ UI_BTYPE_TAB
Definition: UI_interface.h:350
@ UI_BTYPE_HOTKEY_EVENT
Definition: UI_interface.h:377
@ UI_BTYPE_LISTBOX
Definition: UI_interface.h:366
@ UI_BTYPE_VECTORSCOPE
Definition: UI_interface.h:382
@ UI_BTYPE_SEPR_SPACER
Definition: UI_interface.h:388
@ UI_BTYPE_NODE_SOCKET
Definition: UI_interface.h:384
@ UI_BTYPE_ROUNDBOX
Definition: UI_interface.h:359
@ UI_BTYPE_COLORBAND
Definition: UI_interface.h:360
@ UI_BTYPE_BUT_MENU
Definition: UI_interface.h:335
@ UI_BTYPE_TOGGLE_N
Definition: UI_interface.h:341
@ UI_BTYPE_HISTOGRAM
Definition: UI_interface.h:380
@ UI_BTYPE_WAVEFORM
Definition: UI_interface.h:381
@ UI_BTYPE_BLOCK
Definition: UI_interface.h:353
@ UI_BTYPE_NUM_SLIDER
Definition: UI_interface.h:339
@ UI_BTYPE_HSVCIRCLE
Definition: UI_interface.h:368
@ UI_BTYPE_LISTROW
Definition: UI_interface.h:367
@ UI_BTYPE_TEXT
Definition: UI_interface.h:332
@ UI_BTYPE_BUT_TOGGLE
Definition: UI_interface.h:345
@ UI_BTYPE_VIEW_ITEM
Definition: UI_interface.h:393
@ UI_BTYPE_HSVCUBE
Definition: UI_interface.h:356
@ UI_BTYPE_PREVIEW_TILE
Definition: UI_interface.h:376
@ UI_BTYPE_LABEL
Definition: UI_interface.h:354
@ UI_BTYPE_CURVE
Definition: UI_interface.h:363
@ UI_BTYPE_ICON_TOGGLE_N
Definition: UI_interface.h:343
@ UI_BTYPE_DECORATOR
Definition: UI_interface.h:391
@ UI_BTYPE_ROW
Definition: UI_interface.h:331
@ UI_BTYPE_SEARCH_MENU
Definition: UI_interface.h:372
@ UI_BTYPE_UNITVEC
Definition: UI_interface.h:362
@ UI_BTYPE_SEPR_LINE
Definition: UI_interface.h:386
@ UI_BTYPE_KEY_EVENT
Definition: UI_interface.h:355
@ UI_BTYPE_PROGRESS_BAR
Definition: UI_interface.h:383
@ UI_BTYPE_POPOVER
Definition: UI_interface.h:351
@ UI_BTYPE_CHECKBOX_N
Definition: UI_interface.h:348
@ UI_BTYPE_SEPR
Definition: UI_interface.h:385
@ UI_BTYPE_NUM
Definition: UI_interface.h:337
@ UI_BTYPE_PULLDOWN
Definition: UI_interface.h:358
@ UI_BTYPE_CURVEPROFILE
Definition: UI_interface.h:365
@ UI_BTYPE_TRACK_PREVIEW
Definition: UI_interface.h:369
@ UI_BTYPE_COLOR
Definition: UI_interface.h:349
@ UI_BTYPE_CHECKBOX
Definition: UI_interface.h:347
@ UI_BTYPE_GRIP
Definition: UI_interface.h:390
@ UI_BTYPE_MENU
Definition: UI_interface.h:334
@ UI_BTYPE_ICON_TOGGLE
Definition: UI_interface.h:342
@ UI_BTYPE_IMAGE
Definition: UI_interface.h:379
@ UI_BTYPE_SCROLL
Definition: UI_interface.h:352
uiBut * UI_context_active_but_get_respect_menu(const struct bContext *C)
void UI_block_translate(uiBlock *block, int x, int y)
Definition: interface.cc:356
void uiItemL_ex(uiLayout *layout, const char *name, int icon, bool highlight, bool redalert)
int UI_preview_tile_size_y_no_label(void)
Definition: interface.cc:4990
void UI_popup_block_invoke(struct bContext *C, uiBlockCreateFunc func, void *arg, uiFreeArgFunc arg_free)
void UI_popup_handlers_remove(struct ListBase *handlers, uiPopupBlockHandle *popup)
void uiTemplateColorPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
uiPopover * UI_popover_begin(struct bContext *C, int menu_width, bool from_active_button) ATTR_NONNULL(1)
bool UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event)
void uiLayoutSetOperatorContext(uiLayout *layout, wmOperatorCallContext opcontext)
const char * UI_layout_introspect(uiLayout *layout)
uiBut * UI_but_active_drop_name_button(const struct bContext *C)
void UI_screen_free_active_but_highlight(const struct bContext *C, struct bScreen *screen)
void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, struct PointerRNA *trackptr, bool compact)
Definition: clip_buttons.c:377
void(* uiBlockCancelFunc)(struct bContext *C, void *arg1)
Definition: UI_interface.h:715
bool uiLayoutGetRedAlert(uiLayout *layout)
int UI_popup_menu_invoke(struct bContext *C, const char *idname, struct ReportList *reports) ATTR_NONNULL(1
void UI_template_fix_linking(void)
void UI_draw_safe_areas(uint pos, const struct rctf *rect, const float title_aspect[2], const float action_aspect[2])
bool UI_popup_block_name_exists(const struct bScreen *screen, const char *name)
void UI_block_funcN_set(uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2)
Definition: interface.cc:5972
void UI_fontstyle_draw_rotated(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, const uchar col[4])
struct ID * UI_context_active_but_get_tab_ID(struct bContext *C)
int UI_calc_float_precision(int prec, double value)
void UI_block_region_set(uiBlock *block, struct ARegion *region)
Definition: interface.cc:3551
void UI_context_update_anim_flag(const struct bContext *C)
uiBut * UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *rect_px)
uiBut * uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
Definition: interface.cc:4847
void UI_init_userdef(void)
Definition: interface.cc:6776
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
bool UI_panel_is_closed(const struct Panel *panel)
void UI_but_unit_type_set(uiBut *but, int unit_type)
Definition: interface.cc:5934
bool UI_but_is_tool(const uiBut *but)
struct PointerRNA * UI_list_custom_activate_operator_set(struct uiList *ui_list, const char *opname, bool create_properties)
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
void UI_block_update_from_old(const struct bContext *C, struct uiBlock *block)
void UI_block_set_search_only(uiBlock *block, bool search_only)
Definition: interface.cc:3644
void uiTemplateComponentMenu(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name)
void uiTemplateSearchPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, int rows, int cols)
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr)
Definition: interface.cc:2273
void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN)
void UI_but_context_ptr_set(uiBlock *block, uiBut *but, const char *name, const struct PointerRNA *ptr)
void uiItemEnumO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, const char *propname, int value)
void UI_autocomplete_update_name(AutoComplete *autocpl, const char *name)
Definition: interface.cc:4914
@ UI_TEMPLATE_ID_FILTER_AVAILABLE
@ UI_TEMPLATE_ID_FILTER_ALL
void UI_but_flag_enable(uiBut *but, int flag)
Definition: interface.cc:5858
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 UI_but_string_info_get(struct bContext *C, uiBut *but,...) ATTR_SENTINEL(0)
Definition: interface.cc:6494
uiBlock *(* uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1)
Definition: UI_interface.h:714
int UI_fontstyle_string_width(const struct uiFontStyle *fs, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, struct IDProperty *properties, wmOperatorCallContext context, int flag)
bool UI_panel_is_dragging(const struct Panel *panel)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
int UI_pie_menu_invoke(struct bContext *C, const char *idname, const struct wmEvent *event)
bool UI_but_online_manual_id_from_active(const struct bContext *C, char *r_str, size_t maxlength) ATTR_WARN_UNUSED_RESULT
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
void UI_draw_widget_scroll(struct uiWidgetColors *wcol, const struct rcti *rect, const struct rcti *slider, int state)
void uiTemplateImageFormatViews(uiLayout *layout, struct PointerRNA *imfptr, struct PointerRNA *ptr)
uiBut * uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.cc:5645
void uiTemplateConstraintHeader(uiLayout *layout, struct PointerRNA *ptr)
bool UI_but_flag_is_set(uiBut *but, int flag)
Definition: interface.cc:5868
bool UI_but_has_tooltip_label(const uiBut *but)
int void UI_popup_menu_retval_set(const uiBlock *block, int retval, bool enable)
void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, 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)
Definition: interface.cc:5608
struct bContextStore * UI_but_context_get(const uiBut *but)
Definition: interface.cc:5929
struct wmOperatorType * UI_but_extra_operator_icon_optype_get(struct uiButExtraOpIcon *extra_icon)
Definition: interface.cc:1696
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
char * UI_view_item_drop_tooltip(const uiViewItemHandle *item, const struct wmDrag *drag)
@ UI_BLOCK_SEARCH_MENU
Definition: UI_interface.h:147
@ UI_BLOCK_CLIP_EVENTS
Definition: UI_interface.h:150
@ UI_BLOCK_SEARCH_ONLY
Definition: UI_interface.h:165
@ UI_BLOCK_CLIPBOTTOM
Definition: UI_interface.h:141
@ UI_BLOCK_POPOVER_ONCE
Definition: UI_interface.h:158
@ UI_BLOCK_NUMSELECT
Definition: UI_interface.h:138
@ UI_BLOCK_RADIAL
Definition: UI_interface.h:156
@ UI_BLOCK_LOOP
Definition: UI_interface.h:135
@ UI_BLOCK_POPUP_MEMORY
Definition: UI_interface.h:148
@ UI_BLOCK_MOVEMOUSE_QUIT
Definition: UI_interface.h:143
@ UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE
Definition: UI_interface.h:162
@ UI_BLOCK_KEEP_OPEN
Definition: UI_interface.h:144
@ UI_BLOCK_IS_FLIP
Definition: UI_interface.h:136
@ UI_BLOCK_POPUP
Definition: UI_interface.h:145
@ UI_BLOCK_CLIPTOP
Definition: UI_interface.h:142
@ UI_BLOCK_SHOW_SHORTCUT_ALWAYS
Definition: UI_interface.h:160
@ UI_BLOCK_LIST_ITEM
Definition: UI_interface.h:155
@ UI_BLOCK_NO_FLIP
Definition: UI_interface.h:137
@ UI_BLOCK_POPOVER
Definition: UI_interface.h:157
@ UI_BLOCK_OUT_1
Definition: UI_interface.h:146
@ UI_BLOCK_POPUP_HOLD
Definition: UI_interface.h:154
@ UI_BLOCK_QUICK_SETUP
Definition: UI_interface.h:167
@ UI_BLOCK_NO_WIN_CLIP
Definition: UI_interface.h:140
void UI_but_drag_set_name(uiBut *but, const char *name)
void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy)
Definition: interface.cc:630
void UI_block_align_end(uiBlock *block)
Definition: interface.cc:3923
eAlertIcon
wmOperatorCallContext
Definition: WM_types.h:199
volatile int lock
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
OperationNode * node
void * user_data
SyclQueue void void size_t num_bytes void
int len
Definition: draw_manager.c:108
bNodeTree * ntree
#define str(s)
uint pos
uint col
uint padding(uint offset, uint alignment)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
bool enabled
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
ccl_global KernelShaderEvalInput * input
const int state
static unsigned a[3]
Definition: RandGen.cpp:78
bool active
all scheduled work for the GPU.
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
#define min(a, b)
Definition: sort.c:35
unsigned char uint8_t
Definition: stdint.h:78
The meta-data of an asset. By creating and giving this for a data-block (ID.asset_data),...
size_t maxlen
Definition: interface.cc:4895
const char * startname
Definition: interface.cc:4898
Definition: DNA_ID.h:368
struct PanelType * parent
Definition: BKE_screen.h:270
struct uiLayout * layout
short flag
struct bScreen * screen
Definition: context.c:64
struct ARegion * region
Definition: context.c:66
uiBlockInteractionBeginFn begin_fn
Definition: UI_interface.h:580
uiBlockInteractionEndFn end_fn
Definition: UI_interface.h:581
uiBlockInteractionUpdateFn update_fn
Definition: UI_interface.h:582
eFontStyle_Align align
char list_id[64]
uiStringInfoType type
float max
static int cmp_fn(const void *a, const void *b)
int xy[2]
Definition: wm_draw.c:135
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479