|
Blender V5.0
|
#include <algorithm>#include <cctype>#include <cmath>#include <cstdlib>#include <cstring>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math_vector.h"#include "BLI_string.h"#include "BLI_string_utf8.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_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 |
Functions | |
| static int | ui_panel_category_show_active_tab (ARegion *region, const int mval[2]) |
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 (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 (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_pin_to_last_get (const Panel *panel) |
| static void | panel_custom_pin_to_last_set (const bContext *C, const Panel *panel, const bool value) |
| 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) |
| void | UI_panel_drawname_set (Panel *panel, blender::StringRef name) |
| 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 *, ARegion *region) |
| void | UI_panels_end (const bContext *C, ARegion *region, int *r_x, int *r_y) |
Region Level Panel Interaction | |
| LayoutPanelHeader * | ui_layout_panel_header_under_mouse (const Panel &panel, const int my) |
| static uiPanelMouseState | ui_panel_mouse_state_get (const uiBlock *block, const Panel *panel, const int mx, const int my) |
| static void | ui_panel_drag_collapse_handler_remove (bContext *, void *userdata) |
| static void | ui_panel_drag_collapse (const bContext *C, const uiPanelDragCollapseHandle *dragcol_data, const int xy_dst[2]) |
| static int | ui_panel_drag_collapse_handler (bContext *C, const wmEvent *event, void *userdata) |
| void | ui_panel_drag_collapse_handler_add (const bContext *C, const bool was_open) |
| bool | ui_layout_panel_toggle_open (const bContext *C, LayoutPanelHeader *header) |
| static void | ui_handle_layout_panel_header (bContext *C, const uiBlock *block, const int, const int my, const int event_type) |
| 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) |
| bool | UI_panel_category_is_visible (const ARegion *region) |
| PanelCategoryDyn * | UI_panel_category_find (const ARegion *region, const char *idname) |
| int | UI_panel_category_index_find (ARegion *region, const char *idname) |
| PanelCategoryStack * | UI_panel_category_active_find (ARegion *region, const char *idname) |
| static void | ui_panel_category_active_set (ARegion *region, const char *idname, bool fallback) |
| void | UI_panel_category_active_set (ARegion *region, const char *idname) |
| void | UI_panel_category_index_active_set (ARegion *region, const int index) |
| void | UI_panel_category_active_set_default (ARegion *region, const char *idname) |
| const char * | UI_panel_category_active_get (ARegion *region, bool set_fallback) |
| static PanelCategoryDyn * | panel_categories_find_mouse_over (ARegion *region, const wmEvent *event) |
| void | UI_panel_category_add (ARegion *region, const char *name) |
| void | UI_panel_category_clear_all (ARegion *region) |
| static int | ui_handle_panel_category_cycling (const wmEvent *event, ARegion *region, const uiBut *active_but) |
| static void | ui_panel_region_width_set (ARegion *region, const float aspect, int unscaled_size) |
| int | ui_handler_panel_region (bContext *C, const wmEvent *event, ARegion *region, const uiBut *active_but) |
| static void | ui_panel_custom_data_set_recursive (Panel *panel, PointerRNA *custom_data) |
| void | UI_panel_context_pointer_set (Panel *panel, const char *name, PointerRNA *ptr) |
| void | UI_panel_custom_data_set (Panel *panel, PointerRNA *custom_data) |
| PointerRNA * | UI_panel_custom_data_get (const Panel *panel) |
| PointerRNA * | UI_region_panel_custom_data_under_cursor (const bContext *C, const wmEvent *event) |
| bool | UI_panel_can_be_pinned (const Panel *panel) |
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) |
| void | UI_panel_stop_animation (const bContext *C, Panel *panel) |
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_border (const Panel *panel, const rcti *rect, const rcti *header_rect, const bool is_active) |
| 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_softshadow (const rctf *box_rect, const int roundboxalign, const float radius, const float shadow_width) |
| 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 61 of file interface_panel.cc.
Referenced by panel_handle_data_ensure().
| #define ANIMATION_TIME 0.30 |
Definition at line 60 of file interface_panel.cc.
Referenced by ui_do_animate().
| #define DRAG_REGION_PAD (PNL_HEADER * 0.5) |
Definition at line 2059 of file interface_panel.cc.
Referenced by ui_do_drag().
Definition at line 1035 of file interface_panel.cc.
Referenced by ui_handle_panel_header().
| #define TABS_PADDING_BETWEEN_FACTOR 4.0f |
Definition at line 1404 of file interface_panel.cc.
Referenced by UI_panel_category_draw_all().
| #define TABS_PADDING_TEXT_FACTOR 6.0f |
Definition at line 1405 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 94 of file interface_panel.cc.
| enum uiPanelMouseState |
Definition at line 87 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 63 of file interface_panel.cc.
|
static |
Definition at line 1798 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 1783 of file interface_panel.cc.
References b, and Panel::sortorder.
Referenced by reorder_instanced_panel_list(), and uiAlignPanelStep().
|
static |
Definition at line 1741 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 516 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().
|
static |
This function is needed because uiBlock and Panel itself don't change Panel.sizey or location when closed.
Definition at line 1720 of file interface_panel.cc.
References Panel::ofsy, Panel::sizey, and UI_panel_is_closed().
Referenced by ui_panels_size().
|
static |
Definition at line 1700 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().
|
static |
Definition at line 1691 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 2880 of file interface_panel.cc.
References Panel::activedata, BLI_assert, C, CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), data, ED_region_tag_redraw(), blender::wm::InvokeDefault, 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(), 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_panel_stop_animation(), UI_panels_end(), and UI_panels_free_instanced().
|
static |
Definition at line 133 of file interface_panel.cc.
References data, 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 227 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 805 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 2499 of file interface_panel.cc.
References BLI_rcti_isect_pt(), LISTBASE_FOREACH, wmEvent::mval, and ARegion::runtime.
Referenced by ui_handler_panel_region().
|
static |
Definition at line 585 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 601 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 561 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 573 of file interface_panel.cc.
References C, 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 295 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 1255 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(), max_ii(), ARegion::overlap, padding(), panel_draw_softshadow(), 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, U, 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_is_dragging(), UI_panel_matches_search_filter(), UI_SCALE_FAC, UI_ThemeMenuShadowWidth(), 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 1102 of file interface_panel.cc.
References BLI_rcti_size_x(), BLI_rcti_size_y(), Panel::drawname, Panel::flag, GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, Panel::labelofs, panel_custom_pin_to_last_get(), panel_title_color_get(), uiStyle::paneltitle, params, PanelType::parent, PNL_PIN, round_fl_to_int(), size(), Panel::type, UI_fontstyle_draw(), 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, x, rcti::xmax, rcti::xmin, y, rcti::ymax, and rcti::ymin.
Referenced by ui_draw_aligned_panel().
|
static |
Definition at line 1073 of file interface_panel.cc.
References uiBlock::aspect, Panel_Runtime::block, ThemeUI::panel_roundness, PanelType::parent, Panel::runtime, TH_PANEL_ACTIVE, TH_PANEL_OUTLINE, bTheme::tui, Panel::type, U, 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 1240 of file interface_panel.cc.
References BLI_rctf_pad(), ThemeUI::menu_shadow_fac, bTheme::tui, U, ui_draw_dropshadow(), UI_draw_roundbox_corner_set(), and UI_GetTheme().
Referenced by panel_draw_aligned_backdrop().
|
static |
Definition at line 2839 of file interface_panel.cc.
References Panel::activedata, ANIMATION_INTERVAL, BLI_assert, BLI_time_now_seconds(), C, CTX_wm_manager(), View2D::cur, data, 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(), ARegion::v2d, WM_event_add_ui_handler(), WM_event_timer_add(), rctf::xmin, wmEvent::xy, and rctf::ymin.
Referenced by panel_activate_state().
|
static |
Definition at line 887 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 790 of file interface_panel.cc.
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().
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 945 of file interface_panel.cc.
References uiBlock::active, BLI_assert, Panel_Runtime::block, uiBlock::button_groups, uiBlock::buttons, uiButtonGroup::buttons, Panel::children, uiBut::flag, uiButtonGroup::flag, 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 462 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 480 of file interface_panel.cc.
References BLI_assert, C, 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 909 of file interface_panel.cc.
References C, 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 619 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 631 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 1050 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 662 of file interface_panel.cc.
References BLI_listbase_is_empty(), PanelType::category, PanelType::context, ARegion::runtime, STREQ, and UI_panel_category_active_get().
Referenced by reorder_instanced_panel_list().
Definition at line 640 of file interface_panel.cc.
References PanelType::category, PanelType::context, PanelType::flag, LISTBASE_FOREACH, 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 1977 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 195 of file interface_panel.cc.
References panel_active_animation_changed(), ARegion::panels, and properties_space_needs_realign().
Referenced by UI_panels_end().
Definition at line 182 of file interface_panel.cc.
References ListBase::first, SpaceProperties::mainb, SpaceProperties::mainbo, ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_PROPERTIES, ScrArea::spacedata, and ScrArea::spacetype.
Referenced by panels_need_realign(), and UI_panels_end().
|
static |
Definition at line 979 of file interface_panel.cc.
References BLI_assert, LISTBASE_FOREACH, PANEL_ACTIVE, panel_remove_invisible_layouts_recursive(), and ARegion::panels.
Referenced by UI_panels_end().
Set expansion based on the data for instanced panels.
Definition at line 501 of file interface_panel.cc.
References C, PanelType::flag, LISTBASE_FOREACH, 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 929 of file interface_panel.cc.
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().
Definition at line 381 of file interface_panel.cc.
References BLI_assert, C, 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, ARegion::panels, 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 535 of file interface_panel.cc.
References C, PanelType::flag, get_panel_expand_flag(), LISTBASE_FOREACH, 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 1955 of file interface_panel.cc.
References Panel::activedata, ANIMATION_TIME, BLI_time_now_seconds(), C, CTX_wm_region(), data, 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 2060 of file interface_panel.cc.
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, wmEvent::xy, y, rcti::ymax, rctf::ymin, and rcti::ymin.
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 1336 of file interface_panel.cc.
References uiBlock::aspect, PanelType::flag, floor, uiBlock::panel, panel_custom_data_active_get(), panel_draw_aligned_backdrop(), panel_draw_aligned_widgets(), panel_draw_border(), PANEL_TYPE_NO_HEADER, PNL_HEADER, Panel::sizex, Panel::sizey, Panel::type, UI_panel_should_show_background(), 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 1197 of file interface_panel.cc.
References uiBlock::aspect, BLI_rctf_rcti_copy(), Panel_Runtime::block, LayoutPanels::bodies, LayoutPanelBody::end_y, Panel_Runtime::layout_panels, uiBlock::rect, Panel::runtime, LayoutPanelBody::start_y, 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 2270 of file interface_panel.cc.
References BLI_assert, C, 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 2525 of file interface_panel.cc.
References ARegion::alignment, 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, ARegion::runtime, 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 2295 of file interface_panel.cc.
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, 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(), ARegion::v2d, and rctf::xmax.
Referenced by ui_handler_panel_region().
Definition at line 2801 of file interface_panel.cc.
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 2600 of file interface_panel.cc.
References BLI_rctf_size_y(), BLI_rcti_size_x(), BLI_rcti_size_y(), C, View2D::cur, ED_region_tag_redraw(), ELEM, EVT_AKEY, EVT_PADENTER, EVT_PADPERIOD, EVT_RETKEY, EVT_TABKEY, Panel::flag, PanelType::flag, PanelCategoryDyn::idname, ISMOUSE_MOTION, KM_CTRL, KM_PRESS, KM_SHIFT, Label, LEFTMOUSE, LISTBASE_FOREACH, View2D::mask, wmEvent::modifier, NA_EDITED, NC_SCREEN, panel_categories_find_mouse_over(), PANEL_MOUSE_INSIDE_HEADER, PANEL_MOUSE_INSIDE_LAYOUT_PANEL_HEADER, PANEL_MOUSE_OUTSIDE, PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, PNL_CLOSED, RIGHTMOUSE, ARegion::runtime, Panel::runtime_flag, SET_FLAG_FROM_TEST, STREQ, Panel::type, uiBut::type, wmEvent::type, ui_handle_layout_panel_header(), ui_handle_panel_category_cycling(), ui_handle_panel_header(), UI_panel_category_active_get(), UI_panel_category_active_set(), UI_panel_category_is_visible(), UI_PANEL_CATEGORY_MIN_WIDTH, ui_panel_category_show_active_tab(), UI_panel_is_closed(), ui_panel_mouse_state_get(), ui_panel_region_width_set(), ui_popup_context_menu_for_panel(), ui_region_find_active_but(), UI_SCALE_FAC, UI_view2d_mouse_in_scrollers(), UI_view2d_offset(), ui_window_to_block(), ARegion::v2d, wmEvent::val, WHEELDOWNMOUSE, WHEELUPMOUSE, ARegion::winrct, WM_event_add_notifier(), WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, and wmEvent::xy.
Referenced by ui_region_handler().
|
static |
Definition at line 2832 of file interface_panel.cc.
References C, 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 2090 of file interface_panel.cc.
References Panel_Runtime::block, LayoutPanelHeader::end_y, LayoutPanels::headers, IN_RANGE, Panel_Runtime::layout_panels, uiBlock::rect, Panel::runtime, LayoutPanelHeader::start_y, 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 2259 of file interface_panel.cc.
References C, 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 281 of file interface_panel.cc.
References BLI_snprintf_utf8(), INSTANCED_PANEL_UNIQUE_STR_SIZE, and Panel::sortorder.
Referenced by ED_region_panels_layout_ex().
|
static |
Definition at line 863 of file interface_panel.cc.
References uiBlock::buttons, 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 257 of file interface_panel.cc.
References BLI_findstring(), C, offsetof, panel_add_instanced(), panel_set_expansion_from_list_data(), ARegionType::paneltypes, printf, and ARegion::runtime.
Referenced by ANIM_fmodifier_panels(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), uiTemplateShaderFx(), and uiTemplateStripModifiers().
| Panel * UI_panel_begin | ( | ARegion * | region, |
| ListBase * | lb, | ||
| uiBlock * | block, | ||
| PanelType * | pt, | ||
| Panel * | panel, | ||
| bool * | r_open ) |
Definition at line 689 of file interface_panel.cc.
References ARegion::alignment, 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 2789 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 2410 of file interface_panel.cc.
References BLI_findstring(), offsetof, 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 2479 of file interface_panel.cc.
References PanelCategoryDyn::idname, LISTBASE_FOREACH, ARegion::panels_category_active, ARegion::runtime, 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(), ui_handle_panel_category_cycling(), and ui_handler_panel_region().
| void UI_panel_category_active_set | ( | ARegion * | region, |
| const char * | idname ) |
Definition at line 2456 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 2416 of file interface_panel.cc.
References BLI_addhead(), BLI_addtail(), BLI_findstring(), BLI_remlink(), PanelCategoryStack::idname, MEM_callocN(), MEM_freeN(), PanelCategoryStack::next, offsetof, ARegion::panels_category_active, ARegion::runtime, STRNCPY_UTF8, 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 2472 of file interface_panel.cc.
References UI_panel_category_active_find(), and ui_panel_category_active_set().
Referenced by blender::ed::spreadsheet::spreadsheet_sidebar_init().
| void UI_panel_category_add | ( | ARegion * | region, |
| const char * | name ) |
Definition at line 2510 of file interface_panel.cc.
References BLI_addtail(), PanelCategoryDyn::idname, MEM_callocN(), name, ARegion::runtime, and STRNCPY_UTF8.
Referenced by region_panels_collect_categories().
| void UI_panel_category_clear_all | ( | ARegion * | region | ) |
Definition at line 2520 of file interface_panel.cc.
References BLI_freelistN(), and ARegion::runtime.
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 1407 of file interface_panel.cc.
References ARegion::alignment, BLF_color3ubv(), BLF_disable(), BLF_draw(), BLF_DRAW_STR_DUMMY_MAX, BLF_enable(), BLF_position(), BLF_ROTATION, BLF_rotation(), BLF_SHADOW, BLF_shadow(), BLF_shadow_offset(), BLF_size(), BLF_width(), BLI_assert, BLI_listbase_is_empty(), BLI_rcti_size_x(), BLI_rcti_size_y(), ARegion::category_scroll, clamp_i(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), IFACE_, immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor3fvAlpha(), immUniformColor3ubv(), immUniformColor4fv(), immUniformColor4ubv(), immVertexFormat(), is_left(), LISTBASE_FOREACH, M_PI_2, View2D::mask, max_ii(), ARegion::overlap, 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, ARegion::runtime, uiFontStyle::shadow, uiFontStyle::shadowalpha, uiFontStyle::shadowcolor, uiFontStyle::shadx, uiFontStyle::shady, STREQ, TABS_PADDING_BETWEEN_FACTOR, TABS_PADDING_TEXT_FACTOR, TH_BACK, TH_TAB_ACTIVE, TH_TAB_BACK, TH_TAB_INACTIVE, TH_TAB_OUTLINE, TH_TAB_OUTLINE_ACTIVE, TH_TAB_TEXT, TH_TAB_TEXT_HI, bTheme::tui, U, UI_CNR_ALL, 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_fontstyle_set(), UI_GetTheme(), UI_GetThemeColor3ubv(), UI_GetThemeColor4fv(), UI_GetThemeColor4ubv(), UI_panel_category_is_visible(), UI_PANEL_CATEGORY_MARGIN_WIDTH, UI_PANEL_CATEGORY_MIN_WIDTH, UI_SCALE_FAC, UI_style_get(), uiFontStyle::uifont_id, ARegion::v2d, ThemeUI::wcol_tab, uiStyle::widget, ARegion::winrct, 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 2398 of file interface_panel.cc.
References BLI_findstring(), offsetof, and ARegion::runtime.
Referenced by region_panels_collect_categories(), ui_handle_panel_category_cycling(), and UI_panel_category_active_get().
| void UI_panel_category_index_active_set | ( | ARegion * | region, |
| const int | index ) |
| index | index of item in #ARegion.panels_category list. |
Definition at line 2461 of file interface_panel.cc.
References BLI_findlink(), PanelCategoryDyn::idname, ARegion::runtime, and ui_panel_category_active_set().
| int UI_panel_category_index_find | ( | ARegion * | region, |
| const char * | idname ) |
Definition at line 2404 of file interface_panel.cc.
References BLI_findstringindex(), offsetof, and ARegion::runtime.
| bool UI_panel_category_is_visible | ( | const ARegion * | region | ) |
Definition at line 2391 of file interface_panel.cc.
References ARegion::runtime.
Referenced by ED_region_generic_panel_region_snap_size(), 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().
|
static |
Definition at line 1663 of file interface_panel.cc.
References ARegion::category_scroll, ED_region_panel_category_gutter_isect_xy(), ED_region_tag_redraw(), LISTBASE_FOREACH, View2D::mask, PanelCategoryDyn::rect, ARegion::runtime, STREQ, ARegion::v2d, WM_UI_HANDLER_BREAK, WM_UI_HANDLER_CONTINUE, rcti::ymax, and rcti::ymin.
Referenced by ui_handler_panel_region().
| 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 2743 of file interface_panel.cc.
References Panel_Runtime::context, uiLayout::context_ptr_set(), uiLayout::context_store(), Panel::layout, name, ptr, and Panel::runtime.
Referenced by draw_constraint_header(), modifier_panel_get_property_pointers(), blender::seq::modifier_panel_header(), modifier_panel_header(), and shaderfx_panel_get_property_pointers().
| PointerRNA * UI_panel_custom_data_get | ( | const Panel * | panel | ) |
Definition at line 2761 of file interface_panel.cc.
References Panel_Runtime::custom_data_ptr, and Panel::runtime.
Referenced by blender::seq::brightcontrast_panel_draw(), blender::seq::colorBalance_panel_draw(), blender::seq::compositor_modifier_panel_draw(), constraint_reorder(), blender::seq::curves_panel_draw(), 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(), blender::seq::get_strip_modifier_expand_flag(), blender::seq::hue_correct_panel_draw(), blender::seq::maskmodifier_panel_draw(), modifier_panel_get_property_pointers(), blender::seq::modifier_panel_header(), modifier_panel_header(), blender::seq::modifier_reorder(), 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(), blender::seq::set_strip_modifier_expand_flag(), shaderfx_panel_get_property_pointers(), shaderfx_reorder(), blender::seq::sound_equalizermodifier_draw(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw(), blender::ed::spreadsheet::spreadsheet_filter_panel_draw_header(), blender::seq::tonemapmodifier_panel_draw(), UI_region_panel_custom_data_under_cursor(), and blender::seq::whiteBalance_panel_draw().
| void UI_panel_custom_data_set | ( | Panel * | panel, |
| PointerRNA * | custom_data ) |
Definition at line 2749 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(), uiTemplateShaderFx(), and uiTemplateStripModifiers().
|
static |
Definition at line 2734 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 2136 of file interface_panel.cc.
References BLI_rctf_isect_segment(), C, CTX_wm_region(), CTX_wm_region_popup(), ED_region_tag_redraw(), ED_region_tag_refresh_ui(), LayoutPanelHeader::end_y, Panel::flag, PanelType::flag, float, LayoutPanels::headers, Panel_Runtime::layout_panels, LISTBASE_FOREACH, LayoutPanelHeader::open_owner_ptr, LayoutPanelHeader::open_prop_name, panel_activate_state(), PANEL_STATE_ANIMATION, PANEL_TYPE_NO_HEADER, PANEL_USE_CLOSED_FROM_SEARCH, PNL_CLOSED, PNL_HEADER, RNA_boolean_set(), RNA_property_update(), RNA_struct_find_property(), ARegion::runtime, Panel::runtime, Panel::runtime_flag, SET_FLAG_FROM_TEST, set_panels_list_data_expand_flag(), LayoutPanelHeader::start_y, 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().
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 2209 of file interface_panel.cc.
References C, 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 2242 of file interface_panel.cc.
References C, copy_v2_v2_int(), CTX_wm_window(), wmWindow::eventstate, MEM_callocN(), 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 2130 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 857 of file interface_panel.cc.
References BLI_strdupn(), Panel::drawname, MEM_SAFE_FREE, and name.
Referenced by file_panel_operator_header(), hud_panel_operator_redo_draw_header(), and UI_panel_begin().
| void UI_panel_end | ( | Panel * | panel, |
| int | width, | ||
| int | height ) |
Definition at line 849 of file interface_panel.cc.
References Panel::blocksizex, and Panel::blocksizey.
Referenced by ed_panel_draw().
Definition at line 677 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 759 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 766 of file interface_panel.cc.
References BLI_assert, Panel_Runtime::block, uiBlock::button_groups, uiButtonGroup::buttons, uiButtonGroup::flag, Vector< T, InlineBufferCapacity, Allocator >::is_empty(), Vector< T, InlineBufferCapacity, Allocator >::last(), Panel::runtime, Vector< T, InlineBufferCapacity, Allocator >::size(), 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 1003 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 989 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_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 1728 of file interface_panel.cc.
References PANEL_IS_DRAG_DROP, and Panel::runtime_flag.
Referenced by ED_region_panels_layout_ex(), panel_draw_aligned_backdrop(), ui_do_animate(), and UI_panels_draw().
| void UI_panel_label_offset | ( | const uiBlock * | block, |
| int * | r_x, | ||
| int * | r_y ) |
For button layout next to label.
Definition at line 1037 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 332 of file interface_panel.cc.
References BLI_listbase_count(), data, i, LISTBASE_FOREACH, MAX_NAME, Link::next, PANEL_TYPE_INSTANCED, ARegion::panels, PNL_INSTANCED_LIST_ORDER_CHANGED, and STREQ.
Referenced by ANIM_fmodifier_panels(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), uiTemplateShaderFx(), and uiTemplateStripModifiers().
| 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 899 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 2100 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 2581 of file interface_panel.cc.
References ARegion::alignment, View2D::cur, View2D::mask, RGN_ALIGN_RIGHT, ARegion::sizex, UI_SCALE_FAC, UI_view2d_curRect_validate(), ARegion::v2d, ARegion::winrct, ARegion::winx, View2D::winx, rctf::xmax, rcti::xmax, rctf::xmin, and rcti::xmin.
Referenced by ui_handler_panel_region().
Definition at line 1380 of file interface_panel.cc.
References ARegion::alignment, PanelType::flag, ARegion::overlap, PANEL_TYPE_NO_HEADER, ARegion::regiontype, RGN_ALIGN_FLOAT, and RGN_TYPE_TOOLS.
Referenced by panel_draw_width_from_max_width_get(), UI_block_draw(), ui_draw_aligned_panel(), ui_panels_size(), and uiAlignPanelStep().
| int UI_panel_size_y | ( | const Panel * | panel | ) |
Definition at line 1711 of file interface_panel.cc.
References get_panel_real_size_y().
Referenced by ED_region_panels_layout_ex().
Definition at line 2927 of file interface_panel.cc.
References Panel::activedata, C, panel_activate_state(), and PANEL_STATE_EXIT.
Referenced by ED_region_exit().
| void ui_panel_tag_search_filter_match | ( | Panel * | panel | ) |
Definition at line 882 of file interface_panel.cc.
References PANEL_SEARCH_FILTER_MATCH, and Panel::runtime_flag.
Referenced by UI_block_apply_search_filter().
Definition at line 1993 of file interface_panel.cc.
References ARegion::panels, and panels_layout_begin_clear_flags().
Referenced by ED_region_panels_layout_ex().
Draw panels, selected (panels currently being dragged) on top.
Definition at line 1014 of file interface_panel.cc.
References C, LISTBASE_FOREACH_BACKWARD, ARegion::runtime, UI_block_draw(), UI_block_is_search_only(), and UI_panel_is_dragging().
Referenced by ED_region_panels_draw().
Definition at line 2000 of file interface_panel.cc.
References BLI_assert, C, CTX_wm_area(), ARegion::flag, LISTBASE_FOREACH, 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, ARegion::runtime, ui_block_views_end(), 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 307 of file interface_panel.cc.
References C, LISTBASE_FOREACH_MUTABLE, panel_activate_state(), panel_delete(), PANEL_STATE_EXIT, PANEL_TYPE_INSTANCED, and ARegion::panels.
Referenced by ANIM_fmodifier_panels(), ED_region_property_search(), blender::ed::spreadsheet::spreadsheet_row_filters_layout(), uiTemplateConstraints(), uiTemplateModifiers(), uiTemplateShaderFx(), and uiTemplateStripModifiers().
|
static |
Definition at line 1919 of file interface_panel.cc.
References get_panel_real_ofsy(), LISTBASE_FOREACH, max_ii(), min_ii(), PANEL_ACTIVE, ARegion::panels, 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 2766 of file interface_panel.cc.
References C, CTX_wm_region(), ELEM, LISTBASE_FOREACH, PANEL_MOUSE_INSIDE_CONTENT, PANEL_MOUSE_INSIDE_HEADER, ARegion::runtime, 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 1819 of file interface_panel.cc.
References align_sub_panels(), BLI_assert, compare_panel(), find_highest_panel(), Panel::flag, get_panel_real_size_y(), i, interpf(), LISTBASE_FOREACH, MEM_freeN(), MEM_malloc_arrayN(), PanelSort::new_offset_x, PanelSort::new_offset_y, Panel::ofsx, Panel::ofsy, PanelSort::panel, PANEL_ACTIVE, panel_region_offset_x_get(), ARegion::panels, 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(), x, and y.
Referenced by ui_do_animate(), ui_do_drag(), and UI_panels_end().