|
Blender
V2.93
|
#include <ctype.h>#include <math.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "PIL_time.h"#include "BLI_blenlib.h"#include "BLI_math.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "BKE_context.h"#include "BKE_screen.h"#include "RNA_access.h"#include "BLF_api.h"#include "WM_api.h"#include "WM_types.h"#include "ED_screen.h"#include "UI_interface.h"#include "UI_interface_icons.h"#include "UI_resources.h"#include "UI_view2d.h"#include "GPU_batch_presets.h"#include "GPU_immediate.h"#include "GPU_matrix.h"#include "GPU_state.h"#include "interface_intern.h"Go to the source code of this file.
Classes | |
| struct | uiHandlePanelData |
| struct | PanelSort |
| struct | uiPanelDragCollapseHandle |
Functions | |
Local Functions | |
| static bool | panel_active_animation_changed (ListBase *lb, Panel **r_panel_animation, bool *r_no_animation) |
| static bool | properties_space_needs_realign (const ScrArea *area, const ARegion *region) |
| static bool | panels_need_realign (const ScrArea *area, ARegion *region, Panel **r_panel_animation) |
Functions for Instanced Panels | |
| static Panel * | panel_add_instanced (ARegion *region, ListBase *panels, PanelType *panel_type, PointerRNA *custom_data) |
| Panel * | UI_panel_add_instanced (const bContext *C, ARegion *region, ListBase *panels, const char *panel_idname, PointerRNA *custom_data) |
| void | UI_list_panel_unique_str (Panel *panel, char *r_name) |
| static void | panel_delete (const bContext *C, ARegion *region, ListBase *panels, Panel *panel) |
| void | UI_panels_free_instanced (const bContext *C, ARegion *region) |
| bool | UI_panel_list_matches_data (ARegion *region, ListBase *data, uiListPanelIDFromDataFunc panel_idname_func) |
| static void | reorder_instanced_panel_list (bContext *C, ARegion *region, Panel *drag_panel) |
| static bool | panel_set_expand_from_list_data_recursive (Panel *panel, short flag, short *flag_index) |
| static void | region_panels_set_expansion_from_list_data (const bContext *C, ARegion *region) |
| static void | get_panel_expand_flag (const Panel *panel, short *flag, short *flag_index) |
| static void | set_panels_list_data_expand_flag (const bContext *C, const ARegion *region) |
Panels | |
| static bool | panel_custom_data_active_get (const Panel *panel) |
| static void | panel_custom_data_active_set (Panel *panel) |
| static void | panel_set_flag_recursive (Panel *panel, short flag, bool value) |
| static void | panel_set_runtime_flag_recursive (Panel *panel, short flag, bool value) |
| static void | panels_collapse_all (ARegion *region, const Panel *from_panel) |
| Panel * | UI_panel_find_by_type (ListBase *lb, const PanelType *pt) |
| Panel * | UI_panel_begin (ARegion *region, ListBase *lb, uiBlock *block, PanelType *pt, Panel *panel, bool *r_open) |
| void | UI_panel_header_buttons_begin (Panel *panel) |
| void | UI_panel_header_buttons_end (Panel *panel) |
| static float | panel_region_offset_x_get (const ARegion *region) |
| static void | panel_calculate_size_recursive (ARegion *region, Panel *panel) |
| void | UI_panel_end (Panel *panel, int width, int height) |
| static void | ui_offset_panel_block (uiBlock *block) |
| void | ui_panel_tag_search_filter_match (Panel *panel) |
| static void | panel_matches_search_filter_recursive (const Panel *panel, bool *filter_matches) |
| bool | UI_panel_matches_search_filter (const Panel *panel) |
| static void | panel_set_expansion_from_search_filter_recursive (const bContext *C, Panel *panel, const bool use_search_closed) |
| static void | region_panels_set_expansion_from_search_filter (const bContext *C, ARegion *region, const bool use_search_closed) |
| static void | panel_remove_invisible_layouts_recursive (Panel *panel, const Panel *parent_panel) |
| static void | region_panels_remove_invisible_layouts (ARegion *region) |
| bool | UI_panel_is_closed (const Panel *panel) |
| bool | UI_panel_is_active (const Panel *panel) |
Panel Alignment | |
| static int | get_panel_size_y (const Panel *panel) |
| int | UI_panel_size_y (const Panel *panel) |
| static int | get_panel_real_ofsy (Panel *panel) |
| bool | UI_panel_is_dragging (const Panel *panel) |
| static int | find_highest_panel (const void *a, const void *b) |
| static void | align_sub_panels (Panel *panel) |
| static bool | uiAlignPanelStep (ARegion *region, const float factor, const bool drag) |
| static void | ui_panels_size (ARegion *region, int *r_x, int *r_y) |
| static void | ui_do_animate (bContext *C, Panel *panel) |
| static void | panels_layout_begin_clear_flags (ListBase *lb) |
| void | UI_panels_begin (const bContext *UNUSED(C), ARegion *region) |
| void | UI_panels_end (const bContext *C, ARegion *region, int *r_x, int *r_y) |
Window Level Modal Panel Interaction | |
| static int | ui_handler_panel (bContext *C, const wmEvent *event, void *userdata) |
| static void | ui_handler_remove_panel (bContext *C, void *userdata) |
| static void | panel_handle_data_ensure (const bContext *C, wmWindow *win, const ARegion *region, Panel *panel, const uiHandlePanelState state) |
Drawing | |
| #define | PNL_ICON UI_UNIT_X /* Could be UI_UNIT_Y too. */ |
| void | UI_panels_draw (const bContext *C, ARegion *region) |
| void | UI_panel_label_offset (const uiBlock *block, int *r_x, int *r_y) |
| 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_draw_highlight_border (const Panel *panel, const rcti *rect, const rcti *header_rect) |
| 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_aligned_backdrop (const Panel *panel, const rcti *rect, const rcti *header_rect) |
| 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) |
Category Drawing (Tabs) | |
| #define | TABS_PADDING_BETWEEN_FACTOR 4.0f |
| #define | TABS_PADDING_TEXT_FACTOR 6.0f |
| void | UI_panel_category_draw_all (ARegion *region, const char *category_id_active) |
Panel Dragging | |
| #define | DRAG_REGION_PAD (PNL_HEADER * 0.5) |
| static void | ui_do_drag (const bContext *C, const wmEvent *event, Panel *panel) |
| #define ANIMATION_INTERVAL 0.02 |
Definition at line 74 of file interface_panel.c.
| #define ANIMATION_TIME 0.30 |
Definition at line 73 of file interface_panel.c.
| #define DRAG_REGION_PAD (PNL_HEADER * 0.5) |
Definition at line 1983 of file interface_panel.c.
Definition at line 1072 of file interface_panel.c.
| #define TABS_PADDING_BETWEEN_FACTOR 4.0f |
Definition at line 1387 of file interface_panel.c.
| #define TABS_PADDING_TEXT_FACTOR 6.0f |
Definition at line 1388 of file interface_panel.c.
| typedef struct uiHandlePanelData uiHandlePanelData |
| typedef enum uiHandlePanelState uiHandlePanelState |
| typedef struct uiPanelDragCollapseHandle uiPanelDragCollapseHandle |
| typedef enum uiPanelMouseState uiPanelMouseState |
| typedef enum uiPanelRuntimeFlag uiPanelRuntimeFlag |
| enum uiHandlePanelState |
| Enumerator | |
|---|---|
| PANEL_STATE_DRAG | |
| PANEL_STATE_ANIMATION | |
| PANEL_STATE_EXIT | |
Definition at line 106 of file interface_panel.c.
| enum uiPanelMouseState |
| Enumerator | |
|---|---|
| PANEL_MOUSE_OUTSIDE | |
| PANEL_MOUSE_INSIDE_CONTENT | Mouse is not in the panel. |
| PANEL_MOUSE_INSIDE_HEADER | Mouse is in the actual panel content. |
Definition at line 100 of file interface_panel.c.
| enum uiPanelRuntimeFlag |
| Enumerator | |
|---|---|
| PANEL_LAST_ADDED | |
| PANEL_ACTIVE | |
| PANEL_WAS_ACTIVE | |
| PANEL_ANIM_ALIGN | |
| PANEL_NEW_ADDED | |
| PANEL_SEARCH_FILTER_MATCH | |
| PANEL_USE_CLOSED_FROM_SEARCH | Use the status set by property search (PANEL_SEARCH_FILTER_MATCH) instead of PNL_CLOSED. Set to true on every property search update. |
| PANEL_WAS_CLOSED | The Panel was before the start of the current / latest layout pass. |
| PANEL_IS_DRAG_DROP | Set when the panel is being dragged and while it animates back to its aligned position. Unlike PANEL_STATE_ANIMATION, this is applied to sub-panels as well. |
| PANEL_ACTIVE_BORDER | Draw a border with the active color around the panel. |
Definition at line 76 of file interface_panel.c.
|
static |
Definition at line 1737 of file interface_panel.c.
References Panel::blocksizey, Panel::children, get_panel_real_size_y(), get_panel_size_y(), LISTBASE_FOREACH, Panel::ofsx, Panel::ofsy, PANEL_ACTIVE, and Panel::sizey.
Referenced by uiAlignPanelStep().
|
static |
Definition at line 1722 of file interface_panel.c.
References Freestyle::a, and Panel::sortorder.
Referenced by reorder_instanced_panel_list(), and uiAlignPanelStep().
|
static |
Definition at line 1689 of file interface_panel.c.
References Freestyle::a, PanelType::flag, Panel::ofsy, PANEL_TYPE_NO_HEADER, Panel::sizey, Panel::sortorder, and Panel::type.
Referenced by uiAlignPanelStep().
|
static |
Recursive implementation for set_panels_list_data_expand_flag.
Definition at line 552 of file interface_panel.c.
References Panel::children, Panel::flag, LISTBASE_FOREACH, PNL_CLOSED, and SET_FLAG_FROM_TEST.
Referenced by set_panels_list_data_expand_flag().
|
static |
This function is needed because uiBlock and Panel itself don't change Panel.sizey or location when closed.
Definition at line 1668 of file interface_panel.c.
References Panel::ofsy, Panel::sizey, and UI_panel_is_closed().
Referenced by ui_panels_size().
|
static |
Definition at line 1648 of file interface_panel.c.
References PanelType::flag, PANEL_TYPE_NO_HEADER, PNL_HEADER, Panel::sizey, Panel::type, and UI_panel_is_closed().
Referenced by align_sub_panels(), panel_calculate_size_recursive(), UI_panel_size_y(), and uiAlignPanelStep().
|
static |
Definition at line 1639 of file interface_panel.c.
References PanelType::flag, PANEL_TYPE_NO_HEADER, PNL_HEADER, Panel::sizey, and Panel::type.
Referenced by align_sub_panels().
|
static |
Definition at line 2637 of file interface_panel.c.
References Panel::activedata, BLI_assert, C, CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), data, ED_region_tag_redraw(), MEM_freeN, wmWindow::modalhandlers, NULL, ot, panel_custom_data_active_set(), panel_handle_data_ensure(), PANEL_IS_DRAG_DROP, panel_set_flag_recursive(), panel_set_runtime_flag_recursive(), PANEL_STATE_ANIMATION, PANEL_STATE_DRAG, PANEL_STATE_EXIT, PNL_SELECT, state, ui_handle_afterfunc_add_operator(), ui_handler_panel(), ui_handler_remove_panel(), WM_event_remove_timer(), WM_event_remove_ui_handler(), WM_OP_INVOKE_DEFAULT, and WM_operatortype_find().
Referenced by panel_set_expansion_from_list_data(), ui_do_animate(), ui_handle_panel_header(), ui_handler_panel(), ui_handler_remove_panel(), ui_panel_drag_collapse(), UI_panels_end(), and UI_panels_free_instanced().
|
static |
Definition at line 145 of file interface_panel.c.
References data, LISTBASE_FOREACH, PANEL_ACTIVE, PANEL_ANIM_ALIGN, PANEL_STATE_ANIMATION, PANEL_WAS_ACTIVE, PANEL_WAS_CLOSED, and UI_panel_is_closed().
Referenced by panels_need_realign().
|
static |
Definition at line 239 of file interface_panel.c.
References BLI_addtail(), BLI_strncpy(), PanelType::children, Panel::children, Panel_Runtime::custom_data_ptr, PanelType::idname, LISTBASE_FOREACH, MEM_callocN, PANEL_NEW_ADDED, Panel::panelname, Panel::runtime, Panel::runtime_flag, Panel::sortorder, and Panel::type.
Referenced by UI_panel_add_instanced().
Starting from the "block size" set in UI_panel_end, calculate the full size of the panel including the sub-panel headers and buttons.
Definition at line 838 of file interface_panel.c.
References Panel::blocksizex, Panel::blocksizey, Panel::children, get_panel_real_size_y(), height, LISTBASE_FOREACH, max_ii(), Panel::ofsy, PANEL_ACTIVE, PANEL_ANIM_ALIGN, PANEL_NEW_ADDED, panel_region_offset_x_get(), Panel_Runtime::region_ofsx, Panel::runtime, Panel::runtime_flag, Panel::sizex, Panel::sizey, UI_panel_is_closed(), and width.
Referenced by UI_panels_end().
|
static |
Definition at line 2330 of file interface_panel.c.
References BLI_rcti_isect_pt(), LISTBASE_FOREACH, wmEvent::mval, NULL, and ARegion::panels_category.
Referenced by ui_handler_panel_region().
|
static |
Definition at line 597 of file interface_panel.c.
References PanelType::active_property, BLI_assert, NULL, ptr, RNA_boolean_get(), RNA_pointer_is_null(), Panel::type, UI_panel_custom_data_get(), and UI_panel_is_active().
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 613 of file interface_panel.c.
References PanelType::active_property, BLI_assert, NULL, ptr, RNA_boolean_set(), RNA_pointer_is_null(), RNA_struct_find_property(), Panel::type, UI_panel_custom_data_get(), and UI_panel_is_active().
Referenced by panel_activate_state(), and ui_handle_panel_header().
|
static |
Free a panel and its children. Custom data is shared by the panel and its children and is freed by UI_panels_free_instanced.
Definition at line 322 of file interface_panel.c.
References Panel::activedata, BLI_freelistN(), BLI_remlink(), C, Panel::children, LISTBASE_FOREACH_MUTABLE, and MEM_freeN.
Referenced by UI_panels_free_instanced().
|
static |
Definition at line 1243 of file interface_panel.c.
References PanelType::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4ubv(), immUniformThemeColor(), immVertexFormat(), Panel::next, NULL, uiWidgetColors::outline, PANEL_TYPE_DRAW_BOX, PANEL_TYPE_NO_HEADER, PanelType::parent, pos, uiWidgetColors::roundness, TH_MATCH, TH_PANEL_BACK, TH_PANEL_HEADER, TH_PANEL_SUB_BACK, TH_WIDGET_EMBOSS, bTheme::tui, Panel::type, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, ui_draw_box_opaque(), UI_draw_roundbox_aa(), UI_draw_roundbox_corner_set(), UI_GetTheme(), UI_GetThemeColor4fv(), UI_panel_is_closed(), UI_panel_matches_search_filter(), ThemeUI::wcol_box, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 1147 of file interface_panel.c.
References batch, BLI_rctf_scale(), BLI_rcti_size_y(), Panel::drawname, Panel::flag, GPU_batch_draw(), GPU_batch_preset_panel_drag_widget(), GPU_batch_program_set_builtin(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_matrix_pop(), GPU_matrix_push(), GPU_matrix_translate_2f(), GPU_SHADER_2D_FLAT_COLOR, GPUBatch, Panel::labelofs, NULL, panel_title_color_get(), uiStyle::paneltitle, PanelType::parent, PNL_PIN, rgba_uchar_to_float(), round_fl_to_int(), TH_PANEL_BACK, TH_PANEL_HEADER, Panel::type, ui_draw_anti_tria_rect(), UI_fontstyle_draw(), UI_GetThemeColorShade4fv(), UI_icon_draw_ex(), UI_panel_is_closed(), UI_UNIT_X, uiStyle::widgetlabel, rcti::xmax, rcti::xmin, rctf::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 1111 of file interface_panel.c.
References PanelType::flag, NULL, PANEL_TYPE_DRAW_BOX, PanelType::parent, uiWidgetColors::roundness, TH_SELECT_ACTIVE, bTheme::tui, Panel::type, UI_CNR_ALL, UI_CNR_NONE, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetTheme(), UI_GetThemeColor4fv(), UI_panel_is_closed(), ThemeUI::wcol_box, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 2606 of file interface_panel.c.
References Panel::activedata, ANIMATION_INTERVAL, C, CTX_wm_manager(), View2D::cur, data, wmWindow::eventstate, MEM_callocN, wmWindow::modalhandlers, NULL, Panel::ofsx, Panel::ofsy, PIL_check_seconds_timer(), state, TIMER, ui_handler_panel(), ui_handler_remove_panel(), ARegion::v2d, WM_event_add_timer(), WM_event_add_ui_handler(), wmEvent::x, rctf::xmin, wmEvent::y, and rctf::ymin.
Referenced by panel_activate_state().
|
static |
Definition at line 914 of file interface_panel.c.
References Panel::children, LISTBASE_FOREACH, PANEL_SEARCH_FILTER_MATCH, and Panel::runtime_flag.
Referenced by UI_panel_matches_search_filter().
Definition at line 823 of file interface_panel.c.
References ARegion::alignment, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_RIGHT, UI_panel_category_is_visible(), and UI_PANEL_CATEGORY_MARGIN_WIDTH.
Referenced by panel_calculate_size_recursive(), and uiAlignPanelStep().
|
static |
Hide buttons in invisible layouts, which are created because buttons must be added for all panels in order to search, even panels that will end up closed.
Definition at line 976 of file interface_panel.c.
References uiBlock::active, BLI_assert, Panel_Runtime::block, uiBlock::button_groups, uiBlock::buttons, Panel::children, uiBut::flag, LISTBASE_FOREACH, NULL, PANEL_ACTIVE, Panel::runtime, UI_block_set_search_only(), UI_BUTTON_GROUP_PANEL_HEADER, UI_HIDDEN, and UI_panel_is_closed().
Referenced by region_panels_remove_invisible_layouts().
|
static |
Recursive implementation for panel_set_expansion_from_list_data.
Definition at line 498 of file interface_panel.c.
References Panel::children, Panel::flag, LISTBASE_FOREACH, PNL_CLOSED, SET_FLAG_FROM_TEST, and UI_panel_is_closed().
Referenced by panel_set_expansion_from_list_data().
Set the expansion of the panel and its sub-panels from the flag stored in the corresponding list data. The flag has expansion stored in each bit in depth first order.
Definition at line 516 of file interface_panel.c.
References BLI_assert, C, PanelType::flag, PanelType::get_list_data_expand_flag, NULL, panel_activate_state(), panel_set_expand_from_list_data_recursive(), PANEL_STATE_ANIMATION, PANEL_TYPE_INSTANCED, and Panel::type.
Referenced by region_panels_set_expansion_from_list_data(), and UI_panel_add_instanced().
|
static |
Set the flag telling the panel to use its search result status for its expansion.
Definition at line 940 of file interface_panel.c.
References C, Panel::children, PanelType::flag, LISTBASE_FOREACH, NULL, PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, Panel::runtime_flag, SET_FLAG_FROM_TEST, and Panel::type.
Referenced by region_panels_set_expansion_from_search_filter().
|
static |
Set flag state for a panel and its sub-panels.
Definition at line 631 of file interface_panel.c.
References Panel::children, Panel::flag, LISTBASE_FOREACH, and SET_FLAG_FROM_TEST.
Referenced by panel_activate_state(), and ui_handle_panel_header().
|
static |
Set runtime flag state for a panel and its sub-panels.
Definition at line 643 of file interface_panel.c.
References Panel::children, LISTBASE_FOREACH, Panel::runtime_flag, and SET_FLAG_FROM_TEST.
Referenced by panel_activate_state().
|
static |
Definition at line 1088 of file interface_panel.c.
References copy_v4_v4_uchar(), uiWidgetColors::text, TH_TITLE, bTheme::tui, UI_GetTheme(), UI_GetThemeColor4ubv(), UI_panel_matches_search_filter(), and ThemeUI::wcol_menu_back.
Referenced by panel_draw_aligned_widgets().
|
static |
Definition at line 673 of file interface_panel.c.
References PanelType::category, PanelType::context, context, STREQ, UI_panel_category_active_get(), and UI_panel_category_is_visible().
Referenced by reorder_instanced_panel_list().
Definition at line 652 of file interface_panel.c.
References PanelType::category, PanelType::context, PanelType::flag, LISTBASE_FOREACH, NULL, PANEL_TYPE_NO_HEADER, ARegion::panels, PNL_CLOSED, PNL_PIN, STREQ, Panel::type, UI_panel_category_active_get(), and UI_panel_category_is_visible().
Referenced by ui_handle_panel_header().
|
static |
Definition at line 1905 of file interface_panel.c.
References LISTBASE_FOREACH, PANEL_ACTIVE, PANEL_IS_DRAG_DROP, PANEL_USE_CLOSED_FROM_SEARCH, PANEL_WAS_ACTIVE, PANEL_WAS_CLOSED, SET_FLAG_FROM_TEST, and UI_panel_is_closed().
Referenced by UI_panels_begin().
|
static |
Definition at line 207 of file interface_panel.c.
References blender::compositor::area(), NULL, panel_active_animation_changed(), ARegion::panels, and properties_space_needs_realign().
Referenced by UI_panels_end().
Definition at line 194 of file interface_panel.c.
References blender::compositor::area(), SpaceProperties::mainb, SpaceProperties::mainbo, ARegion::regiontype, RGN_TYPE_WINDOW, and SPACE_PROPERTIES.
Referenced by panels_need_realign(), and UI_panels_end().
|
static |
Definition at line 1011 of file interface_panel.c.
References BLI_assert, LISTBASE_FOREACH, NULL, PANEL_ACTIVE, panel_remove_invisible_layouts_recursive(), and ARegion::panels.
Referenced by UI_panels_end().
|
static |
Set expansion based on the data for instanced panels.
Definition at line 537 of file interface_panel.c.
References C, LISTBASE_FOREACH, NULL, PANEL_ACTIVE, panel_set_expansion_from_list_data(), PANEL_TYPE_INSTANCED, and ARegion::panels.
Referenced by UI_panels_end().
|
static |
Set the flag telling every panel to override its expansion with its search result status.
Definition at line 960 of file interface_panel.c.
References C, LISTBASE_FOREACH, panel_set_expansion_from_search_filter_recursive(), ARegion::panels, and set_panels_list_data_expand_flag().
Referenced by UI_panels_end().
|
static |
Definition at line 422 of file interface_panel.c.
References BLI_assert, C, compare_panel(), PanelType::context, context, Panel::flag, LISTBASE_FOREACH, MEM_callocN, MEM_freeN, NULL, PanelSort::panel, panel_type_context_poll(), PANEL_TYPE_INSTANCED, ARegion::panels, PNL_INSTANCED_LIST_ORDER_CHANGED, PanelType::reorder, Panel::type, ARegion::type, and UI_panel_category_is_visible().
Referenced by ui_do_animate().
Call the callback to store the panel and sub-panel expansion settings in the list item that corresponds to each instanced panel.
Definition at line 571 of file interface_panel.c.
References C, PanelType::flag, get_panel_expand_flag(), LISTBASE_FOREACH, NULL, PANEL_ACTIVE, PANEL_TYPE_INSTANCED, and ARegion::panels.
Referenced by region_panels_set_expansion_from_search_filter(), ui_handle_panel_header(), and ui_panel_drag_collapse().
Definition at line 1883 of file interface_panel.c.
References Panel::activedata, ANIMATION_TIME, C, CTX_wm_region(), data, ED_region_tag_redraw(), min_ff(), panel_activate_state(), PANEL_STATE_EXIT, PIL_check_seconds_timer(), reorder_instanced_panel_list(), sqrtf, UI_panel_is_dragging(), and uiAlignPanelStep().
Referenced by ui_handler_panel().
Definition at line 1984 of file interface_panel.c.
References Panel::activedata, BLI_rctf_size_y(), BLI_rcti_size_y(), C, clamp_i(), CTX_wm_region(), View2D::cur, data, DRAG_REGION_PAD, ED_region_tag_redraw(), float(), Panel::ofsy, round_fl_to_int(), uiAlignPanelStep(), ARegion::v2d, ARegion::winrct, y, wmEvent::y, rcti::ymax, rcti::ymin, and rctf::ymin.
Referenced by ui_handler_panel().
| 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 | ||
| ) |
Draw a panel integrated in buttons-window, tool/property lists etc.
Definition at line 1344 of file interface_panel.c.
References uiBlock::aspect, PanelType::flag, floor(), uiBlock::panel, panel_custom_data_active_get(), panel_draw_aligned_backdrop(), panel_draw_aligned_widgets(), panel_draw_highlight_border(), PANEL_TYPE_NO_HEADER, PNL_HEADER, Panel::type, rcti::xmax, rcti::xmin, and rcti::ymax.
|
static |
Definition at line 2356 of file interface_panel.c.
References ARegion::alignment, wmEvent::ctrl, ED_region_tag_redraw(), ELEM, ListBase::first, PanelCategoryDyn::idname, ListBase::last, LIKELY, wmEvent::mval, PanelCategoryDyn::next, ARegion::panels_category, PanelCategoryDyn::prev, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_RIGHT, wmEvent::type, ui_but_supports_cycling(), UI_panel_category_active_get(), UI_panel_category_active_set(), UI_panel_category_find(), WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by ui_handler_panel_region().
|
static |
Supposing the block has a panel and isn't a menu, handle opening, closing, pinning, etc. Code currently assumes layout style for location of widgets
| mx | The mouse x coordinate, in panel space. |
Definition at line 2150 of file interface_panel.c.
References ARegion::alignment, BLI_assert, BLI_listbase_is_empty(), C, Panel::children, CTX_wm_region(), ED_region_tag_redraw(), ELEM, EVT_AKEY, EVT_PADENTER, EVT_RETKEY, ListBase::first, PanelType::flag, Panel::flag, IN_RANGE, LEFTMOUSE, NULL, uiBlock::panel, panel_activate_state(), panel_custom_data_active_set(), panel_set_flag_recursive(), PANEL_STATE_ANIMATION, PANEL_STATE_DRAG, PANEL_TYPE_NO_HEADER, panels_collapse_all(), PanelType::parent, PNL_CLOSED, PNL_ICON, PNL_PIN, uiBlock::rect, RGN_ALIGN_FLOAT, SET_FLAG_FROM_TEST, set_panels_list_data_expand_flag(), Panel::type, UI_panel_category_is_visible(), ui_panel_drag_collapse_handler_add(), UI_panel_is_closed(), UI_view2d_offset(), ARegion::v2d, and rctf::xmax.
Referenced by ui_handler_panel_region().
Definition at line 2568 of file interface_panel.c.
References Panel::activedata, C, wmEvent::customdata, data, KM_RELEASE, LEFTMOUSE, MOUSEMOVE, panel_activate_state(), PANEL_STATE_ANIMATION, PANEL_STATE_DRAG, TIMER, wmEvent::type, ui_do_animate(), ui_do_drag(), wmEvent::val, WM_UI_HANDLER_BREAK, and WM_UI_HANDLER_CONTINUE.
Referenced by panel_activate_state(), and panel_handle_data_ensure().
| int ui_handler_panel_region | ( | bContext * | C, |
| const wmEvent * | event, | ||
| ARegion * | region, | ||
| const uiBut * | active_but | ||
| ) |
Handle region panel events like opening and closing panels, changing categories, etc.
Definition at line 2411 of file interface_panel.c.
References C, wmEvent::ctrl, ED_region_tag_redraw(), ELEM, EVT_AKEY, EVT_PADENTER, EVT_RETKEY, EVT_TABKEY, PanelType::flag, Panel::flag, PanelCategoryDyn::idname, INBETWEEN_MOUSEMOVE, IS_EVENT_MOD, KM_PRESS, LEFTMOUSE, LISTBASE_FOREACH, MOUSEMOVE, NULL, panel_categories_find_mouse_over(), PANEL_MOUSE_INSIDE_HEADER, PANEL_MOUSE_OUTSIDE, PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, PNL_CLOSED, RIGHTMOUSE, Panel::runtime_flag, SET_FLAG_FROM_TEST, wmEvent::shift, Panel::type, wmEvent::type, ui_handle_panel_category_cycling(), ui_handle_panel_header(), UI_panel_category_active_set(), UI_panel_category_is_visible(), UI_panel_is_closed(), ui_panel_mouse_state_get(), ui_popup_context_menu_for_panel(), ui_region_find_active_but(), UI_view2d_mouse_in_scrollers(), UI_view2d_offset(), ui_window_to_block(), ARegion::uiblocks, ARegion::v2d, wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, wmEvent::x, and wmEvent::y.
|
static |
Definition at line 2599 of file interface_panel.c.
References C, panel_activate_state(), and PANEL_STATE_EXIT.
Referenced by panel_activate_state(), and panel_handle_data_ensure().
| void UI_list_panel_unique_str | ( | Panel * | panel, |
| char * | r_name | ||
| ) |
Find a unique key to append to the PanelType.idname for the lookup to the panel's uiBlock. Needed for instanced panels, where there can be multiple with the same type and identifier.
Definition at line 308 of file interface_panel.c.
References INSTANCED_PANEL_UNIQUE_STR_LEN, snprintf, and Panel::sortorder.
Referenced by ED_region_panels_layout_ex().
|
static |
Definition at line 890 of file interface_panel.c.
References uiBlock::buttons, LISTBASE_FOREACH, uiBlock::panel, uiStyle::panelspace, uiBlock::rect, Panel::sizex, Panel::sizey, ui_block_bounds_calc(), UI_style_get_dpi(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by UI_panels_end().
| Panel* UI_panel_add_instanced | ( | const bContext * | C, |
| ARegion * | region, | ||
| ListBase * | panels, | ||
| const char * | panel_idname, | ||
| PointerRNA * | custom_data | ||
| ) |
Called in situations where panels need to be added dynamically rather than having only one panel corresponding to each PanelType.
Definition at line 280 of file interface_panel.c.
References BLI_findstring(), C, NULL, panel_add_instanced(), panel_set_expansion_from_list_data(), ARegionType::paneltypes, and ARegion::type.
| Panel* UI_panel_begin | ( | ARegion * | region, |
| ListBase * | lb, | ||
| uiBlock * | block, | ||
| PanelType * | pt, | ||
| Panel * | panel, | ||
| bool * | r_open | ||
| ) |
Definition at line 703 of file interface_panel.c.
References ARegion::alignment, BLI_addtail(), BLI_insertlinkafter(), BLI_remlink(), BLI_strncpy(), Panel_Runtime::block, Panel::blocksizex, Panel::blocksizey, CTX_IFACE_, Panel::drawname, ListBase::first, PanelType::flag, Panel::flag, PanelType::idname, PanelType::label, LISTBASE_FOREACH, MEM_callocN, Panel::next, NULL, Panel::ofsx, Panel::ofsy, uiBlock::panel, PANEL_ACTIVE, PANEL_LAST_ADDED, PANEL_NEW_ADDED, PANEL_TYPE_DEFAULT_CLOSED, PANEL_WAS_CLOSED, Panel::panelname, PNL_CLOSED, RGN_ALIGN_FLOAT, Panel::runtime, Panel::runtime_flag, Panel::sizex, Panel::sizey, Panel::sortorder, PanelType::translation_context, Panel::type, UI_BLOCK_THEME_STYLE_POPUP, UI_block_theme_style_set(), and UI_panel_is_closed().
Referenced by ed_panel_draw(), and panel_property_search().
| PanelCategoryStack* UI_panel_category_active_find | ( | ARegion * | region, |
| const char * | idname | ||
| ) |
Definition at line 2254 of file interface_panel.c.
References BLI_findstring(), and ARegion::panels_category_active.
Referenced by image_buttons_region_draw(), ui_panel_category_active_set(), and UI_panel_category_active_set_default().
| const char* UI_panel_category_active_get | ( | ARegion * | region, |
| bool | set_fallback | ||
| ) |
Definition at line 2311 of file interface_panel.c.
References ListBase::first, PanelCategoryDyn::idname, LISTBASE_FOREACH, NULL, ARegion::panels_category, ARegion::panels_category_active, ui_panel_category_active_set(), and UI_panel_category_find().
Referenced by ED_area_do_mgs_subscribe_for_tool_ui(), panel_type_context_poll(), panels_collapse_all(), region_panels_collect_categories(), and ui_handle_panel_category_cycling().
| void UI_panel_category_active_set | ( | ARegion * | region, |
| const char * | idname | ||
| ) |
Definition at line 2299 of file interface_panel.c.
References ui_panel_category_active_set().
Referenced by ED_drivers_editor_init(), text_text_search_exec(), ui_handle_panel_category_cycling(), and ui_handler_panel_region().
|
static |
Definition at line 2260 of file interface_panel.c.
References BLI_addhead(), BLI_addtail(), BLI_findstring(), BLI_remlink(), BLI_strncpy(), PanelCategoryStack::idname, MEM_callocN, MEM_freeN, PanelCategoryStack::next, ARegion::panels_category_active, ARegionType::paneltypes, ARegion::type, and UI_panel_category_active_find().
Referenced by UI_panel_category_active_get(), UI_panel_category_active_set(), and UI_panel_category_active_set_default().
| void UI_panel_category_active_set_default | ( | ARegion * | region, |
| const char * | idname | ||
| ) |
Definition at line 2304 of file interface_panel.c.
References UI_panel_category_active_find(), and ui_panel_category_active_set().
Referenced by sequencer_buttons_region_init().
| void UI_panel_category_add | ( | ARegion * | region, |
| const char * | name | ||
| ) |
Definition at line 2341 of file interface_panel.c.
References BLI_addtail(), BLI_strncpy(), PanelCategoryDyn::idname, MEM_callocN, and ARegion::panels_category.
Referenced by region_panels_collect_categories().
| void UI_panel_category_clear_all | ( | ARegion * | region | ) |
Definition at line 2351 of file interface_panel.c.
References BLI_freelistN(), and ARegion::panels_category.
Referenced by region_panels_collect_categories().
| void UI_panel_category_draw_all | ( | ARegion * | region, |
| const char * | category_id_active | ||
| ) |
Draw vertical tabs on the left side of the region, one tab per category.
Definition at line 1393 of file interface_panel.c.
References ARegion::alignment, BLF_color3ubv(), BLF_disable(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable(), BLF_KERNING_DEFAULT, BLF_position(), BLF_rotation(), BLF_ROTATION, BLF_size(), BLF_width(), BLF_width_to_strlen(), BLI_assert, BLI_rcti_size_y(), ListBase::first, float(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_line_smooth(), GPU_SHADER_2D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IFACE_, immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fvAlpha(), immUniformColor3ubv(), immUniformColor4fv(), immUniformColor4ubv(), immVertexFormat(), is_left(), uiFontStyle::kerning, LISTBASE_FOREACH, M_PI_2, View2D::mask, NULL, ARegion::overlap, ARegion::panels_category, uiFontStyle::points, pos, ARegion::regiontype, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_RIGHT, RGN_TYPE_HAS_CATEGORY_MASK, round_fl_to_int(), roundboxtype, uiWidgetColors::roundness, STREQ, TABS_PADDING_BETWEEN_FACTOR, TABS_PADDING_TEXT_FACTOR, TH_BACK, TH_TAB_ACTIVE, TH_TAB_BACK, TH_TAB_INACTIVE, TH_TAB_OUTLINE, TH_TEXT, TH_TEXT_HI, bTheme::tui, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, UI_DPI_FAC, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), ui_fontscale(), UI_GetTheme(), UI_GetThemeColor3ubv(), UI_GetThemeColor4fv(), UI_GetThemeColor4ubv(), UI_panel_category_is_visible(), UI_PANEL_CATEGORY_MARGIN_WIDTH, UI_style_get(), ARegion::uiblocks, uiFontStyle::uifont_id, ARegion::v2d, ThemeUI::wcol_tab, uiStyle::widget, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ED_region_panels_draw().
| PanelCategoryDyn* UI_panel_category_find | ( | const ARegion * | region, |
| const char * | idname | ||
| ) |
Definition at line 2249 of file interface_panel.c.
References BLI_findstring(), and ARegion::panels_category.
Referenced by ui_handle_panel_category_cycling(), and UI_panel_category_active_get().
| bool UI_panel_category_is_visible | ( | const ARegion * | region | ) |
Definition at line 2242 of file interface_panel.c.
References ListBase::first, ListBase::last, and ARegion::panels_category.
Referenced by panel_region_offset_x_get(), panel_type_context_poll(), panels_collapse_all(), reorder_instanced_panel_list(), ui_handle_panel_header(), ui_handler_panel_region(), and UI_panel_category_draw_all().
| PointerRNA* UI_panel_custom_data_get | ( | const Panel * | panel | ) |
Definition at line 2534 of file interface_panel.c.
References Panel_Runtime::custom_data_ptr, and Panel::runtime.
Referenced by panel_custom_data_active_get(), panel_custom_data_active_set(), and UI_region_panel_custom_data_under_cursor().
| void UI_panel_custom_data_set | ( | Panel * | panel, |
| PointerRNA * | custom_data | ||
| ) |
Definition at line 2522 of file interface_panel.c.
References BLI_assert, Panel_Runtime::custom_data_ptr, MEM_freeN, NULL, Panel::runtime, Panel::type, and ui_panel_custom_data_set_recursive().
Referenced by ANIM_fmodifier_panels(), uiTemplateConstraints(), uiTemplateGpencilModifiers(), uiTemplateModifiers(), and uiTemplateShaderFx().
|
static |
Definition at line 2513 of file interface_panel.c.
References Panel::children, Panel_Runtime::custom_data_ptr, LISTBASE_FOREACH, and Panel::runtime.
Referenced by UI_panel_custom_data_set().
|
static |
Definition at line 2047 of file interface_panel.c.
References BLI_rctf_isect_segment(), C, CTX_wm_region(), PanelType::flag, Panel::flag, LISTBASE_FOREACH, NULL, panel_activate_state(), PANEL_STATE_ANIMATION, PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, PNL_CLOSED, PNL_HEADER, Panel::runtime_flag, SET_FLAG_FROM_TEST, set_panels_list_data_expand_flag(), Panel::type, ui_window_to_block_fl(), ARegion::uiblocks, UNPACK2, uiPanelDragCollapseHandle::was_first_open, uiPanelDragCollapseHandle::xy_init, rctf::ymax, and rctf::ymin.
Referenced by ui_panel_drag_collapse_handler().
|
static |
Panel drag-collapse (modal handler). Clicking and dragging over panels toggles their collapse state based on the panel that was first dragged over. If it was open all affected panels including the initial one are closed and vice versa.
Definition at line 2097 of file interface_panel.c.
References C, CTX_wm_window(), KM_RELEASE, LEFTMOUSE, wmWindow::modalhandlers, MOUSEMOVE, wmEvent::type, ui_panel_drag_collapse(), ui_panel_drag_collapse_handler_remove(), wmEvent::val, WM_event_remove_ui_handler(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::x.
Referenced by ui_panel_drag_collapse_handler_add().
|
static |
Definition at line 2127 of file interface_panel.c.
References C, copy_v2_v2_int(), CTX_wm_window(), wmWindow::eventstate, MEM_mallocN, wmWindow::modalhandlers, ui_panel_drag_collapse_handler(), ui_panel_drag_collapse_handler_remove(), uiPanelDragCollapseHandle::was_first_open, WM_event_add_ui_handler(), and uiPanelDragCollapseHandle::xy_init.
Referenced by ui_handle_panel_header().
|
static |
Definition at line 2041 of file interface_panel.c.
References MEM_freeN.
Referenced by ui_panel_drag_collapse_handler(), and ui_panel_drag_collapse_handler_add().
| void UI_panel_end | ( | Panel * | panel, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 882 of file interface_panel.c.
References Panel::blocksizex, Panel::blocksizey, height, and width.
Referenced by ed_panel_draw().
Definition at line 688 of file interface_panel.c.
References PanelType::idname, LISTBASE_FOREACH, NULL, and STREQLEN.
| void UI_panel_header_buttons_begin | ( | Panel * | panel | ) |
Create the panel header button group, used to mark which buttons are part of panel headers for the panel search process that happens later. This Should be called before adding buttons for the panel's header layout.
Definition at line 787 of file interface_panel.c.
References Panel_Runtime::block, Panel::runtime, ui_block_new_button_group(), UI_BUTTON_GROUP_LOCK, and UI_BUTTON_GROUP_PANEL_HEADER.
Referenced by ed_panel_draw().
| void UI_panel_header_buttons_end | ( | Panel * | panel | ) |
Finish the button group for the panel header to avoid putting panel body buttons in it.
Definition at line 797 of file interface_panel.c.
References BLI_assert, BLI_listbase_is_empty(), BLI_listbase_is_single(), Panel_Runtime::block, uiBlock::button_groups, uiButtonGroup::buttons, uiButtonGroup::flag, ListBase::last, Panel::runtime, ui_block_new_button_group(), UI_BUTTON_GROUP_LOCK, and UI_BUTTON_GROUP_PANEL_HEADER.
Referenced by ed_panel_draw().
| bool UI_panel_is_active | ( | const Panel * | panel | ) |
Definition at line 1039 of file interface_panel.c.
References PANEL_ACTIVE, and Panel::runtime_flag.
Referenced by panel_custom_data_active_get(), and panel_custom_data_active_set().
| bool UI_panel_is_closed | ( | const Panel * | panel | ) |
Get the panel's expansion state, taking into account expansion set from property search if it applies.
Definition at line 1025 of file interface_panel.c.
References PanelType::flag, Panel::flag, PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, PNL_CLOSED, Panel::runtime_flag, Panel::type, and UI_panel_matches_search_filter().
Referenced by get_panel_real_ofsy(), get_panel_real_size_y(), panel_active_animation_changed(), panel_calculate_size_recursive(), panel_draw_aligned_backdrop(), panel_draw_aligned_widgets(), panel_draw_highlight_border(), panel_remove_invisible_layouts_recursive(), panel_set_expand_from_list_data_recursive(), panels_layout_begin_clear_flags(), ui_handle_panel_header(), ui_handler_panel_region(), UI_panel_begin(), ui_panel_mouse_state_get(), and uiAlignPanelStep().
| bool UI_panel_is_dragging | ( | const Panel * | panel | ) |
Definition at line 1676 of file interface_panel.c.
References PANEL_IS_DRAG_DROP, and Panel::runtime_flag.
Referenced by ui_do_animate(), and UI_panels_draw().
| void UI_panel_label_offset | ( | const uiBlock * | block, |
| int * | r_x, | ||
| int * | r_y | ||
| ) |
Definition at line 1075 of file interface_panel.c.
References uiBlock::panel, PanelType::parent, Panel::type, UI_UNIT_X, and UI_UNIT_Y.
| bool UI_panel_list_matches_data | ( | ARegion * | region, |
| ListBase * | data, | ||
| uiListPanelIDFromDataFunc | panel_idname_func | ||
| ) |
Check if the instanced panels in the region's panels correspond to the list of data the panels represent. Returns false if the panels have been reordered or if the types from the list data don't match in any way.
| data | The list of data to check against the instanced panels. |
| panel_idname_func | Function to find the PanelType.idname for each item in the data list. For a readability and generality, this lookup happens separately for each type of panel list. |
Definition at line 373 of file interface_panel.c.
References BLI_listbase_count(), data, LISTBASE_FOREACH, MAX_NAME, Link::next, NULL, PANEL_TYPE_INSTANCED, ARegion::panels, PNL_INSTANCED_LIST_ORDER_CHANGED, and STREQ.
Referenced by ANIM_fmodifier_panels(), uiTemplateConstraints(), uiTemplateGpencilModifiers(), uiTemplateModifiers(), and uiTemplateShaderFx().
| bool UI_panel_matches_search_filter | ( | const Panel * | panel | ) |
Find whether a panel or any of its sub-panels contain a property that matches the search filter, depending on the search process running in UI_block_apply_search_filter earlier.
Definition at line 930 of file interface_panel.c.
References panel_matches_search_filter_recursive().
Referenced by panel_draw_aligned_backdrop(), panel_title_color_get(), and UI_panel_is_closed().
|
static |
Definition at line 2014 of file interface_panel.c.
References IN_RANGE, PANEL_MOUSE_INSIDE_CONTENT, PANEL_MOUSE_INSIDE_HEADER, PANEL_MOUSE_OUTSIDE, PNL_HEADER, uiBlock::rect, UI_panel_is_closed(), rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by ui_handler_panel_region(), and UI_region_panel_custom_data_under_cursor().
| int UI_panel_size_y | ( | const Panel * | panel | ) |
Definition at line 1659 of file interface_panel.c.
References get_panel_real_size_y().
| void ui_panel_tag_search_filter_match | ( | Panel * | panel | ) |
Definition at line 909 of file interface_panel.c.
References PANEL_SEARCH_FILTER_MATCH, and Panel::runtime_flag.
Referenced by UI_block_apply_search_filter().
Definition at line 1921 of file interface_panel.c.
References ARegion::panels, and panels_layout_begin_clear_flags().
Draw panels, selected (panels currently being dragged) on top.
Definition at line 1053 of file interface_panel.c.
References C, LISTBASE_FOREACH_BACKWARD, UI_block_draw(), UI_block_is_search_only(), UI_panel_is_dragging(), and ARegion::uiblocks.
Definition at line 1928 of file interface_panel.c.
References blender::compositor::area(), BLI_assert, C, CTX_wm_area(), ARegion::flag, LISTBASE_FOREACH, NULL, panel_activate_state(), PANEL_ACTIVE, panel_calculate_size_recursive(), PANEL_STATE_ANIMATION, ARegion::panels, panels_need_realign(), properties_space_needs_realign(), region_panels_remove_invisible_layouts(), region_panels_set_expansion_from_list_data(), region_panels_set_expansion_from_search_filter(), RGN_FLAG_SEARCH_FILTER_ACTIVE, RGN_FLAG_SEARCH_FILTER_UPDATE, ui_offset_panel_block(), ui_panels_size(), uiAlignPanelStep(), and ARegion::uiblocks.
Remove instanced panels from the region's panel list.
Definition at line 343 of file interface_panel.c.
References C, LISTBASE_FOREACH_MUTABLE, MEM_freeN, NULL, panel_activate_state(), panel_delete(), PANEL_STATE_EXIT, PANEL_TYPE_INSTANCED, and ARegion::panels.
|
static |
Definition at line 1856 of file interface_panel.c.
References get_panel_real_ofsy(), LISTBASE_FOREACH, max_ii(), min_ii(), PANEL_ACTIVE, ARegion::panels, and UI_PANEL_WIDTH.
Referenced by UI_panels_end().
| PointerRNA* UI_region_panel_custom_data_under_cursor | ( | const bContext * | C, |
| const wmEvent * | event | ||
| ) |
Definition at line 2539 of file interface_panel.c.
References C, CTX_wm_region(), ELEM, LISTBASE_FOREACH, NULL, PANEL_MOUSE_INSIDE_CONTENT, PANEL_MOUSE_INSIDE_HEADER, UI_panel_custom_data_get(), ui_panel_mouse_state_get(), ui_window_to_block(), and ARegion::uiblocks.
Calculate the position and order of panels as they are opened, closed, and dragged.
Definition at line 1758 of file interface_panel.c.
References align_sub_panels(), BLI_assert, compare_panel(), find_highest_panel(), PanelType::flag, Panel::flag, get_panel_real_size_y(), interpf(), LISTBASE_FOREACH, MEM_freeN, MEM_mallocN, PanelSort::new_offset_x, PanelSort::new_offset_y, NULL, Panel::ofsx, Panel::ofsy, PanelSort::panel, PANEL_ACTIVE, panel_region_offset_x_get(), PANEL_TYPE_DRAW_BOX, ARegion::panels, PNL_SELECT, Panel_Runtime::region_ofsx, round_fl_to_int(), Panel::runtime, Panel::sizey, Panel::sortorder, Panel::type, UI_PANEL_BOX_STYLE_MARGIN, UI_panel_is_closed(), x, and y.
Referenced by ui_do_animate(), ui_do_drag(), and UI_panels_end().