|
|
|
@@ -25,6 +25,8 @@
|
|
|
|
|
#define __INTERFACE_INTERN_H__
|
|
|
|
|
|
|
|
|
|
#include "BLI_compiler_attrs.h"
|
|
|
|
|
#include "BLI_rect.h"
|
|
|
|
|
|
|
|
|
|
#include "DNA_listBase.h"
|
|
|
|
|
#include "RNA_types.h"
|
|
|
|
|
#include "UI_interface.h"
|
|
|
|
@@ -345,7 +347,7 @@ struct uiBlock {
|
|
|
|
|
uiBlock *next, *prev;
|
|
|
|
|
|
|
|
|
|
ListBase buttons;
|
|
|
|
|
Panel *panel;
|
|
|
|
|
struct Panel *panel;
|
|
|
|
|
uiBlock *oldblock;
|
|
|
|
|
|
|
|
|
|
ListBase butstore; /* UI_butstore_* runtime function */
|
|
|
|
@@ -477,8 +479,10 @@ extern void ui_window_to_block_rctf(const struct ARegion *region,
|
|
|
|
|
uiBlock *block,
|
|
|
|
|
rctf *rct_dst,
|
|
|
|
|
const rctf *rct_src);
|
|
|
|
|
extern void ui_window_to_region(const ARegion *region, int *x, int *y);
|
|
|
|
|
extern void ui_window_to_region_rcti(const ARegion *region, rcti *rect_dst, const rcti *rct_src);
|
|
|
|
|
extern void ui_window_to_region(const struct ARegion *region, int *x, int *y);
|
|
|
|
|
extern void ui_window_to_region_rcti(const struct ARegion *region,
|
|
|
|
|
rcti *rect_dst,
|
|
|
|
|
const rcti *rct_src);
|
|
|
|
|
extern void ui_region_to_window(const struct ARegion *region, int *x, int *y);
|
|
|
|
|
extern void ui_region_winrct_get_no_margin(const struct ARegion *region, struct rcti *r_rect);
|
|
|
|
|
|
|
|
|
@@ -566,7 +570,7 @@ struct uiPopupBlockCreate {
|
|
|
|
|
int event_xy[2];
|
|
|
|
|
|
|
|
|
|
/* when popup is initialized from a button */
|
|
|
|
|
ARegion *butregion;
|
|
|
|
|
struct ARegion *butregion;
|
|
|
|
|
uiBut *but;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -598,8 +602,8 @@ struct uiPopupBlockHandle {
|
|
|
|
|
/* for operator popups */
|
|
|
|
|
struct wmOperator *popup_op;
|
|
|
|
|
struct wmOperatorType *optype;
|
|
|
|
|
ScrArea *ctx_area;
|
|
|
|
|
ARegion *ctx_region;
|
|
|
|
|
struct ScrArea *ctx_area;
|
|
|
|
|
struct ARegion *ctx_region;
|
|
|
|
|
int opcontext;
|
|
|
|
|
|
|
|
|
|
/* return values */
|
|
|
|
@@ -648,9 +652,15 @@ ColorPicker *ui_block_colorpicker_create(struct uiBlock *block);
|
|
|
|
|
|
|
|
|
|
/* interface_region_search.c */
|
|
|
|
|
/* Searchbox for string button */
|
|
|
|
|
ARegion *ui_searchbox_create_generic(struct bContext *C, struct ARegion *butregion, uiBut *but);
|
|
|
|
|
ARegion *ui_searchbox_create_operator(struct bContext *C, struct ARegion *butregion, uiBut *but);
|
|
|
|
|
ARegion *ui_searchbox_create_menu(struct bContext *C, struct ARegion *butregion, uiBut *but);
|
|
|
|
|
struct ARegion *ui_searchbox_create_generic(struct bContext *C,
|
|
|
|
|
struct ARegion *butregion,
|
|
|
|
|
uiBut *but);
|
|
|
|
|
struct ARegion *ui_searchbox_create_operator(struct bContext *C,
|
|
|
|
|
struct ARegion *butregion,
|
|
|
|
|
uiBut *but);
|
|
|
|
|
struct ARegion *ui_searchbox_create_menu(struct bContext *C,
|
|
|
|
|
struct ARegion *butregion,
|
|
|
|
|
uiBut *but);
|
|
|
|
|
|
|
|
|
|
bool ui_searchbox_inside(struct ARegion *region, int x, int y);
|
|
|
|
|
int ui_searchbox_find_index(struct ARegion *region, const char *name);
|
|
|
|
@@ -672,7 +682,7 @@ void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but);
|
|
|
|
|
|
|
|
|
|
uiBlock *ui_popup_block_refresh(struct bContext *C,
|
|
|
|
|
uiPopupBlockHandle *handle,
|
|
|
|
|
ARegion *butregion,
|
|
|
|
|
struct ARegion *butregion,
|
|
|
|
|
uiBut *but);
|
|
|
|
|
|
|
|
|
|
uiPopupBlockHandle *ui_popup_block_create(struct bContext *C,
|
|
|
|
@@ -733,33 +743,33 @@ void ui_draw_but_TAB_outline(const rcti *rect,
|
|
|
|
|
float rad,
|
|
|
|
|
uchar highlight[3],
|
|
|
|
|
uchar highlight_fade[3]);
|
|
|
|
|
void ui_draw_but_HISTOGRAM(ARegion *region,
|
|
|
|
|
void ui_draw_but_HISTOGRAM(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
|
void ui_draw_but_WAVEFORM(ARegion *region,
|
|
|
|
|
void ui_draw_but_WAVEFORM(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
|
void ui_draw_but_VECTORSCOPE(ARegion *region,
|
|
|
|
|
void ui_draw_but_VECTORSCOPE(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
|
void ui_draw_but_COLORBAND(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect);
|
|
|
|
|
void ui_draw_but_UNITVEC(uiBut *but, const struct uiWidgetColors *wcol, const rcti *rect);
|
|
|
|
|
void ui_draw_but_CURVE(ARegion *region,
|
|
|
|
|
void ui_draw_but_CURVE(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
|
void ui_draw_but_CURVEPROFILE(ARegion *region,
|
|
|
|
|
void ui_draw_but_CURVEPROFILE(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
|
void ui_draw_but_IMAGE(ARegion *region,
|
|
|
|
|
void ui_draw_but_IMAGE(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
|
void ui_draw_but_TRACKPREVIEW(ARegion *region,
|
|
|
|
|
void ui_draw_but_TRACKPREVIEW(struct ARegion *region,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
const struct uiWidgetColors *wcol,
|
|
|
|
|
const rcti *rect);
|
|
|
|
@@ -836,7 +846,10 @@ struct GPUBatch *ui_batch_roundbox_shadow_get(void);
|
|
|
|
|
|
|
|
|
|
void ui_draw_anti_tria_rect(const rctf *rect, char dir, const float color[4]);
|
|
|
|
|
void ui_draw_menu_back(struct uiStyle *style, uiBlock *block, rcti *rect);
|
|
|
|
|
void ui_draw_popover_back(ARegion *region, struct uiStyle *style, uiBlock *block, rcti *rect);
|
|
|
|
|
void ui_draw_popover_back(struct ARegion *region,
|
|
|
|
|
struct uiStyle *style,
|
|
|
|
|
uiBlock *block,
|
|
|
|
|
rcti *rect);
|
|
|
|
|
void ui_draw_pie_center(uiBlock *block);
|
|
|
|
|
const struct uiWidgetColors *ui_tooltip_get_theme(void);
|
|
|
|
|
|
|
|
|
@@ -844,8 +857,11 @@ void ui_draw_widget_menu_back_color(const rcti *rect, bool use_shadow, const flo
|
|
|
|
|
void ui_draw_widget_menu_back(const rcti *rect, bool use_shadow);
|
|
|
|
|
void ui_draw_tooltip_background(const struct uiStyle *UNUSED(style), uiBlock *block, rcti *rect);
|
|
|
|
|
|
|
|
|
|
extern void ui_draw_but(
|
|
|
|
|
const struct bContext *C, ARegion *region, struct uiStyle *style, uiBut *but, rcti *rect);
|
|
|
|
|
extern void ui_draw_but(const struct bContext *C,
|
|
|
|
|
struct ARegion *region,
|
|
|
|
|
struct uiStyle *style,
|
|
|
|
|
uiBut *but,
|
|
|
|
|
rcti *rect);
|
|
|
|
|
|
|
|
|
|
void ui_draw_menu_item(const struct uiFontStyle *fstyle,
|
|
|
|
|
rcti *rect,
|
|
|
|
@@ -895,8 +911,8 @@ void ui_item_paneltype_func(struct bContext *C, struct uiLayout *layout, void *a
|
|
|
|
|
|
|
|
|
|
/* interface_align.c */
|
|
|
|
|
bool ui_but_can_align(const uiBut *but) ATTR_WARN_UNUSED_RESULT;
|
|
|
|
|
int ui_but_align_opposite_to_area_align_get(const ARegion *region) ATTR_WARN_UNUSED_RESULT;
|
|
|
|
|
void ui_block_align_calc(uiBlock *block, const ARegion *region);
|
|
|
|
|
int ui_but_align_opposite_to_area_align_get(const struct ARegion *region) ATTR_WARN_UNUSED_RESULT;
|
|
|
|
|
void ui_block_align_calc(uiBlock *block, const struct ARegion *region);
|
|
|
|
|
|
|
|
|
|
/* interface_anim.c */
|
|
|
|
|
void ui_but_anim_flag(uiBut *but, float cfra);
|
|
|
|
@@ -973,8 +989,9 @@ bool ui_region_contains_point_px(const struct ARegion *region,
|
|
|
|
|
int y) ATTR_WARN_UNUSED_RESULT;
|
|
|
|
|
bool ui_region_contains_rect_px(const struct ARegion *region, const rcti *rect_px);
|
|
|
|
|
|
|
|
|
|
ARegion *ui_screen_region_find_mouse_over_ex(bScreen *screen, int x, int y);
|
|
|
|
|
ARegion *ui_screen_region_find_mouse_over(bScreen *screen, const struct wmEvent *event);
|
|
|
|
|
struct ARegion *ui_screen_region_find_mouse_over_ex(struct bScreen *screen, int x, int y);
|
|
|
|
|
struct ARegion *ui_screen_region_find_mouse_over(struct bScreen *screen,
|
|
|
|
|
const struct wmEvent *event);
|
|
|
|
|
|
|
|
|
|
/* interface_context_menu.c */
|
|
|
|
|
bool ui_popup_context_menu_for_button(struct bContext *C, uiBut *but);
|
|
|
|
|