60#define ANIMATION_TIME 0.30
61#define ANIMATION_INTERVAL 0.02
125 const char *context);
134 Panel **r_panel_animation,
135 bool *r_no_animation)
139 if (!(panel->type && panel->type->parent)) {
150 *r_panel_animation = panel;
161 if (panel->activedata) {
164 *r_panel_animation = panel;
168 *r_no_animation =
true;
172 *r_panel_animation = panel;
197 *r_panel_animation =
nullptr;
204 Panel *panel_animation =
nullptr;
205 bool no_animation =
false;
211 if (panel_animation) {
213 *r_panel_animation = panel_animation;
246 int max_sortorder = 0;
248 max_sortorder = std::max(existing_panel->sortorder, max_sortorder);
260 const char *panel_idname,
268 if (panel_type ==
nullptr) {
269 printf(
"Panel type '%s' not found.\n", panel_idname);
318 if (
C !=
nullptr && panel->activedata !=
nullptr) {
323 if (panel->runtime->custom_data_ptr !=
nullptr) {
324 MEM_delete(panel->runtime->custom_data_ptr);
338 Link *data_link =
nullptr;
339 if (
data ==
nullptr) {
345 data_link =
static_cast<Link *
>(
data->first);
357 if (data_link ==
nullptr) {
363 panel_idname_func(data_link, panel_idname);
364 if (!
STREQ(panel_idname, panel->type->idname)) {
368 data_link = data_link->
next;
384 if (drag_panel->
type ==
nullptr) {
392 char *context =
nullptr;
398 int list_panels_len = 0;
399 int start_index = -1;
404 if (panel == drag_panel) {
406 start_index = list_panels_len;
417 MEM_callocN(list_panels_len *
sizeof(*panel_sort), __func__));
423 sort_index->
panel = panel;
429 qsort(panel_sort, list_panels_len,
sizeof(*panel_sort),
compare_panel);
432 int move_to_index = 0;
433 for (; move_to_index < list_panels_len; move_to_index++) {
434 if (panel_sort[move_to_index].panel == drag_panel) {
441 if (move_to_index == start_index) {
452 drag_panel->
type->
reorder(
C, drag_panel, move_to_index);
464 const bool open = (
flag & (1 << *flag_index));
470 *flag_index = *flag_index + 1;
490 short flag_index = 0;
522 *flag_index = *flag_index + 1;
539 if (panel_type ==
nullptr) {
546 short flag_index = 0;
548 if (panel->type->set_list_data_expand_flag) {
549 panel->type->set_list_data_expand_flag(
C, panel, expand_flag);
679 const char *idname = pt->
idname;
682 if (
STREQLEN(panel->panelname, idname,
sizeof(panel->panelname))) {
694 const bool newpanel = (panel ==
nullptr);
725 for (panel_last =
static_cast<Panel *
>(lb->
first); panel_last; panel_last = panel_last->
next) {
738 panel_next->sortorder++;
748 block->
panel = panel;
813 width =
max_ii(width, child_panel->sizex);
821 panel->
sizex = width;
822 panel->
sizey = height;
825 const int old_sizex = panel->
sizex, old_sizey = panel->
sizey;
830 panel->
sizex = width;
833 panel->
sizey = height;
837 if (panel->
sizex != old_sizex || panel->
sizey != old_sizey) {
872 for (
const std::unique_ptr<uiBut> &but : block->
buttons) {
873 but->rect.ymin += ofsy;
874 but->rect.ymax += ofsy;
892 if (!*filter_matches) {
901 bool search_filter_matches =
false;
903 return search_filter_matches;
911 const bool use_search_closed)
931 const bool use_search_closed)
953 for (
const std::unique_ptr<uiBut> &but : block->
buttons) {
973 BLI_assert(child_panel->runtime->block !=
nullptr);
1035#define PNL_ICON UI_UNIT_X
1051 const bool show_background,
1052 const bool region_search_filter_active,
1055 if (!show_background) {
1066 if (region_search_filter_active && !search_match) {
1075 const rcti *header_rect,
1076 const bool is_active)
1078 const bool is_subpanel = panel->
type->
parent !=
nullptr;
1085 if (color[3] == 0.0f) {
1104 const rcti *header_rect,
1106 const bool show_pin,
1107 const bool show_background,
1108 const bool region_search_filter_active)
1110 const bool is_subpanel = panel->
type->
parent !=
nullptr;
1119 widget_rect.
xmin = header_rect->
xmin + (is_subpanel ? scaled_unit * 0.7f : 0);
1120 widget_rect.
xmax = header_rect->
xmax;
1121 widget_rect.
ymin = header_rect->
ymin;
1122 widget_rect.
ymax = header_rect->
ymax;
1124 uchar title_color[4];
1126 title_color[3] = 255;
1134 if (header_width < (scaled_unit * 4)) {
1135 alpha *= std::max(
float(header_width - scaled_unit) /
float(scaled_unit * 3), 0.0f);
1152 title_rect.
xmin = widget_rect.
xmin + (panel->
labelofs / aspect) + scaled_unit * 1.1f;
1153 title_rect.
xmax = widget_rect.
xmax;
1154 if (!is_subpanel && show_background) {
1156 title_rect.
xmax -= scaled_unit;
1158 title_rect.
ymin = widget_rect.
ymin - 2.0f / aspect;
1159 title_rect.
ymax = widget_rect.
ymax;
1171 widget_rect.
ymin + 5.0f / aspect,
1183 if (!is_subpanel && show_background) {
1184 const float x = widget_rect.
xmax - scaled_unit * 1.15;
1185 const float y = widget_rect.
ymin + (header_height - (header_height * 0.7f)) * 0.5f;
1187 const int icon = is_pin ? ICON_PINNED : ICON_GRIP;
1189 float alpha = is_pin ? 1.0f : 0.5f;
1190 if (header_width < (scaled_unit * 5)) {
1191 alpha *= std::max((header_width - scaled_unit) /
float(scaled_unit * 4), 0.0f);
1200 float subpanel_backcolor[4])
1224 if (is_main_panel_end) {
1234 rctf panel_pixelspacef;
1241 const int roundboxalign,
1243 const float shadow_width)
1245 const float outline =
U.pixelsize;
1247 rctf shadow_rect = *box_rect;
1258 const rcti *header_rect)
1261 const bool is_subpanel = panel->
type->
parent !=
nullptr;
1265 if (is_subpanel && !is_open) {
1277 if (!is_subpanel && has_header && (region->
overlap || is_dragging)) {
1279 const float shadow_width = is_dragging ?
1287 box_rect.
ymin = is_open ? rect->
ymin : header_rect->
ymin;
1293 if (is_open || !has_header) {
1294 float panel_backcolor[4];
1304 const float padding = is_subpanel ?
U.widget_unit * 0.1f / aspect : 0.0f;
1311 float subpanel_backcolor[4];
1317 if (!is_subpanel && has_header) {
1318 float panel_headercolor[4];
1340 const bool show_pin,
1341 const bool show_background,
1342 const bool region_search_filter_active)
1352 const rcti header_rect = {
1371 region_search_filter_active);
1404#define TABS_PADDING_BETWEEN_FACTOR 4.0f
1405#define TABS_PADDING_TEXT_FACTOR 6.0f
1416 float fstyle_points = fstyle->
points;
1420 const float zoom = 1.0f / aspect;
1421 const int px =
U.pixelsize;
1435#ifdef USE_FLAT_INACTIVE
1436 bool is_active_prev =
false;
1442 int y_ofs = tab_v_pad;
1445 uchar theme_col_back[4];
1448 uchar theme_col_tab_bg[4];
1449 uchar theme_col_tab_text[3];
1450 uchar theme_col_tab_text_sel[3];
1451 float theme_col_tab_active[4];
1452 float theme_col_tab_inactive[4];
1453 float theme_col_tab_outline[4];
1454 float theme_col_tab_outline_sel[4];
1465 is_alpha = (region->
overlap && (theme_col_back[3] != 255));
1480 rcti *rct = &pc_dyn->rect;
1481 const char *category_id = pc_dyn->idname;
1482 const char *category_id_draw =
IFACE_(category_id);
1486 rct->
xmin = rct_xmin;
1487 rct->
xmax = rct_xmax;
1489 rct->
ymin = v2d->
mask.
ymax - (y_ofs + category_width + (tab_v_pad_text * 2));
1492 y_ofs += category_width + tab_v_pad + (tab_v_pad_text * 2);
1499 rcti *rct = &pc_dyn->rect;
1500 rct->
ymin += scroll;
1501 rct->
ymax += scroll;
1526 v2d->
mask.
xmax - category_tabs_width,
1543 const rcti *rct = &pc_dyn->rect;
1552 const char *category_id = pc_dyn->idname;
1553 const char *category_id_draw =
IFACE_(category_id);
1555 const bool is_active = !too_narrow &&
STREQ(category_id, category_id_active);
1559#ifdef USE_FLAT_INACTIVE
1561 if (is_active ==
false && is_active_prev ==
false && pc_dyn->prev) {
1568 v2d->
mask.
xmax - (category_tabs_width / 5),
1570 is_left ? (v2d->
mask.
xmin + category_tabs_width) - (category_tabs_width / 5) :
1571 (v2d->
mask.
xmax - category_tabs_width) + (category_tabs_width / 5),
1572 rct->
ymax + (px * 3));
1576 is_active_prev = is_active;
1592 is_active ? theme_col_tab_active : theme_col_tab_inactive);
1596 is_active ? theme_col_tab_outline_sel : theme_col_tab_outline);
1617 const int text_v_ofs =
round_fl_to_int(
float(rct_xmax - rct_xmin) * 0.5f);
1622 is_left ? rct->
xmax - text_v_ofs + text_size_offset :
1623 rct->
xmin + text_v_ofs - text_size_offset,
1626 BLF_color3ubv(fontid, is_active ? theme_col_tab_text_sel : theme_col_tab_text);
1630 const float shadow_color[4] = {
1636 BLF_draw(fontid, category_id_draw, category_draw_len);
1646 pc_dyn->rect.xmin = v2d->
mask.
xmin;
1649 pc_dyn->rect.xmax = v2d->
mask.
xmax;
1658#undef TABS_PADDING_BETWEEN_FACTOR
1659#undef TABS_PADDING_TEXT_FACTOR
1670 const bool is_active =
STREQ(pc_dyn->idname, region->
runtime->category);
1674 const rcti *rct = &pc_dyn->rect;
1679 const int tab_v_pad = rct->
ymin - pc_dyn_next->
rect.
ymax;
1694 return panel->
sizey;
1760 if (pin_last_a && !pin_last_b) {
1763 if (!pin_last_a && pin_last_b) {
1805 pachild->ofsx = panel->
ofsx;
1809 if (pachild->children.first) {
1822 int active_panels_len = 0;
1827 active_panels_len++;
1830 if (active_panels_len == 0) {
1849 for (
int i = 0;
i < active_panels_len;
i++) {
1860 for (
int i = 0;
i < active_panels_len;
i++) {
1868 for (
int i = 0,
y = 0;
i < active_panels_len;
i++) {
1875 if (show_background) {
1886 bool changed =
false;
1887 for (
int i = 0;
i < active_panels_len;
i++) {
1908 if (panel->children.first) {
1923 bool has_panel_with_background =
false;
1928 const int pa_sizex = panel->ofsx + panel->sizex;
1931 sizex =
max_ii(sizex, pa_sizex);
1932 sizey =
min_ii(sizey, pa_sizey);
1934 has_panel_with_background =
true;
1947 if (has_panel_with_background) {
1983 const bool was_active = panel->runtime_flag &
PANEL_ACTIVE;
1985 panel->runtime_flag &= flag_copy;
2022 BLI_assert(panel->runtime->block !=
nullptr);
2029 if (block->active && block->panel) {
2059#define DRAG_REGION_PAD (PNL_HEADER * 0.5)
2082#undef DRAG_REGION_PAD
2138 const int xy_dst[2])
2146 float xy_b_block[2] = {
float(xy_dst[0]),
float(xy_dst[1])};
2147 Panel *panel = block->panel;
2149 if (panel ==
nullptr) {
2154 xy_b_block[0] = dragcol_data->
xy_init[0];
2161 rctf rect = block->rect;
2163 rect.
ymax = block->rect.ymax + header.
end_y;
2180 const int oldflag = panel->
flag;
2183 rctf rect = block->rect;
2194 if (panel->
flag != oldflag) {
2215 switch (event->
type) {
2271 bContext *
C,
const uiBlock *block,
const int ,
const int my,
const int event_type)
2277 if (header ==
nullptr) {
2298 const int event_type,
2308 const bool is_subpanel = (panel->
type->
parent !=
nullptr);
2310 const bool show_pin = use_pin && (panel->
flag &
PNL_PIN);
2311 const bool show_drag = !is_subpanel;
2320 float expansion_area_xmax = block->
rect.
xmax;
2322 expansion_area_xmax -= (
PNL_ICON * 1.5f);
2330 if (ctrl && !is_subpanel) {
2368 const float drag_area_xmax = block->
rect.
xmax;
2369 if (
IN_RANGE(mx, drag_area_xmin, drag_area_xmax)) {
2381 const float pin_area_xmin = expansion_area_xmax;
2382 const float pin_area_xmax = pin_area_xmin +
PNL_ICON;
2383 if (
IN_RANGE(mx, pin_area_xmin, pin_area_xmax)) {
2394 return region->
runtime->panels_category.first &&
2395 region->
runtime->panels_category.first != region->
runtime->panels_category.last;
2443 pc_act_next = pc_act->
next;
2444 while ((pc_act = pc_act_next)) {
2445 pc_act_next = pc_act->
next;
2483 return pc_act->idname;
2489 region->
runtime->panels_category.first);
2527 const uiBut *active_but)
2530 const bool inside_tabregion =
2538 if (is_mousewheel && (event->
modifier &
KM_CTRL) == 0 && !inside_tabregion) {
2552 if (is_mousewheel) {
2557 const bool backwards =
event->modifier &
KM_SHIFT;
2558 pc_dyn = backwards ? pc_dyn->
prev : pc_dyn->
next;
2561 pc_dyn = backwards ?
2583 const float size_new = unscaled_size / aspect;
2591 region->
sizex = size_new;
2603 const uiBut *active_but)
2641 else if (already_active) {
2671 const bool region_has_active_button = region_active_but &&
2675 Panel *panel = block->panel;
2676 if (panel ==
nullptr || panel->
type ==
nullptr) {
2683 int mx =
event->xy[0];
2684 int my =
event->xy[1];
2706 if (region_has_active_button) {
2771 Panel *panel = block->panel;
2772 if (panel ==
nullptr) {
2776 int mx =
event->xy[0];
2777 int my =
event->xy[1];
2803 Panel *panel =
static_cast<Panel *
>(userdata);
2834 Panel *panel =
static_cast<Panel *
>(userdata);
2861 if (!
data->animtimer) {
2912 if (
data->animtimer) {
2914 data->animtimer =
nullptr;
ARegion * CTX_wm_region_popup(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
void CTX_store_set(bContext *C, const bContextStore *store)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
@ PANEL_TYPE_DEFAULT_CLOSED
void BKE_panel_free(Panel *panel)
Panel * BKE_panel_new(PanelType *panel_type)
void BLF_size(int fontid, float size)
void BLF_enable(int fontid, FontFlags flag)
void BLF_shadow(int fontid, FontShadowType type, const float rgba[4]=nullptr)
void BLF_color3ubv(int fontid, const unsigned char rgb[3])
void BLF_shadow_offset(int fontid, int x, int y)
#define BLF_DRAW_STR_DUMMY_MAX
void BLF_rotation(int fontid, float angle)
void BLF_draw(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_NONNULL(2)
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLF_disable(int fontid, FontFlags flag)
void BLF_position(int fontid, float x, float y, float z)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkafter(ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_addhead(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findstringindex(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const 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 target, float origin, 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 int BLI_rcti_size_x(const struct rcti *rct)
void BLI_rctf_pad(struct rctf *rect, float pad_x, float pad_y)
void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
Platform independent time functions.
double BLI_time_now_seconds(void)
#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)
@ PNL_INSTANCED_LIST_ORDER_CHANGED
#define RGN_TYPE_HAS_CATEGORY_MASK
@ RGN_FLAG_SEARCH_FILTER_UPDATE
@ RGN_FLAG_SEARCH_FILTER_ACTIVE
void(*)(void *data_link, char *r_idname) uiListPanelIDFromDataFunc
void ED_region_tag_refresh_ui(ARegion *region)
bool ED_region_panel_category_gutter_isect_xy(const ARegion *region, const int event_xy[2])
void ED_region_tag_redraw(ARegion *region)
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_line_smooth(bool enable)
void GPU_blend(GPUBlend blend)
Read Guarded memory(de)allocation.
bool UI_panel_is_closed(const Panel *panel)
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void ui_draw_dropshadow(const rctf *rct, float radius, float width, float aspect, float alpha)
void UI_block_theme_style_set(uiBlock *block, char theme_style)
#define INSTANCED_PANEL_UNIQUE_STR_SIZE
#define UI_PANEL_CATEGORY_MIN_WIDTH
const uiStyle * UI_style_get_dpi()
void UI_draw_roundbox_corner_set(int type)
#define UI_PANEL_MARGIN_X
const uiStyle * UI_style_get()
bool UI_block_is_search_only(const uiBlock *block)
void UI_fontstyle_set(const uiFontStyle *fs)
void UI_block_draw(const bContext *C, uiBlock *block)
#define UI_PANEL_CATEGORY_MARGIN_WIDTH
void UI_fontstyle_draw(const uiFontStyle *fs, const rcti *rect, const char *str, size_t str_len, const uchar col[4], const uiFontStyleDraw_Params *fs_params)
@ UI_BLOCK_THEME_STYLE_POPUP
#define UI_PANEL_MARGIN_Y
bool UI_panel_is_dragging(const Panel *panel)
void UI_block_set_search_only(uiBlock *block, bool search_only)
const char * UI_panel_category_active_get(ARegion *region, bool set_fallback)
#define UI_NO_ICON_OVERLAY_TEXT
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, const IconTextOverlay *text_overlay, const bool inverted=false)
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
int UI_ThemeMenuShadowWidth()
void UI_view2d_curRect_validate(View2D *v2d)
char char UI_view2d_mouse_in_scrollers(const ARegion *region, const View2D *v2d, const int xy[2]) ATTR_NONNULL(1
void UI_view2d_offset(View2D *v2d, float xfac, float yfac)
#define WM_UI_HANDLER_CONTINUE
#define WM_UI_HANDLER_BREAK
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const T & last(const int64_t n=0) const
static float is_left(const float2 &p0, const float2 &p1, const float2 &p2)
void ui_window_to_block(const ARegion *region, const uiBlock *block, int *x, int *y)
void ui_block_bounds_calc(uiBlock *block)
rcti ui_to_pixelrect(const ARegion *region, const uiBlock *block, const rctf *src_rect)
void ui_window_to_block_fl(const ARegion *region, const uiBlock *block, float *x, float *y)
void ui_fontscale(float *points, float aspect)
bool ui_but_supports_cycling(const uiBut *but)
void ui_handle_afterfunc_add_operator(wmOperatorType *ot, blender::wm::OpCallContext opcontext)
void ui_block_views_end(ARegion *region, const uiBlock *block)
@ UI_BUTTON_GROUP_PANEL_HEADER
bool ui_block_is_popup_any(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
uiBut * ui_region_find_active_but(ARegion *region) ATTR_WARN_UNUSED_RESULT
static void ui_panel_region_width_set(ARegion *region, const float aspect, int unscaled_size)
void UI_panel_stop_animation(const bContext *C, Panel *panel)
bool UI_panel_is_closed(const Panel *panel)
static void panel_activate_state(const bContext *C, Panel *panel, const uiHandlePanelState state)
static int get_panel_real_ofsy(Panel *panel)
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 int ui_panel_category_show_active_tab(ARegion *region, const int mval[2])
static void ui_panels_size(ARegion *region, int *r_x, int *r_y)
PanelCategoryDyn * UI_panel_category_find(const ARegion *region, const char *idname)
bool UI_panel_can_be_pinned(const Panel *panel)
static void ui_panel_drag_collapse_handler_remove(bContext *, void *userdata)
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)
void UI_panel_drawname_set(Panel *panel, blender::StringRef name)
Panel * UI_panel_find_by_type(ListBase *lb, const PanelType *pt)
@ 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)
static void panel_delete(ARegion *region, ListBase *panels, Panel *panel)
void ui_draw_layout_panels_backdrop(const ARegion *region, const Panel *panel, const float radius, float subpanel_backcolor[4])
bool UI_panel_category_is_visible(const ARegion *region)
static void ui_panel_custom_data_set_recursive(Panel *panel, PointerRNA *custom_data)
bool ui_layout_panel_toggle_open(const bContext *C, LayoutPanelHeader *header)
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)
Panel * UI_panel_begin(ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open)
static bool panel_custom_data_active_get(const Panel *panel)
static void panel_draw_border(const Panel *panel, const rcti *rect, const rcti *header_rect, const bool is_active)
int ui_handler_panel_region(bContext *C, const wmEvent *event, ARegion *region, const uiBut *active_but)
int UI_panel_size_y(const Panel *panel)
void UI_panels_begin(const bContext *, ARegion *region)
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)
static bool panel_custom_pin_to_last_get(const Panel *panel)
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)
static void panel_draw_softshadow(const rctf *box_rect, const int roundboxalign, const float radius, const float shadow_width)
static PanelCategoryDyn * panel_categories_find_mouse_over(ARegion *region, const wmEvent *event)
void UI_panel_category_clear_all(ARegion *region)
PanelCategoryStack * UI_panel_category_active_find(ARegion *region, const char *idname)
static bool panels_need_realign(const ScrArea *area, ARegion *region, Panel **r_panel_animation)
LayoutPanelHeader * ui_layout_panel_header_under_mouse(const Panel &panel, const int my)
static float panel_region_offset_x_get(const ARegion *region)
static void align_sub_panels(Panel *panel)
@ PANEL_MOUSE_INSIDE_HEADER
@ PANEL_MOUSE_INSIDE_LAYOUT_PANEL_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
int UI_panel_category_index_find(ARegion *region, const char *idname)
static Panel * panel_add_instanced(ListBase *panels, PanelType *panel_type, PointerRNA *custom_data)
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)
#define ANIMATION_INTERVAL
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)
void UI_panel_category_index_active_set(ARegion *region, const int index)
bool UI_panel_list_matches_data(ARegion *region, ListBase *data, uiListPanelIDFromDataFunc panel_idname_func)
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)
PointerRNA * UI_panel_custom_data_get(const Panel *panel)
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_drag_collapse_handler_add(const bContext *C, const bool was_open)
Panel * UI_panel_add_instanced(const bContext *C, ARegion *region, ListBase *panels, const char *panel_idname, PointerRNA *custom_data)
void UI_panel_category_add(ARegion *region, const char *name)
static void panel_draw_aligned_backdrop(const ARegion *region, const Panel *panel, const rcti *rect, const rcti *header_rect)
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)
static void ui_handle_layout_panel_header(bContext *C, const uiBlock *block, const int, const int my, const int event_type)
static void panel_calculate_size_recursive(ARegion *region, Panel *panel)
PointerRNA * UI_region_panel_custom_data_under_cursor(const bContext *C, const wmEvent *event)
const char * UI_panel_category_active_get(ARegion *region, bool set_fallback)
static void ui_panel_category_active_set(ARegion *region, const char *idname, bool fallback)
void ui_draw_aligned_panel(const ARegion *region, const uiStyle *style, const uiBlock *block, const rcti *rect, const bool show_pin, const bool show_background, const bool region_search_filter_active)
static void panel_custom_pin_to_last_set(const bContext *C, const Panel *panel, const bool value)
static uiPanelMouseState ui_panel_mouse_state_get(const uiBlock *block, const Panel *panel, const int mx, const int my)
static bool properties_space_needs_realign(const ScrArea *area, const ARegion *region)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
bool RNA_pointer_is_null(const PointerRNA *ptr)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
ListBase panels_category_active
ARegionRuntimeHandle * runtime
blender::Vector< LayoutPanelBody > bodies
blender::Vector< LayoutPanelHeader > headers
struct PanelCategoryDyn * next
struct PanelCategoryDyn * prev
struct PanelCategoryStack * next
void(* reorder)(bContext *C, Panel *pa, int new_index)
char idname[BKE_ST_MAXNAME]
char pin_to_last_property[BKE_ST_MAXNAME]
char context[BKE_ST_MAXNAME]
char translation_context[BKE_ST_MAXNAME]
char active_property[BKE_ST_MAXNAME]
char category[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
short(* get_list_data_expand_flag)(const bContext *C, Panel *pa)
PointerRNA * custom_data_ptr
LayoutPanels layout_panels
struct Panel_Runtime * runtime
uiWidgetColors wcol_menu_back
blender::Vector< std::unique_ptr< uiBut > > buttons
blender::Vector< uiButtonGroup > button_groups
bContextStore * context_store() const
void context_ptr_set(blender::StringRef name, const PointerRNA *ptr)
wmEventModifierFlag modifier
struct wmEvent * eventstate
wmEventHandler_UI * WM_event_add_ui_handler(const bContext *C, ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const eWM_EventHandlerFlag flag)
void WM_event_remove_ui_handler(ListBase *handlers, wmUIHandlerFunc handle_fn, wmUIHandlerRemoveFunc remove_fn, void *user_data, const bool postpone)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define ISMOUSE_MOTION(event_type)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
wmTimer * WM_event_timer_add(wmWindowManager *wm, wmWindow *win, const wmEventType event_type, const double time_step)
void WM_event_timer_remove(wmWindowManager *wm, wmWindow *, wmTimer *timer)