Blender  V3.3
interface_intern.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_rect.h"
12 
13 #include "DNA_listBase.h"
14 #include "RNA_types.h"
15 #include "UI_interface.h"
16 #include "UI_resources.h"
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 struct ARegion;
24 struct CurveMapping;
25 struct CurveProfile;
26 struct ID;
27 struct ImBuf;
28 struct Main;
29 struct Scene;
30 struct bContext;
31 struct bContextStore;
32 struct uiHandleButtonData;
33 struct uiLayout;
34 struct uiStyle;
35 struct uiUndoStack_Text;
36 struct uiWidgetColors;
37 struct wmEvent;
38 struct wmKeyConfig;
39 struct wmOperatorType;
40 struct wmTimer;
41 
42 /* ****************** general defines ************** */
43 
44 #define RNA_NO_INDEX -1
45 #define RNA_ENUM_VALUE -2
46 
47 #define UI_MENU_PADDING (int)(0.2f * UI_UNIT_Y)
48 
49 #define UI_MENU_WIDTH_MIN (UI_UNIT_Y * 9)
51 #define UI_MENU_SUBMENU_PADDING (6 * UI_DPI_FAC)
52 
53 /* menu scrolling */
54 #define UI_MENU_SCROLL_ARROW (12 * UI_DPI_FAC)
55 #define UI_MENU_SCROLL_MOUSE (UI_MENU_SCROLL_ARROW + 2 * UI_DPI_FAC)
56 #define UI_MENU_SCROLL_PAD (4 * UI_DPI_FAC)
57 
58 /* panel limits */
59 #define UI_PANEL_MINX 100
60 #define UI_PANEL_MINY 70
61 
63 #define UI_POPOVER_WIDTH_UNITS 10
64 
66 enum {
68  UI_SELECT = (1 << 0),
70  UI_SCROLLED = (1 << 1),
71  UI_ACTIVE = (1 << 2),
72  UI_HAS_ICON = (1 << 3),
73  UI_HIDDEN = (1 << 4),
75  UI_SELECT_DRAW = (1 << 5),
78 
83 
84  /* WARNING: rest of #uiBut.flag in UI_interface.h */
85 };
86 
88 enum {
90 };
91 
93 typedef enum RadialDirection {
104 
105 extern const char ui_radial_dir_order[8];
106 extern const char ui_radial_dir_to_numpad[8];
107 extern const short ui_radial_dir_to_angle[8];
108 
109 /* internal panel drawing defines */
110 #define PNL_HEADER (UI_UNIT_Y * 1.25) /* 24 default */
111 
112 /* bit button defines */
113 /* Bit operations */
114 #define UI_BITBUT_TEST(a, b) (((a) & (1 << (b))) != 0)
115 #define UI_BITBUT_VALUE_TOGGLED(a, b) ((a) ^ (1 << (b)))
116 #define UI_BITBUT_VALUE_ENABLED(a, b) ((a) | (1 << (b)))
117 #define UI_BITBUT_VALUE_DISABLED(a, b) ((a) & ~(1 << (b)))
118 
119 /* bit-row */
120 #define UI_BITBUT_ROW(min, max) \
121  (((max) >= 31 ? 0xFFFFFFFF : (1 << ((max) + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0))
122 
124 #define USE_NUMBUTS_LR_ALIGN
125 
127 #define USE_UIBUT_SPATIAL_ALIGN
128 
130 enum {
136  UI_PIE_DRAG_STYLE = (1 << 2),
138  UI_PIE_INVALID_DIR = (1 << 3),
140  UI_PIE_CLICK_STYLE = (1 << 4),
145 };
146 
147 #define PIE_CLICK_THRESHOLD_SQ 50.0f
148 
150 #define PIE_MAX_ITEMS 8
151 
152 struct uiBut {
153  struct uiBut *next, *prev;
154 
161  short ofs, pos, selsta, selend;
162 
163  char *str;
166 
167  rctf rect; /* block relative coords */
168 
169  char *poin;
171 
172  /* both these values use depends on the button type
173  * (polymorphic struct or union would be nicer for this stuff) */
174 
181  float a1;
182 
189  float a2;
190 
191  uchar col[4];
192 
195 
197  void *func_arg1;
198  void *func_arg2;
199 
201  void *func_argN;
202 
204 
207 
209  void *rename_arg1;
210  void *rename_orig;
211 
214  void *hold_argN;
215 
216  const char *tip;
218  void *tip_arg;
220 
222  const char *disabled_info;
223 
230  bool changed;
233  short iconadd;
234 
237 
240 
242 
243  /* RNA data */
244  struct PointerRNA rnapoin;
246  int rnaindex;
247 
248  /* Operator data */
250  struct PointerRNA *opptr;
252 
255 
258  /* Drag-able data, type is WM_DRAG_... */
259  char dragtype;
260  short dragflag;
261  void *dragpoin;
262  struct ImBuf *imb;
263  float imb_scale;
264 
267 
269  void *custom_data;
270 
271  char *editstr;
272  double *editval;
273  float *editvec;
274 
276  const void *pushed_state_arg;
277 
278  /* pointer back */
280 };
281 
283 typedef struct uiButNumber {
285 
286  float step_size;
287  float precision;
289 
291 typedef struct uiButColor {
293 
297 
299 typedef struct uiButTab {
301  struct MenuType *menu;
303 
305 typedef struct uiButSearch {
307 
310  void *item_active;
311 
312  void *arg;
314 
317 
318  const char *item_sep_string;
319 
320  struct PointerRNA rnasearchpoin;
322 
329 
331 typedef struct uiButDecorator {
333 
334  struct PointerRNA rnapoin;
336  int rnaindex;
338 
340 typedef struct uiButProgressbar {
342 
343  /* 0..1 range */
344  float progress;
346 
347 typedef struct uiButViewItem {
349 
350  /* C-Handle to the view item this button was created for. */
353 
355 typedef struct uiButHSVCube {
357 
360 
362 typedef struct uiButColorBand {
364 
367 
369 typedef struct uiButCurveProfile {
371 
374 
376 typedef struct uiButCurveMapping {
378 
382 
384 typedef struct uiButHotkeyEvent {
386 
389 
393 typedef struct uiButExtraOpIcon {
395 
398 
400  bool disabled;
402 
403 typedef struct ColorPicker {
404  struct ColorPicker *next, *prev;
405 
409  float hsv_perceptual[3];
412  bool is_init;
413 
418 
425 
426 typedef struct ColorPickerData {
429 
430 struct PieMenuData {
432  const char *title;
433  int icon;
434 
435  float pie_dir[2];
436  float pie_center_init[2];
438  float last_pos[2];
440  int flags;
442  short event_type;
443  float alphafac;
444 };
445 
451 };
452 
459 typedef struct uiButtonGroup {
460  void *next, *prev;
461  ListBase buttons; /* #LinkData with #uiBut data field. */
462  short flag;
464 
465 /* #uiButtonGroup.flag. */
466 typedef enum uiButtonGroupFlag {
472 
473 struct uiBlock {
475 
477  struct Panel *panel;
479 
482 
483  ListBase button_groups; /* #uiButtonGroup. */
484 
487 
489 
494 
496 
497  float winmat[4][4];
498 
500  float aspect;
501 
504 
506  void *func_arg1;
507  void *func_arg2;
508 
510  void *func_argN;
511 
514 
517 
520 
522  int (*block_event_func)(const struct bContext *C, struct uiBlock *, const struct wmEvent *);
523 
525  void (*drawextra)(const struct bContext *C, void *idv, void *arg1, void *arg2, rcti *rect);
528 
529  int flag;
530  short alignnr;
534  short content_hints; /* #eBlockContentHints */
535 
536  char direction;
541  bool auto_open;
542  char _pad[5];
544 
545  const char *lockstr;
546 
547  bool lock;
549  bool active;
553  bool endblock;
554 
561 
566 
568 
572 
574  void *evil_C;
575 
581 
584 
589  char display_device[64];
590 
591  struct PieMenuData pie_data;
592 };
593 
594 typedef struct uiSafetyRct {
595  struct uiSafetyRct *next, *prev;
599 
600 /* interface.c */
601 
602 void ui_fontscale(float *points, float aspect);
603 
604 extern void ui_block_to_region_fl(const struct ARegion *region,
605  uiBlock *block,
606  float *r_x,
607  float *r_y);
608 extern void ui_block_to_window_fl(const struct ARegion *region,
609  uiBlock *block,
610  float *x,
611  float *y);
612 extern void ui_block_to_window(const struct ARegion *region, uiBlock *block, int *x, int *y);
613 extern void ui_block_to_region_rctf(const struct ARegion *region,
614  uiBlock *block,
615  rctf *rct_dst,
616  const rctf *rct_src);
617 extern void ui_block_to_window_rctf(const struct ARegion *region,
618  uiBlock *block,
619  rctf *rct_dst,
620  const rctf *rct_src);
621 extern float ui_block_to_window_scale(const struct ARegion *region, uiBlock *block);
625 extern void ui_window_to_block_fl(const struct ARegion *region,
626  uiBlock *block,
627  float *x,
628  float *y);
629 extern void ui_window_to_block(const struct ARegion *region, uiBlock *block, int *x, int *y);
630 extern void ui_window_to_block_rctf(const struct ARegion *region,
631  uiBlock *block,
632  rctf *rct_dst,
633  const rctf *rct_src);
634 extern void ui_window_to_region(const struct ARegion *region, int *x, int *y);
635 extern void ui_window_to_region_rcti(const struct ARegion *region,
636  rcti *rect_dst,
637  const rcti *rct_src);
638 extern void ui_window_to_region_rctf(const struct ARegion *region,
639  rctf *rect_dst,
640  const rctf *rct_src);
641 extern void ui_region_to_window(const struct ARegion *region, int *x, int *y);
646 extern void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect);
647 
655 uiBut *ui_but_change_type(uiBut *but, eButType new_type);
656 
657 extern double ui_but_value_get(uiBut *but);
658 extern void ui_but_value_set(uiBut *but, double value);
662 extern void ui_but_hsv_set(uiBut *but);
666 extern void ui_but_v3_get(uiBut *but, float vec[3]);
670 extern void ui_but_v3_set(uiBut *but, const float vec[3]);
671 
672 extern void ui_hsvcircle_vals_from_pos(
673  const rcti *rect, float mx, float my, float *r_val_rad, float *r_val_dist);
677 extern void ui_hsvcircle_pos_from_vals(
678  const ColorPicker *cpicker, const rcti *rect, const float *hsv, float *xpos, float *ypos);
680  const struct uiButHSVCube *hsv_but, const rcti *rect, const float *hsv, float *xp, float *yp);
681 
688 extern void ui_but_string_get_ex(uiBut *but,
689  char *str,
690  size_t maxlen,
691  int float_precision,
692  bool use_exp_float,
693  bool *r_use_exp_float) ATTR_NONNULL(1, 2);
694 extern void ui_but_string_get(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL();
701 extern char *ui_but_string_get_dynamic(uiBut *but, int *r_str_size);
705 extern void ui_but_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL();
706 extern bool ui_but_string_set(struct bContext *C, uiBut *but, const char *str) ATTR_NONNULL();
707 extern bool ui_but_string_eval_number(struct bContext *C,
708  const uiBut *but,
709  const char *str,
710  double *value) ATTR_NONNULL();
711 extern int ui_but_string_get_max_length(uiBut *but);
721 extern void ui_but_set_string_interactive(struct bContext *C, uiBut *but, const char *value);
723 
724 void ui_def_but_icon(uiBut *but, int icon, int flag);
728 void ui_def_but_icon_clear(uiBut *but);
729 
731 
732 extern void ui_but_rna_menu_convert_to_panel_type(struct uiBut *but, const char *panel_type);
733 extern void ui_but_rna_menu_convert_to_menu_type(struct uiBut *but, const char *menu_type);
734 extern bool ui_but_menu_draw_as_popover(const uiBut *but);
735 
736 void ui_but_range_set_hard(uiBut *but);
737 void ui_but_range_set_soft(uiBut *but);
738 
739 bool ui_but_context_poll_operator(struct bContext *C, struct wmOperatorType *ot, const uiBut *but);
746  const uiBut *but,
747  const struct wmOperatorCallParams *optype_params);
748 
749 extern void ui_but_update(uiBut *but);
750 extern void ui_but_update_edited(uiBut *but);
752 extern bool ui_but_is_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
753 extern bool ui_but_is_bool(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
754 extern bool ui_but_is_unit(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
758 extern bool ui_but_is_compatible(const uiBut *but_a, const uiBut *but_b) ATTR_WARN_UNUSED_RESULT;
764 
770 extern int ui_but_is_pushed_ex(uiBut *but, double *value) ATTR_WARN_UNUSED_RESULT;
772 
773 void ui_but_override_flag(struct Main *bmain, uiBut *but);
774 
775 extern void ui_block_bounds_calc(uiBlock *block);
776 
778 void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3]);
779 
780 /* interface_regions.c */
781 
782 struct uiKeyNavLock {
784  bool is_keynav;
786  int event_xy[2];
787 };
788 
789 typedef uiBlock *(*uiBlockHandleCreateFunc)(struct bContext *C,
790  struct uiPopupBlockHandle *handle,
791  void *arg1);
792 
796  void *arg;
798 
799  int event_xy[2];
800 
804 };
805 
807  /* internal */
808  struct ARegion *region;
809 
811  float towards_xy[2];
812  double towardstime;
813  bool dotowards;
814 
815  bool popup;
816  void (*popup_func)(struct bContext *C, void *arg, int event);
817  void (*cancel_func)(struct bContext *C, void *arg);
818  void *popup_arg;
819 
824  bool refresh;
825 
828 
829  struct uiKeyNavLock keynav_state;
830 
831  /* for operator popups */
833  struct ScrArea *ctx_area;
835 
836  /* return values */
839  int retvalue;
840  float retvec[4];
841 
844 
845  /* Previous values so we don't resize or reposition on refresh. */
850 
851  /* Maximum estimated size to avoid having to reposition on refresh. */
853 
854  /* #ifdef USE_DRAG_POPUP */
855  bool is_grab;
856  int grab_xy_prev[2];
857  /* #endif */
858 };
859 
860 /* -------------------------------------------------------------------- */
861 /* interface_region_*.c */
862 
863 /* interface_region_tooltip.c */
864 
865 /* exposed as public API in UI_interface.h */
866 
867 /* interface_region_color_picker.c */
868 
869 void ui_color_picker_rgb_to_hsv_compat(const float rgb[3], float r_cp[3]);
870 void ui_color_picker_rgb_to_hsv(const float rgb[3], float r_cp[3]);
871 void ui_color_picker_hsv_to_rgb(const float r_cp[3], float rgb[3]);
872 
877 bool ui_but_is_color_gamma(uiBut *but);
878 
879 void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3]);
880 void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3]);
881 
882 uiBlock *ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
884 
885 /* interface_region_search.c */
886 
891  struct ARegion *butregion,
892  uiButSearch *search_but);
894  struct ARegion *butregion,
895  uiButSearch *search_but);
897  struct ARegion *butregion,
898  uiButSearch *search_but);
899 
903 bool ui_searchbox_inside(struct ARegion *region, const int xy[2]) ATTR_NONNULL(1, 2);
904 int ui_searchbox_find_index(struct ARegion *region, const char *name);
908 void ui_searchbox_update(struct bContext *C, struct ARegion *region, uiBut *but, bool reset);
909 int ui_searchbox_autocomplete(struct bContext *C, struct ARegion *region, uiBut *but, char *str);
911  struct ARegion *region,
912  uiBut *but,
913  struct ARegion *butregion,
914  const struct wmEvent *event);
918 bool ui_searchbox_apply(uiBut *but, struct ARegion *region);
919 void ui_searchbox_free(struct bContext *C, struct ARegion *region);
924 
925 /* interface_region_menu_popup.c */
926 
927 int ui_but_menu_step(uiBut *but, int direction);
928 bool ui_but_menu_step_poll(const uiBut *but);
929 uiBut *ui_popup_menu_memory_get(struct uiBlock *block);
930 void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but);
931 
936  uiPopupBlockHandle *handle,
937  struct ARegion *butregion,
938  uiBut *but);
939 
941  struct ARegion *butregion,
942  uiBut *but,
944  uiBlockHandleCreateFunc handle_create_func,
945  void *arg,
946  uiFreeArgFunc arg_free);
948  struct ARegion *butregion,
949  uiBut *but,
950  uiMenuCreateFunc menu_func,
951  void *arg);
952 
953 /* interface_region_popover.c */
954 
956  struct ARegion *butregion,
957  uiBut *but,
958  uiMenuCreateFunc menu_func,
959  void *arg);
960 
961 /* interface_region_menu_pie.c */
962 
967  struct wmOperatorType *ot,
968  const char *propname,
969  struct IDProperty *properties,
970  const EnumPropertyItem *items,
971  int totitem,
974 
975 /* interface_region_popup.c */
976 
980 void ui_popup_translate(struct ARegion *region, const int mdiff[2]);
981 void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle);
982 void ui_popup_block_scrolltest(struct uiBlock *block);
983 
984 /* end interface_region_*.c */
985 
986 /* interface_panel.c */
987 
993 extern int ui_handler_panel_region(struct bContext *C,
994  const struct wmEvent *event,
995  struct ARegion *region,
996  const uiBut *active_but);
1000 extern void ui_draw_aligned_panel(const struct uiStyle *style,
1001  const uiBlock *block,
1002  const rcti *rect,
1003  bool show_pin,
1004  bool show_background,
1005  bool region_search_filter_active);
1006 void ui_panel_tag_search_filter_match(struct Panel *panel);
1007 
1008 /* interface_draw.c */
1009 
1011  const rctf *rct, float radius, float aspect, float alpha, int select);
1012 
1016 void ui_draw_gradient(const rcti *rect, const float hsv[3], eButGradientType type, float alpha);
1017 
1018 /* based on UI_draw_roundbox_gl_mode,
1019  * check on making a version which allows us to skip some sides */
1020 void ui_draw_but_TAB_outline(const rcti *rect,
1021  float rad,
1022  uchar highlight[3],
1023  uchar highlight_fade[3]);
1024 void ui_draw_but_HISTOGRAM(struct ARegion *region,
1025  uiBut *but,
1026  const struct uiWidgetColors *wcol,
1027  const rcti *rect);
1028 void ui_draw_but_WAVEFORM(struct ARegion *region,
1029  uiBut *but,
1030  const struct uiWidgetColors *wcol,
1031  const rcti *rect);
1032 void ui_draw_but_VECTORSCOPE(struct ARegion *region,
1033  uiBut *but,
1034  const struct uiWidgetColors *wcol,
1035  const rcti *rect);
1036 void ui_draw_but_COLORBAND(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect);
1038  const struct uiWidgetColors *wcol,
1039  const rcti *rect,
1040  float radius);
1041 void ui_draw_but_CURVE(struct ARegion *region,
1042  uiBut *but,
1043  const struct uiWidgetColors *wcol,
1044  const rcti *rect);
1048 void ui_draw_but_CURVEPROFILE(struct ARegion *region,
1049  uiBut *but,
1050  const struct uiWidgetColors *wcol,
1051  const rcti *rect);
1052 void ui_draw_but_IMAGE(struct ARegion *region,
1053  uiBut *but,
1054  const struct uiWidgetColors *wcol,
1055  const rcti *rect);
1056 void ui_draw_but_TRACKPREVIEW(struct ARegion *region,
1057  uiBut *but,
1058  const struct uiWidgetColors *wcol,
1059  const rcti *rect);
1060 
1061 /* interface_undo.c */
1062 
1076  const char *text,
1077  int cursor_index);
1078 const char *ui_textedit_undo(struct uiUndoStack_Text *undo_stack,
1079  int direction,
1080  int *r_cursor_index);
1081 
1082 /* interface_handlers.c */
1083 
1085  wmOperatorCallContext opcontext);
1089 extern void ui_pan_to_scroll(const struct wmEvent *event, int *type, int *val);
1095 extern void ui_but_activate_event(struct bContext *C, struct ARegion *region, uiBut *but);
1102 extern void ui_but_activate_over(struct bContext *C, struct ARegion *region, uiBut *but);
1103 extern void ui_but_execute_begin(struct bContext *C,
1104  struct ARegion *region,
1105  uiBut *but,
1106  void **active_back);
1107 extern void ui_but_execute_end(struct bContext *C,
1108  struct ARegion *region,
1109  uiBut *but,
1110  void *active_back);
1111 extern void ui_but_active_free(const struct bContext *C, uiBut *but);
1116 extern void ui_but_update_view_for_active(const struct bContext *C, const uiBlock *block);
1117 extern int ui_but_menu_direction(uiBut *but);
1118 extern void ui_but_text_password_hide(char password_str[128], uiBut *but, bool restore);
1124 extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction);
1125 bool ui_but_is_editing(const uiBut *but);
1126 float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]);
1127 
1128 /* XXX, this code will shorten any allocated string to 'UI_MAX_NAME_STR'
1129  * since this is really long its unlikely to be an issue,
1130  * but this could be supported */
1131 void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, bool do_strip);
1132 void ui_but_clipboard_free(void);
1133 bool ui_but_rna_equals(const uiBut *a, const uiBut *b);
1134 bool ui_but_rna_equals_ex(const uiBut *but,
1135  const PointerRNA *ptr,
1136  const PropertyRNA *prop,
1137  int index);
1138 uiBut *ui_but_find_old(uiBlock *block_old, const uiBut *but_new);
1139 uiBut *ui_but_find_new(uiBlock *block_new, const uiBut *but_old);
1140 
1141 #ifdef WITH_INPUT_IME
1142 void ui_but_ime_reposition(uiBut *but, int x, int y, bool complete);
1143 struct wmIMEData *ui_but_ime_data_get(uiBut *but);
1144 #endif
1145 
1146 /* interface_widgets.c */
1147 
1148 /* Widget shader parameters, must match the shader layout. */
1149 typedef struct uiWidgetBaseParameters {
1151  float radi, rad;
1152  float facxi, facyi;
1153  float round_corners[4];
1156  float color_tria[4];
1159  float shade_dir;
1160  /* We pack alpha check and discard factor in alpha_discard.
1161  * If the value is negative then we do alpha check.
1162  * The absolute value itself is the discard factor.
1163  * Initialize value to 1.0f if you don't want discard. */
1165  float tria_type;
1166  float _pad[3];
1168 
1169 enum {
1176 
1177  ROUNDBOX_TRIA_MAX, /* don't use */
1178 };
1179 
1182 
1183 void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
1184 void ui_draw_popover_back(struct ARegion *region,
1185  struct uiStyle *style,
1186  uiBlock *block,
1187  rcti *rect);
1188 void ui_draw_pie_center(uiBlock *block);
1189 const struct uiWidgetColors *ui_tooltip_get_theme(void);
1190 
1191 void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const float color[4]);
1192 void ui_draw_widget_menu_back(const rcti *rect, bool use_shadow);
1193 void ui_draw_tooltip_background(const struct uiStyle *style, uiBlock *block, rcti *rect);
1194 
1198 extern void ui_draw_but(const struct bContext *C,
1199  struct ARegion *region,
1200  struct uiStyle *style,
1201  uiBut *but,
1202  rcti *rect);
1203 
1209 typedef enum {
1227 void ui_draw_menu_item(const struct uiFontStyle *fstyle,
1228  rcti *rect,
1229  const char *name,
1230  int iconid,
1231  int but_flag,
1232  uiMenuItemSeparatorType separator_type,
1233  int *r_xmax);
1234 void ui_draw_preview_item(const struct uiFontStyle *fstyle,
1235  rcti *rect,
1236  const char *name,
1237  int iconid,
1238  int but_flag,
1239  eFontStyle_Align text_align);
1245  rcti *rect,
1246  const char *name,
1247  int iconid,
1248  const uchar text_col[4],
1249  eFontStyle_Align text_align);
1250 
1251 #define UI_TEXT_MARGIN_X 0.4f
1252 #define UI_POPUP_MARGIN (UI_DPI_FAC * 12)
1257 #define UI_POPUP_MENU_TOP (int)(10 * UI_DPI_FAC)
1258 
1259 #define UI_PIXEL_AA_JITTER 8
1260 extern const float ui_pixel_jitter[UI_PIXEL_AA_JITTER][2];
1261 
1262 /* interface_style.c */
1263 
1268 void uiStyleInit(void);
1269 
1270 /* interface_icons.c */
1271 
1272 void ui_icon_ensure_deferred(const struct bContext *C, int icon_id, bool big);
1273 int ui_id_icon_get(const struct bContext *C, struct ID *id, bool big);
1274 
1275 /* interface_icons_event.c */
1276 
1278  float x, float y, int w, int h, float alpha, short event_type, short event_value);
1279 
1280 /* resources.c */
1281 
1282 void ui_resources_init(void);
1283 void ui_resources_free(void);
1284 
1285 /* interface_layout.c */
1286 
1287 void ui_layout_add_but(uiLayout *layout, uiBut *but);
1288 void ui_layout_remove_but(uiLayout *layout, const uiBut *but);
1292 bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but);
1298  PointerRNA *ptr,
1299  PropertyRNA *prop,
1300  PointerRNA *searchptr,
1301  PropertyRNA *searchprop,
1302  bool results_are_suggestions);
1309 /* menu callback */
1310 void ui_item_menutype_func(struct bContext *C, struct uiLayout *layout, void *arg_mt);
1311 void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *arg_pt);
1312 
1313 /* interface_button_group.c */
1314 
1320 void ui_button_group_add_but(uiBlock *block, uiBut *but);
1321 void ui_button_group_replace_but_ptr(uiBlock *block, const void *old_but_ptr, uiBut *new_but);
1323 
1324 /* interface_drag.cc */
1325 
1326 void ui_but_drag_free(uiBut *but);
1327 bool ui_but_drag_is_draggable(const uiBut *but);
1328 void ui_but_drag_start(struct bContext *C, uiBut *but);
1329 
1330 /* interface_align.c */
1331 
1341 void ui_block_align_calc(uiBlock *block, const struct ARegion *region);
1342 
1343 /* interface_anim.c */
1344 
1345 void ui_but_anim_flag(uiBut *but, const struct AnimationEvalContext *anim_eval_context);
1346 void ui_but_anim_copy_driver(struct bContext *C);
1347 void ui_but_anim_paste_driver(struct bContext *C);
1352 bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen);
1353 bool ui_but_anim_expression_set(uiBut *but, const char *str);
1357 bool ui_but_anim_expression_create(uiBut *but, const char *str);
1358 void ui_but_anim_autokey(struct bContext *C, uiBut *but, struct Scene *scene, float cfra);
1359 
1360 void ui_but_anim_decorate_cb(struct bContext *C, void *arg_but, void *arg_dummy);
1362 
1363 /* interface_query.c */
1364 
1373 bool ui_but_is_interactive_ex(const uiBut *but, const bool labeledit, const bool for_tooltip);
1374 bool ui_but_is_interactive(const uiBut *but, bool labeledit) ATTR_WARN_UNUSED_RESULT;
1377 int ui_but_icon(const uiBut *but);
1378 void ui_but_pie_dir(RadialDirection dir, float vec[2]);
1379 
1381 
1382 bool ui_but_contains_pt(const uiBut *but, float mx, float my) ATTR_WARN_UNUSED_RESULT;
1383 bool ui_but_contains_rect(const uiBut *but, const rctf *rect);
1385  struct ARegion *region,
1386  const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT;
1387 bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, const int xy[2])
1389 
1390 uiBut *ui_list_find_mouse_over(const struct ARegion *region,
1391  const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT;
1392 uiBut *ui_list_find_from_row(const struct ARegion *region,
1393  const uiBut *row_but) ATTR_WARN_UNUSED_RESULT;
1394 uiBut *ui_list_row_find_mouse_over(const struct ARegion *region, const int xy[2])
1397  int index,
1398  uiBut *listbox) ATTR_WARN_UNUSED_RESULT;
1399 uiBut *ui_view_item_find_mouse_over(const struct ARegion *region, const int xy[2])
1400  ATTR_NONNULL(1, 2);
1401 uiBut *ui_view_item_find_active(const struct ARegion *region);
1402 
1403 typedef bool (*uiButFindPollFn)(const uiBut *but, const void *customdata);
1408  const int xy[2],
1409  bool labeledit,
1410  bool for_tooltip,
1411  const uiButFindPollFn find_poll,
1412  const void *find_custom_data)
1414 uiBut *ui_but_find_mouse_over(const struct ARegion *region,
1415  const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT;
1416 uiBut *ui_but_find_rect_over(const struct ARegion *region,
1417  const rcti *rect_px) ATTR_WARN_UNUSED_RESULT;
1418 
1419 uiBut *ui_list_find_mouse_over_ex(const struct ARegion *region, const int xy[2])
1421 
1423 
1424 size_t ui_but_drawstr_without_sep_char(const uiBut *but, char *str, size_t str_maxlen)
1425  ATTR_NONNULL(1, 2);
1426 size_t ui_but_drawstr_len_without_sep_char(const uiBut *but);
1427 size_t ui_but_tip_len_only_first_line(const uiBut *but);
1428 
1433 
1434 uiBut *ui_block_active_but_get(const uiBlock *block);
1439 
1440 uiBlock *ui_block_find_mouse_over_ex(const struct ARegion *region, const int xy[2], bool only_clip)
1441  ATTR_NONNULL(1, 2);
1443  const struct wmEvent *event,
1444  bool only_clip);
1445 
1447  int flag_include,
1448  int flag_exclude);
1450 bool ui_region_contains_point_px(const struct ARegion *region, const int xy[2])
1452 bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px);
1453 
1457 struct ARegion *ui_screen_region_find_mouse_over_ex(struct bScreen *screen, const int xy[2])
1458  ATTR_NONNULL(1, 2);
1460  const struct wmEvent *event);
1461 
1462 /* interface_context_menu.c */
1463 
1464 bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but, const struct wmEvent *event);
1469  struct ARegion *region,
1470  struct Panel *panel);
1471 
1472 /* interface_eyedropper.c */
1473 
1474 struct wmKeyMap *eyedropper_modal_keymap(struct wmKeyConfig *keyconf);
1475 struct wmKeyMap *eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf);
1476 
1477 /* interface_eyedropper_color.c */
1478 
1480 
1481 /* interface_eyedropper_colorband.c */
1482 
1485 
1486 /* interface_eyedropper_datablock.c */
1487 
1488 void UI_OT_eyedropper_id(struct wmOperatorType *ot);
1489 
1490 /* interface_eyedropper_depth.c */
1491 
1493 
1494 /* interface_eyedropper_driver.c */
1495 
1497 
1498 /* interface_eyedropper_gpencil_color.c */
1499 
1501 
1502 /* interface_template_asset_view.cc */
1503 
1504 struct uiListType *UI_UL_asset_view(void);
1505 
1509 typedef struct uiRNACollectionSearch {
1512 
1515 
1517  /* Let UI_butstore_ API update search_but pointer above over redraws. */
1519  /* Block has to be stored for freeing butstore (uiBut.block doesn't work with undo). */
1523  const struct bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first);
1524 
1525 /* interface_ops.c */
1526 
1528 
1529 /* interface_queries.c */
1530 
1532 
1533 /* interface_view.cc */
1534 
1535 void ui_block_free_views(struct uiBlock *block);
1537  const uiViewHandle *new_view);
1538 
1540  const uiBlock *new_block, const uiViewItemHandle *new_item_handle);
1541 
1542 /* interface_templates.c */
1543 
1544 struct uiListType *UI_UL_cache_file_layers(void);
1545 
1547  struct Main *bmain,
1548  struct ID *owner_id,
1549  struct ID *id,
1550  const char **r_undo_push_label);
1551 
1552 #ifdef __cplusplus
1553 }
1554 #endif
#define ATTR_NONNULL(...)
unsigned char uchar
Definition: BLI_sys_types.h:70
unsigned int uint
Definition: BLI_sys_types.h:67
These structs are the foundation for all linked lists in the library system.
GPUBatch
Definition: GPU_batch.h:78
_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
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
PropertyScaleType
Definition: RNA_types.h:96
#define C
Definition: RandGen.cpp:25
eUIEmbossType
Definition: UI_interface.h:107
struct ARegion *(* uiButSearchCreateFn)(struct bContext *C, struct ARegion *butregion, struct uiButSearch *search_but)
Definition: UI_interface.h:516
int(* uiButCompleteFunc)(struct bContext *C, char *str, void *arg)
Definition: UI_interface.h:509
void(* uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2)
Definition: UI_interface.h:507
void(* uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but)
Definition: UI_interface.h:508
void(* uiBlockHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:540
int(* uiButPushedStateFunc)(struct uiBut *but, const void *arg)
Definition: UI_interface.h:538
char *(* uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip)
Definition: UI_interface.h:537
void(* uiButSearchUpdateFn)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
Definition: UI_interface.h:524
bool(* uiButIdentityCompareFunc)(const uiBut *a, const uiBut *b)
Definition: UI_interface.h:513
void(* uiFreeArgFunc)(void *arg)
Definition: UI_interface.h:603
eFontStyle_Align
#define UI_MAX_DRAW_STR
Definition: UI_interface.h:91
eBlockBoundsCalc
Definition: UI_interface.h:810
struct ARegion *(* uiButSearchTooltipFn)(struct bContext *C, struct ARegion *region, const struct rcti *item_rect, void *arg, void *active)
Definition: UI_interface.h:530
struct uiViewHandle uiViewHandle
Definition: UI_interface.h:76
void(* uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr)
Definition: UI_interface.h:506
void(* uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2)
Definition: UI_interface.h:505
eButGradientType
Definition: UI_interface.h:399
bool(* uiButSearchContextMenuFn)(struct bContext *C, void *arg, void *active, const struct wmEvent *event)
Definition: UI_interface.h:526
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
Definition: UI_interface.h:592
void(* uiMenuHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:593
bool(* uiMenuStepFunc)(struct bContext *C, int direction, void *arg1)
Definition: UI_interface.h:600
eButPointerType
Definition: UI_interface.h:316
struct uiViewItemHandle uiViewItemHandle
Definition: UI_interface.h:78
eButType
Definition: UI_interface.h:329
#define UI_MAX_NAME_STR
Definition: UI_interface.h:92
uiBlock *(* uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1)
Definition: UI_interface.h:714
BIFIconID
Definition: UI_resources.h:18
wmOperatorCallContext
Definition: WM_types.h:199
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: avxb.h:154
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
Scene scene
SyclQueue void void size_t num_bytes void
#define str(s)
void ui_rna_collection_search_update_fn(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, bool is_first)
const float ui_pixel_jitter[UI_PIXEL_AA_JITTER][2]
uiButViewItem * ui_block_view_find_matching_view_item_but_in_old_block(const uiBlock *new_block, const uiViewItemHandle *new_item_handle)
void ui_draw_but_TRACKPREVIEW(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
struct uiUndoStack_Text * ui_textedit_undo_stack_create(void)
void ui_but_range_set_hard(uiBut *but)
Definition: interface.cc:3258
uiBlock * ui_block_find_mouse_over_ex(const struct ARegion *region, const int xy[2], bool only_clip) ATTR_NONNULL(1
void ui_draw_but_HISTOGRAM(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
void ui_but_extra_operator_icons_free(uiBut *but)
Definition: interface.cc:1674
int ui_but_is_pushed_ex(uiBut *but, double *value) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2156
void ui_but_execute_end(struct bContext *C, struct ARegion *region, uiBut *but, void *active_back)
void ui_hsvcircle_vals_from_pos(const rcti *rect, float mx, float my, float *r_val_rad, float *r_val_dist)
bool ui_but_is_cursor_warp(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_searchbox_apply(uiBut *but, struct ARegion *region)
void ui_button_group_replace_but_ptr(uiBlock *block, const void *old_but_ptr, uiBut *new_but)
bool ui_but_is_rna_valid(uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2475
float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2])
struct ColorPickerData ColorPickerData
bool ui_but_is_editing(const uiBut *but)
void ui_def_but_icon(uiBut *but, int icon, int flag)
Definition: interface.cc:4244
int ui_but_menu_direction(uiBut *but)
uiPopupBlockHandle * ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg, uiFreeArgFunc arg_free)
const short ui_radial_dir_to_angle[8]
Definition: interface.cc:1556
void ui_draw_but_COLORBAND(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
void ui_but_drag_start(struct bContext *C, uiBut *but)
uiBut * ui_list_find_mouse_over_ex(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
bool ui_but_menu_step_poll(const uiBut *but)
uiBut * ui_region_find_active_but(struct ARegion *region) ATTR_WARN_UNUSED_RESULT
void UI_OT_eyedropper_gpencil_color(struct wmOperatorType *ot)
struct uiButViewItem uiButViewItem
uiBut * ui_but_find_mouse_over_ex(const struct ARegion *region, const int xy[2], bool labeledit, bool for_tooltip, const uiButFindPollFn find_poll, const void *find_custom_data) ATTR_NONNULL(1
void ui_block_free_button_groups(uiBlock *block)
void UI_OT_eyedropper_colorramp_point(struct wmOperatorType *ot)
void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3])
size_t size_t ui_but_drawstr_len_without_sep_char(const uiBut *but)
uiBut * ui_list_row_find_mouse_over(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
void ui_but_range_set_soft(uiBut *but)
Definition: interface.cc:3280
void ui_but_update(uiBut *but)
Definition: interface.cc:3900
uiButtonGroupFlag
@ UI_BUTTON_GROUP_LOCK
@ UI_BUTTON_GROUP_PANEL_HEADER
struct wmKeyMap * eyedropper_modal_keymap(struct wmKeyConfig *keyconf)
void ui_but_anim_autokey(struct bContext *C, uiBut *but, struct Scene *scene, float cfra)
uiBut * ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, bool results_are_suggestions)
void ui_but_drag_free(uiBut *but)
void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const float color[4])
void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but)
void ui_draw_but_CURVE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
uiBut uiBut * ui_view_item_find_active(const struct ARegion *region)
uiViewHandle * ui_block_view_find_matching_in_old_block(const uiBlock *new_block, const uiViewHandle *new_view)
RadialDirection
@ UI_RADIAL_W
@ UI_RADIAL_E
@ UI_RADIAL_NONE
@ UI_RADIAL_N
@ UI_RADIAL_SE
@ UI_RADIAL_SW
@ UI_RADIAL_S
@ UI_RADIAL_NE
@ UI_RADIAL_NW
void ui_color_picker_hsv_to_rgb(const float r_cp[3], float rgb[3])
uiBut * ui_but_change_type(uiBut *but, eButType new_type)
Definition: interface.cc:4025
bool ui_block_is_popover(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
bool ui_but_context_poll_operator(struct bContext *C, struct wmOperatorType *ot, const uiBut *but)
Definition: interface.cc:1898
bool ui_block_is_pie_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
uiBlock *(* uiBlockHandleCreateFunc)(struct bContext *C, struct uiPopupBlockHandle *handle, void *arg1)
int ui_handler_panel_region(struct bContext *C, const struct wmEvent *event, struct ARegion *region, const uiBut *active_but)
bool(* uiButFindPollFn)(const uiBut *but, const void *customdata)
struct uiButNumber uiButNumber
bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but, const struct wmEvent *event)
void ui_but_activate_event(struct bContext *C, struct ARegion *region, uiBut *but)
bool ui_searchbox_event(struct bContext *C, struct ARegion *region, uiBut *but, struct ARegion *butregion, const struct wmEvent *event)
void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, bool do_strip)
Definition: interface.cc:1205
bool ui_but_string_eval_number(struct bContext *C, const uiBut *but, const char *str, double *value) ATTR_NONNULL()
Definition: interface.cc:3044
bool ui_but_has_array_value(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_def_but_icon_clear(uiBut *but)
Definition: interface.cc:4259
uiBut * ui_view_item_find_mouse_over(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
bool ui_but_contains_rect(const uiBut *but, const rctf *rect)
void ui_but_search_refresh(uiButSearch *but)
void ui_draw_preview_item_stateless(const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, const uchar text_col[4], eFontStyle_Align text_align)
uiBut * ui_but_next(uiBut *but) ATTR_WARN_UNUSED_RESULT
uiBut * ui_but_drag_multi_edit_get(uiBut *but)
Definition: interface.cc:2661
void ui_popup_context_menu_for_panel(struct bContext *C, struct ARegion *region, struct Panel *panel)
struct uiWidgetBaseParameters uiWidgetBaseParameters
bool ATTR_WARN_UNUSED_RESULT
size_t ui_but_tip_len_only_first_line(const uiBut *but)
void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect)
struct uiSafetyRct uiSafetyRct
bool ui_region_contains_point_px(const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
void ui_block_to_window_rctf(const struct ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but)
struct uiListType * UI_UL_cache_file_layers(void)
void ui_block_to_window(const struct ARegion *region, uiBlock *block, int *x, int *y)
void ui_block_bounds_calc(uiBlock *block)
Definition: interface.cc:444
bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
struct ColorPicker ColorPicker
uiBut * ui_but_find_rect_over(const struct ARegion *region, const rcti *rect_px) ATTR_WARN_UNUSED_RESULT
void ui_but_anim_paste_driver(struct bContext *C)
struct uiButtonGroup uiButtonGroup
void ui_but_anim_flag(uiBut *but, const struct AnimationEvalContext *anim_eval_context)
void ui_but_anim_decorate_cb(struct bContext *C, void *arg_but, void *arg_dummy)
struct ARegion * ui_searchbox_create_generic(struct bContext *C, struct ARegion *butregion, uiButSearch *search_but)
struct uiButExtraOpIcon uiButExtraOpIcon
void ui_draw_widget_menu_back(const rcti *rect, bool use_shadow)
void ui_but_rna_menu_convert_to_menu_type(struct uiBut *but, const char *menu_type)
Definition: interface.cc:4514
bool ui_but_is_bool(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2397
void ui_draw_but_UNITVEC(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect, float radius)
void ui_window_to_region(const struct ARegion *region, int *x, int *y)
bool ui_but_anim_expression_create(uiBut *but, const char *str)
double ui_but_value_get(uiBut *but)
Definition: interface.cc:2492
void ui_but_clipboard_free(void)
struct uiButTab uiButTab
void ui_but_text_password_hide(char password_str[128], uiBut *but, bool restore)
struct ARegion * ui_searchbox_create_operator(struct bContext *C, struct ARegion *butregion, uiButSearch *search_but)
void UI_OT_eyedropper_driver(struct wmOperatorType *ot)
const char * ui_textedit_undo(struct uiUndoStack_Text *undo_stack, int direction, int *r_cursor_index)
void ui_color_picker_rgb_to_hsv(const float rgb[3], float r_cp[3])
void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3])
void ui_draw_popover_back(struct ARegion *region, struct uiStyle *style, uiBlock *block, rcti *rect)
int ui_but_menu_step(uiBut *but, int direction)
uiBut * ui_popup_menu_memory_get(struct uiBlock *block)
const char ui_radial_dir_to_numpad[8]
Definition: interface.cc:1555
void ui_draw_but(const struct bContext *C, struct ARegion *region, struct uiStyle *style, uiBut *but, rcti *rect)
void ui_hsvcube_pos_from_vals(const struct uiButHSVCube *hsv_but, const rcti *rect, const float *hsv, float *xp, float *yp)
void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle)
void ui_block_to_region_fl(const struct ARegion *region, uiBlock *block, float *r_x, float *r_y)
int ui_but_align_opposite_to_area_align_get(const struct ARegion *region) ATTR_WARN_UNUSED_RESULT
void ui_icon_ensure_deferred(const struct bContext *C, int icon_id, bool big)
uiBlock uiBlock * ui_block_find_mouse_over(const struct ARegion *region, const struct wmEvent *event, bool only_clip)
uiBlock * ui_popup_block_refresh(struct bContext *C, uiPopupBlockHandle *handle, struct ARegion *butregion, uiBut *but)
void ui_draw_gradient(const rcti *rect, const float hsv[3], eButGradientType type, float alpha)
uiBut * ui_list_row_find_from_index(const struct ARegion *region, int index, uiBut *listbox) ATTR_WARN_UNUSED_RESULT
void ui_but_anim_decorate_update_from_flag(uiButDecorator *but)
bool ui_but_rna_equals(const uiBut *a, const uiBut *b)
Definition: interface.cc:705
void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3])
Definition: interface.cc:3933
bool ui_but_is_toggle(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px)
void ui_draw_but_CURVEPROFILE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
uiBut * ui_but_find_old(uiBlock *block_old, const uiBut *but_new)
Definition: interface.cc:784
void ui_block_to_region_rctf(const struct ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
struct uiButHSVCube uiButHSVCube
void ui_resources_init(void)
Definition: resources.c:53
void ui_draw_dropshadow(const rctf *rct, float radius, float aspect, float alpha, int select)
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
bool ui_searchbox_inside(struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
void ui_but_string_get_ex(uiBut *but, char *str, size_t maxlen, int float_precision, bool use_exp_float, bool *r_use_exp_float) ATTR_NONNULL(1
bool ui_but_menu_draw_as_popover(const uiBut *but)
Definition: interface.cc:4494
void ui_but_value_set(uiBut *but, double value)
Definition: interface.cc:2557
void ui_panel_tag_search_filter_match(struct Panel *panel)
void ui_block_new_button_group(uiBlock *block, uiButtonGroupFlag flag)
struct uiButProgressbar uiButProgressbar
bool ui_but_contains_point_px_icon(const uiBut *but, struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
bool ui_but_rna_equals_ex(const uiBut *but, const PointerRNA *ptr, const PropertyRNA *prop, int index)
Definition: interface.cc:710
struct ARegion struct ARegion * ui_screen_region_find_mouse_over(struct bScreen *screen, const struct wmEvent *event)
void ui_layout_list_set_labels_active(uiLayout *layout)
void UI_OT_eyedropper_id(struct wmOperatorType *ot)
void ui_but_active_free(const struct bContext *C, uiBut *but)
bool ui_but_context_poll_operator_ex(struct bContext *C, const uiBut *but, const struct wmOperatorCallParams *optype_params)
struct ARegion * ui_searchbox_create_menu(struct bContext *C, struct ARegion *butregion, uiButSearch *search_but)
bool ui_jump_to_target_button_poll(struct bContext *C)
void ui_but_hsv_set(uiBut *but)
void ui_window_to_block_rctf(const struct ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
Definition: interface.cc:218
bool ui_but_is_interactive_ex(const uiBut *but, const bool labeledit, const bool for_tooltip)
void ui_region_to_window(const struct ARegion *region, int *x, int *y)
uiBut * ui_but_find_mouse_over(const struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
void ui_draw_but_IMAGE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
@ UI_PIE_DEGREES_RANGE_LARGE
@ UI_PIE_DRAG_STYLE
@ UI_PIE_INVALID_DIR
@ UI_PIE_ANIMATION_FINISHED
@ UI_PIE_CLICK_STYLE
@ UI_PIE_INITIAL_DIRECTION
@ UI_PIE_GESTURE_END_WAIT
struct uiButSearch uiButSearch
const struct uiWidgetColors * ui_tooltip_get_theme(void)
void ui_window_to_block(const struct ARegion *region, uiBlock *block, int *x, int *y)
void ui_hsvcircle_pos_from_vals(const ColorPicker *cpicker, const rcti *rect, const float *hsv, float *xpos, float *ypos)
bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen)
void UI_OT_eyedropper_depth(struct wmOperatorType *ot)
bool ui_but_is_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2376
bool ui_but_can_align(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_textedit_undo_stack_destroy(struct uiUndoStack_Text *undo_stack)
float ui_block_to_window_scale(const struct ARegion *region, uiBlock *block)
void ui_window_to_region_rctf(const struct ARegion *region, rctf *rect_dst, const rctf *rct_src)
void ui_searchbox_update(struct bContext *C, struct ARegion *region, uiBut *but, bool reset)
struct uiButDecorator uiButDecorator
void ui_but_anim_copy_driver(struct bContext *C)
void ui_pan_to_scroll(const struct wmEvent *event, int *type, int *val)
struct uiButColor uiButColor
bool ui_but_contains_pt(const uiBut *but, float mx, float my) ATTR_WARN_UNUSED_RESULT
ColorPicker * ui_block_colorpicker_create(struct uiBlock *block)
void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *arg_pt)
size_t ui_but_drawstr_without_sep_char(const uiBut *but, char *str, size_t str_maxlen) ATTR_NONNULL(1
struct uiButCurveMapping uiButCurveMapping
struct GPUBatch * ui_batch_roundbox_widget_get(void)
uiBut * ui_block_active_but_get(const uiBlock *block)
bool ui_but_contains_password(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_but_update_edited(uiBut *but)
Definition: interface.cc:3905
int ui_but_is_pushed(uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2253
bool ui_but_is_compatible(const uiBut *but_a, const uiBut *but_b) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2449
void ui_but_v3_set(uiBut *but, const float vec[3])
Definition: interface.cc:2338
void ui_interface_tag_script_reload_queries(void)
bool ui_but_is_editable(const uiBut *but) ATTR_WARN_UNUSED_RESULT
struct ARegion * ui_screen_region_find_mouse_over_ex(struct bScreen *screen, const int xy[2]) ATTR_NONNULL(1
void ui_but_v3_get(uiBut *but, float vec[3])
Definition: interface.cc:2291
bool ui_but_supports_cycling(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2484
void ui_textedit_undo_push(struct uiUndoStack_Text *undo_stack, const char *text, int cursor_index)
void ui_but_execute_begin(struct bContext *C, struct ARegion *region, uiBut *but, void **active_back)
void ui_block_free_views(struct uiBlock *block)
struct uiButColorBand uiButColorBand
struct wmKeyMap * eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf)
bool ui_but_is_interactive(const uiBut *but, bool labeledit) ATTR_WARN_UNUSED_RESULT
void ui_draw_but_WAVEFORM(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
uiBut * ui_but_find_select_in_enum(uiBut *but, int direction)
uiBut * ui_but_last(uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_color_picker_rgb_to_hsv_compat(const float rgb[3], float r_cp[3])
eBlockContentHints
@ UI_BLOCK_CONTAINS_SUBMENU_BUT
uiBut * ui_list_find_from_row(const struct ARegion *region, const uiBut *row_but) ATTR_WARN_UNUSED_RESULT
uiPopupBlockHandle * ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
void ui_fontscale(float *points, float aspect)
Definition: interface.cc:2014
void ui_button_group_add_but(uiBlock *block, uiBut *but)
uiBut * ui_region_find_first_but_test_flag(struct ARegion *region, int flag_include, int flag_exclude)
void ui_handle_afterfunc_add_operator(struct wmOperatorType *ot, wmOperatorCallContext opcontext)
void uiStyleInit(void)
struct uiListType * UI_UL_asset_view(void)
struct uiButCurveProfile uiButCurveProfile
uiBut * ui_but_prev(uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_item_menutype_func(struct bContext *C, struct uiLayout *layout, void *arg_mt)
void ui_draw_menu_item(const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int but_flag, uiMenuItemSeparatorType separator_type, int *r_xmax)
void ui_pie_menu_level_create(uiBlock *block, struct wmOperatorType *ot, const char *propname, struct IDProperty *properties, const EnumPropertyItem *items, int totitem, wmOperatorCallContext context, wmOperatorCallContext flag)
void ui_draw_tooltip_background(const struct uiStyle *style, uiBlock *block, rcti *rect)
void ui_but_pie_dir(RadialDirection dir, float vec[2])
int ui_id_icon_get(const struct bContext *C, struct ID *id, bool big)
bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, const int xy[2]) ATTR_NONNULL(1
struct ColorManagedDisplay * ui_block_cm_display_get(uiBlock *block)
Definition: interface.cc:3928
void ui_but_active_string_clear_and_exit(struct bContext *C, uiBut *but) ATTR_NONNULL()
void ui_popup_translate(struct ARegion *region, const int mdiff[2])
void ui_block_to_window_fl(const struct ARegion *region, uiBlock *block, float *x, float *y)
int ui_but_string_get_max_length(uiBut *but)
Definition: interface.cc:2653
void ui_but_override_flag(struct Main *bmain, uiBut *but)
Definition: interface.cc:1613
void ui_draw_aligned_panel(const struct uiStyle *style, const uiBlock *block, const rcti *rect, bool show_pin, bool show_background, bool region_search_filter_active)
PropertyScaleType ui_but_scale_type(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2389
int ui_but_icon(const uiBut *but)
bool ui_but_is_popover_once_compat(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void void ui_but_string_get(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL()
Definition: interface.cc:2911
bool ui_but_is_editable_as_text(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void UI_OT_eyedropper_colorramp(struct wmOperatorType *ot)
bool ui_but_string_set(struct bContext *C, uiBut *but, const char *str) ATTR_NONNULL()
Definition: interface.cc:3098
uiBut * ui_but_find_new(uiBlock *block_new, const uiBut *but_old)
Definition: interface.cc:794
bool ui_but_drag_is_draggable(const uiBut *but)
bool ui_but_anim_expression_set(uiBut *but, const char *str)
void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect)
Definition: interface.cc:342
bool ui_but_is_color_gamma(uiBut *but)
void ui_layout_remove_but(uiLayout *layout, const uiBut *but)
void ui_but_set_string_interactive(struct bContext *C, uiBut *but, const char *value)
bool int ui_searchbox_find_index(struct ARegion *region, const char *name)
void ui_but_rna_menu_convert_to_panel_type(struct uiBut *but, const char *panel_type)
Definition: interface.cc:4485
void ui_draw_preview_item(const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int but_flag, eFontStyle_Align text_align)
struct uiRNACollectionSearch uiRNACollectionSearch
const char ui_radial_dir_order[8]
Definition: interface.cc:1544
void ui_layout_add_but(uiLayout *layout, uiBut *but)
int ui_searchbox_autocomplete(struct bContext *C, struct ARegion *region, uiBut *but, char *str)
void ui_window_to_region_rcti(const struct ARegion *region, rcti *rect_dst, const rcti *rct_src)
uiBlock * ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but)
bool ui_but_is_unit(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.cc:2420
@ UI_BUT_DRAGPOIN_FREE
void icon_draw_rect_input(float x, float y, int w, int h, float alpha, short event_type, short event_value)
void UI_OT_eyedropper_color(struct wmOperatorType *ot)
void ui_but_activate_over(struct bContext *C, struct ARegion *region, uiBut *but)
@ ROUNDBOX_TRIA_CHECK
@ ROUNDBOX_TRIA_SCROLL
@ ROUNDBOX_TRIA_MENU
@ ROUNDBOX_TRIA_ARROWS
@ ROUNDBOX_TRIA_NONE
@ ROUNDBOX_TRIA_MAX
@ ROUNDBOX_TRIA_HOLD_ACTION_ARROW
void ui_resources_free(void)
Definition: resources.c:58
void ui_draw_but_VECTORSCOPE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
void ui_block_align_calc(uiBlock *block, const struct ARegion *region)
uiBut * ui_but_first(uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_popup_block_scrolltest(struct uiBlock *block)
struct GPUBatch * ui_batch_roundbox_shadow_get(void)
char * ui_but_string_get_dynamic(uiBut *but, int *r_str_size)
Definition: interface.cc:2916
struct ID * ui_template_id_liboverride_hierarchy_make(struct bContext *C, struct Main *bmain, struct ID *owner_id, struct ID *id, const char **r_undo_push_label)
void ui_searchbox_free(struct bContext *C, struct ARegion *region)
void ui_but_update_view_for_active(const struct bContext *C, const uiBlock *block)
struct uiButHotkeyEvent uiButHotkeyEvent
void ui_draw_but_TAB_outline(const rcti *rect, float rad, uchar highlight[3], uchar highlight_fade[3])
#define UI_PIXEL_AA_JITTER
uiBut * ui_list_find_mouse_over(const struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
void ui_but_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL()
Definition: interface.cc:2690
@ UI_ACTIVE
@ UI_SELECT_DRAW
@ UI_HIDDEN
@ UI_SCROLLED
@ UI_HAS_ICON
@ UI_SELECT
@ UI_SEARCH_FILTER_NO_MATCH
@ UI_BUT_ACTIVE_OVERRIDE
void ui_window_to_block_fl(const struct ARegion *region, uiBlock *block, float *x, float *y)
uiPopupBlockHandle * ui_popover_panel_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
uiMenuItemSeparatorType
@ UI_MENU_ITEM_SEPARATOR_NONE
@ UI_MENU_ITEM_SEPARATOR_HINT
@ UI_MENU_ITEM_SEPARATOR_SHORTCUT
void ui_draw_pie_center(uiBlock *block)
ccl_gpu_kernel_postfix ccl_global float int int int int float bool reset
clear internal cached data and reset random seed
static unsigned a[3]
Definition: RandGen.cpp:78
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken rgb("rgb", pxr::TfToken::Immortal)
static PyObject * create_func(PyObject *, PyObject *args)
Definition: python.cpp:156
bool use_luminosity_lock
float hsv_perceptual_init[3]
float hsv_scene_linear[3]
struct ColorPicker * prev
float hsv_perceptual[3]
struct ColorPicker * next
float luminosity_lock_value
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
float last_pos[2]
float pie_center_spawned[2]
const char * title
float pie_center_init[2]
float pie_dir[2]
double duration_gesture
float winmat[4][4]
eUIEmbossType emboss
void * func_argN
void * drawextra_arg2
bool tooltipdisabled
char display_device[64]
uiBlock * next
ListBase layouts
ListBase button_groups
uiButHandleNFunc funcN
bool is_color_gamma_picker
struct Panel * panel
struct UnitSettings * unit
void * drawextra_arg1
ColorPickerData color_pickers
ListBase saferct
uiBlock * oldblock
uiBlock * prev
uiPopupBlockHandle * handle
struct PieMenuData pie_data
uiBlockHandleFunc handle_func
double auto_open_last
int bounds_offset[2]
ListBase buttons
void * butm_func_arg
const char * lockstr
eBlockBoundsCalc bounds_type
uiBlockInteraction_CallbackData custom_interaction_callbacks
uiMenuHandleFunc butm_func
char name[UI_MAX_NAME_STR]
char _pad[5]
uiButHandleFunc func
struct wmOperator * ui_operator
char theme_style
void * handle_func_arg
short content_hints
ListBase butstore
struct uiLayout * curlayout
void * func_arg1
int(* block_event_func)(const struct bContext *C, struct uiBlock *, const struct wmEvent *)
void(* drawextra)(const struct bContext *C, void *idv, void *arg1, void *arg2, rcti *rect)
void * evil_C
void * func_arg2
ListBase views
ListBase contexts
struct ColorBand * edit_coba
struct CurveMapping * edit_cumap
eButGradientType gradient_type
struct CurveProfile * edit_profile
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
struct uiButExtraOpIcon * prev
struct uiButExtraOpIcon * next
struct wmOperatorCallParams * optype_params
eButGradientType gradient_type
uiButSearchUpdateFn items_update_fn
bool results_are_suggestions
const char * item_sep_string
uiButSearchCreateFn popup_create_fn
uiFreeArgFunc arg_free_fn
struct PointerRNA rnasearchpoin
uiButSearchTooltipFn item_tooltip_fn
struct PropertyRNA * rnasearchprop
uiButSearchContextMenuFn item_context_menu_fn
struct MenuType * menu
uiViewItemHandle * view_item
short selend
wmOperatorCallContext opcontext
const char * tip
uiButCompleteFunc autocomplete_func
struct bContextStore * context
ListBase extra_op_icons
struct uiBut * prev
void * custom_data
struct uiBut * next
uiButIdentityCompareFunc identity_cmp_func
uiButHandleNFunc funcN
void * func_arg2
RadialDirection pie_dir
struct uiHandleButtonData * active
short dragflag
void * rename_orig
float * editvec
void * dragpoin
char * editstr
eButType type
uchar menu_key
float softmin
double * editval
const void * pushed_state_arg
float hardmax
short strwidth
uiButHandleFunc func
eButPointerType pointype
bool changed
const char * disabled_info
uchar unit_type
void * tip_arg
uiBlock * block
eUIEmbossType emboss
short bitnr
uiMenuCreateFunc menu_create_func
char * poin
uiButToolTipFunc tip_func
void * func_arg1
short alignnr
short selsta
float hardmin
uiButHandleHoldFunc hold_func
void * hold_argN
short retval
struct ImBuf * imb
BIFIconID icon
struct PointerRNA * opptr
struct wmOperatorType * optype
uiButHandleRenameFunc rename_func
uiBlockCreateFunc block_create_func
uiFreeArgFunc tip_arg_free
float softmax
short iconadd
char dragtype
char drawstr[UI_MAX_DRAW_STR]
void * autofunc_arg
char strdata[UI_MAX_NAME_STR]
void * rename_arg1
uiMenuStepFunc menu_step_func
uiLayout * layout
struct PropertyRNA * rnaprop
float imb_scale
void * func_argN
char * str
uiButPushedStateFunc pushed_state_func
uchar col[4]
struct PointerRNA rnapoin
uiBlockHandleCreateFunc handle_create_func
struct ARegion * butregion
uiBlockCreateFunc create_func
uiFreeArgFunc arg_free
struct ARegion * region
struct wmTimer * scrolltimer
struct ARegion * ctx_region
struct wmOperator * popup_op
struct uiKeyNavLock keynav_state
struct ScrArea * ctx_area
struct uiPopupBlockCreate popup_create_vars
void(* cancel_func)(struct bContext *C, void *arg)
void(* popup_func)(struct bContext *C, void *arg, int event)
struct uiSafetyRct * next
struct uiSafetyRct * prev
#define undo_stack
Definition: undo_system.c:32
int xy[2]
Definition: wm_draw.c:135
PointerRNA * ptr
Definition: wm_files.c:3480
wmOperatorType * ot
Definition: wm_files.c:3479