57 #define ANIMATION_TIME 0.30
58 #define ANIMATION_INTERVAL 0.02
130 Panel **r_panel_animation,
131 bool *r_no_animation)
135 if (!(panel->type && panel->type->parent)) {
146 *r_panel_animation = panel;
157 if (panel->activedata) {
160 *r_panel_animation = panel;
164 *r_no_animation =
true;
168 *r_panel_animation = panel;
193 *r_panel_animation =
NULL;
201 bool no_animation =
false;
207 if (panel_animation) {
209 *r_panel_animation = panel_animation;
229 panel->
type = panel_type;
247 int max_sortorder = 0;
249 if (existing_panel->sortorder > max_sortorder) {
250 max_sortorder = existing_panel->sortorder;
263 const char *panel_idname,
271 if (panel_type ==
NULL) {
272 printf(
"Panel type '%s' not found.\n", panel_idname);
319 if (
C !=
NULL && panel->activedata !=
NULL) {
324 if (panel->runtime.custom_data_ptr !=
NULL) {
325 MEM_freeN(panel->runtime.custom_data_ptr);
347 data_link =
data->first;
359 if (data_link ==
NULL) {
365 panel_idname_func(data_link, panel_idname);
366 if (!
STREQ(panel_idname, panel->type->idname)) {
370 data_link = data_link->
next;
400 int list_panels_len = 0;
401 int start_index = -1;
406 if (panel == drag_panel) {
408 start_index = list_panels_len;
424 sort_index->
panel = panel;
430 qsort(panel_sort, list_panels_len,
sizeof(*panel_sort),
compare_panel);
433 int move_to_index = 0;
434 for (; move_to_index < list_panels_len; move_to_index++) {
435 if (panel_sort[move_to_index].panel == drag_panel) {
442 if (move_to_index == start_index) {
453 drag_panel->
type->
reorder(
C, drag_panel, move_to_index);
465 const bool open = (flag & (1 << *flag_index));
471 *flag_index = *flag_index + 1;
491 short flag_index = 0;
523 *flag_index = *flag_index + 1;
540 if (panel_type ==
NULL) {
547 short flag_index = 0;
549 if (panel->type->set_list_data_expand_flag) {
550 panel->type->set_list_data_expand_flag(
C, panel, expand_flag);
655 const char *idname = pt->
idname;
658 if (
STREQLEN(panel->panelname, idname,
sizeof(panel->panelname))) {
670 const char *idname = pt->
idname;
671 const bool newpanel = (panel ==
NULL);
704 for (panel_last = lb->
first; panel_last; panel_last = panel_last->
next) {
717 panel_next->sortorder++;
727 block->
panel = panel;
812 const int old_sizex = panel->
sizex, old_sizey = panel->
sizey;
824 if (panel->
sizex != old_sizex || panel->
sizey != old_sizey) {
854 but->rect.ymin += ofsy;
855 but->rect.ymax += ofsy;
873 if (!*filter_matches) {
882 bool search_filter_matches =
false;
884 return search_filter_matches;
892 const bool use_search_closed)
912 const bool use_search_closed)
947 uiBut *but = link->data;
1015 #define PNL_ICON UI_UNIT_X
1031 const bool show_background,
1032 const bool region_search_filter_active,
1035 if (!show_background) {
1046 if (region_search_filter_active && !search_match) {
1055 const rcti *header_rect)
1074 .ymax = header_rect->
ymax,
1083 const rcti *header_rect,
1085 const bool show_pin,
1086 const bool show_background,
1087 const bool region_search_filter_active)
1096 const rcti widget_rect = {
1097 .
xmin = header_rect->
xmin + (is_subpanel ? scaled_unit * 0.7f : 0),
1098 .xmax = header_rect->
xmax,
1099 .ymin = header_rect->
ymin,
1100 .ymax = header_rect->
ymax,
1103 uchar title_color[4];
1105 title_color[3] = 255;
1112 widget_rect.
ymin + size_y * 0.2f,
1114 aspect *
U.inv_dpi_fac,
1124 const rcti title_rect = {
1125 .
xmin = widget_rect.
xmin + (panel->
labelofs / aspect) + scaled_unit * 1.1f,
1126 .xmax = widget_rect.
xmax,
1127 .ymin = widget_rect.
ymin - 2.0f / aspect,
1128 .ymax = widget_rect.
ymax,
1136 .align = UI_STYLE_TEXT_LEFT,
1144 widget_rect.
ymin + 5.0f / aspect,
1146 aspect *
U.inv_dpi_fac,
1155 if (!is_subpanel && show_background) {
1156 const int drag_widget_size = header_height * 0.7f;
1161 widget_rect.
ymin + (header_height - drag_widget_size) * 0.5f);
1163 const int col_tint = 84;
1164 float color_high[4], color_dark[4];
1169 U.pixelsize, color_high, color_dark, drag_widget_size);
1178 const rcti *header_rect)
1183 if (is_subpanel && !is_open) {
1196 float panel_backcolor[4];
1214 float panel_headercolor[4];
1224 .ymin = header_rect->
ymin,
1225 .ymax = header_rect->
ymax,
1239 const bool show_pin,
1240 const bool show_background,
1241 const bool region_search_filter_active)
1246 const rcti header_rect = {
1253 if (show_background) {
1265 region_search_filter_active);
1297 #define TABS_PADDING_BETWEEN_FACTOR 4.0f
1298 #define TABS_PADDING_TEXT_FACTOR 6.0f
1308 float fstyle_points = fstyle->
points;
1310 const float zoom = 1.0f / aspect;
1311 const int px =
U.pixelsize;
1323 bool do_scaletabs =
false;
1324 #ifdef USE_FLAT_INACTIVE
1325 bool is_active_prev =
false;
1327 float scaletabs = 1.0f;
1332 const int text_v_ofs = (rct_xmax - rct_xmin) * 0.3f;
1334 int y_ofs = tab_v_pad;
1337 uchar theme_col_back[4];
1338 uchar theme_col_text[3];
1339 uchar theme_col_text_hi[3];
1342 uchar theme_col_tab_bg[4];
1343 float theme_col_tab_active[4];
1344 float theme_col_tab_inactive[4];
1345 float theme_col_tab_outline[4];
1356 is_alpha = (region->
overlap && (theme_col_back[3] != 255));
1361 BLF_size(fontid, fstyle_points *
U.pixelsize,
U.dpi);
1371 rcti *rct = &pc_dyn->rect;
1372 const char *category_id = pc_dyn->idname;
1373 const char *category_id_draw =
IFACE_(category_id);
1376 rct->
xmin = rct_xmin;
1377 rct->
xmax = rct_xmax;
1379 rct->
ymin = v2d->
mask.
ymax - (y_ofs + category_width + (tab_v_pad_text * 2));
1382 y_ofs += category_width + tab_v_pad + (tab_v_pad_text * 2);
1389 rcti *rct = &pc_dyn->rect;
1394 do_scaletabs =
true;
1429 const rcti *rct = &pc_dyn->rect;
1430 const char *category_id = pc_dyn->idname;
1431 const char *category_id_draw =
IFACE_(category_id);
1432 const int category_width =
BLI_rcti_size_y(rct) - (tab_v_pad_text * 2);
1438 const bool is_active =
STREQ(category_id, category_id_active);
1442 #ifdef USE_FLAT_INACTIVE
1444 if (is_active ==
false && is_active_prev ==
false && pc_dyn->prev) {
1451 v2d->
mask.
xmax - (category_tabs_width / 5),
1453 is_left ? (v2d->
mask.
xmin + category_tabs_width) - (category_tabs_width / 5) :
1454 (v2d->
mask.
xmax - category_tabs_width) + (category_tabs_width / 5),
1455 rct->
ymax + (px * 3));
1459 is_active_prev = is_active;
1475 is_active ? theme_col_tab_active : theme_col_tab_inactive);
1485 theme_col_tab_outline);
1505 fontid, category_id_draw, category_draw_len, category_width,
NULL);
1509 BLF_color3ubv(fontid, is_active ? theme_col_text_hi : theme_col_text);
1510 BLF_draw(fontid, category_id_draw, category_draw_len);
1516 pc_dyn->rect.xmin = v2d->
mask.
xmin;
1519 pc_dyn->rect.xmax = v2d->
mask.
xmax;
1528 #undef TABS_PADDING_BETWEEN_FACTOR
1529 #undef TABS_PADDING_TEXT_FACTOR
1540 return panel->
sizey;
1642 pachild->ofsx = panel->
ofsx;
1646 if (pachild->children.first) {
1659 int active_panels_len = 0;
1664 active_panels_len++;
1667 if (active_panels_len == 0) {
1686 for (
int i = 0; i < active_panels_len; i++) {
1697 for (
int i = 0; i < active_panels_len; i++) {
1705 for (
int i = 0,
y = 0; i < active_panels_len; i++) {
1712 if (show_background) {
1723 bool changed =
false;
1724 for (
int i = 0; i < active_panels_len; i++) {
1745 if (panel->children.first) {
1760 bool has_panel_with_background =
false;
1765 const int pa_sizex = panel->ofsx + panel->sizex;
1768 sizex =
max_ii(sizex, pa_sizex);
1769 sizey =
min_ii(sizey, pa_sizey);
1771 has_panel_with_background =
true;
1784 if (has_panel_with_background) {
1820 const bool was_active = panel->runtime_flag &
PANEL_ACTIVE;
1822 panel->runtime_flag &= flag_copy;
1866 if (block->active && block->panel) {
1892 #define DRAG_REGION_PAD (PNL_HEADER * 0.5)
1915 #undef DRAG_REGION_PAD
1958 const int xy_dst[2])
1964 float xy_b_block[2] = {
UNPACK2(xy_dst)};
1965 Panel *panel = block->panel;
1970 const int oldflag = panel->
flag;
1973 xy_b_block[0] = dragcol_data->
xy_init[0];
1980 rctf rect = block->rect;
1991 if (panel->
flag != oldflag) {
2012 switch (event->
type) {
2062 const int event_type,
2074 const bool show_pin = use_pin && (panel->
flag &
PNL_PIN);
2075 const bool show_drag = !is_subpanel;
2084 float expansion_area_xmax = block->
rect.
xmax;
2086 expansion_area_xmax -= (
PNL_ICON * 1.5f);
2094 if (ctrl && !is_subpanel) {
2132 const float drag_area_xmax = block->
rect.
xmax;
2133 if (
IN_RANGE(mx, drag_area_xmin, drag_area_xmax)) {
2141 const float pin_area_xmin = expansion_area_xmax;
2142 const float pin_area_xmax = pin_area_xmin +
PNL_ICON;
2143 if (
IN_RANGE(mx, pin_area_xmin, pin_area_xmax)) {
2196 pc_act_next = pc_act->
next;
2197 while ((pc_act = pc_act_next)) {
2198 pc_act_next = pc_act->
next;
2224 return pc_act->idname;
2267 const uiBut *active_but)
2270 const bool inside_tabregion =
2276 if (is_mousewheel && (event->
modifier &
KM_CTRL) == 0 && !inside_tabregion) {
2288 if (is_mousewheel) {
2293 const bool backwards =
event->modifier &
KM_SHIFT;
2294 pc_dyn = backwards ? pc_dyn->
prev : pc_dyn->
next;
2318 const uiBut *active_but)
2365 Panel *panel = block->panel;
2374 int mx =
event->xy[0];
2375 int my =
event->xy[1];
2398 if (region_has_active_button) {
2457 Panel *panel = block->panel;
2458 if (panel ==
NULL) {
2462 int mx =
event->xy[0];
2463 int my =
event->xy[1];
2488 Panel *panel = userdata;
2519 Panel *panel = userdata;
2587 if (
data->animtimer) {
typedef float(TangentPoint)[2]
struct ScrArea * CTX_wm_area(const bContext *C)
void CTX_store_set(bContext *C, bContextStore *store)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
@ PANEL_TYPE_DEFAULT_CLOSED
void BLF_color3ubv(int fontid, const unsigned char rgb[3])
size_t BLF_width_to_strlen(int fontid, const char *str, size_t str_len, float width, float *r_width) ATTR_NONNULL(2)
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_disable(int fontid, int option)
void BLF_rotation(int fontid, float angle)
float BLF_width(int fontid, const char *str, size_t str_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLF_draw(int fontid, const char *str, size_t str_len) ATTR_NONNULL(2)
void BLF_enable(int fontid, int option)
void BLF_size(int fontid, float size, int dpi)
void BLF_position(int fontid, float x, float y, float z)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void BLI_addhead(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void void BLI_INLINE bool BLI_listbase_is_single(const struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
MINLINE int min_ii(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE float interpf(float a, float b, float t)
MINLINE int clamp_i(int value, int min, int max)
MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
bool BLI_rcti_isect_pt(const struct rcti *rect, int x, int y)
bool BLI_rctf_isect_segment(const struct rctf *rect, const float s1[2], const float s2[2])
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define STREQLEN(a, b, n)
#define IN_RANGE(a, b, c)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define CTX_IFACE_(context, msgid)
#define RGN_ALIGN_ENUM_FROM_MASK(align)
@ RGN_FLAG_SEARCH_FILTER_UPDATE
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
@ PNL_INSTANCED_LIST_ORDER_CHANGED
#define RGN_TYPE_HAS_CATEGORY_MASK
void(* uiListPanelIDFromDataFunc)(void *data_link, char *r_idname)
void ED_region_tag_redraw(struct ARegion *region)
void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id)
void GPU_batch_draw(GPUBatch *batch)
struct GPUBatch * GPU_batch_preset_panel_drag_widget(float pixelsize, const float col_high[4], const float col_dark[4], float width) ATTR_WARN_UNUSED_RESULT
_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
_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
void GPU_matrix_pop(void)
void GPU_matrix_push(void)
void GPU_matrix_translate_2f(float x, float y)
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_2D_FLAT_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_line_smooth(bool enable)
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
Platform independent time functions.
struct bContextStore * uiLayoutGetContextStore(uiLayout *layout)
const struct uiStyle * UI_style_get_dpi(void)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4])
const struct uiStyle * UI_style_get(void)
@ UI_BLOCK_THEME_STYLE_POPUP
void UI_draw_roundbox_corner_set(int type)
#define UI_PANEL_MARGIN_X
bool UI_block_is_search_only(const uiBlock *block)
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
void UI_fontstyle_draw(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, size_t str_len, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params)
#define UI_PANEL_CATEGORY_MARGIN_WIDTH
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
#define UI_PANEL_MARGIN_Y
#define INSTANCED_PANEL_UNIQUE_STR_LEN
void UI_block_set_search_only(uiBlock *block, bool search_only)
void UI_icon_draw_ex(float x, float y, int icon_id, float aspect, float alpha, float desaturate, const uchar mono_color[4], bool mono_border)
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
struct bTheme * UI_GetTheme(void)
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColorShade4fv(int colorid, int offset, float col[4])
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
char char UI_view2d_mouse_in_scrollers(const struct ARegion *region, const struct View2D *v2d, const int xy[2]) ATTR_NONNULL(1
void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac)
#define WM_UI_HANDLER_CONTINUE
#define WM_UI_HANDLER_BREAK
static float is_left(const float p0[2], const float p1[2], const float p2[2])
void ui_block_bounds_calc(uiBlock *block)
void ui_window_to_block_fl(const ARegion *region, uiBlock *block, float *r_x, float *r_y)
void ui_fontscale(float *points, float aspect)
void ui_window_to_block(const ARegion *region, uiBlock *block, int *r_x, int *r_y)
bool ui_but_supports_cycling(const uiBut *but)
void ui_handle_afterfunc_add_operator(wmOperatorType *ot, wmOperatorCallContext opcontext)
uiBut * ui_region_find_active_but(struct ARegion *region) ATTR_WARN_UNUSED_RESULT
@ UI_BUTTON_GROUP_PANEL_HEADER
static Panel * panel_add_instanced(ARegion *region, ListBase *panels, PanelType *panel_type, PointerRNA *custom_data)
bool UI_panel_is_closed(const Panel *panel)
static int get_panel_real_ofsy(Panel *panel)
static void ui_panel_drag_collapse_handler_remove(bContext *UNUSED(C), void *userdata)
struct uiHandlePanelData uiHandlePanelData
static void panel_title_color_get(const Panel *panel, const bool show_background, const bool region_search_filter_active, uchar r_color[4])
static void panel_set_expansion_from_search_filter_recursive(const bContext *C, Panel *panel, const bool use_search_closed)
static void panel_set_runtime_flag_recursive(Panel *panel, short flag, bool value)
static void region_panels_set_expansion_from_search_filter(const bContext *C, ARegion *region, const bool use_search_closed)
void UI_panel_category_draw_all(ARegion *region, const char *category_id_active)
static void ui_panels_size(ARegion *region, int *r_x, int *r_y)
bool UI_panel_can_be_pinned(const Panel *panel)
PointerRNA * UI_region_panel_custom_data_under_cursor(const bContext *C, const wmEvent *event)
static void panel_delete(const bContext *C, ARegion *region, ListBase *panels, Panel *panel)
static void ui_do_animate(bContext *C, Panel *panel)
static int get_panel_real_size_y(const Panel *panel)
static void set_panels_list_data_expand_flag(const bContext *C, const ARegion *region)
PanelCategoryDyn * UI_panel_category_find(const ARegion *region, const char *idname)
struct uiPanelDragCollapseHandle uiPanelDragCollapseHandle
PanelCategoryStack * UI_panel_category_active_find(ARegion *region, const char *idname)
@ PANEL_SEARCH_FILTER_MATCH
@ PANEL_USE_CLOSED_FROM_SEARCH
static void region_panels_set_expansion_from_list_data(const bContext *C, ARegion *region)
static void ui_panel_drag_collapse(const bContext *C, const uiPanelDragCollapseHandle *dragcol_data, const int xy_dst[2])
bool UI_panel_matches_search_filter(const Panel *panel)
static void panel_set_flag_recursive(Panel *panel, short flag, bool value)
static void region_panels_remove_invisible_layouts(ARegion *region)
void UI_panel_header_buttons_begin(Panel *panel)
void UI_panels_free_instanced(const bContext *C, ARegion *region)
static int ui_handler_panel(bContext *C, const wmEvent *event, void *userdata)
bool UI_panel_category_is_visible(const ARegion *region)
static void ui_panel_custom_data_set_recursive(Panel *panel, PointerRNA *custom_data)
static void get_panel_expand_flag(const Panel *panel, short *flag, short *flag_index)
static bool panel_type_context_poll(ARegion *region, const PanelType *panel_type, const char *context)
static void panel_activate_state(const bContext *C, Panel *panel, uiHandlePanelState state)
static bool panel_custom_data_active_get(const Panel *panel)
int ui_handler_panel_region(bContext *C, const wmEvent *event, ARegion *region, const uiBut *active_but)
int UI_panel_size_y(const Panel *panel)
static bool panel_set_expand_from_list_data_recursive(Panel *panel, short flag, short *flag_index)
void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y)
void UI_panel_category_active_set(ARegion *region, const char *idname)
void UI_panel_custom_data_set(Panel *panel, PointerRNA *custom_data)
static void ui_handler_remove_panel(bContext *C, void *userdata)
void ui_panel_tag_search_filter_match(Panel *panel)
bool UI_panel_is_active(const Panel *panel)
static int get_panel_size_y(const Panel *panel)
bool UI_panel_should_show_background(const ARegion *region, const PanelType *panel_type)
static void panel_remove_invisible_layouts_recursive(Panel *panel, const Panel *parent_panel)
static void panel_draw_aligned_widgets(const uiStyle *style, const Panel *panel, const rcti *header_rect, const float aspect, const bool show_pin, const bool show_background, const bool region_search_filter_active)
void UI_panel_category_clear_all(ARegion *region)
static PanelCategoryDyn * panel_categories_find_mouse_over(ARegion *region, const wmEvent *event)
static bool panels_need_realign(const ScrArea *area, ARegion *region, Panel **r_panel_animation)
void UI_panels_begin(const bContext *UNUSED(C), ARegion *region)
struct PanelSort PanelSort
static float panel_region_offset_x_get(const ARegion *region)
static void align_sub_panels(Panel *panel)
@ PANEL_MOUSE_INSIDE_HEADER
@ PANEL_MOUSE_INSIDE_CONTENT
static void panel_matches_search_filter_recursive(const Panel *panel, bool *filter_matches)
static void reorder_instanced_panel_list(bContext *C, ARegion *region, Panel *drag_panel)
static void panel_set_expansion_from_list_data(const bContext *C, Panel *panel)
#define TABS_PADDING_BETWEEN_FACTOR
static void panel_handle_data_ensure(const bContext *C, wmWindow *win, const ARegion *region, Panel *panel, const uiHandlePanelState state)
void UI_panel_category_active_set_default(ARegion *region, const char *idname)
Panel * UI_panel_add_instanced(const bContext *C, ARegion *region, ListBase *panels, const char *panel_idname, PointerRNA *custom_data)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
#define ANIMATION_INTERVAL
void ui_draw_aligned_panel(const uiStyle *style, const uiBlock *block, const rcti *rect, const bool show_pin, const bool show_background, const bool region_search_filter_active)
void UI_panel_label_offset(const uiBlock *block, int *r_x, int *r_y)
#define TABS_PADDING_TEXT_FACTOR
static int compare_panel(const void *a, const void *b)
static int ui_panel_drag_collapse_handler(bContext *C, const wmEvent *event, void *userdata)
static void panels_collapse_all(ARegion *region, const Panel *from_panel)
static void panels_layout_begin_clear_flags(ListBase *lb)
static void ui_do_drag(const bContext *C, const wmEvent *event, Panel *panel)
void UI_panel_end(Panel *panel, int width, int height)
bool UI_panel_list_matches_data(ARegion *region, ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
static void ui_panel_drag_collapse_handler_add(const bContext *C, const bool was_open)
void UI_panel_header_buttons_end(Panel *panel)
bool UI_panel_is_dragging(const Panel *panel)
static void ui_offset_panel_block(uiBlock *block)
void UI_panels_draw(const bContext *C, ARegion *region)
static void panel_custom_data_active_set(Panel *panel)
static int ui_handle_panel_category_cycling(const wmEvent *event, ARegion *region, const uiBut *active_but)
const char * UI_panel_category_active_get(ARegion *region, bool set_fallback)
static bool panel_active_animation_changed(ListBase *lb, Panel **r_panel_animation, bool *r_no_animation)
static bool uiAlignPanelStep(ARegion *region, const float factor, const bool drag)
void UI_list_panel_unique_str(Panel *panel, char *r_name)
void UI_panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr)
void UI_panel_category_add(ARegion *region, const char *name)
static int find_highest_panel(const void *a, const void *b)
static void ui_handle_panel_header(const bContext *C, const uiBlock *block, const int mx, const int event_type, const bool ctrl, const bool shift)
Panel * UI_panel_find_by_type(ListBase *lb, const PanelType *pt)
static void panel_calculate_size_recursive(ARegion *region, Panel *panel)
static void ui_panel_category_active_set(ARegion *region, const char *idname, bool fallback)
static void panel_draw_highlight_border(const Panel *panel, const rcti *rect, const rcti *header_rect)
static void panel_draw_aligned_backdrop(const Panel *panel, const rcti *rect, const rcti *header_rect)
static uiPanelMouseState ui_panel_mouse_state_get(const uiBlock *block, const Panel *panel, const int mx, const int my)
Panel * UI_panel_begin(ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open)
static bool properties_space_needs_realign(const ScrArea *area, const ARegion *region)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_pointer_is_null(const PointerRNA *ptr)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
ListBase panels_category_active
struct ARegionType * type
struct PanelCategoryDyn * next
struct PanelCategoryDyn * prev
struct PanelCategoryStack * next
short(* get_list_data_expand_flag)(const struct bContext *C, struct Panel *pa)
char idname[BKE_ST_MAXNAME]
char context[BKE_ST_MAXNAME]
void(* reorder)(struct bContext *C, struct Panel *pa, int new_index)
char translation_context[BKE_ST_MAXNAME]
char active_property[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
struct PanelType * parent
char label[BKE_ST_MAXNAME]
struct bContextStore * context
struct PointerRNA * custom_data_ptr
uiWidgetColors wcol_menu_back
struct wmEvent * eventstate
double PIL_check_seconds_timer(void)
wmEventHandler_UI * WM_event_add_ui_handler(const bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const char flag)
void WM_event_remove_ui_handler(ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const bool postpone)
#define ISMOUSE_MOTION(event_type)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
wmTimer * WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep)