Blender  V2.93
UI_interface.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_sys_types.h" /* size_t */
28 #include "UI_interface_icons.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /* Struct Declarations */
35 
36 struct ARegion;
37 struct AutoComplete;
38 struct EnumPropertyItem;
39 struct FileSelectParams;
40 struct ID;
41 struct IDProperty;
42 struct ImBuf;
43 struct Image;
44 struct ImageUser;
45 struct ListBase;
46 struct MTex;
47 struct Panel;
48 struct PanelType;
49 struct PointerRNA;
50 struct PropertyRNA;
51 struct ReportList;
52 struct ResultBLF;
53 struct bContext;
54 struct bContextStore;
55 struct bNode;
56 struct bNodeSocket;
57 struct bNodeTree;
58 struct bScreen;
59 struct rctf;
60 struct rcti;
61 struct uiButSearch;
62 struct uiFontStyle;
63 struct uiList;
64 struct uiStyle;
65 struct uiWidgetColors;
66 struct wmDrag;
67 struct wmDropBox;
68 struct wmEvent;
69 struct wmGizmo;
70 struct wmKeyConfig;
71 struct wmKeyMap;
72 struct wmKeyMapItem;
73 struct wmMsgBus;
74 struct wmOperator;
75 struct wmOperatorType;
76 struct wmWindow;
77 
78 typedef struct uiBlock uiBlock;
79 typedef struct uiBut uiBut;
80 typedef struct uiLayout uiLayout;
82 
83 /* Defines */
84 
85 /* char for splitting strings, aligning shortcuts in menus, users never see */
86 #define UI_SEP_CHAR '|'
87 #define UI_SEP_CHAR_S "|"
88 
89 /* names */
90 #define UI_MAX_DRAW_STR 400
91 #define UI_MAX_NAME_STR 128
92 #define UI_MAX_SHORTCUT_STR 64
93 
100 #define UI_REGION_OVERLAP_MARGIN (U.widget_unit / 3)
101 
102 /* use for clamping popups within the screen */
103 #define UI_SCREEN_MARGIN 10
104 
106 typedef enum eUIEmbossType {
107  UI_EMBOSS = 0, /* use widget style for drawing */
108  UI_EMBOSS_NONE = 1, /* Nothing, only icon and/or text */
109  UI_EMBOSS_PULLDOWN = 2, /* Pull-down menu style */
110  UI_EMBOSS_RADIAL = 3, /* Pie Menu */
116 
117  UI_EMBOSS_UNDEFINED = 255, /* For layout engine, use emboss from block. */
119 
120 /* uiBlock->direction */
121 enum {
122  UI_DIR_UP = 1 << 0,
123  UI_DIR_DOWN = 1 << 1,
124  UI_DIR_LEFT = 1 << 2,
125  UI_DIR_RIGHT = 1 << 3,
126  UI_DIR_CENTER_X = 1 << 4,
127  UI_DIR_CENTER_Y = 1 << 5,
128 
130 };
131 
132 #if 0
133 /* uiBlock->autofill (not yet used) */
134 # define UI_BLOCK_COLLUMNS 1
135 # define UI_BLOCK_ROWS 2
136 #endif
137 
139 enum {
140  UI_BLOCK_LOOP = 1 << 0,
150  UI_BLOCK_POPUP = 1 << 9,
151  UI_BLOCK_OUT_1 = 1 << 10,
154  /* Stop handling mouse events. */
156 
157  /* block->flag bits 14-17 are identical to but->drawflag bits */
158 
161  UI_BLOCK_RADIAL = 1 << 20,
162  UI_BLOCK_POPOVER = 1 << 21,
171 };
172 
174 enum {
178  UI_RETURN_OK = 1 << 1,
180  UI_RETURN_OUT = 1 << 2,
187 };
188 
189 /* but->flag - general state flags. */
190 enum {
194 
197  UI_BUT_DRAG_LOCK = 1 << 10,
199  UI_BUT_DISABLED = 1 << 11,
200 
201  UI_BUT_ANIMATED = 1 << 13,
203  UI_BUT_DRIVEN = 1 << 15,
204  UI_BUT_REDALERT = 1 << 16,
206  UI_BUT_INACTIVE = 1 << 17,
208  UI_BUT_UNDO = 1 << 19,
209  UI_BUT_IMMEDIATE = 1 << 20,
210  UI_BUT_NO_UTF8 = 1 << 21,
211 
216 
218  UI_BUT_LIST_ITEM = 1 << 24,
220  UI_BUT_DRAG_MULTI = 1 << 25,
223 
232 
234  UI_BUT_OVERRIDDEN = 1u << 31u,
235 };
236 
237 /* Default font size for normal text. */
238 #define UI_DEFAULT_TEXT_POINTS 11
239 
240 /* Larger size used for title text. */
241 #define UI_DEFAULT_TITLE_POINTS 12
242 
243 #define UI_PANEL_WIDTH 340
244 #define UI_COMPACT_PANEL_WIDTH 160
245 #define UI_SIDEBAR_PANEL_WIDTH 220
246 #define UI_NAVIGATION_REGION_WIDTH UI_COMPACT_PANEL_WIDTH
247 #define UI_NARROW_NAVIGATION_REGION_WIDTH 100
248 
249 #define UI_PANEL_CATEGORY_MARGIN_WIDTH (U.widget_unit * 1.0f)
250 
251 #define UI_PANEL_BOX_STYLE_MARGIN (U.widget_unit * 0.2f)
252 
253 /* but->drawflag - these flags should only affect how the button is drawn. */
254 /* Note: currently, these flags _are not passed_ to the widget's state() or draw() functions
255  * (except for the 'align' ones)!
256  */
257 enum {
266 
267  /* Button align flag, for drawing groups together.
268  * Used in 'uiBlock.flag', take care! */
269  UI_BUT_ALIGN_TOP = 1 << 14,
270  UI_BUT_ALIGN_LEFT = 1 << 15,
272  UI_BUT_ALIGN_DOWN = 1 << 17,
274  /* end bits shared with 'uiBlock.flag' */
275 
284 
286  UI_BUT_BOX_ITEM = 1 << 20,
287 
292 
293  /* (also used by search buttons to enforce shortcut display for their items). */
296 
299 
302 
303  /* Draw the checkbox buttons inverted. */
305 };
306 
307 /* scale fixed button widths by this to account for DPI */
308 
309 #define UI_DPI_FAC (U.dpi_fac)
310 /* 16 to copy ICON_DEFAULT_HEIGHT */
311 #define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_FAC)
312 
320 typedef enum {
325  /* UI_BUT_POIN_FUNCTION = 192, */ /*UNUSED*/
326  UI_BUT_POIN_BIT = 256, /* OR'd with a bit index*/
328 
329 /* requires (but->poin != NULL) */
330 #define UI_BUT_POIN_TYPES (UI_BUT_POIN_FLOAT | UI_BUT_POIN_SHORT | UI_BUT_POIN_CHAR)
331 
332 /* assigned to but->type, OR'd with the flags above when passing args */
333 typedef enum {
334  UI_BTYPE_BUT = 1 << 9,
335  UI_BTYPE_ROW = 2 << 9,
336  UI_BTYPE_TEXT = 3 << 9,
338  UI_BTYPE_MENU = 4 << 9,
341  UI_BTYPE_NUM = 6 << 9,
344  UI_BTYPE_TOGGLE = 8 << 9,
351  UI_BTYPE_CHECKBOX = 13 << 9,
353  UI_BTYPE_COLOR = 15 << 9,
354  UI_BTYPE_TAB = 16 << 9,
355  UI_BTYPE_POPOVER = 17 << 9,
356  UI_BTYPE_SCROLL = 18 << 9,
357  UI_BTYPE_BLOCK = 19 << 9,
358  UI_BTYPE_LABEL = 20 << 9,
360  UI_BTYPE_HSVCUBE = 26 << 9,
362  UI_BTYPE_PULLDOWN = 27 << 9,
363  UI_BTYPE_ROUNDBOX = 28 << 9,
366  UI_BTYPE_UNITVEC = 31 << 9,
367  UI_BTYPE_CURVE = 32 << 9,
370  UI_BTYPE_LISTBOX = 36 << 9,
371  UI_BTYPE_LISTROW = 37 << 9,
374 
377  UI_BTYPE_EXTRA = 42 << 9,
380  UI_BTYPE_IMAGE = 47 << 9,
382  UI_BTYPE_WAVEFORM = 49 << 9,
386  UI_BTYPE_SEPR = 54 << 9,
391  UI_BTYPE_GRIP = 57 << 9,
393 } eButType;
394 
395 #define BUTTYPE (63 << 9)
396 
398 typedef enum eButGradientType {
405 
409 
410 /* Drawing
411  *
412  * Functions to draw various shapes, taking theme settings into account.
413  * Used for code that draws its own UI style elements. */
414 
415 void UI_draw_anti_tria(
416  float x1, float y1, float x2, float y2, float x3, float y3, const float color[4]);
417 void UI_draw_anti_fan(float tri_array[][2], unsigned int length, const float color[4]);
418 
420 void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4]);
421 void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4]);
422 void UI_draw_roundbox_3ub_alpha(const struct rctf *rect,
423  bool filled,
424  float rad,
425  const unsigned char col[3],
426  unsigned char alpha);
428  const struct rctf *rect, bool filled, float rad, const float col[3], float alpha);
429 void UI_draw_roundbox_shade_x(const struct rctf *rect,
430  bool filled,
431  float rad,
432  float shadetop,
433  float shadedown,
434  const float col[4]);
435 void UI_draw_roundbox_4fv_ex(const struct rctf *rect,
436  const float inner1[4],
437  const float inner2[4],
438  float shade_dir,
439  const float outline[4],
440  float outline_width,
441  float rad);
442 
443 #if 0 /* unused */
444 int UI_draw_roundbox_corner_get(void);
445 #endif
446 
447 void UI_draw_box_shadow(const struct rctf *rect, unsigned char alpha);
448 void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4]);
449 
451  const struct rctf *rect,
452  const float title_aspect[2],
453  const float action_aspect[2]);
454 
456 enum {
460 };
462  const struct rcti *rect,
463  const struct rcti *slider,
464  int state);
465 
466 /* Shortening string helper. */
467 float UI_text_clip_middle_ex(const struct uiFontStyle *fstyle,
468  char *str,
469  float okwidth,
470  const float minwidth,
471  const size_t max_len,
472  const char rpart_sep);
473 
490 typedef struct uiSearchItems uiSearchItems;
491 
492 typedef void (*uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2);
493 typedef void (*uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr);
494 typedef void (*uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2);
495 typedef void (*uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but);
496 typedef int (*uiButCompleteFunc)(struct bContext *C, char *str, void *arg);
497 
498 /* Search types. */
499 typedef struct ARegion *(*uiButSearchCreateFn)(struct bContext *C,
500  struct ARegion *butregion,
501  struct uiButSearch *search_but);
502 /* `is_first` is typically used to ignore search filtering when the menu is first opened in order
503  * to display the full list of options. The value will be false after the button's text is edited
504  * (for every call except the first). */
505 typedef void (*uiButSearchUpdateFn)(const struct bContext *C,
506  void *arg,
507  const char *str,
508  uiSearchItems *items,
509  const bool is_first);
510 typedef void (*uiButSearchArgFreeFn)(void *arg);
511 typedef bool (*uiButSearchContextMenuFn)(struct bContext *C,
512  void *arg,
513  void *active,
514  const struct wmEvent *event);
515 typedef struct ARegion *(*uiButSearchTooltipFn)(struct bContext *C,
516  struct ARegion *region,
517  const struct rcti *item_rect,
518  void *arg,
519  void *active);
520 
521 /* Must return allocated string. */
522 typedef char *(*uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip);
523 typedef int (*uiButPushedStateFunc)(struct bContext *C, void *arg);
524 
525 typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
526 
527 /* Menu Callbacks */
528 
529 typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1);
530 typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event);
537 typedef bool (*uiMenuStepFunc)(struct bContext *C, int direction, void *arg1);
538 
539 /* interface_query.c */
540 bool UI_but_has_tooltip_label(const uiBut *but);
541 bool UI_but_is_tool(const uiBut *but);
542 bool UI_but_is_utf8(const uiBut *but);
543 #define UI_but_is_decorator(but) ((but)->type == UI_BTYPE_DECORATOR)
544 
545 bool UI_block_is_empty_ex(const uiBlock *block, const bool skip_title);
546 bool UI_block_is_empty(const uiBlock *block);
548 
549 /* interface_region_menu_popup.c */
558 typedef struct uiPopupMenu uiPopupMenu;
559 
560 uiPopupMenu *UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL();
562  const char *title,
563  const char *block_name,
564  int icon) ATTR_NONNULL();
565 void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup);
566 bool UI_popup_menu_end_or_cancel(struct bContext *C, struct uiPopupMenu *head);
568 
569 void UI_popup_menu_reports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL();
570 int UI_popup_menu_invoke(struct bContext *C, const char *idname, struct ReportList *reports)
571  ATTR_NONNULL(1, 2);
572 
573 void UI_popup_menu_retval_set(const uiBlock *block, const int retval, const bool enable);
574 void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *but);
575 
576 /* interface_region_popover.c */
577 
578 typedef struct uiPopover uiPopover;
579 
581  const char *idname,
582  bool keep_open,
583  struct ReportList *reports);
584 
585 uiPopover *UI_popover_begin(struct bContext *C, int menu_width, bool from_active_button)
586  ATTR_NONNULL(1);
587 void UI_popover_end(struct bContext *C, struct uiPopover *pup, struct wmKeyMap *keymap);
588 struct uiLayout *UI_popover_layout(uiPopover *pup);
590 
591 /* interface_region_menu_pie.c */
592 /* Pie menus */
593 typedef struct uiPieMenu uiPieMenu;
594 
595 int UI_pie_menu_invoke(struct bContext *C, const char *idname, const struct wmEvent *event);
597  const char *title,
598  const char *opname,
599  const char *propname,
600  const struct wmEvent *event);
602  const char *title,
603  const char *path,
604  const struct wmEvent *event);
605 
607  const char *title,
608  int icon,
609  const struct wmEvent *event) ATTR_NONNULL();
610 void UI_pie_menu_end(struct bContext *C, uiPieMenu *pie);
611 struct uiLayout *UI_pie_menu_layout(struct uiPieMenu *pie);
612 
613 /* interface_region_menu_popup.c */
614 
615 /* Popup Blocks
616  *
617  * Functions used to create popup blocks. These are like popup menus
618  * but allow using all button types and creating an own layout. */
619 typedef uiBlock *(*uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1);
620 typedef void (*uiBlockCancelFunc)(struct bContext *C, void *arg1);
621 
622 void UI_popup_block_invoke(struct bContext *C,
623  uiBlockCreateFunc func,
624  void *arg,
625  void (*arg_free)(void *arg));
626 void UI_popup_block_invoke_ex(struct bContext *C,
627  uiBlockCreateFunc func,
628  void *arg,
629  void (*arg_free)(void *arg),
630  bool can_refresh);
631 void UI_popup_block_ex(struct bContext *C,
632  uiBlockCreateFunc func,
633  uiBlockHandleFunc popup_func,
634  uiBlockCancelFunc cancel_func,
635  void *arg,
636  struct wmOperator *op);
637 #if 0 /* UNUSED */
638 void uiPupBlockOperator(struct bContext *C,
639  uiBlockCreateFunc func,
640  struct wmOperator *op,
641  int opcontext);
642 #endif
643 
644 void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *block);
645 
646 bool UI_popup_block_name_exists(const struct bScreen *screen, const char *name);
647 
648 /* Blocks
649  *
650  * Functions for creating, drawing and freeing blocks. A Block is a
651  * container of buttons and used for various purposes.
652  *
653  * Begin/Define Buttons/End/Draw is the typical order in which these
654  * function should be called, though for popup blocks Draw is left out.
655  * Freeing blocks is done by the screen/ module automatically.
656  */
657 
659  struct ARegion *region,
660  const char *name,
661  eUIEmbossType emboss);
662 void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2], int r_xy[2]);
663 void UI_block_end(const struct bContext *C, uiBlock *block);
664 void UI_block_draw(const struct bContext *C, struct uiBlock *block);
665 void UI_blocklist_update_window_matrix(const struct bContext *C, const struct ListBase *lb);
666 void UI_blocklist_draw(const struct bContext *C, const struct ListBase *lb);
667 void UI_block_update_from_old(const struct bContext *C, struct uiBlock *block);
668 
669 enum {
672 };
673 void UI_block_theme_style_set(uiBlock *block, char theme_style);
674 char UI_block_emboss_get(uiBlock *block);
675 void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss);
676 bool UI_block_is_search_only(const uiBlock *block);
677 void UI_block_set_search_only(uiBlock *block, bool search_only);
678 
679 void UI_block_free(const struct bContext *C, uiBlock *block);
680 void UI_blocklist_free(const struct bContext *C, struct ListBase *lb);
681 void UI_blocklist_free_inactive(const struct bContext *C, struct ListBase *lb);
682 void UI_screen_free_active_but(const struct bContext *C, struct bScreen *screen);
683 
684 void UI_block_region_set(uiBlock *block, struct ARegion *region);
685 
686 void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr);
687 void UI_block_lock_clear(uiBlock *block);
688 
689 /* automatic aligning, horiz or verical */
690 void UI_block_align_begin(uiBlock *block);
691 void UI_block_align_end(uiBlock *block);
692 
693 /* block bounds/position calculation */
694 typedef enum {
703 
704 void UI_block_bounds_set_normal(struct uiBlock *block, int addval);
705 void UI_block_bounds_set_text(uiBlock *block, int addval);
706 void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2]);
707 void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2]);
708 void UI_block_bounds_set_centered(uiBlock *block, int addval);
709 void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy);
710 
711 int UI_blocklist_min_y_get(struct ListBase *lb);
712 
713 void UI_block_direction_set(uiBlock *block, char direction);
714 void UI_block_order_flip(uiBlock *block);
715 void UI_block_flag_enable(uiBlock *block, int flag);
716 void UI_block_flag_disable(uiBlock *block, int flag);
717 void UI_block_translate(uiBlock *block, int x, int y);
718 
720 
721 void UI_but_drag_set_id(uiBut *but, struct ID *id);
722 void UI_but_drag_set_asset(uiBut *but,
723  const char *name,
724  const char *path,
725  int id_type,
726  int icon,
727  struct ImBuf *imb,
728  float scale);
729 void UI_but_drag_set_rna(uiBut *but, struct PointerRNA *ptr);
730 void UI_but_drag_set_path(uiBut *but, const char *path, const bool use_free);
731 void UI_but_drag_set_name(uiBut *but, const char *name);
732 void UI_but_drag_set_value(uiBut *but);
734  uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, const bool use_free);
735 
736 bool UI_but_active_drop_name(struct bContext *C);
737 bool UI_but_active_drop_color(struct bContext *C);
738 
739 void UI_but_flag_enable(uiBut *but, int flag);
740 void UI_but_flag_disable(uiBut *but, int flag);
741 bool UI_but_flag_is_set(uiBut *but, int flag);
742 
743 void UI_but_drawflag_enable(uiBut *but, int flag);
744 void UI_but_drawflag_disable(uiBut *but, int flag);
745 
746 void UI_but_disable(uiBut *but, const char *disabled_hint);
747 
749 
750 /* special button case, only draw it when used actively, for outliner etc */
751 bool UI_but_active_only_ex(const struct bContext *C,
752  struct ARegion *region,
753  uiBlock *block,
754  uiBut *but,
755  const bool remove_on_failure);
756 bool UI_but_active_only(const struct bContext *C,
757  struct ARegion *region,
758  uiBlock *block,
759  uiBut *but);
761  struct ARegion *region,
762  struct uiBlock *block);
763 
764 void UI_but_execute(const struct bContext *C, struct ARegion *region, uiBut *but);
765 
766 bool UI_but_online_manual_id(const uiBut *but,
767  char *r_str,
768  size_t maxlength) ATTR_WARN_UNUSED_RESULT;
770  char *r_str,
771  size_t maxlength) ATTR_WARN_UNUSED_RESULT;
772 bool UI_but_is_userdef(const uiBut *but);
773 
774 /* Buttons
775  *
776  * Functions to define various types of buttons in a block. Postfixes:
777  * - F: float
778  * - I: int
779  * - S: short
780  * - C: char
781  * - R: RNA
782  * - O: operator */
783 
784 uiBut *uiDefBut(uiBlock *block,
785  int type,
786  int retval,
787  const char *str,
788  int x,
789  int y,
790  short width,
791  short height,
792  void *poin,
793  float min,
794  float max,
795  float a1,
796  float a2,
797  const char *tip);
798 uiBut *uiDefButF(uiBlock *block,
799  int type,
800  int retval,
801  const char *str,
802  int x,
803  int y,
804  short width,
805  short height,
806  float *poin,
807  float min,
808  float max,
809  float a1,
810  float a2,
811  const char *tip);
812 uiBut *uiDefButBitF(uiBlock *block,
813  int type,
814  int bit,
815  int retval,
816  const char *str,
817  int x,
818  int y,
819  short width,
820  short height,
821  float *poin,
822  float min,
823  float max,
824  float a1,
825  float a2,
826  const char *tip);
827 uiBut *uiDefButI(uiBlock *block,
828  int type,
829  int retval,
830  const char *str,
831  int x,
832  int y,
833  short width,
834  short height,
835  int *poin,
836  float min,
837  float max,
838  float a1,
839  float a2,
840  const char *tip);
841 uiBut *uiDefButBitI(uiBlock *block,
842  int type,
843  int bit,
844  int retval,
845  const char *str,
846  int x,
847  int y,
848  short width,
849  short height,
850  int *poin,
851  float min,
852  float max,
853  float a1,
854  float a2,
855  const char *tip);
856 uiBut *uiDefButS(uiBlock *block,
857  int type,
858  int retval,
859  const char *str,
860  int x,
861  int y,
862  short width,
863  short height,
864  short *poin,
865  float min,
866  float max,
867  float a1,
868  float a2,
869  const char *tip);
870 uiBut *uiDefButBitS(uiBlock *block,
871  int type,
872  int bit,
873  int retval,
874  const char *str,
875  int x,
876  int y,
877  short width,
878  short height,
879  short *poin,
880  float min,
881  float max,
882  float a1,
883  float a2,
884  const char *tip);
885 uiBut *uiDefButC(uiBlock *block,
886  int type,
887  int retval,
888  const char *str,
889  int x,
890  int y,
891  short width,
892  short height,
893  char *poin,
894  float min,
895  float max,
896  float a1,
897  float a2,
898  const char *tip);
899 uiBut *uiDefButBitC(uiBlock *block,
900  int type,
901  int bit,
902  int retval,
903  const char *str,
904  int x,
905  int y,
906  short width,
907  short height,
908  char *poin,
909  float min,
910  float max,
911  float a1,
912  float a2,
913  const char *tip);
914 uiBut *uiDefButR(uiBlock *block,
915  int type,
916  int retval,
917  const char *str,
918  int x,
919  int y,
920  short width,
921  short height,
922  struct PointerRNA *ptr,
923  const char *propname,
924  int index,
925  float min,
926  float max,
927  float a1,
928  float a2,
929  const char *tip);
931  int type,
932  int retval,
933  const char *str,
934  int x,
935  int y,
936  short width,
937  short height,
938  struct PointerRNA *ptr,
939  struct PropertyRNA *prop,
940  int index,
941  float min,
942  float max,
943  float a1,
944  float a2,
945  const char *tip);
946 uiBut *uiDefButO(uiBlock *block,
947  int type,
948  const char *opname,
949  int opcontext,
950  const char *str,
951  int x,
952  int y,
953  short width,
954  short height,
955  const char *tip);
956 uiBut *uiDefButO_ptr(uiBlock *block,
957  int type,
958  struct wmOperatorType *ot,
959  int opcontext,
960  const char *str,
961  int x,
962  int y,
963  short width,
964  short height,
965  const char *tip);
966 
967 uiBut *uiDefIconBut(uiBlock *block,
968  int type,
969  int retval,
970  int icon,
971  int x,
972  int y,
973  short width,
974  short height,
975  void *poin,
976  float min,
977  float max,
978  float a1,
979  float a2,
980  const char *tip);
981 uiBut *uiDefIconButF(uiBlock *block,
982  int type,
983  int retval,
984  int icon,
985  int x,
986  int y,
987  short width,
988  short height,
989  float *poin,
990  float min,
991  float max,
992  float a1,
993  float a2,
994  const char *tip);
996  int type,
997  int bit,
998  int retval,
999  int icon,
1000  int x,
1001  int y,
1002  short width,
1003  short height,
1004  float *poin,
1005  float min,
1006  float max,
1007  float a1,
1008  float a2,
1009  const char *tip);
1010 uiBut *uiDefIconButI(uiBlock *block,
1011  int type,
1012  int retval,
1013  int icon,
1014  int x,
1015  int y,
1016  short width,
1017  short height,
1018  int *poin,
1019  float min,
1020  float max,
1021  float a1,
1022  float a2,
1023  const char *tip);
1025  int type,
1026  int bit,
1027  int retval,
1028  int icon,
1029  int x,
1030  int y,
1031  short width,
1032  short height,
1033  int *poin,
1034  float min,
1035  float max,
1036  float a1,
1037  float a2,
1038  const char *tip);
1039 uiBut *uiDefIconButS(uiBlock *block,
1040  int type,
1041  int retval,
1042  int icon,
1043  int x,
1044  int y,
1045  short width,
1046  short height,
1047  short *poin,
1048  float min,
1049  float max,
1050  float a1,
1051  float a2,
1052  const char *tip);
1054  int type,
1055  int bit,
1056  int retval,
1057  int icon,
1058  int x,
1059  int y,
1060  short width,
1061  short height,
1062  short *poin,
1063  float min,
1064  float max,
1065  float a1,
1066  float a2,
1067  const char *tip);
1068 uiBut *uiDefIconButC(uiBlock *block,
1069  int type,
1070  int retval,
1071  int icon,
1072  int x,
1073  int y,
1074  short width,
1075  short height,
1076  char *poin,
1077  float min,
1078  float max,
1079  float a1,
1080  float a2,
1081  const char *tip);
1083  int type,
1084  int bit,
1085  int retval,
1086  int icon,
1087  int x,
1088  int y,
1089  short width,
1090  short height,
1091  char *poin,
1092  float min,
1093  float max,
1094  float a1,
1095  float a2,
1096  const char *tip);
1097 uiBut *uiDefIconButR(uiBlock *block,
1098  int type,
1099  int retval,
1100  int icon,
1101  int x,
1102  int y,
1103  short width,
1104  short height,
1105  struct PointerRNA *ptr,
1106  const char *propname,
1107  int index,
1108  float min,
1109  float max,
1110  float a1,
1111  float a2,
1112  const char *tip);
1114  int type,
1115  int retval,
1116  int icon,
1117  int x,
1118  int y,
1119  short width,
1120  short height,
1121  struct PointerRNA *ptr,
1122  struct PropertyRNA *prop,
1123  int index,
1124  float min,
1125  float max,
1126  float a1,
1127  float a2,
1128  const char *tip);
1129 uiBut *uiDefIconButO(uiBlock *block,
1130  int type,
1131  const char *opname,
1132  int opcontext,
1133  int icon,
1134  int x,
1135  int y,
1136  short width,
1137  short height,
1138  const char *tip);
1140  int type,
1141  struct wmOperatorType *ot,
1142  int opcontext,
1143  int icon,
1144  int x,
1145  int y,
1146  short width,
1147  short height,
1148  const char *tip);
1150  uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4]);
1151 uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height);
1153  int type,
1154  int retval,
1155  int icon,
1156  const char *str,
1157  int x,
1158  int y,
1159  short width,
1160  short height,
1161  void *poin,
1162  float min,
1163  float max,
1164  float a1,
1165  float a2,
1166  const char *tip);
1168  int type,
1169  int retval,
1170  int icon,
1171  const char *str,
1172  int x,
1173  int y,
1174  short width,
1175  short height,
1176  float *poin,
1177  float min,
1178  float max,
1179  float a1,
1180  float a2,
1181  const char *tip);
1183  int type,
1184  int bit,
1185  int retval,
1186  int icon,
1187  const char *str,
1188  int x,
1189  int y,
1190  short width,
1191  short height,
1192  float *poin,
1193  float min,
1194  float max,
1195  float a1,
1196  float a2,
1197  const char *tip);
1199  int type,
1200  int retval,
1201  int icon,
1202  const char *str,
1203  int x,
1204  int y,
1205  short width,
1206  short height,
1207  int *poin,
1208  float min,
1209  float max,
1210  float a1,
1211  float a2,
1212  const char *tip);
1214  int type,
1215  int bit,
1216  int retval,
1217  int icon,
1218  const char *str,
1219  int x,
1220  int y,
1221  short width,
1222  short height,
1223  int *poin,
1224  float min,
1225  float max,
1226  float a1,
1227  float a2,
1228  const char *tip);
1230  int type,
1231  int retval,
1232  int icon,
1233  const char *str,
1234  int x,
1235  int y,
1236  short width,
1237  short height,
1238  short *poin,
1239  float min,
1240  float max,
1241  float a1,
1242  float a2,
1243  const char *tip);
1245  int type,
1246  int bit,
1247  int retval,
1248  int icon,
1249  const char *str,
1250  int x,
1251  int y,
1252  short width,
1253  short height,
1254  short *poin,
1255  float min,
1256  float max,
1257  float a1,
1258  float a2,
1259  const char *tip);
1261  int type,
1262  int retval,
1263  int icon,
1264  const char *str,
1265  int x,
1266  int y,
1267  short width,
1268  short height,
1269  char *poin,
1270  float min,
1271  float max,
1272  float a1,
1273  float a2,
1274  const char *tip);
1276  int type,
1277  int bit,
1278  int retval,
1279  int icon,
1280  const char *str,
1281  int x,
1282  int y,
1283  short width,
1284  short height,
1285  char *poin,
1286  float min,
1287  float max,
1288  float a1,
1289  float a2,
1290  const char *tip);
1292  int type,
1293  int retval,
1294  int icon,
1295  const char *str,
1296  int x,
1297  int y,
1298  short width,
1299  short height,
1300  struct PointerRNA *ptr,
1301  const char *propname,
1302  int index,
1303  float min,
1304  float max,
1305  float a1,
1306  float a2,
1307  const char *tip);
1309  int type,
1310  int retval,
1311  int icon,
1312  const char *str,
1313  int x,
1314  int y,
1315  short width,
1316  short height,
1317  struct PointerRNA *ptr,
1318  struct PropertyRNA *prop,
1319  int index,
1320  float min,
1321  float max,
1322  float a1,
1323  float a2,
1324  const char *tip);
1326  int type,
1327  const char *opname,
1328  int opcontext,
1329  int icon,
1330  const char *str,
1331  int x,
1332  int y,
1333  short width,
1334  short height,
1335  const char *tip);
1337  int type,
1338  struct wmOperatorType *ot,
1339  int opcontext,
1340  int icon,
1341  const char *str,
1342  int x,
1343  int y,
1344  short width,
1345  short height,
1346  const char *tip);
1347 
1348 /* for passing inputs to ButO buttons */
1350 
1351 void UI_but_unit_type_set(uiBut *but, const int unit_type);
1352 int UI_but_unit_type_get(const uiBut *but);
1353 
1354 typedef enum uiStringInfoType {
1361  BUT_GET_RNA_LABEL_CONTEXT, /* Context specified in CTX_XXX_ macros are just unreachable! */
1368 
1369 typedef struct uiStringInfo {
1371  char *strinfo;
1373 
1374 /* Note: Expects pointers to uiStringInfo structs as parameters.
1375  * Will fill them with translated strings, when possible.
1376  * Strings in uiStringInfo must be MEM_freeN'ed by caller. */
1377 void UI_but_string_info_get(struct bContext *C, uiBut *but, ...) ATTR_SENTINEL(0);
1378 
1379 /* Edit i18n stuff. */
1380 /* Name of the main py op from i18n addon. */
1381 #define EDTSRC_I18N_OP_NAME "UI_OT_edittranslation"
1382 
1394 enum {
1395  UI_ID_RENAME = 1 << 0,
1396  UI_ID_BROWSE = 1 << 1,
1397  UI_ID_ADD_NEW = 1 << 2,
1398  UI_ID_ALONE = 1 << 4,
1399  UI_ID_OPEN = 1 << 3,
1400  UI_ID_DELETE = 1 << 5,
1401  UI_ID_LOCAL = 1 << 6,
1404  UI_ID_PIN = 1 << 9,
1405  UI_ID_PREVIEWS = 1 << 10,
1406  UI_ID_OVERRIDE = 1 << 11,
1409 };
1410 
1415 enum {
1418 };
1419 
1420 int UI_icon_from_id(const struct ID *id);
1424 
1425 int UI_icon_from_event_type(short event_type, short event_value);
1426 int UI_icon_from_keymap_item(const struct wmKeyMapItem *kmi, int r_icon_mod[4]);
1427 
1429  uiBlockCreateFunc func,
1430  void *arg,
1431  const char *str,
1432  int x,
1433  int y,
1434  short width,
1435  short height,
1436  const char *tip);
1437 uiBut *uiDefMenuBut(uiBlock *block,
1438  uiMenuCreateFunc func,
1439  void *arg,
1440  const char *str,
1441  int x,
1442  int y,
1443  short width,
1444  short height,
1445  const char *tip);
1447  uiMenuCreateFunc func,
1448  void *arg,
1449  int icon,
1450  const char *str,
1451  int x,
1452  int y,
1453  short width,
1454  short height,
1455  const char *tip);
1457  uiMenuCreateFunc func,
1458  void *arg,
1459  int icon,
1460  int x,
1461  int y,
1462  short width,
1463  short height,
1464  const char *tip);
1465 
1466 uiBut *uiDefBlockBut(uiBlock *block,
1467  uiBlockCreateFunc func,
1468  void *arg,
1469  const char *str,
1470  int x,
1471  int y,
1472  short width,
1473  short height,
1474  const char *tip);
1475 uiBut *uiDefBlockButN(uiBlock *block,
1476  uiBlockCreateFunc func,
1477  void *argN,
1478  const char *str,
1479  int x,
1480  int y,
1481  short width,
1482  short height,
1483  const char *tip);
1484 
1486  uiBlockCreateFunc func,
1487  void *arg,
1488  int retval,
1489  int icon,
1490  int x,
1491  int y,
1492  short width,
1493  short height,
1494  const char *tip);
1496  uiBlockCreateFunc func,
1497  void *arg,
1498  int icon,
1499  const char *str,
1500  int x,
1501  int y,
1502  short width,
1503  short height,
1504  const char *tip);
1505 
1506 uiBut *uiDefKeyevtButS(uiBlock *block,
1507  int retval,
1508  const char *str,
1509  int x,
1510  int y,
1511  short width,
1512  short height,
1513  short *spoin,
1514  const char *tip);
1516  int retval,
1517  const char *str,
1518  int x,
1519  int y,
1520  short width,
1521  short height,
1522  short *keypoin,
1523  const short *modkeypoin,
1524  const char *tip);
1525 
1526 uiBut *uiDefSearchBut(uiBlock *block,
1527  void *arg,
1528  int retval,
1529  int icon,
1530  int maxlen,
1531  int x,
1532  int y,
1533  short width,
1534  short height,
1535  float a1,
1536  float a2,
1537  const char *tip);
1539  struct wmOperatorType *ot,
1540  struct IDProperty *properties,
1541  void *arg,
1542  int retval,
1543  int icon,
1544  int maxlen,
1545  int x,
1546  int y,
1547  short width,
1548  short height,
1549  float a1,
1550  float a2,
1551  const char *tip);
1552 
1553 /* For uiDefAutoButsRNA */
1554 typedef enum {
1555  /* Keep current layout for aligning label with property button. */
1557  /* Align label and property button vertically. */
1559  /* Split layout into a column for the label and one for property button. */
1561 } eButLabelAlign;
1562 
1563 /* Return info for uiDefAutoButsRNA */
1564 typedef enum {
1565  /* Returns when no buttons were added */
1567  /* Returned when any property failed the custom check callback (check_prop) */
1570 
1571 uiBut *uiDefAutoButR(uiBlock *block,
1572  struct PointerRNA *ptr,
1573  struct PropertyRNA *prop,
1574  int index,
1575  const char *name,
1576  int icon,
1577  int x,
1578  int y,
1579  int width,
1580  int height);
1582  struct PointerRNA *ptr,
1583  bool (*check_prop)(struct PointerRNA *ptr,
1584  struct PropertyRNA *prop,
1585  void *user_data),
1586  void *user_data,
1587  struct PropertyRNA *prop_activate_init,
1588  eButLabelAlign label_align,
1589  const bool compact);
1590 
1591 /* use inside searchfunc to add items */
1592 bool UI_search_item_add(uiSearchItems *items,
1593  const char *name,
1594  void *poin,
1595  int iconid,
1596  int state,
1597  const uint8_t name_prefix_offset);
1598 
1599 void UI_but_func_search_set(uiBut *but,
1600  uiButSearchCreateFn search_create_fn,
1601  uiButSearchUpdateFn search_update_fn,
1602  void *arg,
1603  const bool free_arg,
1604  uiButSearchArgFreeFn search_arg_free_fn,
1605  uiButHandleFunc search_exec_fn,
1606  void *active);
1609 void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string);
1610 void UI_but_func_search_set_results_are_suggestions(uiBut *but, const bool value);
1611 
1612 /* height in pixels, it's using hardcoded values still */
1613 int UI_searchbox_size_y(void);
1614 int UI_searchbox_size_x(void);
1615 /* check if a string is in an existing search box */
1616 int UI_search_items_find_index(uiSearchItems *items, const char *name);
1617 
1618 void UI_but_node_link_set(uiBut *but, struct bNodeSocket *socket, const float draw_color[4]);
1619 
1620 void UI_but_number_step_size_set(uiBut *but, float step_size);
1621 void UI_but_number_precision_set(uiBut *but, float precision);
1622 
1623 void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg);
1624 void UI_block_func_butmenu_set(uiBlock *block, uiMenuHandleFunc func, void *arg);
1625 void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2);
1626 void UI_block_funcN_set(uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2);
1627 
1628 void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1);
1629 void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2);
1630 void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2);
1631 
1632 void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg);
1633 
1635  uiBlock *block,
1636  void (*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect),
1637  void *arg1,
1638  void *arg2);
1639 
1641 
1642 void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *argN);
1643 void UI_but_tooltip_refresh(struct bContext *C, uiBut *but);
1644 void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but);
1645 
1647  struct ARegion *region,
1648  const void *rna_poin_data,
1649  const char *rna_prop_id);
1650 bool UI_textbutton_activate_but(const struct bContext *C, uiBut *but);
1651 
1652 void UI_but_focus_on_enter_event(struct wmWindow *win, uiBut *but);
1653 
1654 void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN);
1655 
1656 void UI_but_func_pushed_state_set(uiBut *but, uiButPushedStateFunc func, void *arg);
1657 
1659  const char *opname,
1660  short opcontext,
1661  int icon);
1662 
1663 /* Autocomplete
1664  *
1665  * Tab complete helper functions, for use in uiButCompleteFunc callbacks.
1666  * Call begin once, then multiple times do_name with all possibilities,
1667  * and finally end to finish and get the completed name. */
1668 
1669 typedef struct AutoComplete AutoComplete;
1670 
1671 #define AUTOCOMPLETE_NO_MATCH 0
1672 #define AUTOCOMPLETE_FULL_MATCH 1
1673 #define AUTOCOMPLETE_PARTIAL_MATCH 2
1674 
1675 AutoComplete *UI_autocomplete_begin(const char *startname, size_t maxlen);
1676 void UI_autocomplete_update_name(AutoComplete *autocpl, const char *name);
1677 int UI_autocomplete_end(AutoComplete *autocpl, char *autoname);
1678 
1679 /* Panels
1680  *
1681  * Functions for creating, freeing and drawing panels. The API here
1682  * could use a good cleanup, though how they will function in 2.5 is
1683  * not clear yet so we postpone that. */
1684 
1685 void UI_panels_begin(const struct bContext *C, struct ARegion *region);
1686 void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y);
1687 void UI_panels_draw(const struct bContext *C, struct ARegion *region);
1688 
1689 struct Panel *UI_panel_find_by_type(struct ListBase *lb, const struct PanelType *pt);
1690 struct Panel *UI_panel_begin(struct ARegion *region,
1691  struct ListBase *lb,
1692  uiBlock *block,
1693  struct PanelType *pt,
1694  struct Panel *panel,
1695  bool *r_open);
1696 void UI_panel_header_buttons_begin(struct Panel *panel);
1697 void UI_panel_header_buttons_end(struct Panel *panel);
1698 void UI_panel_end(struct Panel *panel, int width, int height);
1699 
1700 bool UI_panel_is_closed(const struct Panel *panel);
1701 bool UI_panel_is_active(const struct Panel *panel);
1702 void UI_panel_label_offset(const struct uiBlock *block, int *r_x, int *r_y);
1703 int UI_panel_size_y(const struct Panel *panel);
1704 bool UI_panel_is_dragging(const struct Panel *panel);
1705 bool UI_panel_matches_search_filter(const struct Panel *panel);
1706 
1707 bool UI_panel_category_is_visible(const struct ARegion *region);
1708 void UI_panel_category_add(struct ARegion *region, const char *name);
1709 struct PanelCategoryDyn *UI_panel_category_find(const struct ARegion *region, const char *idname);
1711  const char *idname);
1712 const char *UI_panel_category_active_get(struct ARegion *region, bool set_fallback);
1713 void UI_panel_category_active_set(struct ARegion *region, const char *idname);
1714 void UI_panel_category_active_set_default(struct ARegion *region, const char *idname);
1715 void UI_panel_category_clear_all(struct ARegion *region);
1716 void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active);
1717 
1718 /* Panel custom data. */
1719 struct PointerRNA *UI_panel_custom_data_get(const struct Panel *panel);
1721  const struct wmEvent *event);
1722 void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data);
1723 
1724 /* Polyinstantiated panels for representing a list of data. */
1725 struct Panel *UI_panel_add_instanced(const struct bContext *C,
1726  struct ARegion *region,
1727  struct ListBase *panels,
1728  const char *panel_idname,
1729  struct PointerRNA *custom_data);
1730 void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region);
1731 
1732 #define INSTANCED_PANEL_UNIQUE_STR_LEN 16
1733 void UI_list_panel_unique_str(struct Panel *panel, char *r_name);
1734 
1735 typedef void (*uiListPanelIDFromDataFunc)(void *data_link, char *r_idname);
1736 bool UI_panel_list_matches_data(struct ARegion *region,
1737  struct ListBase *data,
1738  uiListPanelIDFromDataFunc panel_idname_func);
1739 
1740 /* Handlers
1741  *
1742  * Handlers that can be registered in regions, areas and windows for
1743  * handling WM events. Mostly this is done automatic by modules such
1744  * as screen/ if ED_KEYMAP_UI is set, or internally in popup functions. */
1745 
1746 void UI_region_handlers_add(struct ListBase *handlers);
1747 void UI_popup_handlers_add(struct bContext *C,
1748  struct ListBase *handlers,
1749  uiPopupBlockHandle *popup,
1750  const char flag);
1751 void UI_popup_handlers_remove(struct ListBase *handlers, uiPopupBlockHandle *popup);
1752 void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers);
1753 
1754 /* Module
1755  *
1756  * init and exit should be called before using this module. init_userdef must
1757  * be used to reinitialize some internal state if user preferences change. */
1758 
1759 void UI_init(void);
1760 void UI_init_userdef(void);
1761 void UI_reinit_font(void);
1762 void UI_exit(void);
1763 
1764 /* Layout
1765  *
1766  * More automated layout of buttons. Has three levels:
1767  * - Layout: contains a number templates, within a bounded width or height.
1768  * - Template: predefined layouts for buttons with a number of slots, each
1769  * slot can contain multiple items.
1770  * - Item: item to put in a template slot, being either an RNA property,
1771  * operator, label or menu. Also regular buttons can be used when setting
1772  * uiBlockCurLayout. */
1773 
1774 /* layout */
1775 enum {
1778 };
1779 
1780 enum {
1787 };
1788 
1789 #define UI_UNIT_X ((void)0, U.widget_unit)
1790 #define UI_UNIT_Y ((void)0, U.widget_unit)
1791 
1792 enum {
1797 };
1798 
1799 enum {
1800  /* UI_ITEM_O_RETURN_PROPS = 1 << 0, */ /* UNUSED */
1827  /* Even create the property split layout if there's no name to show there. */
1829 };
1830 
1831 #define UI_HEADER_OFFSET ((void)0, 0.4f * UI_UNIT_X)
1832 
1833 /* uiLayoutOperatorButs flags */
1834 enum {
1839  /* Disable property split for the default layout (custom ui callbacks still have full control
1840  * over the layout and can enable it). */
1842 };
1843 
1844 /* used for transp checkers */
1845 #define UI_ALPHA_CHECKER_DARK 100
1846 #define UI_ALPHA_CHECKER_LIGHT 160
1847 
1848 /* flags to set which corners will become rounded:
1849  *
1850  * 1------2
1851  * | |
1852  * 8------4 */
1853 
1854 enum {
1859  /* just for convenience */
1862 };
1863 
1865  int dir,
1866  int type,
1867  int x,
1868  int y,
1869  int size,
1870  int em,
1871  int padding,
1872  const struct uiStyle *style);
1874 void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y);
1875 void UI_block_layout_free(uiBlock *block);
1876 
1877 bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter);
1878 
1879 void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus);
1880 
1882 
1883 void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv);
1884 void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr);
1886 void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context);
1888  struct PropertyRNA **r_prop);
1889 struct MenuType *UI_but_menutype_get(uiBut *but);
1890 struct PanelType *UI_but_paneltype_get(uiBut *but);
1891 void UI_menutype_draw(struct bContext *C, struct MenuType *mt, struct uiLayout *layout);
1892 void UI_paneltype_draw(struct bContext *C, struct PanelType *pt, struct uiLayout *layout);
1893 
1894 /* Only for convenience. */
1895 void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but);
1896 
1897 void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
1898 void uiLayoutSetActive(uiLayout *layout, bool active);
1899 void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default);
1900 void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init);
1901 void uiLayoutSetEnabled(uiLayout *layout, bool enabled);
1902 void uiLayoutSetRedAlert(uiLayout *layout, bool redalert);
1903 void uiLayoutSetAlignment(uiLayout *layout, char alignment);
1904 void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size);
1905 void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect);
1906 void uiLayoutSetScaleX(uiLayout *layout, float scale);
1907 void uiLayoutSetScaleY(uiLayout *layout, float scale);
1908 void uiLayoutSetUnitsX(uiLayout *layout, float unit);
1909 void uiLayoutSetUnitsY(uiLayout *layout, float unit);
1910 void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss);
1911 void uiLayoutSetPropSep(uiLayout *layout, bool is_sep);
1912 void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep);
1913 int uiLayoutGetLocalDir(const uiLayout *layout);
1914 
1916 bool uiLayoutGetActive(uiLayout *layout);
1917 bool uiLayoutGetActiveDefault(uiLayout *layout);
1918 bool uiLayoutGetActivateInit(uiLayout *layout);
1919 bool uiLayoutGetEnabled(uiLayout *layout);
1920 bool uiLayoutGetRedAlert(uiLayout *layout);
1921 int uiLayoutGetAlignment(uiLayout *layout);
1922 bool uiLayoutGetFixedSize(uiLayout *layout);
1923 bool uiLayoutGetKeepAspect(uiLayout *layout);
1924 int uiLayoutGetWidth(uiLayout *layout);
1925 float uiLayoutGetScaleX(uiLayout *layout);
1926 float uiLayoutGetScaleY(uiLayout *layout);
1927 float uiLayoutGetUnitsX(uiLayout *layout);
1928 float uiLayoutGetUnitsY(uiLayout *layout);
1930 bool uiLayoutGetPropSep(uiLayout *layout);
1931 bool uiLayoutGetPropDecorate(uiLayout *layout);
1932 
1933 /* layout specifiers */
1934 uiLayout *uiLayoutRow(uiLayout *layout, bool align);
1935 uiLayout *uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading);
1936 uiLayout *uiLayoutColumn(uiLayout *layout, bool align);
1937 uiLayout *uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading);
1938 uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, bool align);
1940  bool row_major,
1941  int columns_len,
1942  bool even_columns,
1943  bool even_rows,
1944  bool align);
1945 uiLayout *uiLayoutBox(uiLayout *layout);
1947  struct uiList *ui_list,
1948  struct PointerRNA *actptr,
1949  struct PropertyRNA *actprop);
1950 uiLayout *uiLayoutAbsolute(uiLayout *layout, bool align);
1951 uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, bool align);
1954 uiLayout *uiLayoutRadial(uiLayout *layout);
1955 
1956 /* templates */
1957 void uiTemplateHeader(uiLayout *layout, struct bContext *C);
1958 void uiTemplateID(uiLayout *layout,
1959  const struct bContext *C,
1960  struct PointerRNA *ptr,
1961  const char *propname,
1962  const char *newop,
1963  const char *openop,
1964  const char *unlinkop,
1965  int filter,
1966  const bool live_icon,
1967  const char *text);
1968 void uiTemplateIDBrowse(uiLayout *layout,
1969  struct bContext *C,
1970  struct PointerRNA *ptr,
1971  const char *propname,
1972  const char *newop,
1973  const char *openop,
1974  const char *unlinkop,
1975  int filter,
1976  const char *text);
1977 void uiTemplateIDPreview(uiLayout *layout,
1978  struct bContext *C,
1979  struct PointerRNA *ptr,
1980  const char *propname,
1981  const char *newop,
1982  const char *openop,
1983  const char *unlinkop,
1984  int rows,
1985  int cols,
1986  int filter,
1987  const bool hide_buttons);
1988 void uiTemplateIDTabs(uiLayout *layout,
1989  struct bContext *C,
1990  struct PointerRNA *ptr,
1991  const char *propname,
1992  const char *newop,
1993  const char *menu,
1994  int filter);
1995 void uiTemplateAnyID(uiLayout *layout,
1996  struct PointerRNA *ptr,
1997  const char *propname,
1998  const char *proptypename,
1999  const char *text);
2000 void uiTemplateSearch(uiLayout *layout,
2001  struct bContext *C,
2002  struct PointerRNA *ptr,
2003  const char *propname,
2004  struct PointerRNA *searchptr,
2005  const char *searchpropname,
2006  const char *newop,
2007  const char *unlinkop);
2008 void uiTemplateSearchPreview(uiLayout *layout,
2009  struct bContext *C,
2010  struct PointerRNA *ptr,
2011  const char *propname,
2012  struct PointerRNA *searchptr,
2013  const char *searchpropname,
2014  const char *newop,
2015  const char *unlinkop,
2016  const int rows,
2017  const int cols);
2019  struct PointerRNA *ptr,
2020  const char *propname,
2021  struct PointerRNA *root_ptr,
2022  const char *text);
2023 void uiTemplateModifiers(uiLayout *layout, struct bContext *C);
2025 void uiTemplateShaderFx(uiLayout *layout, struct bContext *C);
2026 void uiTemplateConstraints(uiLayout *layout, struct bContext *C, bool use_bone_constraints);
2027 
2030  struct bContext *C,
2031  struct PointerRNA *ptr,
2032  const char *propname,
2033  int rows,
2034  int cols,
2035  float scale,
2036  int filter);
2037 
2039 
2040 void uiTemplateConstraintHeader(uiLayout *layout, struct PointerRNA *ptr);
2041 void uiTemplatePreview(uiLayout *layout,
2042  struct bContext *C,
2043  struct ID *id,
2044  bool show_buttons,
2045  struct ID *parent,
2046  struct MTex *slot,
2047  const char *preview_id);
2048 void uiTemplateColorRamp(uiLayout *layout,
2049  struct PointerRNA *ptr,
2050  const char *propname,
2051  bool expand);
2052 void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale);
2053 void uiTemplateIconView(uiLayout *layout,
2054  struct PointerRNA *ptr,
2055  const char *propname,
2056  bool show_labels,
2057  float icon_scale,
2058  float icon_scale_popup);
2059 void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2060 void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2061 void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2062 void uiTemplateCurveMapping(uiLayout *layout,
2063  struct PointerRNA *ptr,
2064  const char *propname,
2065  int type,
2066  bool levels,
2067  bool brush,
2068  bool neg_slope,
2069  bool tone);
2070 void uiTemplateCurveProfile(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2071 void uiTemplateColorPicker(uiLayout *layout,
2072  struct PointerRNA *ptr,
2073  const char *propname,
2074  bool value_slider,
2075  bool lock,
2076  bool lock_luminosity,
2077  bool cubic);
2079  struct PointerRNA *ptr,
2080  const char *propname,
2081  bool colors);
2082 void uiTemplateCryptoPicker(uiLayout *layout,
2083  struct PointerRNA *ptr,
2084  const char *propname,
2085  int icon);
2086 void uiTemplateLayers(uiLayout *layout,
2087  struct PointerRNA *ptr,
2088  const char *propname,
2089  struct PointerRNA *used_ptr,
2090  const char *used_propname,
2091  int active_layer);
2092 void uiTemplateImage(uiLayout *layout,
2093  struct bContext *C,
2094  struct PointerRNA *ptr,
2095  const char *propname,
2096  struct PointerRNA *userptr,
2097  bool compact,
2098  bool multiview);
2099 void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management);
2100 void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr);
2101 void uiTemplateImageViews(uiLayout *layout, struct PointerRNA *imaptr);
2103  struct PointerRNA *imfptr,
2104  struct PointerRNA *ptr);
2105 void uiTemplateImageLayers(uiLayout *layout,
2106  struct bContext *C,
2107  struct Image *ima,
2108  struct ImageUser *iuser);
2109 void uiTemplateImageInfo(uiLayout *layout,
2110  struct bContext *C,
2111  struct Image *ima,
2112  struct ImageUser *iuser);
2113 void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
2115 void uiTemplateOperatorSearch(uiLayout *layout);
2116 
2117 void UI_but_func_menu_search(uiBut *but);
2118 void uiTemplateMenuSearch(uiLayout *layout);
2119 
2121  uiLayout *layout,
2122  struct wmOperator *op,
2123  eButLabelAlign label_align,
2124  short flag);
2125 void uiTemplateHeader3D_mode(uiLayout *layout, struct bContext *C);
2126 void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C);
2127 void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);
2128 void uiTemplateInputStatus(uiLayout *layout, struct bContext *C);
2129 void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
2130 
2131 bool uiTemplateEventFromKeymapItem(struct uiLayout *layout,
2132  const char *text,
2133  const struct wmKeyMapItem *kmi,
2134  bool text_fallback);
2135 
2136 void uiTemplateComponentMenu(uiLayout *layout,
2137  struct PointerRNA *ptr,
2138  const char *propname,
2139  const char *name);
2140 void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float *color);
2142  const struct bContext *C,
2143  struct PointerRNA *ptr,
2144  const char *propname);
2145 
2146 /* Default UIList class name, keep in sync with its declaration in bl_ui/__init__.py */
2147 #define UI_UL_DEFAULT_CLASS_NAME "UI_UL_list"
2148 void uiTemplateList(uiLayout *layout,
2149  struct bContext *C,
2150  const char *listtype_name,
2151  const char *list_id,
2152  struct PointerRNA *dataptr,
2153  const char *propname,
2154  struct PointerRNA *active_dataptr,
2155  const char *active_propname,
2156  const char *item_dyntip_propname,
2157  int rows,
2158  int maxrows,
2159  int layout_type,
2160  int columns,
2161  bool sort_reverse,
2162  bool sort_lock);
2163 void uiTemplateNodeLink(uiLayout *layout,
2164  struct bContext *C,
2165  struct bNodeTree *ntree,
2166  struct bNode *node,
2167  struct bNodeSocket *input);
2168 void uiTemplateNodeView(uiLayout *layout,
2169  struct bContext *C,
2170  struct bNodeTree *ntree,
2171  struct bNode *node,
2172  struct bNodeSocket *input);
2173 void uiTemplateTextureUser(uiLayout *layout, struct bContext *C);
2175  const struct bContext *C,
2176  struct PointerRNA *ptr,
2177  struct PropertyRNA *prop);
2178 
2179 void uiTemplateMovieClip(struct uiLayout *layout,
2180  struct bContext *C,
2181  struct PointerRNA *ptr,
2182  const char *propname,
2183  bool compact);
2184 void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2185 void uiTemplateMarker(struct uiLayout *layout,
2186  struct PointerRNA *ptr,
2187  const char *propname,
2188  struct PointerRNA *userptr,
2189  struct PointerRNA *trackptr,
2190  bool compact);
2191 void uiTemplateMovieclipInformation(struct uiLayout *layout,
2192  struct PointerRNA *ptr,
2193  const char *propname,
2194  struct PointerRNA *userptr);
2195 
2196 void uiTemplateColorspaceSettings(struct uiLayout *layout,
2197  struct PointerRNA *ptr,
2198  const char *propname);
2200  struct bContext *C,
2201  struct PointerRNA *ptr,
2202  const char *propname);
2203 
2204 int uiTemplateRecentFiles(struct uiLayout *layout, int rows);
2205 void uiTemplateFileSelectPath(uiLayout *layout,
2206  struct bContext *C,
2207  struct FileSelectParams *params);
2208 
2209 /* items */
2210 void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);
2211 void uiItemEnumO_ptr(uiLayout *layout,
2212  struct wmOperatorType *ot,
2213  const char *name,
2214  int icon,
2215  const char *propname,
2216  int value);
2217 void uiItemEnumO(uiLayout *layout,
2218  const char *opname,
2219  const char *name,
2220  int icon,
2221  const char *propname,
2222  int value);
2223 void uiItemEnumO_value(uiLayout *layout,
2224  const char *name,
2225  int icon,
2226  const char *opname,
2227  const char *propname,
2228  int value);
2229 void uiItemEnumO_string(uiLayout *layout,
2230  const char *name,
2231  int icon,
2232  const char *opname,
2233  const char *propname,
2234  const char *value);
2235 void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname);
2236 void uiItemBooleanO(uiLayout *layout,
2237  const char *name,
2238  int icon,
2239  const char *opname,
2240  const char *propname,
2241  int value);
2242 void uiItemIntO(uiLayout *layout,
2243  const char *name,
2244  int icon,
2245  const char *opname,
2246  const char *propname,
2247  int value);
2248 void uiItemFloatO(uiLayout *layout,
2249  const char *name,
2250  int icon,
2251  const char *opname,
2252  const char *propname,
2253  float value);
2254 void uiItemStringO(uiLayout *layout,
2255  const char *name,
2256  int icon,
2257  const char *opname,
2258  const char *propname,
2259  const char *value);
2260 
2261 void uiItemFullO_ptr(uiLayout *layout,
2262  struct wmOperatorType *ot,
2263  const char *name,
2264  int icon,
2265  struct IDProperty *properties,
2266  int context,
2267  int flag,
2268  struct PointerRNA *r_opptr);
2269 void uiItemFullO(uiLayout *layout,
2270  const char *opname,
2271  const char *name,
2272  int icon,
2273  struct IDProperty *properties,
2274  int context,
2275  int flag,
2276  struct PointerRNA *r_opptr);
2277 void uiItemFullOMenuHold_ptr(uiLayout *layout,
2278  struct wmOperatorType *ot,
2279  const char *name,
2280  int icon,
2281  struct IDProperty *properties,
2282  int context,
2283  int flag,
2284  const char *menu_id, /* extra menu arg. */
2285  struct PointerRNA *r_opptr);
2286 
2287 void uiItemR(uiLayout *layout,
2288  struct PointerRNA *ptr,
2289  const char *propname,
2290  int flag,
2291  const char *name,
2292  int icon);
2293 void uiItemFullR(uiLayout *layout,
2294  struct PointerRNA *ptr,
2295  struct PropertyRNA *prop,
2296  int index,
2297  int value,
2298  int flag,
2299  const char *name,
2300  int icon);
2301 void uiItemFullR_with_popover(uiLayout *layout,
2302  struct PointerRNA *ptr,
2303  struct PropertyRNA *prop,
2304  int index,
2305  int value,
2306  int flag,
2307  const char *name,
2308  int icon,
2309  const char *panel_type);
2310 void uiItemFullR_with_menu(uiLayout *layout,
2311  struct PointerRNA *ptr,
2312  struct PropertyRNA *prop,
2313  int index,
2314  int value,
2315  int flag,
2316  const char *name,
2317  int icon,
2318  const char *menu_type);
2319 void uiItemEnumR_prop(uiLayout *layout,
2320  const char *name,
2321  int icon,
2322  struct PointerRNA *ptr,
2323  struct PropertyRNA *prop,
2324  int value);
2325 void uiItemEnumR(uiLayout *layout,
2326  const char *name,
2327  int icon,
2328  struct PointerRNA *ptr,
2329  const char *propname,
2330  int value);
2331 void uiItemEnumR_string_prop(uiLayout *layout,
2332  struct PointerRNA *ptr,
2333  struct PropertyRNA *prop,
2334  const char *value,
2335  const char *name,
2336  int icon);
2337 void uiItemEnumR_string(uiLayout *layout,
2338  struct PointerRNA *ptr,
2339  const char *propname,
2340  const char *value,
2341  const char *name,
2342  int icon);
2343 void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
2344 void uiItemPointerR_prop(uiLayout *layout,
2345  struct PointerRNA *ptr,
2346  struct PropertyRNA *prop,
2347  struct PointerRNA *searchptr,
2348  struct PropertyRNA *searchprop,
2349  const char *name,
2350  int icon);
2351 void uiItemPointerR(uiLayout *layout,
2352  struct PointerRNA *ptr,
2353  const char *propname,
2354  struct PointerRNA *searchptr,
2355  const char *searchpropname,
2356  const char *name,
2357  int icon);
2358 void uiItemsFullEnumO(uiLayout *layout,
2359  const char *opname,
2360  const char *propname,
2361  struct IDProperty *properties,
2362  int context,
2363  int flag);
2365  struct wmOperatorType *ot,
2366  struct PointerRNA ptr,
2367  struct PropertyRNA *prop,
2368  struct IDProperty *properties,
2369  int context,
2370  int flag,
2371  const struct EnumPropertyItem *item_array,
2372  int totitem);
2373 
2374 typedef struct uiPropertySplitWrapper {
2379 
2381 
2382 void uiItemL(uiLayout *layout, const char *name, int icon); /* label */
2383 void uiItemL_ex(
2384  uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert);
2385 uiLayout *uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon);
2386 /* label icon for dragging */
2387 void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, const char *name, int icon);
2388 /* menu */
2389 void uiItemM_ptr(uiLayout *layout, struct MenuType *mt, const char *name, int icon);
2390 void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon);
2391 /* menu contents */
2392 void uiItemMContents(uiLayout *layout, const char *menuname);
2393 /* Decorators */
2394 void uiItemDecoratorR_prop(uiLayout *layout,
2395  struct PointerRNA *ptr,
2396  struct PropertyRNA *prop,
2397  int index);
2398 void uiItemDecoratorR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int index);
2399 /* value */
2400 void uiItemV(uiLayout *layout, const char *name, int icon, int argval);
2401 /* separator */
2402 void uiItemS(uiLayout *layout);
2403 void uiItemS_ex(uiLayout *layout, float factor);
2404 /* Special separator. */
2405 void uiItemSpacer(uiLayout *layout);
2406 
2408  uiLayout *layout, struct bContext *C, struct PanelType *pt, const char *name, int icon);
2409 void uiItemPopoverPanel(
2410  uiLayout *layout, struct bContext *C, const char *panel_type, const char *name, int icon);
2412  struct bContext *C,
2413  int space_id,
2414  int region_id,
2415  const char *context,
2416  const char *category);
2417 
2418 void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg);
2419 void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN);
2420 void uiItemMenuEnumO_ptr(uiLayout *layout,
2421  struct bContext *C,
2422  struct wmOperatorType *ot,
2423  const char *propname,
2424  const char *name,
2425  int icon);
2426 void uiItemMenuEnumO(uiLayout *layout,
2427  struct bContext *C,
2428  const char *opname,
2429  const char *propname,
2430  const char *name,
2431  int icon);
2432 void uiItemMenuEnumR_prop(uiLayout *layout,
2433  struct PointerRNA *ptr,
2434  struct PropertyRNA *prop,
2435  const char *name,
2436  int icon);
2437 void uiItemMenuEnumR(
2438  uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon);
2439 void uiItemTabsEnumR_prop(uiLayout *layout,
2440  struct bContext *C,
2441  struct PointerRNA *ptr,
2442  struct PropertyRNA *prop,
2443  struct PointerRNA *ptr_highlight,
2444  struct PropertyRNA *prop_highlight,
2445  bool icon_only);
2446 
2447 /* Only for testing, inspecting layouts. */
2448 const char *UI_layout_introspect(uiLayout *layout);
2449 
2450 /* Helper to add a big icon and create a split layout for alert boxes. */
2451 uiLayout *uiItemsAlertBox(uiBlock *block, const int size, const eAlertIcon icon);
2452 
2453 /* UI Operators */
2454 typedef struct uiDragColorHandle {
2455  float color[3];
2458 
2459 void ED_operatortypes_ui(void);
2460 void ED_keymap_ui(struct wmKeyConfig *keyconf);
2461 
2462 void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop);
2464  struct wmDrag *drag,
2465  const struct wmEvent *event,
2466  const char **r_tooltip);
2467 
2469  struct PointerRNA *ptr,
2470  struct PropertyRNA *prop,
2471  struct ListBase *r_lb,
2472  bool *r_use_path_from_id,
2473  char **r_path);
2474 
2475 /* Helpers for Operators */
2479  struct PointerRNA *r_ptr,
2480  struct PropertyRNA **r_prop,
2481  int *r_index);
2483 void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region);
2484 
2485 struct wmOperator *UI_context_active_operator_get(const struct bContext *C);
2488  struct PointerRNA *r_ptr,
2489  struct PropertyRNA **r_prop,
2490  bool *r_is_undo,
2491  bool *r_is_userdef);
2493  struct PointerRNA *r_ptr,
2494  struct PropertyRNA **r_prop);
2496 
2497 uiBut *UI_region_active_but_get(const struct ARegion *region);
2498 uiBut *UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *rect_px);
2499 uiBlock *UI_region_block_find_mouse_over(const struct ARegion *region,
2500  const int xy[2],
2501  bool only_clip);
2502 struct ARegion *UI_region_searchbox_region_get(const struct ARegion *button_region);
2503 
2504 /* uiFontStyle.align */
2505 typedef enum eFontStyle_Align {
2510 
2514 };
2515 
2516 /* Styled text draw */
2517 void UI_fontstyle_set(const struct uiFontStyle *fs);
2518 void UI_fontstyle_draw_ex(const struct uiFontStyle *fs,
2519  const struct rcti *rect,
2520  const char *str,
2521  const uchar col[4],
2522  const struct uiFontStyleDraw_Params *fs_params,
2523  size_t len,
2524  int *r_xofs,
2525  int *r_yofs,
2526  struct ResultBLF *r_info);
2527 void UI_fontstyle_draw(const struct uiFontStyle *fs,
2528  const struct rcti *rect,
2529  const char *str,
2530  const uchar col[4],
2531  const struct uiFontStyleDraw_Params *fs_params);
2533  const struct rcti *rect,
2534  const char *str,
2535  const uchar col[4]);
2537  const struct uiFontStyle *fs, float x, float y, const char *str, const uchar col[4]);
2539  float x,
2540  float y,
2541  const char *str,
2542  const float col_fg[4],
2543  const float col_bg[4]);
2544 
2545 int UI_fontstyle_string_width(const struct uiFontStyle *fs, const char *str);
2546 int UI_fontstyle_height_max(const struct uiFontStyle *fs);
2547 
2548 void UI_draw_icon_tri(float x, float y, char dir, const float[4]);
2549 
2550 const struct uiStyle *UI_style_get(void); /* use for fonts etc */
2551 const struct uiStyle *UI_style_get_dpi(void); /* DPI scaled settings for drawing */
2552 
2553 /* linker workaround ack! */
2554 void UI_template_fix_linking(void);
2555 
2556 /* UI_OT_editsource helpers */
2559 void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but);
2560 
2561 /* UI_butstore_ helpers */
2562 typedef struct uiButStore uiButStore;
2563 typedef struct uiButStoreElem uiButStoreElem;
2564 
2566 void UI_butstore_clear(uiBlock *block);
2567 void UI_butstore_update(uiBlock *block);
2568 void UI_butstore_free(uiBlock *block, uiButStore *bs);
2570 bool UI_butstore_is_registered(uiBlock *block, uiBut *but);
2571 void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p);
2572 bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src);
2573 void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p);
2574 
2575 /* ui_interface_region_tooltip.c */
2577  struct ARegion *butregion,
2578  uiBut *but,
2579  bool is_label);
2580 struct ARegion *UI_tooltip_create_from_gizmo(struct bContext *C, struct wmGizmo *gz);
2581 void UI_tooltip_free(struct bContext *C, struct bScreen *screen, struct ARegion *region);
2582 
2583 typedef struct {
2585  char description[UI_MAX_DRAW_STR];
2586  /* The full name of the item, without prefixes or suffixes (e.g. hint with UI_SEP_CHARP). */
2587  const char *name;
2589  char hint[UI_MAX_DRAW_STR];
2591 
2593  struct bContext *C,
2594  const struct ARegion *searchbox_region,
2595  const struct rcti *item_rect,
2596  const uiSearchItemTooltipData *item_tooltip_data);
2597 
2598 /* How long before a tool-tip shows. */
2599 #define UI_TOOLTIP_DELAY 0.5
2600 #define UI_TOOLTIP_DELAY_LABEL 0.2
2601 
2602 /* Float precision helpers */
2603 #define UI_PRECISION_FLOAT_MAX 6
2604 /* For float buttons the 'step' (or a1), is scaled */
2605 #define UI_PRECISION_FLOAT_SCALE 0.01f
2606 
2607 /* Typical UI text */
2608 #define UI_FSTYLE_WIDGET (const uiFontStyle *)&(UI_style_get()->widget)
2609 
2610 int UI_calc_float_precision(int prec, double value);
2611 
2612 /* widget batched drawing */
2615 void UI_widgetbase_draw_cache_end(void);
2616 
2617 /* Use for resetting the theme. */
2618 void UI_theme_init_default(void);
2619 void UI_style_init_default(void);
2620 
2622 
2623 /* Special drawing for toolbar, mainly workarounds for inflexible icon sizing. */
2624 #define USE_UI_TOOLBAR_HACK
2625 
2626 /* Support click-drag motion which presses the button and closes a popover (like a menu). */
2627 #define USE_UI_POPOVER_ONCE
2628 
2629 #ifdef __cplusplus
2630 }
2631 #endif
#define ATTR_NONNULL(...)
void BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() int BLI_kdtree_nd_() ATTR_WARN_UNUSED_RESULT
size_t ATTR_SENTINEL(0)
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_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 height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define C
Definition: RandGen.cpp:39
void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
int UI_text_colorid_from_report_type(int type)
struct wmOperator * UI_context_active_operator_get(const struct bContext *C)
void uiItemS_ex(uiLayout *layout, float factor)
bool UI_but_online_manual_id(const uiBut *but, char *r_str, size_t maxlength) ATTR_WARN_UNUSED_RESULT
void UI_but_flag_disable(uiBut *but, int flag)
Definition: interface.c:6082
void UI_but_disable(uiBut *but, const char *disabled_hint)
Definition: interface.c:6102
uiBut * uiDefButC(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5082
bool uiLayoutGetActivateInit(uiLayout *layout)
void UI_panel_category_active_set_default(struct ARegion *region, const char *idname)
eAutoPropButsReturn
@ UI_PROP_BUTS_ANY_FAILED_CHECK
@ UI_PROP_BUTS_NONE_ADDED
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5603
uiLayout * uiLayoutRowWithHeading(uiLayout *layout, bool align, const char *heading)
void UI_but_drag_set_rna(uiBut *but, struct PointerRNA *ptr)
Definition: interface.c:6162
void UI_widgetbase_draw_cache_begin(void)
void uiItemL_ex(uiLayout *layout, const char *name, int icon, const bool highlight, const bool redalert)
uiBut * uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:4988
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiItemEnumR_string_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, const char *value, const char *name, int icon)
void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
void uiItemFullR_with_popover(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon, const char *panel_type)
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *argN)
Definition: interface.c:6323
uiBut * uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5951
void UI_paneltype_draw(struct bContext *C, struct PanelType *pt, struct uiLayout *layout)
void UI_panel_category_clear_all(struct ARegion *region)
@ UI_ITEM_R_EVENT
@ UI_ITEM_R_TOGGLE
@ UI_ITEM_O_DEPRESS
@ UI_ITEM_R_SPLIT_EMPTY_NAME
@ UI_ITEM_R_ICON_NEVER
@ UI_ITEM_R_IMMEDIATE
@ UI_ITEM_R_FORCE_BLANK_DECORATE
@ UI_ITEM_R_COMPACT
@ UI_ITEM_R_EXPAND
@ UI_ITEM_R_NO_BG
@ UI_ITEM_R_CHECKBOX_INVERT
@ UI_ITEM_R_ICON_ONLY
@ UI_ITEM_R_FULL_EVENT
@ UI_ITEM_R_SLIDER
int UI_searchbox_size_x(void)
uiBlock * UI_region_block_find_mouse_over(const struct ARegion *region, const int xy[2], bool only_clip)
bool uiLayoutGetPropDecorate(uiLayout *layout)
void UI_style_init_default(void)
Definition: resources.c:1057
void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, bool compact)
Definition: clip_buttons.c:103
struct bContextStore * uiLayoutGetContextStore(uiLayout *layout)
int uiLayoutGetAlignment(uiLayout *layout)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
void uiItemPopoverPanelFromGroup(uiLayout *layout, struct bContext *C, int space_id, int region_id, const char *context, const char *category)
void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname, struct IDProperty *properties, int context, int flag)
void uiLayoutSetUnitsY(uiLayout *layout, float unit)
void UI_blocklist_free(const struct bContext *C, struct ListBase *lb)
@ UI_BUT_TEXT_RIGHT
Definition: UI_interface.h:261
@ UI_BUT_ACTIVE_RIGHT
Definition: UI_interface.h:291
@ UI_BUT_HAS_SHORTCUT
Definition: UI_interface.h:295
@ UI_BUT_ICON_LEFT
Definition: UI_interface.h:260
@ UI_BUT_ALIGN_ALL
Definition: UI_interface.h:283
@ UI_BUT_ALIGN_DOWN
Definition: UI_interface.h:272
@ UI_BUT_ALIGN_TOP
Definition: UI_interface.h:269
@ UI_BUT_ALIGN
Definition: UI_interface.h:273
@ UI_BUT_NO_TEXT_PADDING
Definition: UI_interface.h:265
@ UI_BUT_NO_TOOLTIP
Definition: UI_interface.h:263
@ UI_BUT_CHECKBOX_INVERT
Definition: UI_interface.h:304
@ UI_BUT_ALIGN_STITCH_TOP
Definition: UI_interface.h:281
@ UI_BUT_ANIMATED_CHANGED
Definition: UI_interface.h:301
@ UI_BUT_TEXT_LEFT
Definition: UI_interface.h:259
@ UI_BUT_ACTIVE_LEFT
Definition: UI_interface.h:289
@ UI_BUT_BOX_ITEM
Definition: UI_interface.h:286
@ UI_BUT_ALIGN_STITCH_LEFT
Definition: UI_interface.h:282
@ UI_BUT_ALIGN_RIGHT
Definition: UI_interface.h:271
@ UI_BUT_ALIGN_LEFT
Definition: UI_interface.h:270
@ UI_BUT_ICON_REVERSE
Definition: UI_interface.h:298
uiBut * uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6376
uiBut * uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6410
void UI_panel_category_draw_all(struct ARegion *region, const char *category_id_active)
void uiTemplateOperatorPropertyButs(const struct bContext *C, uiLayout *layout, struct wmOperator *op, eButLabelAlign label_align, short flag)
eUIEmbossType
Definition: UI_interface.h:106
@ UI_EMBOSS_UNDEFINED
Definition: UI_interface.h:117
@ UI_EMBOSS_NONE
Definition: UI_interface.h:108
@ UI_EMBOSS
Definition: UI_interface.h:107
@ UI_EMBOSS_RADIAL
Definition: UI_interface.h:110
@ UI_EMBOSS_PULLDOWN
Definition: UI_interface.h:109
@ UI_EMBOSS_NONE_OR_STATUS
Definition: UI_interface.h:115
void UI_fontstyle_set(const struct uiFontStyle *fs)
void UI_panels_begin(const struct bContext *C, struct ARegion *region)
void uiTemplateNodeView(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input)
void uiItemMenuEnumO_ptr(uiLayout *layout, struct bContext *C, struct wmOperatorType *ot, const char *propname, const char *name, int icon)
void uiTemplateColormanagedViewSettings(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname)
eAutoPropButsReturn uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, bool(*check_prop)(struct PointerRNA *ptr, struct PropertyRNA *prop, void *user_data), void *user_data, struct PropertyRNA *prop_activate_init, eButLabelAlign label_align, const bool compact)
void UI_popup_menu_but_set(uiPopupMenu *pup, struct ARegion *butregion, uiBut *but)
void uiTemplateConstraints(uiLayout *layout, struct bContext *C, bool use_bone_constraints)
const struct uiStyle * UI_style_get_dpi(void)
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5223
void UI_block_theme_style_set(uiBlock *block, char theme_style)
Definition: interface.c:3547
int UI_pie_menu_invoke_from_rna_enum(struct bContext *C, const char *title, const char *path, const struct wmEvent *event)
void uiTemplateSearch(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop)
uiBut * uiDefButImage(uiBlock *block, void *imbuf, int x, int y, short width, short height, const uchar color[4])
Definition: interface.c:4710
uiBut * uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x, int y, short width, short height, short *spoin, const char *tip)
Definition: interface.c:6511
void UI_fontstyle_draw_ex(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params, size_t len, int *r_xofs, int *r_yofs, struct ResultBLF *r_info)
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
int UI_searchbox_size_y(void)
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
void UI_popup_block_close(struct bContext *C, struct wmWindow *win, uiBlock *block)
bool UI_block_is_empty_ex(const uiBlock *block, const bool skip_title)
void UI_panel_header_buttons_begin(struct Panel *panel)
@ UI_BUT_DRAG_LOCK
Definition: UI_interface.h:197
@ UI_BUT_LIST_ITEM
Definition: UI_interface.h:218
@ UI_BUT_REDALERT
Definition: UI_interface.h:204
@ UI_BUT_UNDO
Definition: UI_interface.h:208
@ UI_BUT_ACTIVE_DEFAULT
Definition: UI_interface.h:215
@ UI_BUT_IMMEDIATE
Definition: UI_interface.h:209
@ UI_BUT_ACTIVATE_ON_INIT
Definition: UI_interface.h:222
@ UI_BUT_ANIMATED
Definition: UI_interface.h:201
@ UI_BUT_DISABLED
Definition: UI_interface.h:199
@ UI_BUT_INACTIVE
Definition: UI_interface.h:206
@ UI_BUT_OVERRIDDEN
Definition: UI_interface.h:234
@ UI_BUT_NO_UTF8
Definition: UI_interface.h:210
@ UI_BUT_HAS_SEP_CHAR
Definition: UI_interface.h:225
@ UI_BUT_NODE_LINK
Definition: UI_interface.h:195
@ UI_BUT_ICON_PREVIEW
Definition: UI_interface.h:193
@ UI_BUT_NODE_ACTIVE
Definition: UI_interface.h:196
@ UI_BUT_DRIVEN
Definition: UI_interface.h:203
@ UI_BUT_DRAG_MULTI
Definition: UI_interface.h:220
@ UI_BUT_UPDATE_DELAY
Definition: UI_interface.h:227
@ UI_BUT_ICON_SUBMENU
Definition: UI_interface.h:192
@ UI_BUT_VALUE_CLEAR
Definition: UI_interface.h:231
@ UI_BUT_TEXTEDIT_UPDATE
Definition: UI_interface.h:229
@ UI_BUT_ANIMATED_KEY
Definition: UI_interface.h:202
@ UI_BUT_LAST_ACTIVE
Definition: UI_interface.h:207
void UI_draw_icon_tri(float x, float y, char dir, const float[4])
void UI_but_node_link_set(uiBut *but, struct bNodeSocket *socket, const float draw_color[4])
Definition: interface.c:6820
struct ARegion * UI_tooltip_create_from_button(struct bContext *C, struct ARegion *butregion, uiBut *but, bool is_label)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter)
bool UI_block_can_add_separator(const uiBlock *block)
int UI_icon_from_report_type(int type)
struct ARegion *(* uiButSearchCreateFn)(struct bContext *C, struct ARegion *butregion, struct uiButSearch *search_but)
Definition: UI_interface.h:499
uiBut * uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5495
@ UI_CNR_BOTTOM_LEFT
@ UI_CNR_BOTTOM_RIGHT
@ UI_CNR_ALL
@ UI_CNR_TOP_LEFT
@ UI_CNR_TOP_RIGHT
@ UI_CNR_NONE
uiLayout * uiLayoutGridFlow(uiLayout *layout, bool row_major, int columns_len, bool even_columns, bool even_rows, bool align)
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C)
uiLayout * uiLayoutOverlap(uiLayout *layout)
void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4])
@ UI_LAYOUT_PIEMENU
@ UI_LAYOUT_MENU
@ UI_LAYOUT_PANEL
@ UI_LAYOUT_VERT_BAR
@ UI_LAYOUT_TOOLBAR
@ UI_LAYOUT_HEADER
void uiTemplatePathBuilder(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *root_ptr, const char *text)
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
void UI_panel_label_offset(const struct uiBlock *block, int *r_x, int *r_y)
int(* uiButCompleteFunc)(struct bContext *C, char *str, void *arg)
Definition: UI_interface.h:496
void UI_menutype_draw(struct bContext *C, struct MenuType *mt, struct uiLayout *layout)
void uiLayoutSetFixedSize(uiLayout *layout, bool fixed_size)
void(* uiButHandleNFunc)(struct bContext *C, void *argN, void *arg2)
Definition: UI_interface.h:494
void uiTemplateIcon(uiLayout *layout, int icon_value, float icon_scale)
void UI_init(void)
Definition: interface.c:7111
void UI_popup_handlers_remove_all(struct bContext *C, struct ListBase *handlers)
uiBut * uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:4687
int UI_blocklist_min_y_get(struct ListBase *lb)
Definition: interface.c:6015
void(* uiButHandleHoldFunc)(struct bContext *C, struct ARegion *butregion, uiBut *but)
Definition: UI_interface.h:495
uiBut * uiDefButF(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:4896
float uiLayoutGetUnitsY(uiLayout *layout)
uiPropertySplitWrapper uiItemPropertySplitWrapperCreate(uiLayout *parent_layout)
void uiTemplateHeader3D_mode(uiLayout *layout, struct bContext *C)
uiBut * uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5341
void uiLayoutSetScaleY(uiLayout *layout, float scale)
void UI_block_lock_clear(uiBlock *block)
Definition: interface.c:2219
void(* uiBlockHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:525
uiLayout * uiTemplateGpencilModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr)
void UI_block_bounds_set_normal(struct uiBlock *block, int addval)
Definition: interface.c:580
void UI_blocklist_update_window_matrix(const struct bContext *C, const struct ListBase *lb)
void uiTemplateSearchPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *newop, const char *unlinkop, const int rows, const int cols)
const char * UI_panel_category_active_get(struct ARegion *region, bool set_fallback)
void UI_draw_anti_fan(float tri_array[][2], unsigned int length, const float color[4])
void UI_block_bounds_set_popup(uiBlock *block, int addval, const int bounds_offset[2])
Definition: interface.c:598
struct PointerRNA * UI_but_operator_ptr_get(uiBut *but)
Definition: interface.c:6218
void uiTemplateGpencilModifiers(uiLayout *layout, struct bContext *C)
struct uiLayout * UI_pie_menu_layout(struct uiPieMenu *pie)
void uiTemplateShaderFx(uiLayout *layout, struct bContext *C)
void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4])
int UI_but_unit_type_get(const uiBut *but)
Definition: interface.c:6233
int UI_panel_size_y(const struct Panel *panel)
uiBut * uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5729
uiBut * uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6458
uiBut * uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5893
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void uiTemplateColorspaceSettings(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname)
bool UI_butstore_is_valid(uiButStore *bs)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiItemMenuEnumO(uiLayout *layout, struct bContext *C, const char *opname, const char *propname, const char *name, int icon)
void UI_screen_free_active_but(const struct bContext *C, struct bScreen *screen)
void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default)
const struct uiStyle * UI_style_get(void)
uiBut * uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x, int y, int width, int height)
void uiItemFullR_with_menu(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon, const char *menu_type)
void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop)
bool UI_search_item_add(uiSearchItems *items, const char *name, void *poin, int iconid, int state, const uint8_t name_prefix_offset)
uiBut * uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5527
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert)
void UI_blocklist_free_inactive(const struct bContext *C, struct ListBase *lb)
uiBut * uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5549
uiBut * UI_context_active_but_get(const struct bContext *C)
bool UI_but_is_userdef(const uiBut *but)
bool UI_but_active_drop_name(struct bContext *C)
void uiTemplateHistogram(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
void UI_but_drag_set_image(uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, const bool use_free)
Definition: interface.c:6201
struct Panel * UI_panel_find_by_type(struct ListBase *lb, const struct PanelType *pt)
struct PointerRNA * UI_panel_custom_data_get(const struct Panel *panel)
char UI_block_emboss_get(uiBlock *block)
Definition: interface.c:3537
uiBut * uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6487
bool UI_but_is_utf8(const uiBut *but)
uiLayout * uiLayoutAbsolute(uiLayout *layout, bool align)
void uiTemplateImageViews(uiLayout *layout, struct PointerRNA *imaptr)
void uiLayoutSetScaleX(uiLayout *layout, float scale)
bool UI_block_is_empty(const uiBlock *block)
struct uiLayout * UI_popover_layout(uiPopover *pup)
void UI_but_func_menu_step_set(uiBut *but, uiMenuStepFunc func)
Definition: interface.c:6318
uiBut * uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5827
uiBut * uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5861
void uiTemplateIconView(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool show_labels, float icon_scale, float icon_scale_popup)
void UI_panel_category_active_set(struct ARegion *region, const char *idname)
struct ARegion * UI_tooltip_create_from_search_item_generic(struct bContext *C, const struct ARegion *searchbox_region, const struct rcti *item_rect, const uiSearchItemTooltipData *item_tooltip_data)
float uiLayoutGetUnitsX(uiLayout *layout)
int UI_icon_colorid_from_report_type(int type)
void uiItemFullOMenuHold_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, struct IDProperty *properties, int context, int flag, const char *menu_id, struct PointerRNA *r_opptr)
void(* uiButSearchUpdateFn)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
Definition: UI_interface.h:505
void UI_fontstyle_draw_simple(const struct uiFontStyle *fs, float x, float y, const char *str, const uchar col[4])
void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
void UI_block_flag_disable(uiBlock *block, int flag)
Definition: interface.c:6072
bool UI_but_active_drop_color(struct bContext *C)
char *(* uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip)
Definition: UI_interface.h:522
void uiTemplateID(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const bool live_icon, const char *text)
void UI_draw_roundbox_3fv_alpha(const struct rctf *rect, bool filled, float rad, const float col[3], float alpha)
void UI_popover_once_clear(uiPopover *pup)
void UI_panel_custom_data_set(struct Panel *panel, struct PointerRNA *custom_data)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
struct Panel * UI_panel_add_instanced(const struct bContext *C, struct ARegion *region, struct ListBase *panels, const char *panel_idname, struct PointerRNA *custom_data)
void UI_but_drag_set_path(uiBut *but, const char *path, const bool use_free)
Definition: interface.c:6172
void UI_but_drawflag_enable(uiBut *but, int flag)
Definition: interface.c:6092
int UI_fontstyle_height_max(const struct uiFontStyle *fs)
uiLayout * uiLayoutBox(uiLayout *layout)
void UI_butstore_update(uiBlock *block)
void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context)
void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management)
int UI_but_return_value_get(uiBut *but)
Definition: interface.c:6122
void UI_but_tooltip_refresh(struct bContext *C, uiBut *but)
void UI_but_func_search_set_tooltip(uiBut *but, uiButSearchTooltipFn tooltip_fn)
Definition: interface.c:6691
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
bool uiLayoutGetEnabled(uiLayout *layout)
uiBut * uiDefIconButC(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5465
bool UI_textbutton_activate_but(const struct bContext *C, uiBut *but)
void uiItemV(uiLayout *layout, const char *name, int icon, int argval)
void UI_butstore_free(uiBlock *block, uiButStore *bs)
void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but)
struct PanelCategoryStack * UI_panel_category_active_find(struct ARegion *region, const char *idname)
uiBlock * uiLayoutAbsoluteBlock(uiLayout *layout)
void uiTemplateIDTabs(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *menu, int filter)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void UI_draw_roundbox_corner_set(int type)
struct PointerRNA * UI_region_panel_custom_data_under_cursor(const struct bContext *C, const struct wmEvent *event)
void UI_but_number_step_size_set(uiBut *but, float step_size)
Definition: interface.c:6827
AutoComplete * UI_autocomplete_begin(const char *startname, size_t maxlen)
Definition: interface.c:4782
void UI_block_func_handle_set(uiBlock *block, uiBlockHandleFunc func, void *arg)
Definition: interface.c:6247
uiBut * uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:4926
void uiItemS(uiLayout *layout)
void ED_operatortypes_ui(void)
void UI_but_func_menu_search(uiBut *but)
void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name, int icon)
void uiTemplateMenuSearch(uiLayout *layout)
eButLabelAlign
@ UI_BUT_LABEL_ALIGN_SPLIT_COLUMN
@ UI_BUT_LABEL_ALIGN_NONE
@ UI_BUT_LABEL_ALIGN_COLUMN
void UI_context_active_but_prop_handle(struct bContext *C)
struct PointerRNA * UI_but_extra_operator_icon_add(uiBut *but, const char *opname, short opcontext, int icon)
Definition: interface.c:1650
void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus)
Definition: interface.c:2092
int uiTemplateRecentFiles(struct uiLayout *layout, int rows)
void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop)
struct PanelCategoryDyn * UI_panel_category_find(const struct ARegion *region, const char *idname)
float uiLayoutGetScaleY(uiLayout *layout)
void uiTemplateOperatorSearch(uiLayout *layout)
void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
struct PanelType * UI_but_paneltype_get(uiBut *but)
bool UI_panel_is_active(const struct Panel *panel)
void uiItemFullO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
void uiTemplateCryptoPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int icon)
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C)
void uiTemplateFileSelectPath(uiLayout *layout, struct bContext *C, struct FileSelectParams *params)
struct uiStringInfo uiStringInfo
void uiItemEnumO(uiLayout *layout, const char *opname, const char *name, int icon, const char *propname, int value)
void UI_popup_menu_reports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL()
void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but)
void UI_panel_end(struct Panel *panel, int width, int height)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
bool uiLayoutGetActive(uiLayout *layout)
uiLayout * uiLayoutColumnFlow(uiLayout *layout, int number, bool align)
void UI_list_panel_unique_str(struct Panel *panel, char *r_name)
void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
void UI_panels_free_instanced(const struct bContext *C, struct ARegion *region)
void uiTemplateImageInfo(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser)
uiBut * uiDefIconButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.c:5572
@ UI_LAYOUT_ALIGN_LEFT
@ UI_LAYOUT_ALIGN_CENTER
@ UI_LAYOUT_ALIGN_RIGHT
@ UI_LAYOUT_ALIGN_EXPAND
bool UI_panel_list_matches_data(struct ARegion *region, struct ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
uiBut * uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5795
void UI_draw_roundbox_shade_x(const struct rctf *rect, bool filled, float rad, float shadetop, float shadedown, const float col[4])
void UI_butstore_unregister(uiButStore *bs_handle, uiBut **but_p)
void uiItemsFullEnumO_items(uiLayout *layout, struct wmOperatorType *ot, struct PointerRNA ptr, struct PropertyRNA *prop, struct IDProperty *properties, int context, int flag, const struct EnumPropertyItem *item_array, int totitem)
void UI_but_drag_set_id(uiBut *but, struct ID *id)
Definition: interface.c:6127
bool UI_butstore_register_update(uiBlock *block, uiBut *but_dst, const uiBut *but_src)
bool uiLayoutGetKeepAspect(uiLayout *layout)
void(* uiButSearchArgFreeFn)(void *arg)
Definition: UI_interface.h:510
void ED_keymap_ui(struct wmKeyConfig *keyconf)
User Interface Keymap.
eFontStyle_Align
@ UI_STYLE_TEXT_LEFT
@ UI_STYLE_TEXT_CENTER
@ UI_STYLE_TEXT_RIGHT
uiBut * uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5403
@ UI_TEMPLATE_ID_FILTER_AVAILABLE
@ UI_TEMPLATE_ID_FILTER_ALL
bool uiLayoutGetPropSep(uiLayout *layout)
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols, int filter, const bool hide_buttons)
uiBut * uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5433
void UI_but_func_search_set(uiBut *but, uiButSearchCreateFn search_create_fn, uiButSearchUpdateFn search_update_fn, void *arg, const bool free_arg, uiButSearchArgFreeFn search_arg_free_fn, uiButHandleFunc search_exec_fn, void *active)
Definition: interface.c:6613
void uiTemplateCurveProfile(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
int UI_pie_menu_invoke_from_operator_enum(struct bContext *C, const char *title, const char *opname, const char *propname, const struct wmEvent *event)
void uiTemplatePalette(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool colors)
int(* uiButPushedStateFunc)(struct bContext *C, void *arg)
Definition: UI_interface.h:523
uiLayout * uiLayoutListBox(uiLayout *layout, struct uiList *ui_list, struct PointerRNA *actptr, struct PropertyRNA *actprop)
void UI_but_func_operator_search(uiBut *but)
int UI_autocomplete_end(AutoComplete *autocpl, char *autoname)
Definition: interface.c:4829
void UI_widgetbase_draw_cache_end(void)
void uiLayoutSetUnitsX(uiLayout *layout, float unit)
void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, float value)
void UI_editsource_active_but_test(uiBut *but)
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *used_ptr, const char *used_propname, int active_layer)
void UI_panel_category_add(struct ARegion *region, const char *name)
eUIEmbossType uiLayoutGetEmboss(uiLayout *layout)
void UI_block_end(const struct bContext *C, uiBlock *block)
bool UI_block_is_search_only(const uiBlock *block)
Definition: interface.c:3552
uiBut * uiDefButR(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5144
void UI_but_type_set_menu_from_pulldown(uiBut *but)
Definition: interface.c:6114
void UI_popup_block_invoke(struct bContext *C, uiBlockCreateFunc func, void *arg, void(*arg_free)(void *arg))
bool UI_but_active_only_ex(const struct bContext *C, struct ARegion *region, uiBlock *block, uiBut *but, const bool remove_on_failure)
void uiItemPointerR_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, struct PointerRNA *searchptr, struct PropertyRNA *searchprop, const char *name, int icon)
int UI_icon_from_id(const struct ID *id)
void UI_popup_block_invoke_ex(struct bContext *C, uiBlockCreateFunc func, void *arg, void(*arg_free)(void *arg), bool can_refresh)
uiBut * uiDefSearchButO_ptr(uiBlock *block, struct wmOperatorType *ot, struct IDProperty *properties, void *arg, int retval, int icon, int maxlen, int x, int y, short width, short height, float a1, float a2, const char *tip)
Definition: interface.c:6783
int uiLayoutGetLocalDir(const uiLayout *layout)
void uiItemPopoverPanel(uiLayout *layout, struct bContext *C, const char *panel_type, const char *name, int icon)
#define UI_MAX_DRAW_STR
Definition: UI_interface.h:90
eBlockBoundsCalc
Definition: UI_interface.h:694
@ UI_BLOCK_BOUNDS_PIE_CENTER
Definition: UI_interface.h:701
@ UI_BLOCK_BOUNDS_POPUP_MOUSE
Definition: UI_interface.h:698
@ UI_BLOCK_BOUNDS_POPUP_CENTER
Definition: UI_interface.h:700
@ UI_BLOCK_BOUNDS_POPUP_MENU
Definition: UI_interface.h:699
@ UI_BLOCK_BOUNDS_TEXT
Definition: UI_interface.h:697
@ UI_BLOCK_BOUNDS
Definition: UI_interface.h:696
@ UI_BLOCK_BOUNDS_NONE
Definition: UI_interface.h:695
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
Definition: interface.c:3542
void UI_popup_block_ex(struct bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg, struct wmOperator *op)
uiBut * uiDefButS(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5020
void uiItemSpacer(uiLayout *layout)
struct uiPropertySplitWrapper uiPropertySplitWrapper
void uiLayoutSetKeepAspect(uiLayout *layout, bool keepaspect)
int UI_icon_from_keymap_item(const struct wmKeyMapItem *kmi, int r_icon_mod[4])
void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr)
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
bool uiLayoutGetFixedSize(uiLayout *layout)
void UI_block_func_set(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2)
Definition: interface.c:6259
struct ARegion *(* uiButSearchTooltipFn)(struct bContext *C, struct ARegion *region, const struct rcti *item_rect, void *arg, void *active)
Definition: UI_interface.h:515
void UI_but_func_search_set_context_menu(uiBut *but, uiButSearchContextMenuFn context_menu_fn)
Definition: interface.c:6671
void UI_popup_handlers_add(struct bContext *C, struct ListBase *handlers, uiPopupBlockHandle *popup, const char flag)
void UI_block_bounds_set_menu(uiBlock *block, int addval, const int bounds_offset[2])
Definition: interface.c:613
void(* uiButHandleRenameFunc)(struct bContext *C, void *arg, char *origstr)
Definition: UI_interface.h:493
bool UI_but_active_only(const struct bContext *C, struct ARegion *region, uiBlock *block, uiBut *but)
void uiItemEnumR_prop(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, struct PropertyRNA *prop, int value)
bool UI_editsource_enable_check(void)
void uiTemplateOperatorRedoProperties(uiLayout *layout, const struct bContext *C)
void UI_but_func_rename_set(uiBut *but, uiButHandleRenameFunc func, void *arg1)
Definition: interface.c:6277
@ UI_ID_FULL
@ UI_ID_BROWSE
@ UI_ID_DELETE
@ UI_ID_ADD_NEW
@ UI_ID_OPEN
@ UI_ID_PIN
@ UI_ID_RENAME
@ UI_ID_PREVIEWS
@ UI_ID_AUTO_NAME
@ UI_ID_OVERRIDE
@ UI_ID_LOCAL
@ UI_ID_FAKE_USER
@ UI_ID_ALONE
uiBut * uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6355
void UI_tooltip_free(struct bContext *C, struct bScreen *screen, struct ARegion *region)
uiPopupMenu * UI_popup_menu_begin_ex(struct bContext *C, const char *title, const char *block_name, int icon) ATTR_NONNULL()
uiBut * uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:5204
void UI_but_unit_type_set(uiBut *but, const int unit_type)
Definition: interface.c:6228
void uiItemMContents(uiLayout *layout, const char *menuname)
void UI_popover_end(struct bContext *C, struct uiPopover *pup, struct wmKeyMap *keymap)
void UI_but_drawflag_disable(uiBut *but, int flag)
Definition: interface.c:6097
bool uiLayoutGetActiveDefault(uiLayout *layout)
bool UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event, const char **r_tooltip)
@ UI_BLOCK_SEARCH_MENU
Definition: UI_interface.h:152
@ UI_BLOCK_CLIP_EVENTS
Definition: UI_interface.h:155
@ UI_BLOCK_SEARCH_ONLY
Definition: UI_interface.h:168
@ UI_BLOCK_CLIPBOTTOM
Definition: UI_interface.h:146
@ UI_BLOCK_POPOVER_ONCE
Definition: UI_interface.h:163
@ UI_BLOCK_NUMSELECT
Definition: UI_interface.h:143
@ UI_BLOCK_RADIAL
Definition: UI_interface.h:161
@ UI_BLOCK_LOOP
Definition: UI_interface.h:140
@ UI_BLOCK_POPUP_MEMORY
Definition: UI_interface.h:153
@ UI_BLOCK_MOVEMOUSE_QUIT
Definition: UI_interface.h:148
@ UI_BLOCK_KEEP_OPEN
Definition: UI_interface.h:149
@ UI_BLOCK_IS_FLIP
Definition: UI_interface.h:141
@ UI_BLOCK_POPUP
Definition: UI_interface.h:150
@ UI_BLOCK_CLIPTOP
Definition: UI_interface.h:147
@ UI_BLOCK_SHOW_SHORTCUT_ALWAYS
Definition: UI_interface.h:165
@ UI_BLOCK_LIST_ITEM
Definition: UI_interface.h:160
@ UI_BLOCK_NO_FLIP
Definition: UI_interface.h:142
@ UI_BLOCK_POPOVER
Definition: UI_interface.h:162
@ UI_BLOCK_OUT_1
Definition: UI_interface.h:151
@ UI_BLOCK_POPUP_HOLD
Definition: UI_interface.h:159
@ UI_BLOCK_QUICK_SETUP
Definition: UI_interface.h:170
@ UI_BLOCK_NO_WIN_CLIP
Definition: UI_interface.h:145
void(* uiListPanelIDFromDataFunc)(void *data_link, char *r_idname)
int uiLayoutGetOperatorContext(uiLayout *layout)
uiBut * uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5309
struct wmOperatorType * UI_but_operatortype_get_from_enum_menu(struct uiBut *but, struct PropertyRNA **r_prop)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const struct uiStyle *style)
void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void UI_panel_header_buttons_end(struct Panel *panel)
void(* uiButHandleFunc)(struct bContext *C, void *arg1, void *arg2)
Definition: UI_interface.h:492
bool UI_butstore_is_registered(uiBlock *block, uiBut *but)
void UI_block_bounds_set_text(uiBlock *block, int addval)
Definition: interface.c:591
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
Definition: interface.c:6294
void uiTemplateModifiers(uiLayout *layout, struct bContext *C)
void uiItemPopoverPanel_ptr(uiLayout *layout, struct bContext *C, struct PanelType *pt, const char *name, int icon)
struct MenuType * UI_but_menutype_get(uiBut *but)
void uiItemM_ptr(uiLayout *layout, struct MenuType *mt, const char *name, int icon)
void UI_draw_roundbox_3ub_alpha(const struct rctf *rect, bool filled, float rad, const unsigned char col[3], unsigned char alpha)
uiBut * uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5166
uiBut * uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, short *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5050
uiButStore * UI_butstore_create(uiBlock *block)
void UI_panels_end(const struct bContext *C, struct ARegion *region, int *r_x, int *r_y)
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, bool compact, bool multiview)
void UI_block_align_begin(uiBlock *block)
Definition: interface.c:3821
uiLayout * uiLayoutRadial(uiLayout *layout)
@ UI_RETURN_UPDATE
Definition: UI_interface.h:184
@ UI_RETURN_OUT_PARENT
Definition: UI_interface.h:182
@ UI_RETURN_CANCEL
Definition: UI_interface.h:176
@ UI_RETURN_POPUP_OK
Definition: UI_interface.h:186
@ UI_RETURN_OK
Definition: UI_interface.h:178
@ UI_RETURN_OUT
Definition: UI_interface.h:180
bool UI_panel_category_is_visible(const struct ARegion *region)
uiBut * uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6338
int UI_fontstyle_string_width(const struct uiFontStyle *fs, const char *str)
uiStringInfoType
@ BUT_GET_RNA_TIP
@ BUT_GET_RNA_LABEL
@ BUT_GET_LABEL
@ BUT_GET_PROP_KEYMAP
@ BUT_GET_TIP
@ BUT_GET_RNAENUM_TIP
@ BUT_GET_RNASTRUCT_IDENTIFIER
@ BUT_GET_RNAENUM_LABEL
@ BUT_GET_RNAPROP_IDENTIFIER
@ BUT_GET_RNA_LABEL_CONTEXT
@ BUT_GET_RNAENUM_IDENTIFIER
@ BUT_GET_OP_KEYMAP
uiBut * uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6435
uiBut * UI_region_active_but_get(const struct ARegion *region)
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser)
void UI_but_execute(const struct bContext *C, struct ARegion *region, uiBut *but)
uiBut * uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5279
int void UI_popup_menu_retval_set(const uiBlock *block, const int retval, const bool enable)
void UI_butstore_register(uiButStore *bs_handle, uiBut **but_p)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void UI_pie_menu_end(struct bContext *C, uiPieMenu *pie)
int uiLayoutGetWidth(uiLayout *layout)
void UI_butstore_clear(uiBlock *block)
uiBut * uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, struct PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5927
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon)
void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4])
void uiTemplateMovieclipInformation(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr)
Definition: clip_buttons.c:773
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
void UI_block_free(const struct bContext *C, uiBlock *block)
void UI_context_active_but_clear(struct bContext *C, struct wmWindow *win, struct ARegion *region)
void uiItemTabsEnumR_prop(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, struct PointerRNA *ptr_highlight, struct PropertyRNA *prop_highlight, bool icon_only)
void UI_but_func_search_set_results_are_suggestions(uiBut *but, const bool value)
Definition: interface.c:6699
bool UI_block_active_only_flagged_buttons(const struct bContext *C, struct ARegion *region, struct uiBlock *block)
void uiTemplatePreview(uiLayout *layout, struct bContext *C, struct ID *id, bool show_buttons, struct ID *parent, struct MTex *slot, const char *preview_id)
void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string)
Definition: interface.c:6683
void UI_interface_tag_script_reload(void)
Definition: interface.c:7134
float uiLayoutGetScaleX(uiLayout *layout)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname)
Definition: clip_buttons.c:162
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
bool uiTemplateEventFromKeymapItem(struct uiLayout *layout, const char *text, const struct wmKeyMapItem *kmi, bool text_fallback)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiTemplateHeader(uiLayout *layout, struct bContext *C)
void UI_block_order_flip(uiBlock *block)
Definition: interface.c:6034
void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but)
void uiTemplateGpencilColorPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int rows, int cols, float scale, int filter)
void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float *color)
eButGradientType
Definition: UI_interface.h:398
@ UI_GRAD_L_ALT
Definition: UI_interface.h:407
@ UI_GRAD_SV
Definition: UI_interface.h:399
@ UI_GRAD_V_ALT
Definition: UI_interface.h:406
@ UI_GRAD_S
Definition: UI_interface.h:403
@ UI_GRAD_HV
Definition: UI_interface.h:400
@ UI_GRAD_HS
Definition: UI_interface.h:401
@ UI_GRAD_V
Definition: UI_interface.h:404
@ UI_GRAD_H
Definition: UI_interface.h:402
void UI_block_layout_free(uiBlock *block)
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:6393
void UI_block_func_butmenu_set(uiBlock *block, uiMenuHandleFunc func, void *arg)
Definition: interface.c:6253
uiBut * uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5695
void UI_blocklist_draw(const struct bContext *C, const struct ListBase *lb)
void UI_but_number_precision_set(uiBut *but, float precision)
Definition: interface.c:6836
void UI_block_bounds_set_centered(uiBlock *block, int addval)
Definition: interface.c:626
float UI_text_clip_middle_ex(const struct uiFontStyle *fstyle, char *str, float okwidth, const float minwidth, const size_t max_len, const char rpart_sep)
void uiItemDecoratorR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int index)
bool(* uiButSearchContextMenuFn)(struct bContext *C, void *arg, void *active, const struct wmEvent *event)
Definition: UI_interface.h:511
void uiItemMenuEnumR_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, const char *name, int icon)
void UI_but_func_pushed_state_set(uiBut *but, uiButPushedStateFunc func, void *arg)
Definition: interface.c:6332
void UI_context_active_but_prop_get_filebrowser(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, bool *r_is_undo, bool *r_is_userdef)
void uiTemplateTextureUser(uiLayout *layout, struct bContext *C)
void uiTemplateNodeLink(uiLayout *layout, struct bContext *C, struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *input)
void UI_draw_roundbox_4fv_ex(const struct rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad)
void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const char *text)
void uiTemplateInputStatus(uiLayout *layout, struct bContext *C)
struct ARegion * UI_tooltip_create_from_gizmo(struct bContext *C, struct wmGizmo *gz)
void UI_panels_draw(const struct bContext *C, struct ARegion *region)
int UI_icon_from_event_type(short event_type, short event_value)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void UI_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3, const float color[4])
uiBut * uiDefButI(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:4958
uiLayout * uiItemL_respect_property_split(uiLayout *layout, const char *text, int icon)
uiBut * UI_context_active_but_prop_get(const struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop, int *r_index)
void UI_region_handlers_add(struct ListBase *handlers)
void uiTemplateTextureShow(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop)
void uiItemDecoratorR_prop(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index)
bool UI_textbutton_activate_rna(const struct bContext *C, struct ARegion *region, const void *rna_poin_data, const char *rna_prop_id)
uiBut * uiDefIconTextButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:5975
void uiTemplateImageStereo3d(uiLayout *layout, struct PointerRNA *stereo3d_format_ptr)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
void(* uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1)
Definition: UI_interface.h:529
void UI_fontstyle_draw(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params)
void UI_but_drag_set_value(uiBut *but)
Definition: interface.c:6196
struct uiDragColorHandle uiDragColorHandle
void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init)
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool expand)
void(* uiMenuHandleFunc)(struct bContext *C, void *arg, int event)
Definition: UI_interface.h:530
struct uiPieMenu * UI_pie_menu_begin(struct bContext *C, const char *title, int icon, const struct wmEvent *event) ATTR_NONNULL()
bool(* uiMenuStepFunc)(struct bContext *C, int direction, void *arg1)
Definition: UI_interface.h:537
@ UI_SCROLL_NO_OUTLINE
Definition: UI_interface.h:459
@ UI_SCROLL_PRESSED
Definition: UI_interface.h:457
@ UI_SCROLL_ARROWS
Definition: UI_interface.h:458
void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, const char *value)
uiBut * uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x, int y, short width, short height, float a1, float a2, const char *tip)
Definition: interface.c:6573
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *proptypename, const char *text)
uiBut * uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x, int y, short width, short height, char *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5112
void UI_block_direction_set(uiBlock *block, char direction)
Definition: interface.c:6028
void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN)
Definition: interface.c:6864
bool UI_context_copy_to_selected_list(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, struct ListBase *r_lb, bool *r_use_path_from_id, char **r_path)
void UI_draw_box_shadow(const struct rctf *rect, unsigned char alpha)
void UI_but_focus_on_enter_event(struct wmWindow *win, uiBut *but)
Definition: interface.c:6850
int UI_search_items_find_index(uiSearchItems *items, const char *name)
@ UI_TEMPLATE_OP_PROPS_HIDE_ADVANCED
@ UI_TEMPLATE_OP_PROPS_SHOW_EMPTY
@ UI_TEMPLATE_OP_PROPS_SHOW_TITLE
@ UI_TEMPLATE_OP_PROPS_COMPACT
@ UI_TEMPLATE_OP_PROPS_NO_SPLIT_LAYOUT
void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, const char *propname, int value)
eButPointerType
Definition: UI_interface.h:320
@ UI_BUT_POIN_SHORT
Definition: UI_interface.h:322
@ UI_BUT_POIN_INT
Definition: UI_interface.h:323
@ UI_BUT_POIN_BIT
Definition: UI_interface.h:326
@ UI_BUT_POIN_CHAR
Definition: UI_interface.h:321
@ UI_BUT_POIN_FLOAT
Definition: UI_interface.h:324
bool UI_panel_matches_search_filter(const struct Panel *panel)
void UI_but_func_complete_set(uiBut *but, uiButCompleteFunc func, void *arg)
Definition: interface.c:6312
void UI_fontstyle_draw_simple_backdrop(const struct uiFontStyle *fs, float x, float y, const char *str, const float col_fg[4], const float col_bg[4])
struct ARegion * UI_region_searchbox_region_get(const struct ARegion *button_region)
void UI_exit(void)
Definition: interface.c:7128
struct Panel * UI_panel_begin(struct ARegion *region, struct ListBase *lb, uiBlock *block, struct PanelType *pt, struct Panel *panel, bool *r_open)
void UI_but_func_drawextra_set(uiBlock *block, void(*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect), void *arg1, void *arg2)
void UI_block_layout_set_current(uiBlock *block, uiLayout *layout)
void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg)
void uiItemFullR(uiLayout *layout, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, int value, int flag, const char *name, int icon)
@ UI_DIR_CENTER_X
Definition: UI_interface.h:126
@ UI_DIR_CENTER_Y
Definition: UI_interface.h:127
@ UI_DIR_ALL
Definition: UI_interface.h:129
@ UI_DIR_DOWN
Definition: UI_interface.h:123
@ UI_DIR_RIGHT
Definition: UI_interface.h:125
@ UI_DIR_LEFT
Definition: UI_interface.h:124
@ UI_DIR_UP
Definition: UI_interface.h:122
void uiTemplateCacheFile(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname)
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2)
Definition: interface.c:6301
void UI_theme_init_default(void)
Definition: resources.c:1041
void UI_widgetbase_draw_cache_flush(void)
void UI_but_drag_set_asset(uiBut *but, const char *name, const char *path, int id_type, int icon, struct ImBuf *imb, float scale)
Definition: interface.c:6137
void UI_reinit_font(void)
Definition: interface.c:7123
int UI_popover_panel_invoke(struct bContext *C, const char *idname, bool keep_open, struct ReportList *reports)
@ UI_LAYOUT_VERTICAL
@ UI_LAYOUT_HORIZONTAL
uiBut * uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5761
void UI_block_end_ex(const struct bContext *C, uiBlock *block, const int xy[2], int r_xy[2])
void UI_block_flag_enable(uiBlock *block, int flag)
Definition: interface.c:6067
uiBut * uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x, int y, short width, short height, int *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5371
eButType
Definition: UI_interface.h:333
@ UI_BTYPE_BUT
Definition: UI_interface.h:334
@ UI_BTYPE_TOGGLE
Definition: UI_interface.h:344
@ UI_BTYPE_EXTRA
Definition: UI_interface.h:377
@ UI_BTYPE_TAB
Definition: UI_interface.h:354
@ UI_BTYPE_HOTKEY_EVENT
Definition: UI_interface.h:378
@ UI_BTYPE_LISTBOX
Definition: UI_interface.h:370
@ UI_BTYPE_VECTORSCOPE
Definition: UI_interface.h:383
@ UI_BTYPE_SEPR_SPACER
Definition: UI_interface.h:389
@ UI_BTYPE_NODE_SOCKET
Definition: UI_interface.h:385
@ UI_BTYPE_ROUNDBOX
Definition: UI_interface.h:363
@ UI_BTYPE_COLORBAND
Definition: UI_interface.h:364
@ UI_BTYPE_BUT_MENU
Definition: UI_interface.h:339
@ UI_BTYPE_TOGGLE_N
Definition: UI_interface.h:345
@ UI_BTYPE_HISTOGRAM
Definition: UI_interface.h:381
@ UI_BTYPE_WAVEFORM
Definition: UI_interface.h:382
@ UI_BTYPE_BLOCK
Definition: UI_interface.h:357
@ UI_BTYPE_NUM_SLIDER
Definition: UI_interface.h:343
@ UI_BTYPE_HSVCIRCLE
Definition: UI_interface.h:372
@ UI_BTYPE_LISTROW
Definition: UI_interface.h:371
@ UI_BTYPE_TEXT
Definition: UI_interface.h:336
@ UI_BTYPE_BUT_TOGGLE
Definition: UI_interface.h:349
@ UI_BTYPE_HSVCUBE
Definition: UI_interface.h:360
@ UI_BTYPE_LABEL
Definition: UI_interface.h:358
@ UI_BTYPE_CURVE
Definition: UI_interface.h:367
@ UI_BTYPE_ICON_TOGGLE_N
Definition: UI_interface.h:347
@ UI_BTYPE_DECORATOR
Definition: UI_interface.h:392
@ UI_BTYPE_ROW
Definition: UI_interface.h:335
@ UI_BTYPE_SEARCH_MENU
Definition: UI_interface.h:376
@ UI_BTYPE_UNITVEC
Definition: UI_interface.h:366
@ UI_BTYPE_SEPR_LINE
Definition: UI_interface.h:387
@ UI_BTYPE_KEY_EVENT
Definition: UI_interface.h:359
@ UI_BTYPE_PROGRESS_BAR
Definition: UI_interface.h:384
@ UI_BTYPE_POPOVER
Definition: UI_interface.h:355
@ UI_BTYPE_CHECKBOX_N
Definition: UI_interface.h:352
@ UI_BTYPE_SEPR
Definition: UI_interface.h:386
@ UI_BTYPE_NUM
Definition: UI_interface.h:341
@ UI_BTYPE_PULLDOWN
Definition: UI_interface.h:362
@ UI_BTYPE_CURVEPROFILE
Definition: UI_interface.h:369
@ UI_BTYPE_TRACK_PREVIEW
Definition: UI_interface.h:373
@ UI_BTYPE_COLOR
Definition: UI_interface.h:353
@ UI_BTYPE_CHECKBOX
Definition: UI_interface.h:351
@ UI_BTYPE_GRIP
Definition: UI_interface.h:391
@ UI_BTYPE_MENU
Definition: UI_interface.h:338
@ UI_BTYPE_ICON_TOGGLE
Definition: UI_interface.h:346
@ UI_BTYPE_IMAGE
Definition: UI_interface.h:380
@ UI_BTYPE_SCROLL
Definition: UI_interface.h:356
uiBut * UI_context_active_but_get_respect_menu(const struct bContext *C)
void UI_block_translate(uiBlock *block, int x, int y)
Definition: interface.c:353
void UI_popup_handlers_remove(struct ListBase *handlers, uiPopupBlockHandle *popup)
void uiTemplateColorPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
uiBut * uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:5992
uiPopover * UI_popover_begin(struct bContext *C, int menu_width, bool from_active_button) ATTR_NONNULL(1)
uiBut * uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x, int y, short width, short height, short *keypoin, const short *modkeypoin, const char *tip)
Definition: interface.c:6541
const char * UI_layout_introspect(uiLayout *layout)
void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, struct PointerRNA *trackptr, bool compact)
Definition: clip_buttons.c:393
@ UI_BLOCK_THEME_STYLE_REGULAR
Definition: UI_interface.h:670
@ UI_BLOCK_THEME_STYLE_POPUP
Definition: UI_interface.h:671
void(* uiBlockCancelFunc)(struct bContext *C, void *arg1)
Definition: UI_interface.h:620
bool uiLayoutGetRedAlert(uiLayout *layout)
int UI_popup_menu_invoke(struct bContext *C, const char *idname, struct ReportList *reports) ATTR_NONNULL(1
void UI_template_fix_linking(void)
void UI_draw_safe_areas(uint pos, const struct rctf *rect, const float title_aspect[2], const float action_aspect[2])
bool UI_popup_block_name_exists(const struct bScreen *screen, const char *name)
void UI_block_funcN_set(uiBlock *block, uiButHandleNFunc funcN, void *argN, void *arg2)
Definition: interface.c:6266
void UI_fontstyle_draw_rotated(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, const uchar col[4])
struct ID * UI_context_active_but_get_tab_ID(struct bContext *C)
int UI_calc_float_precision(int prec, double value)
void UI_block_region_set(uiBlock *block, struct ARegion *region)
Definition: interface.c:3468
void UI_context_update_anim_flag(const struct bContext *C)
uiBut * UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *rect_px)
uiBut * uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
Definition: interface.c:4728
void UI_init_userdef(void)
Definition: interface.c:7117
void uiTemplateList(uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id, struct PointerRNA *dataptr, const char *propname, struct PointerRNA *active_dataptr, const char *active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, bool sort_reverse, bool sort_lock)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
bool UI_panel_is_closed(const struct Panel *panel)
bool UI_but_is_tool(const uiBut *but)
void uiTemplateWaveform(uiLayout *layout, struct PointerRNA *ptr, const char *propname)
void UI_block_update_from_old(const struct bContext *C, struct uiBlock *block)
void UI_block_set_search_only(uiBlock *block, bool search_only)
Definition: interface.c:3561
void uiTemplateComponentMenu(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name)
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr)
Definition: interface.c:2211
void uiItemMenuFN(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *argN)
void uiItemEnumO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, const char *propname, int value)
void UI_autocomplete_update_name(AutoComplete *autocpl, const char *name)
Definition: interface.c:4795
uiBut * uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, int x, int y, short width, short height, const char *tip)
Definition: interface.c:5587
void UI_but_flag_enable(uiBut *but, int flag)
Definition: interface.c:6077
void UI_but_string_info_get(struct bContext *C, uiBut *but,...) ATTR_SENTINEL(0)
Definition: interface.c:6870
bool UI_popup_menu_end_or_cancel(struct bContext *C, struct uiPopupMenu *head)
uiBlock *(* uiBlockCreateFunc)(struct bContext *C, struct ARegion *region, void *arg1)
Definition: UI_interface.h:619
bool UI_panel_is_dragging(const struct Panel *panel)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
int UI_pie_menu_invoke(struct bContext *C, const char *idname, const struct wmEvent *event)
bool UI_but_online_manual_id_from_active(const struct bContext *C, char *r_str, size_t maxlength) ATTR_WARN_UNUSED_RESULT
void uiItemM(uiLayout *layout, const char *menuname, const char *name, int icon)
void UI_draw_widget_scroll(struct uiWidgetColors *wcol, const struct rcti *rect, const struct rcti *slider, int state)
void uiTemplateImageFormatViews(uiLayout *layout, struct PointerRNA *imfptr, struct PointerRNA *ptr)
uiBut * uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, float *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:5663
void uiTemplateConstraintHeader(uiLayout *layout, struct PointerRNA *ptr)
bool UI_but_flag_is_set(uiBut *but, int flag)
Definition: interface.c:6087
bool UI_but_has_tooltip_label(const uiBut *but)
uiBut * uiDefButO_ptr(uiBlock *block, int type, struct wmOperatorType *ot, int opcontext, const char *str, int x, int y, short width, short height, const char *tip)
Definition: interface.c:5189
void uiItemLDrag(uiLayout *layout, struct PointerRNA *ptr, const char *name, int icon)
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv)
void UI_but_drag_set_name(uiBut *but, const char *name)
Definition: interface.c:6185
void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy)
Definition: interface.c:632
void UI_block_align_end(uiBlock *block)
Definition: interface.c:3834
uiLayout * uiItemsAlertBox(uiBlock *block, const int size, const eAlertIcon icon)
eAlertIcon
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
Definition: btQuaternion.h:895
OperationNode * node
void * user_data
static CCL_NAMESPACE_BEGIN const double alpha
bNodeTree * ntree
#define str(s)
uint pos
uint col
uint padding(uint offset, uint alignment)
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
bool enabled
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
static ulong state[N]
bool active
all scheduled work for the GPU.
struct SELECTID_Context context
Definition: select_engine.c:47
#define min(a, b)
Definition: sort.c:51
unsigned char uint8_t
Definition: stdint.h:81
size_t maxlen
Definition: interface.c:4776
const char * startname
Definition: interface.c:4779
Definition: DNA_ID.h:273
struct PanelType * parent
Definition: BKE_screen.h:288
struct uiLayout * layout
short flag
struct bScreen * screen
Definition: context.c:77
struct ARegion * region
Definition: context.c:79
eFontStyle_Align align
uiStringInfoType type
float max
uint len
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156