Blender  V2.93
interface_intern.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "BLI_compiler_attrs.h"
27 #include "BLI_rect.h"
28 
29 #include "DNA_listBase.h"
30 #include "RNA_types.h"
31 #include "UI_interface.h"
32 #include "UI_resources.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 struct ARegion;
40 struct CurveMapping;
41 struct CurveProfile;
42 struct ID;
43 struct ImBuf;
44 struct Scene;
45 struct bContext;
46 struct bContextStore;
47 struct uiHandleButtonData;
48 struct uiLayout;
49 struct uiStyle;
50 struct uiUndoStack_Text;
51 struct uiWidgetColors;
52 struct wmEvent;
53 struct wmKeyConfig;
54 struct wmOperatorType;
55 struct wmTimer;
56 
57 /* ****************** general defines ************** */
58 
59 #define RNA_NO_INDEX -1
60 #define RNA_ENUM_VALUE -2
61 
62 #define UI_MENU_PADDING (int)(0.2f * UI_UNIT_Y)
63 
64 #define UI_MENU_WIDTH_MIN (UI_UNIT_Y * 9)
65 /* some extra padding added to menus containing submenu icons */
66 #define UI_MENU_SUBMENU_PADDING (6 * UI_DPI_FAC)
67 
68 /* menu scrolling */
69 #define UI_MENU_SCROLL_ARROW (12 * UI_DPI_FAC)
70 #define UI_MENU_SCROLL_MOUSE (UI_MENU_SCROLL_ARROW + 2 * UI_DPI_FAC)
71 #define UI_MENU_SCROLL_PAD (4 * UI_DPI_FAC)
72 
73 /* panel limits */
74 #define UI_PANEL_MINX 100
75 #define UI_PANEL_MINY 70
76 
77 /* popover width (multiplied by 'U.widget_unit') */
78 #define UI_POPOVER_WIDTH_UNITS 10
79 
80 /* uiBut->flag */
81 enum {
82  UI_SELECT = (1 << 0), /* use when the button is pressed */
83  UI_SCROLLED = (1 << 1), /* temp hidden, scrolled away */
84  UI_ACTIVE = (1 << 2),
85  UI_HAS_ICON = (1 << 3),
86  UI_HIDDEN = (1 << 4),
87  UI_SELECT_DRAW = (1 << 5), /* Display selected, doesn't impact interaction. */
90  /* warn: rest of uiBut->flag in UI_interface.h */
91 };
92 
93 /* uiBut->dragflag */
94 enum {
96 };
97 
98 /* but->pie_dir */
99 typedef enum RadialDirection {
110 
111 extern const char ui_radial_dir_order[8];
112 extern const char ui_radial_dir_to_numpad[8];
113 extern const short ui_radial_dir_to_angle[8];
114 
115 /* internal panel drawing defines */
116 #define PNL_HEADER (UI_UNIT_Y * 1.2) /* 24 default */
117 
118 /* bit button defines */
119 /* Bit operations */
120 #define UI_BITBUT_TEST(a, b) (((a) & (1 << (b))) != 0)
121 #define UI_BITBUT_VALUE_TOGGLED(a, b) ((a) ^ (1 << (b)))
122 #define UI_BITBUT_VALUE_ENABLED(a, b) ((a) | (1 << (b)))
123 #define UI_BITBUT_VALUE_DISABLED(a, b) ((a) & ~(1 << (b)))
124 
125 /* bit-row */
126 #define UI_BITBUT_ROW(min, max) \
127  (((max) >= 31 ? 0xFFFFFFFF : (1 << ((max) + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0))
128 
129 /* split numbuts by ':' and align l/r */
130 #define USE_NUMBUTS_LR_ALIGN
131 
132 /* Use new 'align' computation code. */
133 #define USE_UIBUT_SPATIAL_ALIGN
134 
135 /* PieMenuData->flags */
136 enum {
142  UI_PIE_DRAG_STYLE = (1 << 2),
144  UI_PIE_INVALID_DIR = (1 << 3),
146  UI_PIE_CLICK_STYLE = (1 << 4),
151 };
152 
153 #define PIE_CLICK_THRESHOLD_SQ 50.0f
154 
155 /* max amount of items a radial menu (pie menu) can contain */
156 #define PIE_MAX_ITEMS 8
157 
158 struct uiBut {
159  struct uiBut *next, *prev;
160 
161  /* Pointer back to the layout item holding this button. */
167  short ofs, pos, selsta, selend;
168 
169  char *str;
172 
173  rctf rect; /* block relative coords */
174 
175  char *poin;
177 
178  /* both these values use depends on the button type
179  * (polymorphic struct or union would be nicer for this stuff) */
180 
187  float a1;
188 
195  float a2;
196 
197  uchar col[4];
198 
200  void *func_arg1;
201  void *func_arg2;
202 
204  void *func_argN;
205 
207 
210 
212  void *rename_arg1;
213  void *rename_orig;
214 
217  void *hold_argN;
218 
219  const char *tip;
221  void *tip_argN;
222 
224  const char *disabled_info;
225 
230  signed char pie_dir;
232  bool changed;
236  short iconadd;
237 
238  /* UI_BTYPE_BLOCK data */
240 
241  /* UI_BTYPE_PULLDOWN/UI_BTYPE_MENU data */
243 
245 
246  /* RNA data */
247  struct PointerRNA rnapoin;
249  int rnaindex;
250 
251  /* Operator data */
253  struct PointerRNA *opptr;
254  short opcontext;
255  uchar menu_key; /* 'a'-'z', always lower case */
256 
257  ListBase extra_op_icons; /* uiButExtraOpIcon */
258 
259  /* Draggable data, type is WM_DRAG_... */
260  char dragtype;
261  short dragflag;
262  void *dragpoin;
263  struct ImBuf *imb;
264  float imb_scale;
265 
266  /* active button data */
268 
269  /* Custom button data. */
270  void *custom_data;
271 
272  char *editstr;
273  double *editval;
274  float *editvec;
275 
278 
279  /* pointer back */
281 };
282 
284 typedef struct uiButNumber {
286 
287  float step_size;
288  float precision;
290 
292 typedef struct uiButColor {
294 
298 
300 typedef struct uiButTab {
302  struct MenuType *menu;
304 
306 typedef struct uiButSearch {
308 
311  void *item_active;
312 
313  void *arg;
315 
318 
319  const char *item_sep_string;
320 
321  struct PointerRNA rnasearchpoin;
323 
330 
332 typedef struct uiButDecorator {
334 
335  struct PointerRNA rnapoin;
337  int rnaindex;
339 
341 typedef struct uiButProgressbar {
343 
344  /* 0..1 range */
345  float progress;
347 
349 typedef struct uiButHSVCube {
351 
354 
356 typedef struct uiButColorBand {
358 
361 
363 typedef struct uiButCurveProfile {
365 
368 
370 typedef struct uiButCurveMapping {
372 
376 
380 typedef struct uiButExtraOpIcon {
382 
385 
388 
389 typedef struct ColorPicker {
390  struct ColorPicker *next, *prev;
391 
395  float hsv_perceptual[3];
398  bool is_init;
399 
404 
411 
412 typedef struct ColorPickerData {
415 
416 struct PieMenuData {
418  const char *title;
419  int icon;
420 
421  float pie_dir[2];
422  float pie_center_init[2];
424  float last_pos[2];
426  int flags;
428  short event_type;
429  float alphafac;
430 };
431 
432 /* uiBlock.content_hints */
437 };
438 
445 typedef struct uiButtonGroup {
446  void *next, *prev;
447  ListBase buttons; /* #LinkData with #uiBut data field. */
448  short flag;
450 
451 /* #uiButtonGroup.flag. */
452 typedef enum uiButtonGroupFlag {
458 
459 struct uiBlock {
461 
463  struct Panel *panel;
465 
466  ListBase butstore; /* UI_butstore_* runtime function */
467 
468  ListBase button_groups; /* #uiButtonGroup. */
469 
472 
474 
476 
477  float winmat[4][4];
478 
480  float aspect;
481 
482  uint puphash; /* popup menu hash for memory */
483 
485  void *func_arg1;
486  void *func_arg2;
487 
489  void *func_argN;
490 
493 
496 
497  /* custom extra handling */
498  int (*block_event_func)(const struct bContext *C, struct uiBlock *, const struct wmEvent *);
499 
500  /* extra draw function for custom blocks */
501  void (*drawextra)(const struct bContext *C, void *idv, void *arg1, void *arg2, rcti *rect);
504 
505  int flag;
506  short alignnr;
510  short content_hints; /* eBlockContentHints */
511 
512  char direction;
517  bool auto_open;
518  char _pad[5];
520 
521  const char *lockstr;
522 
523  bool lock;
525  bool active;
529  bool endblock;
530 
537 
542 
543  uiPopupBlockHandle *handle; /* handle */
544 
548 
550  void *evil_C;
551 
557 
558  bool is_color_gamma_picker; /* Block for color picker with gamma baked in. */
559 
563  char display_device[64];
564 
565  struct PieMenuData pie_data;
566 };
567 
568 typedef struct uiSafetyRct {
569  struct uiSafetyRct *next, *prev;
573 
574 /* interface.c */
575 
576 void ui_fontscale(short *points, float aspect);
577 
578 extern void ui_block_to_window_fl(const struct ARegion *region,
579  uiBlock *block,
580  float *x,
581  float *y);
582 extern void ui_block_to_window(const struct ARegion *region, uiBlock *block, int *x, int *y);
583 extern void ui_block_to_window_rctf(const struct ARegion *region,
584  uiBlock *block,
585  rctf *rct_dst,
586  const rctf *rct_src);
587 extern float ui_block_to_window_scale(const struct ARegion *region, uiBlock *block);
588 extern void ui_window_to_block_fl(const struct ARegion *region,
589  uiBlock *block,
590  float *x,
591  float *y);
592 extern void ui_window_to_block(const struct ARegion *region, uiBlock *block, int *x, int *y);
593 extern void ui_window_to_block_rctf(const struct ARegion *region,
594  uiBlock *block,
595  rctf *rct_dst,
596  const rctf *rct_src);
597 extern void ui_window_to_region(const struct ARegion *region, int *x, int *y);
598 extern void ui_window_to_region_rcti(const struct ARegion *region,
599  rcti *rect_dst,
600  const rcti *rct_src);
601 extern void ui_region_to_window(const struct ARegion *region, int *x, int *y);
602 extern void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect);
603 
604 uiBut *ui_but_change_type(uiBut *but, eButType new_type);
605 
606 extern double ui_but_value_get(uiBut *but);
607 extern void ui_but_value_set(uiBut *but, double value);
608 extern void ui_but_hsv_set(uiBut *but);
609 extern void ui_but_v3_get(uiBut *but, float vec[3]);
610 extern void ui_but_v3_set(uiBut *but, const float vec[3]);
611 
612 extern void ui_hsvcircle_vals_from_pos(
613  const rcti *rect, const float mx, const float my, float *r_val_rad, float *r_val_dist);
614 extern void ui_hsvcircle_pos_from_vals(
615  const ColorPicker *cpicker, const rcti *rect, const float *hsv, float *xpos, float *ypos);
617  const struct uiButHSVCube *hsv_but, const rcti *rect, const float *hsv, float *xp, float *yp);
618 
619 extern void ui_but_string_get_ex(uiBut *but,
620  char *str,
621  const size_t maxlen,
622  const int float_precision,
623  const bool use_exp_float,
624  bool *r_use_exp_float) ATTR_NONNULL(1, 2);
625 extern void ui_but_string_get(uiBut *but, char *str, const size_t maxlen) ATTR_NONNULL();
626 extern char *ui_but_string_get_dynamic(uiBut *but, int *r_str_size);
627 extern void ui_but_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL();
628 extern bool ui_but_string_set(struct bContext *C, uiBut *but, const char *str) ATTR_NONNULL();
629 extern bool ui_but_string_eval_number(struct bContext *C,
630  const uiBut *but,
631  const char *str,
632  double *value) ATTR_NONNULL();
633 extern int ui_but_string_get_max_length(uiBut *but);
634 /* Clear & exit the active button's string. */
637 
638 void ui_def_but_icon(uiBut *but, const int icon, const int flag);
639 void ui_def_but_icon_clear(uiBut *but);
640 
642 
643 extern void ui_but_rna_menu_convert_to_panel_type(struct uiBut *but, const char *panel_type);
644 extern void ui_but_rna_menu_convert_to_menu_type(struct uiBut *but, const char *menu_type);
645 extern bool ui_but_menu_draw_as_popover(const uiBut *but);
646 
647 void ui_but_range_set_hard(uiBut *but);
648 void ui_but_range_set_soft(uiBut *but);
649 
650 bool ui_but_context_poll_operator(struct bContext *C, struct wmOperatorType *ot, const uiBut *but);
651 
652 extern void ui_but_update(uiBut *but);
653 extern void ui_but_update_edited(uiBut *but);
654 extern bool ui_but_is_float(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
655 extern bool ui_but_is_bool(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
656 extern bool ui_but_is_unit(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
657 extern bool ui_but_is_compatible(const uiBut *but_a, const uiBut *but_b) ATTR_WARN_UNUSED_RESULT;
660 
661 extern int ui_but_is_pushed_ex(uiBut *but, double *value) ATTR_WARN_UNUSED_RESULT;
663 
664 void ui_but_override_flag(struct Main *bmain, uiBut *but);
665 
666 extern void ui_block_bounds_calc(uiBlock *block);
667 
669 void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3]);
670 
671 /* interface_regions.c */
672 
673 struct uiKeyNavLock {
674  /* Set when we're using key-input. */
675  bool is_keynav;
676  /* only used to check if we've moved the cursor */
677  int event_xy[2];
678 };
679 
680 typedef uiBlock *(*uiBlockHandleCreateFunc)(struct bContext *C,
681  struct uiPopupBlockHandle *handle,
682  void *arg1);
683 
687  void *arg;
688  void (*arg_free)(void *arg);
689 
690  int event_xy[2];
691 
692  /* when popup is initialized from a button */
695 };
696 
698  /* internal */
699  struct ARegion *region;
700 
701  /* use only for 'UI_BLOCK_MOVEMOUSE_QUIT' popups */
702  float towards_xy[2];
703  double towardstime;
704  bool dotowards;
705 
706  bool popup;
707  void (*popup_func)(struct bContext *C, void *arg, int event);
708  void (*cancel_func)(struct bContext *C, void *arg);
709  void *popup_arg;
710 
711  /* store data for refreshing popups */
713  /* true if we can re-create the popup using 'popup_create_vars' */
715  bool refresh;
716 
719 
720  struct uiKeyNavLock keynav_state;
721 
722  /* for operator popups */
724  struct ScrArea *ctx_area;
726 
727  /* return values */
730  int retvalue;
731  float retvec[4];
732 
733  /* menu direction */
735 
736  /* Previous values so we don't resize or reposition on refresh. */
741 
742  /* Maximum estimated size to avoid having to reposition on refresh. */
744 
745  /* #ifdef USE_DRAG_POPUP */
746  bool is_grab;
747  int grab_xy_prev[2];
748  /* #endif */
749 };
750 
751 /* -------------------------------------------------------------------- */
752 /* interface_region_*.c */
753 
754 /* interface_region_tooltip.c */
755 /* exposed as public API in UI_interface.h */
756 
757 /* interface_region_color_picker.c */
758 void ui_color_picker_rgb_to_hsv_compat(const float rgb[3], float r_cp[3]);
759 void ui_color_picker_rgb_to_hsv(const float rgb[3], float r_cp[3]);
760 void ui_color_picker_hsv_to_rgb(const float r_cp[3], float rgb[3]);
761 
762 bool ui_but_is_color_gamma(uiBut *but);
763 
764 void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3]);
765 void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3]);
766 
767 uiBlock *ui_block_func_COLOR(struct bContext *C, uiPopupBlockHandle *handle, void *arg_but);
769 
770 /* interface_region_search.c */
771 /* Search-box for string button. */
773  struct ARegion *butregion,
774  uiButSearch *search_but);
776  struct ARegion *butregion,
777  uiButSearch *search_but);
779  struct ARegion *butregion,
780  uiButSearch *search_but);
781 
782 bool ui_searchbox_inside(struct ARegion *region, int x, int y);
783 int ui_searchbox_find_index(struct ARegion *region, const char *name);
784 void ui_searchbox_update(struct bContext *C, struct ARegion *region, uiBut *but, const bool reset);
785 int ui_searchbox_autocomplete(struct bContext *C, struct ARegion *region, uiBut *but, char *str);
787  struct ARegion *region,
788  uiBut *but,
789  struct ARegion *butregion,
790  const struct wmEvent *event);
791 bool ui_searchbox_apply(uiBut *but, struct ARegion *region);
792 void ui_searchbox_free(struct bContext *C, struct ARegion *region);
794 
795 /* interface_region_menu_popup.c */
796 int ui_but_menu_step(uiBut *but, int direction);
797 bool ui_but_menu_step_poll(const uiBut *but);
798 uiBut *ui_popup_menu_memory_get(struct uiBlock *block);
799 void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but);
800 
802  uiPopupBlockHandle *handle,
803  struct ARegion *butregion,
804  uiBut *but);
805 
807  struct ARegion *butregion,
808  uiBut *but,
810  uiBlockHandleCreateFunc handle_create_func,
811  void *arg,
812  void (*arg_free)(void *arg));
814  struct ARegion *butregion,
815  uiBut *but,
816  uiMenuCreateFunc menu_func,
817  void *arg);
818 
819 /* interface_region_popover.c */
821  struct ARegion *butregion,
822  uiBut *but,
823  uiMenuCreateFunc menu_func,
824  void *arg);
825 
826 /* interface_region_menu_pie.c */
828  struct wmOperatorType *ot,
829  const char *propname,
830  struct IDProperty *properties,
831  const EnumPropertyItem *items,
832  int totitem,
833  int context,
834  int flag);
835 
836 /* interface_region_popup.c */
837 void ui_popup_translate(struct ARegion *region, const int mdiff[2]);
838 void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle);
839 void ui_popup_block_scrolltest(struct uiBlock *block);
840 
841 /* end interface_region_*.c */
842 
843 /* interface_panel.c */
844 extern int ui_handler_panel_region(struct bContext *C,
845  const struct wmEvent *event,
846  struct ARegion *region,
847  const uiBut *active_but);
848 extern void ui_draw_aligned_panel(const struct uiStyle *style,
849  const uiBlock *block,
850  const rcti *rect,
851  const bool show_pin,
852  const bool show_background,
853  const bool region_search_filter_active);
854 void ui_panel_tag_search_filter_match(struct Panel *panel);
855 
856 /* interface_draw.c */
857 extern void ui_draw_dropshadow(
858  const rctf *rct, float radius, float aspect, float alpha, int select);
859 
860 void ui_draw_gradient(const rcti *rect,
861  const float hsv[3],
862  const eButGradientType type,
863  const float alpha);
864 
865 void ui_draw_but_TAB_outline(const rcti *rect,
866  float rad,
867  uchar highlight[3],
868  uchar highlight_fade[3]);
869 void ui_draw_but_HISTOGRAM(struct ARegion *region,
870  uiBut *but,
871  const struct uiWidgetColors *wcol,
872  const rcti *rect);
873 void ui_draw_but_WAVEFORM(struct ARegion *region,
874  uiBut *but,
875  const struct uiWidgetColors *wcol,
876  const rcti *rect);
877 void ui_draw_but_VECTORSCOPE(struct ARegion *region,
878  uiBut *but,
879  const struct uiWidgetColors *wcol,
880  const rcti *rect);
881 void ui_draw_but_COLORBAND(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect);
882 void ui_draw_but_UNITVEC(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect);
883 void ui_draw_but_CURVE(struct ARegion *region,
884  uiBut *but,
885  const struct uiWidgetColors *wcol,
886  const rcti *rect);
887 void ui_draw_but_CURVEPROFILE(struct ARegion *region,
888  uiBut *but,
889  const struct uiWidgetColors *wcol,
890  const rcti *rect);
891 void ui_draw_but_IMAGE(struct ARegion *region,
892  uiBut *but,
893  const struct uiWidgetColors *wcol,
894  const rcti *rect);
895 void ui_draw_but_TRACKPREVIEW(struct ARegion *region,
896  uiBut *but,
897  const struct uiWidgetColors *wcol,
898  const rcti *rect);
899 
900 /* interface_undo.c */
904  const char *text,
905  int cursor_index);
906 const char *ui_textedit_undo(struct uiUndoStack_Text *undo_stack,
907  int direction,
908  int *r_cursor_index);
909 
910 /* interface_handlers.c */
912  int opcontext,
913  bool create_props);
914 extern void ui_pan_to_scroll(const struct wmEvent *event, int *type, int *val);
915 extern void ui_but_activate_event(struct bContext *C, struct ARegion *region, uiBut *but);
916 extern void ui_but_activate_over(struct bContext *C, struct ARegion *region, uiBut *but);
917 extern void ui_but_execute_begin(struct bContext *C,
918  struct ARegion *region,
919  uiBut *but,
920  void **active_back);
921 extern void ui_but_execute_end(struct bContext *C,
922  struct ARegion *region,
923  uiBut *but,
924  void *active_back);
925 extern void ui_but_active_free(const struct bContext *C, uiBut *but);
926 extern int ui_but_menu_direction(uiBut *but);
927 extern void ui_but_text_password_hide(char password_str[UI_MAX_DRAW_STR],
928  uiBut *but,
929  const bool restore);
930 extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction);
931 bool ui_but_is_editing(const uiBut *but);
932 float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]);
933 
934 void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip);
935 void ui_but_clipboard_free(void);
936 bool ui_but_rna_equals(const uiBut *a, const uiBut *b);
937 bool ui_but_rna_equals_ex(const uiBut *but,
938  const PointerRNA *ptr,
939  const PropertyRNA *prop,
940  int index);
941 uiBut *ui_but_find_old(uiBlock *block_old, const uiBut *but_new);
942 uiBut *ui_but_find_new(uiBlock *block_new, const uiBut *but_old);
943 
944 #ifdef WITH_INPUT_IME
945 void ui_but_ime_reposition(uiBut *but, int x, int y, bool complete);
946 struct wmIMEData *ui_but_ime_data_get(uiBut *but);
947 #endif
948 
949 /* interface_widgets.c */
950 
951 /* Widget shader parameters, must match the shader layout. */
952 typedef struct uiWidgetBaseParameters {
954  float radi, rad;
955  float facxi, facyi;
956  float round_corners[4];
959  float color_tria[4];
962  float shade_dir;
963  /* We pack alpha check and discard factor in alpha_discard.
964  * If the value is negative then we do alpha check.
965  * The absolute value itself is the discard factor.
966  * Initialize value to 1.0f if you don't want discard. */
968  float tria_type;
969  float _pad[3];
971 
972 enum {
979 
980  ROUNDBOX_TRIA_MAX, /* don't use */
981 };
982 
985 
986 void ui_draw_anti_tria_rect(const rctf *rect, char dir, const float color[4]);
987 void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
988 void ui_draw_box_opaque(rcti *rect, int roundboxalign);
989 void ui_draw_popover_back(struct ARegion *region,
990  struct uiStyle *style,
991  uiBlock *block,
992  rcti *rect);
993 void ui_draw_pie_center(uiBlock *block);
994 const struct uiWidgetColors *ui_tooltip_get_theme(void);
995 
996 void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const float color[4]);
997 void ui_draw_widget_menu_back(const rcti *rect, bool use_shadow);
998 void ui_draw_tooltip_background(const struct uiStyle *style, uiBlock *block, rcti *rect);
999 
1000 extern void ui_draw_but(const struct bContext *C,
1001  struct ARegion *region,
1002  struct uiStyle *style,
1003  uiBut *but,
1004  rcti *rect);
1005 
1011 typedef enum {
1020 void ui_draw_menu_item(const struct uiFontStyle *fstyle,
1021  rcti *rect,
1022  const char *name,
1023  int iconid,
1024  int state,
1025  uiMenuItemSeparatorType separator_type,
1026  int *r_xmax);
1028  const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state);
1029 
1030 #define UI_TEXT_MARGIN_X 0.4f
1031 #define UI_POPUP_MARGIN (UI_DPI_FAC * 12)
1032 /* Margin at top of screen for popups. Note this value must be sufficient
1033  to draw a popover arrow to avoid cropping it. */
1034 #define UI_POPUP_MENU_TOP (int)(10 * UI_DPI_FAC)
1035 
1036 #define UI_PIXEL_AA_JITTER 8
1037 extern const float ui_pixel_jitter[UI_PIXEL_AA_JITTER][2];
1038 
1039 /* interface_style.c */
1040 void uiStyleInit(void);
1041 
1042 /* interface_icons.c */
1043 void ui_icon_ensure_deferred(const struct bContext *C, const int icon_id, const bool big);
1044 int ui_id_icon_get(const struct bContext *C, struct ID *id, const bool big);
1045 
1046 /* interface_icons_event.c */
1048  float x, float y, int w, int h, float alpha, short event_type, short event_value);
1049 
1050 /* resources.c */
1051 void ui_resources_init(void);
1052 void ui_resources_free(void);
1053 
1054 /* interface_layout.c */
1055 void ui_layout_add_but(uiLayout *layout, uiBut *but);
1056 bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but);
1058  PointerRNA *ptr,
1059  PropertyRNA *prop,
1060  PointerRNA *searchptr,
1061  PropertyRNA *searchprop);
1063 /* menu callback */
1064 void ui_item_menutype_func(struct bContext *C, struct uiLayout *layout, void *arg_mt);
1065 void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *arg_pt);
1066 
1067 /* interface_button_group.c */
1069 void ui_button_group_add_but(uiBlock *block, uiBut *but);
1070 void ui_button_group_replace_but_ptr(uiBlock *block, const void *old_but_ptr, uiBut *new_but);
1072 
1073 /* interface_align.c */
1076 void ui_block_align_calc(uiBlock *block, const struct ARegion *region);
1077 
1078 /* interface_anim.c */
1079 void ui_but_anim_flag(uiBut *but, const struct AnimationEvalContext *anim_eval_context);
1080 void ui_but_anim_copy_driver(struct bContext *C);
1081 void ui_but_anim_paste_driver(struct bContext *C);
1082 bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen);
1083 bool ui_but_anim_expression_set(uiBut *but, const char *str);
1084 bool ui_but_anim_expression_create(uiBut *but, const char *str);
1085 void ui_but_anim_autokey(struct bContext *C, uiBut *but, struct Scene *scene, float cfra);
1086 
1087 void ui_but_anim_decorate_cb(struct bContext *C, void *arg_but, void *arg_dummy);
1089 
1090 /* interface_query.c */
1094 bool ui_but_is_interactive(const uiBut *but, const bool labeledit) ATTR_WARN_UNUSED_RESULT;
1097 int ui_but_icon(const uiBut *but);
1098 void ui_but_pie_dir(RadialDirection dir, float vec[2]);
1099 
1101 
1102 bool ui_but_contains_pt(const uiBut *but, float mx, float my) ATTR_WARN_UNUSED_RESULT;
1103 bool ui_but_contains_rect(const uiBut *but, const rctf *rect);
1105  struct ARegion *region,
1106  const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT;
1107 bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, int x, int y)
1109 
1111  const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT;
1112 
1114  const int x,
1115  const int y,
1116  const bool labeledit) ATTR_WARN_UNUSED_RESULT;
1117 uiBut *ui_but_find_mouse_over(const struct ARegion *region,
1118  const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT;
1119 uiBut *ui_but_find_rect_over(const struct ARegion *region,
1120  const rcti *rect_px) ATTR_WARN_UNUSED_RESULT;
1121 
1123 
1125 
1126 size_t ui_but_drawstr_len_without_sep_char(const uiBut *but);
1127 size_t ui_but_tip_len_only_first_line(const uiBut *but);
1128 
1133 
1138 
1140  const int x,
1141  const int y,
1142  bool only_clip);
1144  const struct wmEvent *event,
1145  bool only_clip);
1146 
1148  int flag_include,
1149  int flag_exclude);
1151 bool ui_region_contains_point_px(const struct ARegion *region,
1152  int x,
1154 bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px);
1155 
1156 struct ARegion *ui_screen_region_find_mouse_over_ex(struct bScreen *screen, int x, int y);
1158  const struct wmEvent *event);
1159 
1160 /* interface_context_menu.c */
1161 bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but);
1163  struct ARegion *region,
1164  struct Panel *panel);
1165 
1166 /* interface_eyedropper.c */
1167 struct wmKeyMap *eyedropper_modal_keymap(struct wmKeyConfig *keyconf);
1168 struct wmKeyMap *eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf);
1169 
1170 /* interface_eyedropper_color.c */
1172 
1173 /* interface_eyedropper_colorband.c */
1176 
1177 /* interface_eyedropper_datablock.c */
1178 void UI_OT_eyedropper_id(struct wmOperatorType *ot);
1179 
1180 /* interface_eyedropper_depth.c */
1182 
1183 /* interface_eyedropper_driver.c */
1185 
1186 /* interface_eyedropper_gpencil_color.c */
1188 
1192 typedef struct uiRNACollectionSearch {
1195 
1198 
1200  /* Let UI_butstore_ API update search_but pointer above over redraws. */
1202  /* Block has to be stored for freeing butstore (uiBut.block doesn't work with undo). */
1205 void ui_rna_collection_search_update_fn(const struct bContext *C,
1206  void *arg,
1207  const char *str,
1208  uiSearchItems *items,
1209  const bool is_first);
1210 
1211 /* interface_ops.c */
1213 
1214 /* interface_queries.c */
1216 
1217 #ifdef __cplusplus
1218 }
1219 #endif
#define ATTR_NONNULL(...)
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
These structs are the foundation for all linked lists in the library system.
GPUBatch
Definition: GPU_batch.h:93
_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 y
#define C
Definition: RandGen.cpp:39
eUIEmbossType
Definition: UI_interface.h:106
struct ARegion *(* uiButSearchCreateFn)(struct bContext *C, struct ARegion *butregion, struct uiButSearch *search_but)
Definition: UI_interface.h:499
int(* uiButCompleteFunc)(struct bContext *C, char *str, void *arg)
Definition: UI_interface.h:496
void(* uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2)
Definition: UI_interface.h:494
void(* uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but)
Definition: UI_interface.h:495
void(* uiBlockHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:525
void(* uiButSearchUpdateFn)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
Definition: UI_interface.h:505
char *(* uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip)
Definition: UI_interface.h:522
void(* uiButSearchArgFreeFn)(void *arg)
Definition: UI_interface.h:510
int(* uiButPushedStateFunc)(struct bContext *C, void *arg)
Definition: UI_interface.h:523
#define UI_MAX_DRAW_STR
Definition: UI_interface.h:90
eBlockBoundsCalc
Definition: UI_interface.h:694
struct ARegion *(* uiButSearchTooltipFn)(struct bContext *C, struct ARegion *region, const struct rcti *item_rect, void *arg, void *active)
Definition: UI_interface.h:515
void(* uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr)
Definition: UI_interface.h:493
void(* uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2)
Definition: UI_interface.h:492
eButGradientType
Definition: UI_interface.h:398
bool(* uiButSearchContextMenuFn)(struct bContext *C, void *arg, void *active, const struct wmEvent *event)
Definition: UI_interface.h:511
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
Definition: UI_interface.h:529
void(* uiMenuHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:530
bool(* uiMenuStepFunc)(struct bContext *C, int direction, void *arg1)
Definition: UI_interface.h:537
eButPointerType
Definition: UI_interface.h:320
eButType
Definition: UI_interface.h:333
#define UI_MAX_NAME_STR
Definition: UI_interface.h:91
uiBlock *(* uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1)
Definition: UI_interface.h:619
BIFIconID
Definition: UI_resources.h:34
static PyObject * create_func(PyObject *, PyObject *args)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
void reset()
clear internal cached data and reset random seed
Scene scene
static CCL_NAMESPACE_BEGIN const double alpha
#define str(s)
@ ROUNDBOX_TRIA_CHECK
@ ROUNDBOX_TRIA_SCROLL
@ ROUNDBOX_TRIA_MENU
@ ROUNDBOX_TRIA_ARROWS
@ ROUNDBOX_TRIA_NONE
@ ROUNDBOX_TRIA_MAX
@ ROUNDBOX_TRIA_HOLD_ACTION_ARROW
const float ui_pixel_jitter[UI_PIXEL_AA_JITTER][2]
@ UI_BUT_DRAGPOIN_FREE
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.c:3194
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.c:1642
int ui_but_is_pushed_ex(uiBut *but, double *value) ATTR_WARN_UNUSED_RESULT
Definition: interface.c:2106
void ui_draw_menu_item(const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state, uiMenuItemSeparatorType separator_type, int *r_xmax)
void ui_but_execute_end(struct bContext *C, struct ARegion *region, uiBut *but, void *active_back)
bool ui_but_is_cursor_warp(const uiBut *but) ATTR_WARN_UNUSED_RESULT
size_t ui_but_drawstr_len_without_sep_char(const uiBut *but)
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.c:2411
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)
int ui_but_menu_direction(uiBut *but)
const short ui_radial_dir_to_angle[8]
Definition: interface.c:1523
void ui_draw_but_COLORBAND(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
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)
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])
uiBut * ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop)
int ui_id_icon_get(const struct bContext *C, struct ID *id, const bool big)
void ui_but_range_set_soft(uiBut *but)
Definition: interface.c:3219
void ui_but_update(uiBut *but)
Definition: interface.c:3811
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)
struct ARegion * ui_screen_region_find_mouse_over_ex(struct bScreen *screen, int x, int y)
void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const float color[4])
void ui_draw_but_UNITVEC(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
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)
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.c:3935
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.c:1824
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)
uiBut * ui_but_find_mouse_over_ex(const struct ARegion *region, const int x, const int y, const bool labeledit) ATTR_WARN_UNUSED_RESULT
struct uiButNumber uiButNumber
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)
bool ui_but_contains_point_px(const uiBut *but, const struct ARegion *region, int x, int y) ATTR_WARN_UNUSED_RESULT
bool ui_but_string_eval_number(struct bContext *C, const uiBut *but, const char *str, double *value) ATTR_NONNULL()
Definition: interface.c:2984
bool ui_but_has_array_value(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_def_but_icon_clear(uiBut *but)
Definition: interface.c:4169
bool ui_but_contains_rect(const uiBut *but, const rctf *rect)
void ui_but_search_refresh(uiButSearch *but)
uiBut * ui_but_next(uiBut *but) ATTR_WARN_UNUSED_RESULT
uiBut * ui_but_drag_multi_edit_get(uiBut *but)
Definition: interface.c:2600
void ui_popup_context_menu_for_panel(struct bContext *C, struct ARegion *region, struct Panel *panel)
struct uiWidgetBaseParameters uiWidgetBaseParameters
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
PointerRNA * ui_handle_afterfunc_add_operator(struct wmOperatorType *ot, int opcontext, bool create_props)
@ 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
void ui_block_to_window_rctf(const struct ARegion *region, uiBlock *block, rctf *rct_dst, const rctf *rct_src)
void ui_icon_ensure_deferred(const struct bContext *C, const int icon_id, const bool big)
bool ui_layout_replace_but_ptr(uiLayout *layout, const void *old_but_ptr, uiBut *new_but)
void ui_block_to_window(const struct ARegion *region, uiBlock *block, int *x, int *y)
void ui_block_bounds_calc(uiBlock *block)
Definition: interface.c:441
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)
void ui_draw_gradient(const rcti *rect, const float hsv[3], const eButGradientType type, const float alpha)
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_preview_item(const struct uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state)
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.c:4396
bool ui_but_is_bool(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.c:2330
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.c:2431
void ui_but_clipboard_free(void)
struct uiButTab uiButTab
void ui_def_but_icon(uiBut *but, const int icon, const int flag)
Definition: interface.c:4153
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_draw_anti_tria_rect(const rctf *rect, char dir, const float color[4])
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.c:1522
void ui_draw_but(const struct bContext *C, struct ARegion *region, struct uiStyle *style, uiBut *but, rcti *rect)
int ui_searchbox_find_index(struct ARegion *region, const char *name)
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)
int ui_but_align_opposite_to_area_align_get(const struct ARegion *region) ATTR_WARN_UNUSED_RESULT
uiBlock * ui_popup_block_refresh(struct bContext *C, uiPopupBlockHandle *handle, struct ARegion *butregion, uiBut *but)
void ui_pie_menu_level_create(uiBlock *block, struct wmOperatorType *ot, const char *propname, struct IDProperty *properties, const EnumPropertyItem *items, int totitem, int context, int flag)
void ui_but_anim_decorate_update_from_flag(uiButDecorator *but)
bool ui_but_rna_equals(const uiBut *a, const uiBut *b)
Definition: interface.c:672
void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3])
Definition: interface.c:3844
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.c:726
void ui_searchbox_update(struct bContext *C, struct ARegion *region, uiBut *but, const bool reset)
struct uiButHSVCube uiButHSVCube
void ui_resources_init(void)
Definition: resources.c:69
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_but_menu_draw_as_popover(const uiBut *but)
Definition: interface.c:4376
void ui_but_value_set(uiBut *but, double value)
Definition: interface.c:2496
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.c:677
uiBut * ui_list_find_mouse_over_ex(struct ARegion *region, int x, int y) ATTR_WARN_UNUSED_RESULT
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)
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.c:217
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_rna_collection_search_update_fn(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
void ui_draw_but_IMAGE(struct ARegion *region, uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect)
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)
uiBlock * ui_block_find_mouse_over(const struct ARegion *region, const struct wmEvent *event, bool only_clip)
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.c:2317
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)
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)
bool ui_searchbox_inside(struct ARegion *region, int x, int y)
bool ui_but_is_interactive(const uiBut *but, const bool labeledit) ATTR_WARN_UNUSED_RESULT
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)
struct uiButCurveMapping uiButCurveMapping
struct GPUBatch * ui_batch_roundbox_widget_get(void)
bool ui_but_contains_password(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_but_update_edited(uiBut *but)
Definition: interface.c:3816
int ui_but_is_pushed(uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.c:2191
bool ui_but_is_compatible(const uiBut *but_a, const uiBut *but_b) ATTR_WARN_UNUSED_RESULT
Definition: interface.c:2385
void ui_but_v3_set(uiBut *but, const float vec[3])
Definition: interface.c:2279
void ui_draw_aligned_panel(const struct uiStyle *style, const uiBlock *block, const rcti *rect, const bool show_pin, const bool show_background, const bool region_search_filter_active)
void ui_interface_tag_script_reload_queries(void)
bool ui_but_is_editable(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void ui_but_v3_get(uiBut *but, float vec[3])
Definition: interface.c:2230
bool ui_but_supports_cycling(const uiBut *but) ATTR_WARN_UNUSED_RESULT
Definition: interface.c:2423
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)
struct uiButColorBand uiButColorBand
struct wmKeyMap * eyedropper_colorband_modal_keymap(struct wmKeyConfig *keyconf)
void ui_hsvcircle_vals_from_pos(const rcti *rect, const float mx, const float my, float *r_val_rad, float *r_val_dist)
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])
uiBut * ui_list_find_mouse_over(struct ARegion *region, const struct wmEvent *event) ATTR_WARN_UNUSED_RESULT
eBlockContentHints
@ UI_BLOCK_CONTAINS_SUBMENU_BUT
uiPopupBlockHandle * ui_popup_menu_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg)
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 uiStyleInit(void)
struct uiButCurveProfile uiButCurveProfile
uiBut * ui_but_prev(uiBut *but) ATTR_WARN_UNUSED_RESULT
struct ARegion * ui_screen_region_find_mouse_over(struct bScreen *screen, const struct wmEvent *event)
void ui_item_menutype_func(struct bContext *C, struct uiLayout *layout, void *arg_mt)
void ui_draw_tooltip_background(const struct uiStyle *style, uiBlock *block, rcti *rect)
void ui_but_pie_dir(RadialDirection dir, float vec[2])
void ui_draw_box_opaque(rcti *rect, int roundboxalign)
struct ColorManagedDisplay * ui_block_cm_display_get(uiBlock *block)
Definition: interface.c:3839
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.c:2592
void ui_but_override_flag(struct Main *bmain, uiBut *but)
Definition: interface.c:1580
uiBlock * ui_block_find_mouse_over_ex(const struct ARegion *region, const int x, const int y, bool only_clip)
bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but)
bool ui_region_contains_point_px(const struct ARegion *region, int x, int y) ATTR_WARN_UNUSED_RESULT
int ui_but_icon(const uiBut *but)
bool ui_but_is_popover_once_compat(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_but_is_editable_as_text(const uiBut *but) ATTR_WARN_UNUSED_RESULT
void UI_OT_eyedropper_colorramp(struct wmOperatorType *ot)
void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip)
Definition: interface.c:1136
bool ui_but_string_set(struct bContext *C, uiBut *but, const char *str) ATTR_NONNULL()
Definition: interface.c:3038
uiBut * ui_but_find_new(uiBlock *block_new, const uiBut *but_old)
Definition: interface.c:736
void void ui_but_string_get(uiBut *but, char *str, const size_t maxlen) ATTR_NONNULL()
Definition: interface.c:2847
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.c:339
bool ui_but_is_color_gamma(uiBut *but)
void ui_but_rna_menu_convert_to_panel_type(struct uiBut *but, const char *panel_type)
Definition: interface.c:4367
void ui_but_text_password_hide(char password_str[UI_MAX_DRAW_STR], uiBut *but, const bool restore)
struct uiRNACollectionSearch uiRNACollectionSearch
uiPopupBlockHandle * ui_popup_block_create(struct bContext *C, struct ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg, void(*arg_free)(void *arg))
const char ui_radial_dir_order[8]
Definition: interface.c:1511
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)
void ui_but_string_get_ex(uiBut *but, char *str, const size_t maxlen, const int float_precision, const bool use_exp_float, bool *r_use_exp_float) ATTR_NONNULL(1
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.c:2353
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)
void ui_resources_free(void)
Definition: resources.c:74
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.c:2858
void ui_searchbox_free(struct bContext *C, struct ARegion *region)
@ UI_ACTIVE
@ UI_SELECT_DRAW
@ UI_HIDDEN
@ UI_SCROLLED
@ UI_HAS_ICON
@ UI_SELECT
@ UI_SEARCH_FILTER_NO_MATCH
void ui_draw_but_TAB_outline(const rcti *rect, float rad, uchar highlight[3], uchar highlight_fade[3])
#define UI_PIXEL_AA_JITTER
void ui_but_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) ATTR_NONNULL()
Definition: interface.c:2630
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_fontscale(short *points, float aspect)
Definition: interface.c:1943
void ui_draw_pie_center(uiBlock *block)
static ulong state[N]
static unsigned a[3]
Definition: RandGen.cpp:92
struct SELECTID_Context context
Definition: select_engine.c:47
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:273
Definition: BKE_main.h:116
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
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 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
uiButSearchArgFreeFn arg_free_fn
uiButSearchCreateFn popup_create_fn
struct PointerRNA rnasearchpoin
uiButSearchTooltipFn item_tooltip_fn
struct PropertyRNA * rnasearchprop
uiButSearchContextMenuFn item_context_menu_fn
struct MenuType * menu
short selend
const char * tip
uiButCompleteFunc autocomplete_func
struct bContextStore * context
ListBase extra_op_icons
struct uiBut * prev
void * custom_data
struct uiBut * next
short modifier_key
uiButHandleNFunc funcN
void * func_arg2
struct uiHandleButtonData * active
short dragflag
void * rename_orig
float * editvec
void * dragpoin
char * editstr
eButType type
uchar menu_key
float softmin
double * editval
float hardmax
short strwidth
uiButHandleFunc func
signed char pie_dir
eButPointerType pointype
bool changed
const char * disabled_info
uchar unit_type
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
void * tip_argN
float softmax
short iconadd
short opcontext
char dragtype
char drawstr[UI_MAX_DRAW_STR]
void * autofunc_arg
char strdata[UI_MAX_NAME_STR]
void * rename_arg1
uiMenuStepFunc menu_step_func
void * pushed_state_arg
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
void(* arg_free)(void *arg)
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:46
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: util_avxb.h:167
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156