|
|
|
@@ -25,8 +25,9 @@
|
|
|
|
|
#define __INTERFACE_INTERN_H__
|
|
|
|
|
|
|
|
|
|
#include "BLI_compiler_attrs.h"
|
|
|
|
|
#include "BLI_rect.h"
|
|
|
|
|
|
|
|
|
|
#include "DNA_listBase.h"
|
|
|
|
|
#include "DNA_screen_types.h"
|
|
|
|
|
#include "RNA_types.h"
|
|
|
|
|
#include "UI_interface.h"
|
|
|
|
|
#include "UI_resources.h"
|
|
|
|
@@ -354,7 +355,7 @@ struct uiBlock {
|
|
|
|
|
uiBlock *next, *prev;
|
|
|
|
|
|
|
|
|
|
ListBase buttons;
|
|
|
|
|
Panel *panel;
|
|
|
|
|
struct Panel *panel;
|
|
|
|
|
uiBlock *oldblock;
|
|
|
|
|
|
|
|
|
|
ListBase butstore; /* UI_butstore_* runtime function */
|
|
|
|
@@ -486,8 +487,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);
|
|
|
|
|
|
|
|
|
@@ -575,7 +578,7 @@ struct uiPopupBlockCreate {
|
|
|
|
|
int event_xy[2];
|
|
|
|
|
|
|
|
|
|
/* when popup is initialized from a button */
|
|
|
|
|
ARegion *butregion;
|
|
|
|
|
struct ARegion *butregion;
|
|
|
|
|
uiBut *but;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@@ -606,8 +609,8 @@ struct uiPopupBlockHandle {
|
|
|
|
|
|
|
|
|
|
/* for operator popups */
|
|
|
|
|
struct wmOperator *popup_op;
|
|
|
|
|
ScrArea *ctx_area;
|
|
|
|
|
ARegion *ctx_region;
|
|
|
|
|
struct ScrArea *ctx_area;
|
|
|
|
|
struct ARegion *ctx_region;
|
|
|
|
|
|
|
|
|
|
/* return values */
|
|
|
|
|
int butretval;
|
|
|
|
@@ -655,9 +658,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);
|
|
|
|
@@ -680,7 +689,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,
|
|
|
|
@@ -707,7 +716,7 @@ uiPopupBlockHandle *ui_popover_panel_create(struct bContext *C,
|
|
|
|
|
void ui_pie_menu_level_create(uiBlock *block,
|
|
|
|
|
struct wmOperatorType *ot,
|
|
|
|
|
const char *propname,
|
|
|
|
|
IDProperty *properties,
|
|
|
|
|
struct IDProperty *properties,
|
|
|
|
|
const EnumPropertyItem *items,
|
|
|
|
|
int totitem,
|
|
|
|
|
int context,
|
|
|
|
@@ -741,33 +750,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);
|
|
|
|
@@ -859,7 +868,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);
|
|
|
|
|
|
|
|
|
@@ -867,8 +879,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,
|
|
|
|
@@ -918,8 +933,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);
|
|
|
|
@@ -996,8 +1011,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);
|
|
|
|
|