|
Blender V4.3
|
#include <cctype>#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_time.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "BKE_context.hh"#include "BKE_screen.hh"#include "RNA_access.hh"#include "BLF_api.hh"#include "WM_api.hh"#include "WM_types.hh"#include "ED_screen.hh"#include "UI_interface.hh"#include "UI_interface_c.hh"#include "UI_interface_icons.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "GPU_batch_presets.hh"#include "GPU_immediate.hh"#include "GPU_matrix.hh"#include "GPU_state.hh"#include "interface_intern.hh"Go to the source code of this file.
Classes | |
| struct | uiHandlePanelData |
| struct | PanelSort |
| struct | uiPanelDragCollapseHandle |
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) |
| void | ui_draw_layout_panels_backdrop (const ARegion *region, const Panel *panel, const float radius, float subpanel_backcolor[4]) |
| static void | panel_draw_aligned_backdrop (const ARegion *region, const Panel *panel, const rcti *rect, const rcti *header_rect) |
| 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) |
| bool | UI_panel_should_show_background (const ARegion *region, const PanelType *panel_type) |
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 58 of file interface_panel.cc.
Referenced by panel_handle_data_ensure().
| #define ANIMATION_TIME 0.30 |
Definition at line 57 of file interface_panel.cc.
Referenced by ui_do_animate().
| #define DRAG_REGION_PAD (PNL_HEADER * 0.5) |
Definition at line 1968 of file interface_panel.cc.
Referenced by ui_do_drag().
Definition at line 1030 of file interface_panel.cc.
Referenced by ui_handle_panel_header().
| #define TABS_PADDING_BETWEEN_FACTOR 4.0f |
Definition at line 1366 of file interface_panel.cc.
Referenced by UI_panel_category_draw_all().
| #define TABS_PADDING_TEXT_FACTOR 6.0f |
Definition at line 1367 of file interface_panel.cc.
Referenced by UI_panel_category_draw_all().
| enum uiHandlePanelState |
| Enumerator | |
|---|---|
| PANEL_STATE_DRAG | |
| PANEL_STATE_ANIMATION | |
| PANEL_STATE_EXIT | |
Definition at line 91 of file interface_panel.cc.
| enum uiPanelMouseState |
Definition at line 84 of file interface_panel.cc.
| 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 60 of file interface_panel.cc.
|
static |
Definition at line 1706 of file interface_panel.cc.
References align_sub_panels(), 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 align_sub_panels(), and uiAlignPanelStep().
|
static |
Definition at line 1691 of file interface_panel.cc.
References b, and Panel::sortorder.
Referenced by reorder_instanced_panel_list(), and uiAlignPanelStep().
|
static |
Definition at line 1649 of file interface_panel.cc.
References b, PanelType::flag, Panel::ofsy, panel_custom_pin_to_last_get(), 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 511 of file interface_panel.cc.
References Panel::children, flag, Panel::flag, get_panel_expand_flag(), LISTBASE_FOREACH, PNL_CLOSED, and SET_FLAG_FROM_TEST.
Referenced by get_panel_expand_flag(), and set_panels_list_data_expand_flag().
This function is needed because uiBlock and Panel itself don't change Panel.sizey or location when closed.
Definition at line 1628 of file interface_panel.cc.
References Panel::ofsy, Panel::sizey, and UI_panel_is_closed().
Referenced by ui_panels_size().
Definition at line 1608 of file interface_panel.cc.
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().
Definition at line 1599 of file interface_panel.cc.
References PanelType::flag, PANEL_TYPE_NO_HEADER, PNL_HEADER, Panel::sizey, and Panel::type.
Referenced by align_sub_panels().
|
static |
Definition at line 2744 of file interface_panel.cc.
References Panel::activedata, BLI_assert, CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), ED_region_tag_redraw(), MEM_freeN(), wmWindow::modalhandlers, 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_ui_handler(), WM_event_timer_remove(), 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 130 of file interface_panel.cc.
References LISTBASE_FOREACH, PANEL_ACTIVE, panel_active_animation_changed(), PANEL_ANIM_ALIGN, PANEL_STATE_ANIMATION, PANEL_WAS_ACTIVE, PANEL_WAS_CLOSED, and UI_panel_is_closed().
Referenced by panel_active_animation_changed(), and panels_need_realign().
|
static |
Definition at line 224 of file interface_panel.cc.
References BKE_panel_new(), BLI_addtail(), Panel::children, PanelType::children, Panel_Runtime::custom_data_ptr, LISTBASE_FOREACH, panel_add_instanced(), PANEL_NEW_ADDED, Panel::runtime, Panel::runtime_flag, and Panel::sortorder.
Referenced by panel_add_instanced(), and 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 800 of file interface_panel.cc.
References Panel::blocksizex, Panel::blocksizey, Panel::children, get_panel_real_size_y(), LISTBASE_FOREACH, max_ii(), Panel::ofsy, PANEL_ACTIVE, PANEL_ANIM_ALIGN, panel_calculate_size_recursive(), PANEL_NEW_ADDED, panel_region_offset_x_get(), Panel_Runtime::region_ofsx, Panel::runtime, Panel::runtime_flag, Panel::sizex, Panel::sizey, and UI_panel_is_closed().
Referenced by panel_calculate_size_recursive(), and UI_panels_end().
|
static |
Definition at line 2405 of file interface_panel.cc.
References BLI_rcti_isect_pt(), LISTBASE_FOREACH, and wmEvent::mval.
Referenced by ui_handler_panel_region().
|
static |
Definition at line 580 of file interface_panel.cc.
References PanelType::active_property, BLI_assert, 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 596 of file interface_panel.cc.
References PanelType::active_property, BLI_assert, 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 |
Definition at line 556 of file interface_panel.cc.
References PanelType::pin_to_last_property, ptr, RNA_boolean_get(), RNA_pointer_is_null(), Panel::type, and UI_panel_custom_data_get().
Referenced by find_highest_panel(), panel_draw_aligned_widgets(), and ui_handle_panel_header().
|
static |
Definition at line 568 of file interface_panel.cc.
References PanelType::pin_to_last_property, ptr, RNA_boolean_set(), RNA_pointer_is_null(), RNA_property_update(), RNA_struct_find_property(), Panel::type, and UI_panel_custom_data_get().
Referenced by ui_handle_panel_header().
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 294 of file interface_panel.cc.
References BKE_panel_free(), BLI_freelistN(), BLI_remlink(), Panel::children, LISTBASE_FOREACH_MUTABLE, and panel_delete().
Referenced by panel_delete(), and UI_panels_free_instanced().
|
static |
Definition at line 1241 of file interface_panel.cc.
References uiBlock::aspect, Panel_Runtime::block, PanelType::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_SHADER_3D_UNIFORM_COLOR, immBindBuiltinProgram(), immUnbindProgram(), ThemeUI::panel_roundness, PANEL_TYPE_NO_HEADER, PanelType::parent, Panel::runtime, TH_BACK, TH_MATCH, TH_PANEL_BACK, TH_PANEL_HEADER, TH_PANEL_SUB_BACK, bTheme::tui, Panel::type, UI_CNR_ALL, UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_TOP_LEFT, UI_CNR_TOP_RIGHT, ui_draw_layout_panels_backdrop(), UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetTheme(), UI_GetThemeColor4fv(), UI_panel_is_closed(), UI_panel_matches_search_filter(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 1093 of file interface_panel.cc.
References batch, 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_3D_FLAT_COLOR, Panel::labelofs, panel_custom_pin_to_last_get(), panel_title_color_get(), uiStyle::paneltitle, params, PanelType::parent, PNL_PIN, round_fl_to_int(), TH_PANEL_BACK, TH_PANEL_HEADER, Panel::type, UI_fontstyle_draw(), UI_GetThemeColorShade4fv(), UI_icon_draw_ex(), UI_INV_SCALE_FAC, UI_NO_ICON_OVERLAY_TEXT, UI_panel_is_closed(), UI_STYLE_TEXT_LEFT, UI_UNIT_X, uiStyle::widget, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 1068 of file interface_panel.cc.
References uiBlock::aspect, Panel_Runtime::block, ThemeUI::panel_roundness, PanelType::parent, Panel::runtime, TH_SELECT_ACTIVE, bTheme::tui, Panel::type, UI_CNR_ALL, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), UI_GetTheme(), UI_GetThemeColor4fv(), UI_panel_is_closed(), rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 2703 of file interface_panel.cc.
References Panel::activedata, ANIMATION_INTERVAL, uiHandlePanelData::animtimer, BLI_assert, BLI_time_now_seconds(), CTX_wm_manager(), ELEM, wmWindow::eventstate, MEM_callocN, wmWindow::modalhandlers, Panel::ofsx, Panel::ofsy, PANEL_STATE_ANIMATION, PANEL_STATE_DRAG, state, TIMER, ui_handler_panel(), ui_handler_remove_panel(), WM_event_add_ui_handler(), WM_event_timer_add(), and wmEvent::xy.
Referenced by panel_activate_state().
|
static |
Definition at line 882 of file interface_panel.cc.
References Panel::children, LISTBASE_FOREACH, panel_matches_search_filter_recursive(), PANEL_SEARCH_FILTER_MATCH, and Panel::runtime_flag.
Referenced by panel_matches_search_filter_recursive(), and UI_panel_matches_search_filter().
Definition at line 785 of file interface_panel.cc.
References 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 940 of file interface_panel.cc.
References uiBlock::active, BLI_assert, Panel_Runtime::block, uiBlock::button_groups, uiBlock::buttons, Panel::children, LISTBASE_FOREACH, PANEL_ACTIVE, panel_remove_invisible_layouts_recursive(), Panel::runtime, UI_block_set_search_only(), UI_BUTTON_GROUP_PANEL_HEADER, UI_HIDDEN, and UI_panel_is_closed().
Referenced by panel_remove_invisible_layouts_recursive(), and region_panels_remove_invisible_layouts().
|
static |
Recursive implementation for panel_set_expansion_from_list_data.
Definition at line 457 of file interface_panel.cc.
References Panel::children, flag, Panel::flag, LISTBASE_FOREACH, panel_set_expand_from_list_data_recursive(), PNL_CLOSED, SET_FLAG_FROM_TEST, and UI_panel_is_closed().
Referenced by panel_set_expand_from_list_data_recursive(), and 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 475 of file interface_panel.cc.
References BLI_assert, PanelType::flag, PanelType::get_list_data_expand_flag, 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 904 of file interface_panel.cc.
References Panel::children, PanelType::flag, LISTBASE_FOREACH, panel_set_expansion_from_search_filter_recursive(), PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, Panel::runtime_flag, SET_FLAG_FROM_TEST, and Panel::type.
Referenced by panel_set_expansion_from_search_filter_recursive(), and region_panels_set_expansion_from_search_filter().
|
static |
Set flag state for a panel and its sub-panels.
Definition at line 614 of file interface_panel.cc.
References Panel::children, flag, Panel::flag, LISTBASE_FOREACH, panel_set_flag_recursive(), and SET_FLAG_FROM_TEST.
Referenced by panel_activate_state(), panel_set_flag_recursive(), and ui_handle_panel_header().
|
static |
Set runtime flag state for a panel and its sub-panels.
Definition at line 626 of file interface_panel.cc.
References Panel::children, flag, LISTBASE_FOREACH, panel_set_runtime_flag_recursive(), Panel::runtime_flag, and SET_FLAG_FROM_TEST.
Referenced by panel_activate_state(), and panel_set_runtime_flag_recursive().
|
static |
Definition at line 1045 of file interface_panel.cc.
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 657 of file interface_panel.cc.
References BLI_listbase_is_empty(), PanelType::category, PanelType::context, STREQ, and UI_panel_category_active_get().
Referenced by reorder_instanced_panel_list().
Definition at line 635 of file interface_panel.cc.
References PanelType::category, PanelType::context, PanelType::flag, LISTBASE_FOREACH, PANEL_TYPE_NO_HEADER, 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 1886 of file interface_panel.cc.
References LISTBASE_FOREACH, PANEL_ACTIVE, PANEL_IS_DRAG_DROP, PANEL_USE_CLOSED_FROM_SEARCH, PANEL_WAS_ACTIVE, PANEL_WAS_CLOSED, panels_layout_begin_clear_flags(), SET_FLAG_FROM_TEST, and UI_panel_is_closed().
Referenced by panels_layout_begin_clear_flags(), and UI_panels_begin().
|
static |
Definition at line 192 of file interface_panel.cc.
References panel_active_animation_changed(), and properties_space_needs_realign().
Referenced by UI_panels_end().
Definition at line 179 of file interface_panel.cc.
References SpaceProperties::mainb, SpaceProperties::mainbo, RGN_TYPE_WINDOW, and SPACE_PROPERTIES.
Referenced by panels_need_realign(), and UI_panels_end().
|
static |
Definition at line 974 of file interface_panel.cc.
References BLI_assert, LISTBASE_FOREACH, PANEL_ACTIVE, and panel_remove_invisible_layouts_recursive().
Referenced by UI_panels_end().
|
static |
Set expansion based on the data for instanced panels.
Definition at line 496 of file interface_panel.cc.
References PanelType::flag, LISTBASE_FOREACH, PANEL_ACTIVE, panel_set_expansion_from_list_data(), and PANEL_TYPE_INSTANCED.
Referenced by UI_panels_end().
|
static |
Set the flag telling every panel to override its expansion with its search result status.
Definition at line 924 of file interface_panel.cc.
References LISTBASE_FOREACH, panel_set_expansion_from_search_filter_recursive(), and set_panels_list_data_expand_flag().
Referenced by UI_panels_end().
|
static |
Definition at line 376 of file interface_panel.cc.
References BLI_assert, compare_panel(), Panel_Runtime::context, PanelType::context, CTX_store_set(), Panel::flag, LISTBASE_FOREACH, MEM_callocN, MEM_freeN(), PanelSort::panel, panel_type_context_poll(), PANEL_TYPE_INSTANCED, PNL_INSTANCED_LIST_ORDER_CHANGED, PanelType::reorder, Panel::runtime, Panel::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 530 of file interface_panel.cc.
References PanelType::flag, get_panel_expand_flag(), LISTBASE_FOREACH, PANEL_ACTIVE, and PANEL_TYPE_INSTANCED.
Referenced by region_panels_set_expansion_from_search_filter(), ui_handle_panel_header(), and ui_panel_drag_collapse().
Definition at line 1864 of file interface_panel.cc.
References Panel::activedata, ANIMATION_TIME, BLI_time_now_seconds(), CTX_wm_region(), ED_region_tag_redraw(), min_ff(), panel_activate_state(), PANEL_STATE_EXIT, reorder_instanced_panel_list(), sqrtf, UI_panel_is_dragging(), and uiAlignPanelStep().
Referenced by ui_handler_panel().
Definition at line 1969 of file interface_panel.cc.
References Panel::activedata, BLI_rctf_size_y(), BLI_rcti_size_y(), clamp_i(), CTX_wm_region(), DRAG_REGION_PAD, ED_region_tag_redraw(), float, Panel::ofsy, round_fl_to_int(), uiAlignPanelStep(), and wmEvent::xy.
Referenced by ui_handler_panel().
| void ui_draw_aligned_panel | ( | const ARegion * | region, |
| const uiStyle * | style, | ||
| const uiBlock * | block, | ||
| const rcti * | rect, | ||
| bool | show_pin, | ||
| bool | show_background, | ||
| bool | region_search_filter_active ) |
Draw a panel integrated in buttons-window, tool/property lists etc.
Definition at line 1304 of file interface_panel.cc.
References uiBlock::aspect, PanelType::flag, floor(), int, 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.
Referenced by UI_block_draw().
| void ui_draw_layout_panels_backdrop | ( | const ARegion * | region, |
| const Panel * | panel, | ||
| const float | radius, | ||
| float | subpanel_backcolor[4] ) |
Definition at line 1198 of file interface_panel.cc.
References uiBlock::aspect, BLI_rctf_rcti_copy(), Panel_Runtime::block, LayoutPanels::bodies, Panel_Runtime::layout_panels, uiBlock::rect, Panel::runtime, ui_block_is_popup_any(), UI_CNR_BOTTOM_LEFT, UI_CNR_BOTTOM_RIGHT, UI_CNR_NONE, UI_draw_roundbox_4fv(), UI_draw_roundbox_corner_set(), ui_to_pixelrect(), rctf::ymax, and rctf::ymin.
Referenced by panel_draw_aligned_backdrop(), and UI_block_draw().
|
static |
Definition at line 2176 of file interface_panel.cc.
References BLI_assert, CTX_wm_region(), CTX_wm_window(), ED_region_tag_redraw(), LEFTMOUSE, uiBlock::panel, Panel::type, ui_layout_panel_header_under_mouse(), ui_layout_panel_toggle_open(), ui_panel_drag_collapse_handler_add(), and WM_tooltip_clear().
Referenced by ui_handler_panel_region().
|
static |
Definition at line 2431 of file interface_panel.cc.
References ED_region_tag_redraw(), ELEM, PanelCategoryDyn::idname, KM_CTRL, KM_SHIFT, LIKELY, wmEvent::modifier, wmEvent::mval, PanelCategoryDyn::next, 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 2201 of file interface_panel.cc.
References BLI_assert, BLI_listbase_is_empty(), Panel::children, CTX_wm_region(), ED_region_tag_redraw(), ELEM, EVT_AKEY, EVT_PADENTER, EVT_RETKEY, ListBase::first, Panel::flag, PanelType::flag, IN_RANGE, LEFTMOUSE, uiBlock::panel, panel_activate_state(), panel_custom_data_active_set(), panel_custom_pin_to_last_get(), panel_custom_pin_to_last_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_can_be_pinned(), UI_panel_category_is_visible(), ui_panel_drag_collapse_handler_add(), UI_panel_is_closed(), UI_view2d_offset(), and rctf::xmax.
Referenced by ui_handler_panel_region().
Definition at line 2665 of file interface_panel.cc.
References Panel::activedata, wmEvent::customdata, 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 2484 of file interface_panel.cc.
References ED_region_tag_redraw(), ELEM, EVT_AKEY, EVT_PADENTER, EVT_RETKEY, EVT_TABKEY, Panel::flag, PanelType::flag, PanelCategoryDyn::idname, ISMOUSE_MOTION, KM_ALT, KM_CTRL, KM_OSKEY, KM_PRESS, KM_SHIFT, LEFTMOUSE, LISTBASE_FOREACH, wmEvent::modifier, panel_categories_find_mouse_over(), PANEL_MOUSE_INSIDE_HEADER, PANEL_MOUSE_INSIDE_LAYOUT_PANEL_HEADER, PANEL_MOUSE_OUTSIDE, PANEL_TYPE_NO_HEADER, PNL_CLOSED, RIGHTMOUSE, Panel::runtime_flag, SET_FLAG_FROM_TEST, Panel::type, uiBut::type, wmEvent::type, UI_BTYPE_LABEL, ui_handle_layout_panel_header(), 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(), wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_region_handler().
|
static |
Definition at line 2696 of file interface_panel.cc.
References panel_activate_state(), and PANEL_STATE_EXIT.
Referenced by panel_activate_state(), and panel_handle_data_ensure().
| LayoutPanelHeader * ui_layout_panel_header_under_mouse | ( | const Panel & | panel, |
| const int | my ) |
Definition at line 1999 of file interface_panel.cc.
References Panel_Runtime::block, LayoutPanels::headers, IN_RANGE, Panel_Runtime::layout_panels, uiBlock::rect, Panel::runtime, and rctf::ymax.
Referenced by ui_handle_layout_panel_header(), ui_handle_menus_recursive(), and ui_panel_mouse_state_get().
| bool ui_layout_panel_toggle_open | ( | const bContext * | C, |
| LayoutPanelHeader * | header ) |
Toggles layout panel open state and returns the new state.
Definition at line 2165 of file interface_panel.cc.
References LayoutPanelHeader::open_owner_ptr, LayoutPanelHeader::open_prop_name, RNA_boolean_get(), RNA_boolean_set(), RNA_property_update(), and RNA_struct_find_property().
Referenced by ui_handle_layout_panel_header(), and ui_handle_menus_recursive().
| 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 280 of file interface_panel.cc.
References BLI_snprintf(), INSTANCED_PANEL_UNIQUE_STR_SIZE, and Panel::sortorder.
Referenced by ED_region_panels_layout_ex().
|
static |
Definition at line 858 of file interface_panel.cc.
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 256 of file interface_panel.cc.
References BLI_findstring(), offsetof, panel_add_instanced(), panel_set_expansion_from_list_data(), ARegionType::paneltypes, and printf.
Referenced by ANIM_fmodifier_panels(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), and uiTemplateShaderFx().
| Panel * UI_panel_begin | ( | ARegion * | region, |
| ListBase * | lb, | ||
| uiBlock * | block, | ||
| PanelType * | pt, | ||
| Panel * | panel, | ||
| bool * | r_open ) |
Definition at line 684 of file interface_panel.cc.
References BKE_panel_new(), BLI_addtail(), BLI_insertlinkafter(), BLI_remlink(), Panel_Runtime::block, Panel::blocksizex, Panel::blocksizey, CTX_IFACE_, ListBase::first, Panel::flag, PanelType::flag, PanelType::label, LISTBASE_FOREACH, Panel::next, Panel::ofsx, Panel::ofsy, uiBlock::panel, PANEL_ACTIVE, PANEL_LAST_ADDED, PANEL_NEW_ADDED, PANEL_TYPE_DEFAULT_CLOSED, PANEL_WAS_CLOSED, 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(), UI_panel_drawname_set(), and UI_panel_is_closed().
Referenced by ed_panel_draw(), and panel_property_search().
| bool UI_panel_can_be_pinned | ( | const Panel * | panel | ) |
Definition at line 2653 of file interface_panel.cc.
References PanelType::flag, PANEL_TYPE_INSTANCED, PanelType::parent, and Panel::type.
Referenced by ui_handle_panel_header(), and ui_popup_context_menu_for_panel().
| PanelCategoryStack * UI_panel_category_active_find | ( | ARegion * | region, |
| const char * | idname ) |
Definition at line 2317 of file interface_panel.cc.
References BLI_findstring(), and offsetof.
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 2386 of file interface_panel.cc.
References PanelCategoryDyn::idname, LISTBASE_FOREACH, 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(), text_text_search_exec(), and ui_handle_panel_category_cycling().
| void UI_panel_category_active_set | ( | ARegion * | region, |
| const char * | idname ) |
Definition at line 2363 of file interface_panel.cc.
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 2323 of file interface_panel.cc.
References BLI_addhead(), BLI_addtail(), BLI_findstring(), BLI_remlink(), PanelCategoryStack::idname, MEM_freeN(), PanelCategoryStack::next, offsetof, STRNCPY, and UI_panel_category_active_find().
Referenced by UI_panel_category_active_get(), UI_panel_category_active_set(), UI_panel_category_active_set_default(), and UI_panel_category_index_active_set().
| void UI_panel_category_active_set_default | ( | ARegion * | region, |
| const char * | idname ) |
Definition at line 2379 of file interface_panel.cc.
References UI_panel_category_active_find(), and ui_panel_category_active_set().
Referenced by sequencer_buttons_region_init(), and blender::ed::spreadsheet::spreadsheet_sidebar_init().
| void UI_panel_category_add | ( | ARegion * | region, |
| const char * | name ) |
Definition at line 2416 of file interface_panel.cc.
References BLI_addtail(), PanelCategoryDyn::idname, and STRNCPY.
Referenced by region_panels_collect_categories().
| void UI_panel_category_clear_all | ( | ARegion * | region | ) |
Definition at line 2426 of file interface_panel.cc.
References BLI_freelistN().
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 1369 of file interface_panel.cc.
References BLF_color3ubv(), BLF_disable(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable(), BLF_position(), BLF_ROTATION, BLF_rotation(), BLF_size(), BLF_width(), BLI_assert, BLI_listbase_is_empty(), BLI_rcti_size_y(), clamp_i(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_COMP_I32, GPU_FETCH_INT_TO_FLOAT, GPU_line_smooth(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IFACE_, immBindBuiltinProgram(), immRecti(), immUnbindProgram(), immUniformColor3fvAlpha(), immUniformColor3ubv(), immUniformColor4fv(), immUniformColor4ubv(), immVertexFormat(), int, is_left(), LISTBASE_FOREACH, M_PI_2, View2D::mask, max_ii(), uiFontStyle::points, pos, 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_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_SCALE_FAC, UI_style_get(), uiFontStyle::uifont_id, ThemeUI::wcol_tab, uiStyle::widget, rctf::xmax, rcti::xmax, rctf::xmin, rcti::xmin, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ED_region_panels_draw().
| PanelCategoryDyn * UI_panel_category_find | ( | const ARegion * | region, |
| const char * | idname ) |
Definition at line 2306 of file interface_panel.cc.
References BLI_findstring(), and offsetof.
Referenced by region_panels_collect_categories(), ui_handle_panel_category_cycling(), and UI_panel_category_active_get().
| index | index of item in ARegion.panels_category list. |
Definition at line 2368 of file interface_panel.cc.
References BLI_findlink(), PanelCategoryDyn::idname, and ui_panel_category_active_set().
Definition at line 2312 of file interface_panel.cc.
References BLI_findstringindex(), and offsetof.
| bool UI_panel_category_is_visible | ( | const ARegion * | region | ) |
Definition at line 2299 of file interface_panel.cc.
Referenced by ED_region_panel_category_gutter_calc_rect(), ED_region_panels_draw(), panel_region_offset_x_get(), panels_collapse_all(), region_panels_collect_categories(), reorder_instanced_panel_list(), UI_block_draw(), ui_handle_panel_header(), ui_handler_panel_region(), UI_panel_category_draw_all(), and ui_popup_context_menu_for_panel().
| void UI_panel_context_pointer_set | ( | Panel * | panel, |
| const char * | name, | ||
| PointerRNA * | ptr ) |
Set a context for this entire panel and its current layout. This should be used whenever panel callbacks that are called outside of regular drawing might require context. Currently it affects the PanelType.reorder callback only.
Definition at line 2607 of file interface_panel.cc.
References Panel_Runtime::context, Panel::layout, ptr, Panel::runtime, uiLayoutGetContextStore(), and uiLayoutSetContextPointer().
Referenced by draw_constraint_header(), modifier_panel_get_property_pointers(), modifier_panel_header(), and shaderfx_panel_get_property_pointers().
| PointerRNA * UI_panel_custom_data_get | ( | const Panel * | panel | ) |
Definition at line 2625 of file interface_panel.cc.
References Panel_Runtime::custom_data_ptr, and Panel::runtime.
Referenced by constraint_reorder(), blender::ed::spreadsheet::filter_reorder(), fmodifier_get_pointers(), get_constraint_expand_flag(), blender::ed::spreadsheet::get_filter_expand_flag(), get_modifier_expand_flag(), get_shaderfx_expand_flag(), modifier_panel_get_property_pointers(), modifier_panel_header(), modifier_reorder(), panel_custom_data_active_get(), panel_custom_data_active_set(), panel_custom_pin_to_last_get(), panel_custom_pin_to_last_set(), set_constraint_expand_flag(), blender::ed::spreadsheet::set_filter_expand_flag(), set_modifier_expand_flag(), set_shaderfx_expand_flag(), shaderfx_panel_get_property_pointers(), shaderfx_reorder(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw_header(), and UI_region_panel_custom_data_under_cursor().
| void UI_panel_custom_data_set | ( | Panel * | panel, |
| PointerRNA * | custom_data ) |
Definition at line 2613 of file interface_panel.cc.
References BLI_assert, Panel_Runtime::custom_data_ptr, Panel::runtime, Panel::type, and ui_panel_custom_data_set_recursive().
Referenced by ANIM_fmodifier_panels(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), and uiTemplateShaderFx().
|
static |
Definition at line 2598 of file interface_panel.cc.
References Panel::children, Panel_Runtime::custom_data_ptr, LISTBASE_FOREACH, Panel::runtime, and ui_panel_custom_data_set_recursive().
Referenced by UI_panel_custom_data_set(), and ui_panel_custom_data_set_recursive().
|
static |
Definition at line 2045 of file interface_panel.cc.
References BLI_rctf_isect_segment(), CTX_wm_region(), CTX_wm_region_popup(), ED_region_tag_redraw(), ED_region_tag_refresh_ui(), Panel::flag, PanelType::flag, float, LayoutPanels::headers, Panel_Runtime::layout_panels, LISTBASE_FOREACH, panel_activate_state(), PANEL_STATE_ANIMATION, PANEL_TYPE_NO_HEADER, PNL_CLOSED, PNL_HEADER, RNA_boolean_set(), RNA_property_update(), RNA_struct_find_property(), Panel::runtime, Panel::runtime_flag, SET_FLAG_FROM_TEST, set_panels_list_data_expand_flag(), Panel::type, ui_window_to_block_fl(), 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 2118 of file interface_panel.cc.
References CTX_wm_window(), KM_RELEASE, LEFTMOUSE, wmWindow::modalhandlers, MOUSEMOVE, wmEvent::type, ui_panel_drag_collapse(), ui_panel_drag_collapse_handler(), ui_panel_drag_collapse_handler_remove(), wmEvent::val, WM_event_remove_ui_handler(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_panel_drag_collapse_handler(), and ui_panel_drag_collapse_handler_add().
| void ui_panel_drag_collapse_handler_add | ( | const bContext * | C, |
| const bool | was_open ) |
Definition at line 2148 of file interface_panel.cc.
References copy_v2_v2_int(), CTX_wm_window(), wmWindow::eventstate, 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_layout_panel_header(), ui_handle_menus_recursive(), and ui_handle_panel_header().
|
static |
Definition at line 2039 of file interface_panel.cc.
References MEM_freeN().
Referenced by ui_panel_drag_collapse_handler(), and ui_panel_drag_collapse_handler_add().
| void UI_panel_drawname_set | ( | Panel * | panel, |
| blender::StringRef | name ) |
Set the name that should be drawn in the UI. Should be a translated string.
Definition at line 852 of file interface_panel.cc.
References BLI_strdupn(), Panel::drawname, and MEM_SAFE_FREE.
Referenced by file_panel_operator_header(), hud_panel_operator_redo_draw_header(), and UI_panel_begin().
Definition at line 844 of file interface_panel.cc.
References Panel::blocksizex, and Panel::blocksizey.
Referenced by ed_panel_draw().
Definition at line 672 of file interface_panel.cc.
References PanelType::idname, LISTBASE_FOREACH, and STREQLEN.
Referenced by ed_panel_draw(), ED_region_panels_layout_ex(), and panel_property_search().
| 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 754 of file interface_panel.cc.
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 761 of file interface_panel.cc.
References BLI_assert, Panel_Runtime::block, uiBlock::button_groups, uiButtonGroup::buttons, uiButtonGroup::flag, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), Panel::runtime, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and ui_block_new_button_group().
Referenced by ed_panel_draw().
| bool UI_panel_is_active | ( | const Panel * | panel | ) |
Definition at line 998 of file interface_panel.cc.
References PANEL_ACTIVE, and Panel::runtime_flag.
Referenced by buttons_main_region_property_search(), ED_area_do_mgs_subscribe_for_tool_ui(), 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 984 of file interface_panel.cc.
References Panel::flag, PanelType::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 ED_region_panels_layout_ex(), 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 1636 of file interface_panel.cc.
References PANEL_IS_DRAG_DROP, and Panel::runtime_flag.
Referenced by ED_region_panels_layout_ex(), ui_do_animate(), and UI_panels_draw().
For button layout next to label.
Definition at line 1032 of file interface_panel.cc.
References uiBlock::panel, PanelType::parent, Panel::type, UI_UNIT_X, and UI_UNIT_Y.
Referenced by ed_panel_draw().
| 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 327 of file interface_panel.cc.
References BLI_listbase_count(), LISTBASE_FOREACH, MAX_NAME, Link::next, PANEL_TYPE_INSTANCED, PNL_INSTANCED_LIST_ORDER_CHANGED, and STREQ.
Referenced by ANIM_fmodifier_panels(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), 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 894 of file interface_panel.cc.
References panel_matches_search_filter_recursive().
Referenced by buttons_main_region_property_search(), panel_draw_aligned_backdrop(), panel_title_color_get(), and UI_panel_is_closed().
|
static |
Definition at line 2009 of file interface_panel.cc.
References IN_RANGE, PANEL_MOUSE_INSIDE_CONTENT, PANEL_MOUSE_INSIDE_HEADER, PANEL_MOUSE_INSIDE_LAYOUT_PANEL_HEADER, PANEL_MOUSE_OUTSIDE, PNL_HEADER, uiBlock::rect, ui_layout_panel_header_under_mouse(), 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().
Definition at line 1342 of file interface_panel.cc.
References PanelType::flag, PANEL_TYPE_NO_HEADER, RGN_ALIGN_FLOAT, and RGN_TYPE_TOOLS.
Referenced by panel_draw_width_from_max_width_get(), UI_block_draw(), ui_panels_size(), and uiAlignPanelStep().
Definition at line 1619 of file interface_panel.cc.
References get_panel_real_size_y().
Referenced by ED_region_panels_layout_ex().
| void ui_panel_tag_search_filter_match | ( | Panel * | panel | ) |
Definition at line 877 of file interface_panel.cc.
References PANEL_SEARCH_FILTER_MATCH, and Panel::runtime_flag.
Referenced by UI_block_apply_search_filter().
Definition at line 1902 of file interface_panel.cc.
References panels_layout_begin_clear_flags().
Referenced by ED_region_panels_layout_ex().
Draw panels, selected (panels currently being dragged) on top.
Definition at line 1009 of file interface_panel.cc.
References LISTBASE_FOREACH_BACKWARD, UI_block_draw(), UI_block_is_search_only(), and UI_panel_is_dragging().
Referenced by ED_region_panels_draw().
Definition at line 1909 of file interface_panel.cc.
References BLI_assert, CTX_wm_area(), LISTBASE_FOREACH, panel_activate_state(), PANEL_ACTIVE, panel_calculate_size_recursive(), PANEL_STATE_ANIMATION, 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_block_views_bounds_calc(), ui_offset_panel_block(), ui_panels_size(), and uiAlignPanelStep().
Referenced by ED_region_panels_layout_ex().
Remove instanced panels from the region's panel list.
Definition at line 306 of file interface_panel.cc.
References LISTBASE_FOREACH_MUTABLE, panel_activate_state(), panel_delete(), PANEL_STATE_EXIT, and PANEL_TYPE_INSTANCED.
Referenced by ANIM_fmodifier_panels(), ED_region_property_search(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), and uiTemplateShaderFx().
Definition at line 1828 of file interface_panel.cc.
References get_panel_real_ofsy(), LISTBASE_FOREACH, max_ii(), min_ii(), PANEL_ACTIVE, UI_PANEL_MARGIN_Y, UI_panel_should_show_background(), 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 2630 of file interface_panel.cc.
References CTX_wm_region(), ELEM, LISTBASE_FOREACH, PANEL_MOUSE_INSIDE_CONTENT, PANEL_MOUSE_INSIDE_HEADER, UI_panel_custom_data_get(), ui_panel_mouse_state_get(), and ui_window_to_block().
Referenced by blender::ed::object::edit_constraint_invoke_properties(), blender::ed::object::edit_modifier_invoke_properties_with_hover(), and blender::ed::object::edit_shaderfx_invoke_properties().
Calculate the position and order of panels as they are opened, closed, and dragged.
Definition at line 1727 of file interface_panel.cc.
References align_sub_panels(), BLI_assert, compare_panel(), find_highest_panel(), Panel::flag, get_panel_real_size_y(), interpf(), LISTBASE_FOREACH, MEM_freeN(), MEM_mallocN, PanelSort::new_offset_x, PanelSort::new_offset_y, Panel::ofsx, Panel::ofsy, PanelSort::panel, PANEL_ACTIVE, panel_region_offset_x_get(), PNL_SELECT, Panel_Runtime::region_ofsx, round_fl_to_int(), Panel::runtime, Panel::sizey, Panel::sortorder, Panel::type, UI_panel_is_closed(), UI_PANEL_MARGIN_X, UI_PANEL_MARGIN_Y, UI_panel_should_show_background(), and y.
Referenced by ui_do_animate(), ui_do_drag(), and UI_panels_end().