Blender V5.0
area.cc File Reference
#include <algorithm>
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_rand.hh"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_string_utils.hh"
#include "BLI_utildefines.h"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_screen.hh"
#include "BKE_workspace.hh"
#include "RNA_access.hh"
#include "WM_api.hh"
#include "WM_message.hh"
#include "WM_toolsystem.hh"
#include "WM_types.hh"
#include "ED_asset_shelf.hh"
#include "ED_buttons.hh"
#include "ED_screen.hh"
#include "ED_screen_types.hh"
#include "ED_space_api.hh"
#include "ED_time_scrub_ui.hh"
#include "GPU_framebuffer.hh"
#include "GPU_immediate.hh"
#include "GPU_immediate_util.hh"
#include "GPU_matrix.hh"
#include "GPU_platform.hh"
#include "GPU_state.hh"
#include "BLF_api.hh"
#include "IMB_metadata.hh"
#include "UI_interface.hh"
#include "UI_interface_icons.hh"
#include "UI_interface_layout.hh"
#include "UI_resources.hh"
#include "UI_view2d.hh"
#include "screen_intern.hh"

Go to the source code of this file.

Classes

struct  RegionTypeAlignInfo
struct  MetadataPanelDrawContext

Functions

static void region_draw_gradient (const ARegion *region)
void ED_region_pixelspace (const ARegion *region)
void ED_region_do_listen (wmRegionListenerParams *params)
void ED_area_do_listen (wmSpaceTypeListenerParams *params)
void ED_area_do_refresh (bContext *C, ScrArea *area)
static void area_draw_azone_fullscreen (short, short, short x2, short y2, float alpha)
 Corner widget use for quitting full-screen.
static void area_draw_azone (ScrArea *area, ARegion *region, AZone *az)
 Corner widgets use for dragging and splitting the view.
static void draw_azone_arrow (float x1, float y1, float x2, float y2, AZEdge edge)
 Edge widgets to show hidden panels such as the toolbar and headers.
static void region_draw_azone_tab_arrow (ScrArea *area, ARegion *region, AZone *az)
static void area_azone_tag_update (ScrArea *area)
static void region_draw_azones (ScrArea *area, ARegion *region)
static void region_draw_status_text (ScrArea *, ARegion *region)
void ED_region_do_msg_notify_tag_redraw (bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
void ED_area_do_msg_notify_tag_refresh (bContext *, wmMsgSubscribeKey *, wmMsgSubscribeValue *msg_val)
void ED_area_do_mgs_subscribe_for_tool_header (const wmRegionMessageSubscribeParams *params)
void ED_area_do_mgs_subscribe_for_tool_ui (const wmRegionMessageSubscribeParams *params)
static bool area_is_pseudo_minimized (const ScrArea *area)
void ED_region_do_layout (bContext *C, ARegion *region)
void ED_region_do_draw (bContext *C, ARegion *region)
void ED_region_tag_redraw (ARegion *region)
void ED_region_tag_redraw_cursor (ARegion *region)
void ED_region_tag_redraw_no_rebuild (ARegion *region)
void ED_region_tag_refresh_ui (ARegion *region)
void ED_region_tag_redraw_editor_overlays (ARegion *region)
void ED_region_tag_redraw_partial (ARegion *region, const rcti *rct, bool rebuild)
void ED_area_tag_redraw (ScrArea *area)
void ED_area_tag_redraw_no_rebuild (ScrArea *area)
void ED_area_tag_redraw_regiontype (ScrArea *area, int regiontype)
void ED_area_tag_refresh (ScrArea *area)
void ED_area_tag_region_size_update (ScrArea *area, ARegion *changed_region)
int ED_area_max_regionsize (const ScrArea *area, const ARegion *scale_region, const AZEdge edge)
const char * ED_area_region_search_filter_get (const ScrArea *area, const ARegion *region)
void ED_region_search_filter_update (const ScrArea *area, ARegion *region)
void ED_area_status_text (ScrArea *area, const char *str)
static void ed_workspace_status_item (WorkSpace *workspace, std::string text, const int icon, const float space_factor=0.0f, const bool inverted=false)
static void ed_workspace_status_space (WorkSpace *workspace, const float space_factor)
static void area_azone_init (const wmWindow *win, const bScreen *screen, ScrArea *area)
static void fullscreen_azone_init (ScrArea *area, ARegion *region)
static bool region_background_is_transparent (const ScrArea *area, const ARegion *region)
static void region_azone_edge (const ScrArea *area, AZone *az, const ARegion *region)
static void region_azone_tab_plus (ScrArea *area, AZone *az, ARegion *region)
static bool region_azone_edge_poll (const ScrArea *area, const ARegion *region, const bool is_fullscreen)
static void region_azone_edge_init (ScrArea *area, ARegion *region, AZEdge edge, const bool is_fullscreen)
static void region_azone_scrollbar_init (ScrArea *area, ARegion *region, AZScrollDirection direction)
static void region_azones_scrollbars_init (ScrArea *area, ARegion *region)
static void region_azones_add_edge (ScrArea *area, ARegion *region, const int alignment, const bool is_fullscreen)
static void region_azones_add (const bScreen *screen, ScrArea *area, ARegion *region)
static int rct_fits (const rcti *rect, const eScreenAxis dir_axis, int size)
static void region_overlap_fix (ScrArea *area, ARegion *region)
bool ED_region_is_overlap (int spacetype, int regiontype)
static void region_rect_recursive (ScrArea *area, ARegion *region, rcti *remainder, rcti *overlap_remainder, int quad)
static void area_calc_totrct (const bScreen *screen, ScrArea *area, const rcti *window_rect)
static void region_evaulate_visibility (ARegion *region)
static void ed_default_handlers (wmWindowManager *wm, ScrArea *area, ARegion *region, ListBase *handlers, int flag)
void ED_area_update_region_sizes (wmWindowManager *wm, wmWindow *win, ScrArea *area)
bool ED_area_has_shared_border (ScrArea *a, ScrArea *b)
static void area_init_type_fallback (ScrArea *area, eSpace_Type space_type)
void ED_area_and_region_types_init (ScrArea *area)
void ED_area_init (bContext *C, const wmWindow *win, ScrArea *area)
static void area_offscreen_init (ScrArea *area)
ScrAreaED_area_offscreen_create (wmWindow *win, eSpace_Type space_type)
static void area_offscreen_exit (wmWindowManager *wm, wmWindow *win, ScrArea *area)
void ED_area_offscreen_free (wmWindowManager *wm, wmWindow *win, ScrArea *area)
static void region_update_rect (ARegion *region)
void ED_region_update_rect (ARegion *region)
void ED_region_floating_init (ARegion *region)
void ED_region_cursor_set (wmWindow *win, ScrArea *area, ARegion *region)
void ED_region_visibility_change_update_ex (bContext *C, ScrArea *area, ARegion *region, bool is_hidden, bool do_init)
void ED_region_visibility_change_update (bContext *C, ScrArea *area, ARegion *region)
void region_toggle_hidden (bContext *C, ARegion *region, const bool do_fade)
void ED_region_toggle_hidden (bContext *C, ARegion *region)
void ED_area_data_copy (ScrArea *area_dst, ScrArea *area_src, const bool do_free)
void ED_area_data_swap (ScrArea *area_dst, ScrArea *area_src)
void ED_area_swapspace (bContext *C, ScrArea *sa1, ScrArea *sa2)
void ED_area_newspace (bContext *C, ScrArea *area, int type, const bool skip_region_exit)
static SpaceLinkarea_get_prevspace (ScrArea *area)
void ED_area_prevspace (bContext *C, ScrArea *area)
int ED_area_header_switchbutton (const bContext *C, uiBlock *block, int yco)
static ThemeColorID region_background_color_id (const bContext *, const ARegion *region)
void ED_region_clear (const bContext *C, const ARegion *region, const int colorid)
static void region_clear_fully_transparent (const bContext *C)
BLI_INLINE bool streq_array_any (const char *s, const char *arr[])
static void ed_panel_draw (const bContext *C, ARegion *region, ListBase *lb, PanelType *pt, Panel *panel, int w, int em, char *unique_panel_str, const char *search_filter, blender::wm::OpCallContext op_context)
static bool panel_add_check (const bContext *C, const WorkSpace *workspace, const char *contexts[], const char *category_override, PanelType *panel_type)
static bool region_uses_category_tabs (const ScrArea *area, const ARegion *region)
static const char * region_panels_collect_categories (ARegion *region, LinkNode *panel_types_stack, bool *use_category_tabs)
static int panel_draw_width_from_max_width_get (const ARegion *region, const PanelType *panel_type, const int max_width)
void ED_region_panels_layout_ex (const bContext *C, ARegion *region, ListBase *paneltypes, blender::wm::OpCallContext op_context, const char *contexts[], const char *category_override)
void ED_region_draw_overflow_indication (const ScrArea *area, ARegion *region, rcti *mask)
void ED_region_panels_layout (const bContext *C, ARegion *region)
void ED_region_panels_draw (const bContext *C, ARegion *region)
void ED_region_panels_ex (const bContext *C, ARegion *region, blender::wm::OpCallContext op_context, const char *contexts[])
void ED_region_panels (const bContext *C, ARegion *region)
void ED_region_panels_init (wmWindowManager *wm, ARegion *region)
static bool panel_property_search (const bContext *C, ARegion *region, const uiStyle *style, Panel *panel, PanelType *panel_type, const char *search_filter)
bool ED_region_property_search (const bContext *C, ARegion *region, ListBase *paneltypes, const char *contexts[], const char *category_override)
void ED_region_header_layout (const bContext *C, ARegion *region)
static void region_draw_blocks_in_view2d (const bContext *C, const ARegion *region)
void ED_region_header_draw (const bContext *C, ARegion *region)
void ED_region_header_draw_with_button_sections (const bContext *C, const ARegion *region, const uiButtonSectionsAlign align)
void ED_region_header (const bContext *C, ARegion *region)
void ED_region_header_with_button_sections (const bContext *C, ARegion *region, const uiButtonSectionsAlign align)
void ED_region_header_init (ARegion *region)
int ED_area_headersize ()
int ED_area_footersize ()
int ED_area_global_size_y (const ScrArea *area)
int ED_area_global_min_size_y (const ScrArea *area)
int ED_area_global_max_size_y (const ScrArea *area)
bool ED_area_is_global (const ScrArea *area)
ScrAreaED_area_find_under_cursor (const bContext *C, int spacetype, const int event_xy[2])
ScrAreaED_screen_areas_iter_first (const wmWindow *win, const bScreen *screen)
ScrAreaED_screen_areas_iter_next (const bScreen *screen, const ScrArea *area)
int ED_region_global_size_y ()
void ED_region_info_draw_multiline (ARegion *region, const char *text_array[], const float fill_color[4], const bool full_redraw)
void ED_region_info_draw (ARegion *region, const char *text, const float fill_color[4], const bool full_redraw)
static void metadata_panel_draw_field (const char *field, const char *value, void *ctx_v)
void ED_region_image_metadata_panel_draw (ImBuf *ibuf, uiLayout *layout)
void ED_region_grid_draw (ARegion *region, float zoomx, float zoomy, float x0, float y0)
static void region_visible_rect_calc (ARegion *region, rcti *rect)
const rctiED_region_visible_rect (ARegion *region)
void ED_region_cache_draw_background (ARegion *region)
void ED_region_cache_draw_curfra_label (const int framenr, const float x, const float y)
void ED_region_cache_draw_cached_segments (ARegion *region, const int num_segments, const int *points, const int sfra, const int efra)
void ED_region_message_subscribe (wmRegionMessageSubscribeParams *params)
int ED_region_snap_size_test (const ARegion *region)
bool ED_region_snap_size_apply (ARegion *region, int snap_flag)
Public Functions
void ED_workspace_status_text (bContext *C, const char *str)
Region Alignment Syncing for Space Switching
static void region_align_info_from_area (ScrArea *area, RegionTypeAlignInfo *r_align_info)
static short region_alignment_from_header_and_tool_header_state (const RegionTypeAlignInfo *region_align_info, const short fallback)
static void region_align_info_to_area_for_headers (const RegionTypeAlignInfo *region_align_info_src, const RegionTypeAlignInfo *region_align_info_dst, ARegion *region_by_type[RGN_TYPE_NUM])
static void region_align_info_to_area (ScrArea *area, const RegionTypeAlignInfo region_align_info_src[RGN_TYPE_NUM])

Private helper functions to help ensure consistent spacing

static constexpr float STATUS_BEFORE_TEXT = 0.17f
static constexpr float STATUS_AFTER_TEXT = 0.90f
static constexpr float STATUS_MOUSE_ICON_PAD = -0.68f
static void ed_workspace_status_text_item (WorkSpace *workspace, std::string text)
static void ed_workspace_status_icon_item (WorkSpace *workspace, const int icon, const bool inverted=false)

Function Documentation

◆ area_azone_init()

◆ area_azone_tag_update()

void area_azone_tag_update ( ScrArea * area)
static

Definition at line 270 of file area.cc.

References AREA_FLAG_ACTIONZONES_UPDATE, and ScrArea::flag.

Referenced by region_draw_azones().

◆ area_calc_totrct()

◆ area_draw_azone()

void area_draw_azone ( ScrArea * area,
ARegion * region,
AZone * az )
static

◆ area_draw_azone_fullscreen()

void area_draw_azone_fullscreen ( short ,
short ,
short x2,
short y2,
float alpha )
static

Corner widget use for quitting full-screen.

Definition at line 145 of file area.cc.

References min_ff(), U, UI_icon_draw_ex(), UI_INV_SCALE_FAC, and UI_NO_ICON_OVERLAY_TEXT.

Referenced by region_draw_azones().

◆ area_get_prevspace()

SpaceLink * area_get_prevspace ( ScrArea * area)
static

◆ area_init_type_fallback()

void area_init_type_fallback ( ScrArea * area,
eSpace_Type space_type )
static

◆ area_is_pseudo_minimized()

bool area_is_pseudo_minimized ( const ScrArea * area)
static

Although there's no general support for minimizing areas, the status-bar can be snapped to be only a few pixels high. A few pixels rather than 0 so it can be un-minimized again. We consider it pseudo-minimized and don't draw it then.

Definition at line 451 of file area.cc.

References ScrArea::winx, and ScrArea::winy.

Referenced by ED_region_do_draw(), and ED_region_do_layout().

◆ area_offscreen_exit()

◆ area_offscreen_init()

◆ draw_azone_arrow()

◆ ED_area_and_region_types_init()

void ED_area_and_region_types_init ( ScrArea * area)

◆ ED_area_data_copy()

◆ ED_area_data_swap()

void ED_area_data_swap ( ScrArea * area_dst,
ScrArea * area_src )

◆ ED_area_do_listen()

void ED_area_do_listen ( wmSpaceTypeListenerParams * params)

Only exported for WM.

Definition at line 125 of file area.cc.

References params.

Referenced by wm_event_do_notifiers().

◆ ED_area_do_mgs_subscribe_for_tool_header()

◆ ED_area_do_mgs_subscribe_for_tool_ui()

◆ ED_area_do_msg_notify_tag_refresh()

void ED_area_do_msg_notify_tag_refresh ( bContext * C,
wmMsgSubscribeKey * msg_key,
wmMsgSubscribeValue * msg_val )

Definition at line 384 of file area.cc.

References ED_area_tag_refresh(), and wmMsgSubscribeValue::user_data.

Referenced by file_main_region_message_subscribe().

◆ ED_area_do_refresh()

void ED_area_do_refresh ( bContext * C,
ScrArea * area )

Only exported for WM.

Definition at line 133 of file area.cc.

References C, ScrArea::do_refresh, SpaceType::refresh, and ScrArea::type.

Referenced by wm_event_do_refresh_wm_and_depsgraph(), and wm_handler_fileselect_do().

◆ ED_area_find_under_cursor()

ScrArea * ED_area_find_under_cursor ( const bContext * C,
int spacetype,
const int event_xy[2] )

Search all screens, even non-active or overlapping (multiple windows), return the most-likely area of interest. xy is relative to active window, like all similar functions.

Definition at line 3988 of file area.cc.

References BKE_screen_find_area_xy(), C, CTX_wm_screen(), CTX_wm_window(), wmWindow::parent, WM_window_find_under_cursor(), and WM_window_get_active_screen().

Referenced by area_join_update_data(), area_swap_modal(), and blender::ed::asset::screenshot_preview_exec().

◆ ED_area_footersize()

int ED_area_footersize ( )

Definition at line 3962 of file area.cc.

References ED_area_headersize().

Referenced by region_rect_recursive().

◆ ED_area_global_max_size_y()

int ED_area_global_max_size_y ( const ScrArea * area)

◆ ED_area_global_min_size_y()

int ED_area_global_min_size_y ( const ScrArea * area)

◆ ED_area_global_size_y()

int ED_area_global_size_y ( const ScrArea * area)
Returns
the final height of a global area, accounting for DPI.

Definition at line 3967 of file area.cc.

References BLI_assert, ScrGlobalAreaData::cur_fixed_height, ED_area_is_global(), ScrArea::global, round_fl_to_int(), and UI_SCALE_FAC.

Referenced by screen_geom_vertices_scale(), and WM_window_screen_rect_calc().

◆ ED_area_has_shared_border()

bool ED_area_has_shared_border ( ScrArea * a,
ScrArea * b )

Definition at line 2085 of file area.cc.

References area_getorientation(), and b.

Referenced by ED_buttons_should_sync_with_outliner().

◆ ED_area_header_switchbutton()

int ED_area_header_switchbutton ( const bContext * C,
uiBlock * block,
int yco )

Returns offset for next button in header.

Definition at line 2892 of file area.cc.

References C, CTX_wm_area(), CTX_wm_screen(), bScreen::id, Menu, RNA_pointer_create_discrete(), U, and uiDefButR().

Referenced by uiTemplateHeader().

◆ ED_area_headersize()

◆ ED_area_init()

◆ ED_area_is_global()

◆ ED_area_max_regionsize()

◆ ED_area_newspace()

◆ ED_area_offscreen_create()

ScrArea * ED_area_offscreen_create ( wmWindow * win,
eSpace_Type space_type )

◆ ED_area_offscreen_free()

void ED_area_offscreen_free ( wmWindowManager * wm,
wmWindow * win,
ScrArea * area )

Definition at line 2279 of file area.cc.

References area_offscreen_exit(), BKE_screen_area_free(), and MEM_freeN().

Referenced by wm_xr_runtime_data_free().

◆ ED_area_prevspace()

◆ ED_area_region_search_filter_get()

const char * ED_area_region_search_filter_get ( const ScrArea * area,
const ARegion * region )

Returns the search string if the space type and region type support property search.

Definition at line 825 of file area.cc.

References ED_buttons_search_string_get(), ListBase::first, ARegion::regiontype, RGN_TYPE_WINDOW, SPACE_PROPERTIES, ScrArea::spacedata, and ScrArea::spacetype.

Referenced by ED_region_panels_layout_ex(), ED_region_property_search(), and ED_region_search_filter_update().

◆ ED_area_status_text()

void ED_area_status_text ( ScrArea * area,
const char * str )

Show the given text in the area's header, instead of its regular contents. Use NULL to disable this and show the regular header contents again.

Definition at line 851 of file area.cc.

References BLI_str_rstrip(), BLI_strncpy_utf8(), ED_region_tag_redraw(), LISTBASE_FOREACH, MEM_malloc_arrayN(), MEM_SAFE_FREE, ScrArea::regionbase, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, ARegion::runtime, str, and UI_MAX_DRAW_STR.

Referenced by blender::ed::transform::apply_shear(), blender::ed::transform::applyAlign(), blender::ed::transform::applyBakeTime(), blender::ed::transform::applyBoneEnvelope(), blender::ed::transform::applyBoneRoll(), blender::ed::transform::applyBoneSize(), blender::ed::transform::applyCurveShrinkFatten(), blender::ed::transform::applyEdgeSlide(), blender::ed::transform::applyGPOpacity(), blender::ed::transform::applyMaskShrinkFatten(), blender::ed::transform::applyMirror(), blender::ed::transform::applyNormalRotation(), blender::ed::transform::applyRotation(), blender::ed::transform::applySeqSlide(), blender::ed::transform::applyTilt(), blender::ed::transform::applyTimeScale(), blender::ed::transform::applyTimeSlide(), blender::ed::transform::applyTimeTranslate(), blender::ed::transform::applyTrackball(), blender::ed::transform::applyTranslation(), blender::ed::transform::applyVertSlide(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_cancel(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_modal(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_update_header(), ed_marker_move_exit(), ed_marker_move_update_header(), ED_screen_state_toggle(), ED_slider_create(), ED_slider_destroy(), edbm_bevel_exit(), edbm_bevel_update_status_text(), edbm_inset_exit(), edbm_inset_update_header(), graph_slider_exit(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_exit(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_modal(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_status_indicators(), interactive_value_exit(), interactive_value_update(), loopcut_finish(), loopcut_init(), loopcut_modal(), minimize_stretch_exit(), minimize_stretch_iteration(), pose_slide_draw_status(), pose_slide_modal(), poselib_blend_cleanup(), radial_control_cancel(), radial_control_update_header(), blender::ed::vse::slip_cleanup(), blender::ed::vse::slip_update_header(), ui_handler_wait_for_input_remove(), blender::ed::transform::viewRedrawPost(), and WM_operator_name_call_ptr_with_depends_on_cursor().

◆ ED_area_swapspace()

◆ ED_area_tag_redraw()

void ED_area_tag_redraw ( ScrArea * area)

Definition at line 693 of file area.cc.

References ED_region_tag_redraw(), LISTBASE_FOREACH, and ScrArea::regionbase.

Referenced by action_listener(), action_refresh(), actkeys_viewall(), area_actionzone_refresh_xy(), area_docking_apply(), area_dupli_fn(), area_join_dock_cb_window(), area_join_exec(), area_join_modal(), area_move_apply_do(), area_split_apply(), area_split_exit(), area_split_modal(), area_swap_modal(), blender::ui::bonedropper_exit(), box_select_exec(), buttons_area_listener(), buttons_area_redraw(), buttons_clear_filter_exec(), clip_listener(), clip_rebuild_proxy_exec(), console_clear_exec(), console_clear_line_exec(), console_copy_exec(), console_delete_exec(), console_history_append_exec(), console_history_cycle_exec(), console_indent_exec(), console_insert_exec(), console_modal_select_all_invoke(), console_modal_select_apply(), console_move_exec(), console_paste_exec(), console_scrollback_append_exec(), console_select_set_modal(), console_selectword_invoke(), console_unindent_exec(), do_view3d_region_buttons(), ED_area_newspace(), ED_area_prevspace(), ED_area_swapspace(), ED_area_type_hud_clear(), ED_editors_init(), ED_imbuf_sample_exit(), ED_region_visibility_change_update_ex(), ED_screen_restore_temp_type(), ED_view3d_quadview_update(), ED_workspace_layout_duplicate(), file_draw_check_ex(), file_filenum_exec(), file_highlight_invoke(), file_refresh(), file_rename_exec(), file_select_all_exec(), file_view_selected_exec(), fsmenu_write_file_and_refresh_or_report_error(), gesture_modal_end(), graph_listener(), graph_refresh(), graphkeys_clear_ghostcurves_exec(), graphkeys_create_ghostcurves_exec(), header_toggle_menus_exec(), image_listener(), image_sample_apply(), image_sample_line_exec(), localview_exec(), nla_listener(), nlaedit_viewall(), blender::ed::space_node::node_area_listener(), blender::ed::outliner::outliner_clear_filter_exec(), blender::ed::outliner::outliner_id_remap(), blender::ed::space_node::pick_input_link_by_link_intersect(), previewrange_clear_exec(), proj_paint_add_slot(), redraw_timer_window_swap(), region_blend_end(), region_flip_exec(), region_quadview_exec(), region_scale_modal(), report_delete_exec(), report_replay_exec(), report_select_all_exec(), reset_exec(), blender::ed::space_node::sample_apply(), blender::ed::space_node::sample_exit(), scene_range_frame_exec(), screen_area_join_ex(), scroll_exit(), select_report_pick_exec(), blender::ed::vse::seq_build_proxy(), blender::ed::vse::seq_proxy_build_job(), blender::ed::vse::sequencer_listener(), blender::ed::vse::sequencer_preview_add_sound(), blender::ed::vse::sequencer_refresh(), sequencer_sample_apply(), blender::ed::vse::sequencer_view_all_preview_exec(), template_texture_show(), text_autocomplete_invoke(), text_autocomplete_modal(), text_listener(), text_scroll_apply(), text_scroll_exec(), text_scroll_modal(), toggle_pin_exec(), toggle_xray_exec(), blender::ed::spreadsheet::view_active_object(), view_curve_in_graph_editor_exec(), view_zoomdrag_apply(), view_zoomstep_apply_ex(), blender::ed::transform::viewRedrawForce(), WM_keyconfig_update_ex(), WM_window_cursor_keymap_status_refresh(), WM_window_status_area_tag_redraw(), and WorkspaceStatus::WorkspaceStatus().

◆ ED_area_tag_redraw_no_rebuild()

void ED_area_tag_redraw_no_rebuild ( ScrArea * area)

◆ ED_area_tag_redraw_regiontype()

void ED_area_tag_redraw_regiontype ( ScrArea * area,
int regiontype )

◆ ED_area_tag_refresh()

◆ ED_area_tag_region_size_update()

void ED_area_tag_region_size_update ( ScrArea * area,
ARegion * changed_region )

For regions that change the region size in their ARegionType.layout() callback: Mark the area as having a changed region size, requiring refitting of regions within the area.

Definition at line 729 of file area.cc.

References ARegion::alignment, AREA_FLAG_REGION_SIZE_UPDATE, ED_region_tag_redraw(), ScrArea::flag, ARegion::next, ARegion::overlap, and RGN_ALIGN_FLOAT.

Referenced by ED_area_type_hud_ensure(), ED_region_header_layout(), ED_region_panels_layout_ex(), and blender::ed::asset::shelf::region_resize_to_preferred().

◆ ED_area_update_region_sizes()

◆ ed_default_handlers()

◆ ed_panel_draw()

void ed_panel_draw ( const bContext * C,
ARegion * region,
ListBase * lb,
PanelType * pt,
Panel * panel,
int w,
int em,
char * unique_panel_str,
const char * search_filter,
blender::wm::OpCallContext op_context )
static

Builds the panel layout for the input panel or type pt.

Parameters
panelThe panel to draw. Can be null, in which case a panel with the type of pt will be created.
unique_panel_strA unique identifier for the name of the uiBlock associated with the panel. Used when the panel is an instanced panel so a unique identifier is needed to find the correct old uiBlock, and nullptr otherwise.

Definition at line 2975 of file area.cc.

References BKE_ST_MAXNAME, BLI_string_join, blender::ui::block_layout(), blender::ui::block_layout_resolve(), C, Panel::children, PanelType::children, LayoutPanels::clear(), PanelType::draw, PanelType::draw_header, PanelType::draw_header_preset, ed_panel_draw(), blender::ui::Emboss, PanelType::flag, blender::ui::Header, blender::ui::Horizontal, PanelType::idname, INSTANCED_PANEL_UNIQUE_STR_SIZE, Panel::labelofs, Panel::layout, Panel_Runtime::layout_panels, LISTBASE_FOREACH, uiLayout::operator_context_set(), blender::ui::Panel, PANEL_TYPE_HEADER_EXPAND, PANEL_TYPE_LAYOUT_VERT_BAR, PANEL_TYPE_NO_HEADER, uiStyle::panelspace, PanelType::poll, ARegion::regiontype, RGN_TYPE_TOOLS, uiLayout::row(), Panel::runtime, STRNCPY_UTF8, blender::ui::Toolbar, UI_block_apply_search_filter(), UI_block_begin(), UI_block_end(), UI_block_translate(), UI_panel_begin(), UI_panel_end(), UI_panel_find_by_type(), UI_panel_header_buttons_begin(), UI_panel_header_buttons_end(), UI_panel_label_offset(), UI_style_get_dpi(), UI_UNIT_X, UI_UNIT_Y, uiLayoutEndsWithPanelHeader(), blender::ui::Vertical, blender::ui::VerticalBar, and w().

Referenced by ed_panel_draw(), and ED_region_panels_layout_ex().

◆ ED_region_cache_draw_background()

◆ ED_region_cache_draw_cached_segments()

void ED_region_cache_draw_cached_segments ( ARegion * region,
const int num_segments,
const int * points,
const int sfra,
const int efra )

◆ ED_region_cache_draw_curfra_label()

◆ ED_region_clear()

◆ ED_region_cursor_set()

void ED_region_cursor_set ( wmWindow * win,
ScrArea * area,
ARegion * region )

◆ ED_region_do_draw()

void ED_region_do_draw ( bContext * C,
ARegion * region )

Only exported for WM.

Definition at line 479 of file area.cc.

References ARegion::alignment, wmRegionMessageSubscribeParams::area, area_is_pseudo_minimized(), C, wmRegionMessageSubscribeParams::context, CTX_data_scene(), CTX_wm_area(), CTX_wm_manager(), CTX_wm_window(), CTX_wm_workspace(), ARegionType::do_lock, ARegionType::draw, ED_region_do_msg_notify_tag_redraw(), ED_region_draw_cb_draw(), ED_region_message_subscribe(), ED_region_pixelspace(), ELEM, fb(), ListBase::first, RandomNumberGenerator::from_random_seed(), G, RandomNumberGenerator::get_float(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_framebuffer_active_get(), GPU_framebuffer_bind(), GPU_line_width(), GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertformat_attr_add(), bScreen::id, imm_draw_box_wire_2d(), immBindBuiltinProgram(), immRectf(), immUnbindProgram(), immUniformColor4f(), immUniformColor4fv(), immVertexFormat(), wmRegionMessageSubscribeParams::message_bus, wmMsgSubscribeValue::notify, wmMsgSubscribeValue::owner, pos, ptr, wmRegionMessageSubscribeParams::region, region_draw_azones(), region_draw_gradient(), REGION_DRAW_POST_PIXEL, region_draw_status_text(), ARegionType::regionid, ARegion::regiontype, RGN_ALIGN_QSPLIT, RGN_DRAWING, RGN_TYPE_CHANNELS, RGN_TYPE_HEADER, RGN_TYPE_TOOLS, RGN_TYPE_UI, RGN_TYPE_WINDOW, RNA_pointer_create_discrete(), ARegion::runtime, wmRegionMessageSubscribeParams::scene, wmRegionMessageSubscribeParams::screen, SCREENFULL, SPACE_TOPBAR, ScrArea::spacedata, ScrArea::spacetype, bScreen::state, TH_EDITOR_BORDER, UI_blocklist_free_inactive(), UI_GetThemeColor3fv(), UI_SetTheme(), UI_ThemeClearColor(), wmMsgSubscribeValue::user_data, ARegion::winrct, WM_msg_subscribe_rna(), WM_msgbus_clear_by_owner(), WM_window_get_active_screen(), wmOrtho2_region_pixelspace(), wmPartialViewport(), wmRegionMessageSubscribeParams::workspace, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by text_text_search_exec(), ui_region_redraw_immediately(), wm_draw_area_offscreen(), wm_draw_region_test(), and wm_draw_window_offscreen().

◆ ED_region_do_layout()

◆ ED_region_do_listen()

void ED_region_do_listen ( wmRegionListenerParams * params)

◆ ED_region_do_msg_notify_tag_redraw()

◆ ED_region_draw_overflow_indication()

◆ ED_region_floating_init()

void ED_region_floating_init ( ARegion * region)

◆ ED_region_global_size_y()

int ED_region_global_size_y ( )

For now we just assume all global areas are made up out of horizontal bars with the same size. A fixed size could be stored in ARegion instead if needed.

Returns
the DPI aware height of a single bar/region in global areas.

Definition at line 4047 of file area.cc.

References ED_area_headersize().

Referenced by region_rect_recursive().

◆ ED_region_grid_draw()

◆ ED_region_header()

◆ ED_region_header_draw()

◆ ED_region_header_draw_with_button_sections()

void ED_region_header_draw_with_button_sections ( const bContext * C,
const ARegion * region,
uiButtonSectionsAlign align )

◆ ED_region_header_init()

◆ ED_region_header_layout()

◆ ED_region_header_with_button_sections()

void ED_region_header_with_button_sections ( const bContext * C,
ARegion * region,
uiButtonSectionsAlign align )

◆ ED_region_image_metadata_panel_draw()

void ED_region_image_metadata_panel_draw ( ImBuf * ibuf,
uiLayout * layout )

◆ ED_region_info_draw()

void ED_region_info_draw ( ARegion * region,
const char * text,
const float fill_color[4],
const bool full_redraw )

Definition at line 4128 of file area.cc.

References ED_region_info_draw_multiline().

Referenced by draw_movieclip_notes(), and draw_render_info().

◆ ED_region_info_draw_multiline()

◆ ED_region_is_overlap()

◆ ED_region_message_subscribe()

void ED_region_message_subscribe ( wmRegionMessageSubscribeParams * params)

Generate subscriptions for this region.

Definition at line 4387 of file area.cc.

References BLI_listbase_is_empty(), C, params, ARegion::runtime, UI_region_message_subscribe(), and WM_gizmomap_message_subscribe().

Referenced by ED_region_do_draw().

◆ ED_region_panels()

◆ ED_region_panels_draw()

◆ ED_region_panels_ex()

void ED_region_panels_ex ( const bContext * C,
ARegion * region,
blender::wm::OpCallContext op_context,
const char * contexts[] )

◆ ED_region_panels_init()

◆ ED_region_panels_layout()

◆ ED_region_panels_layout_ex()

void ED_region_panels_layout_ex ( const bContext * C,
ARegion * region,
ListBase * paneltypes,
blender::wm::OpCallContext op_context,
const char * contexts[],
const char * category_override )
Parameters
contextsA NULL terminated array of context strings to match against. Matching against any of these strings will draw the panel. Can be NULL to skip context checks.

Definition at line 3233 of file area.cc.

References ARegion::alignment, BLI_linklist_prepend_alloca, BLI_rctf_size_x(), C, PanelType::category, CTX_wm_area(), CTX_wm_workspace(), View2D::cur, ED_area_region_search_filter_get(), ED_area_tag_region_size_update(), ed_panel_draw(), fabsf, ARegion::flag, Panel::flag, PanelType::flag, INSTANCED_PANEL_UNIQUE_STR_SIZE, View2D::keepofs, ListBase::last, LISTBASE_FOREACH, LISTBASE_FOREACH_BACKWARD, min_ii(), LinkNode::next, panel_add_check(), panel_draw_width_from_max_width_get(), PANEL_TYPE_INSTANCED, ARegion::panels, PNL_PIN, region_panels_collect_categories(), region_uses_category_tabs(), RGN_ALIGN_LEFT, RGN_FLAG_DYNAMIC_SIZE, ARegion::runtime, View2D::scroll, ARegion::sizex, ARegion::sizey, STREQ, View2D::tot, UI_blocklist_update_view_for_buttons(), UI_list_panel_unique_str(), UI_PANEL_CATEGORY_MARGIN_WIDTH, UI_panel_find_by_type(), UI_panel_is_closed(), UI_panel_is_dragging(), UI_panel_size_y(), UI_panels_begin(), UI_panels_end(), UI_SCALE_FAC, UI_UNIT_X, UI_view2d_totRect_set(), UI_view2d_view_ortho(), ARegion::v2d, V2D_KEEPOFS_X, V2D_KEEPOFS_Y, V2D_LOCKOFS_X, V2D_LOCKOFS_Y, V2D_SCROLL_BOTTOM, V2D_SCROLL_LEFT, V2D_SCROLL_RIGHT, View2D::winy, x, y, rctf::ymax, and rctf::ymin.

Referenced by buttons_main_region_layout_properties(), ED_region_panels_ex(), ED_region_panels_layout(), ED_view3d_buttons_region_layout_ex(), image_buttons_region_layout(), and userpref_main_region_layout().

◆ ED_region_pixelspace()

void ED_region_pixelspace ( const ARegion * region)

◆ ED_region_property_search()

bool ED_region_property_search ( const bContext * C,
ARegion * region,
ListBase * paneltypes,
const char * contexts[],
const char * category_override )

◆ ED_region_search_filter_update()

void ED_region_search_filter_update ( const ScrArea * area,
ARegion * region )

◆ ED_region_snap_size_apply()

bool ED_region_snap_size_apply ( ARegion * region,
int snap_flag )

Definition at line 4419 of file area.cc.

References ARegion::runtime, ARegion::sizex, and ARegion::sizey.

Referenced by reset_exec(), view_zoomdrag_apply(), and view_zoomstep_apply_ex().

◆ ED_region_snap_size_test()

int ED_region_snap_size_test ( const ARegion * region)

Definition at line 4406 of file area.cc.

References abs, ARegion::runtime, ARegion::sizex, and ARegion::sizey.

Referenced by reset_exec(), view_zoomdrag_apply(), and view_zoomstep_apply_ex().

◆ ED_region_tag_redraw()

void ED_region_tag_redraw ( ARegion * region)

Definition at line 618 of file area.cc.

References RGN_DRAW, RGN_DRAW_EDITOR_OVERLAYS, RGN_DRAW_NO_REBUILD, RGN_DRAW_PARTIAL, RGN_DRAWING, and ARegion::runtime.

Referenced by action_channel_region_listener(), action_footer_region_listener(), action_header_region_listener(), action_main_region_listener(), action_refresh(), action_region_listener(), blender::ed::space_node::add_dragged_links_to_tree(), animchannels_select_filter_invoke(), annotation_draw_apply_event(), annotation_draw_modal(), blender::ed::asset::shelf::asset_shelf_region_listen(), axis_set_view(), blender::ed::space_node::backimage_fit_exec(), blender::ed::space_node::backimage_zoom_exec(), blender::ui::bonedropper_sample_pt(), blender::ui::bonedropper_set_draw_callback_region(), buttons_main_region_listener(), center_current_frame_exec(), clip_header_region_listener(), clip_main_region_listener(), clip_properties_region_listener(), clip_props_region_listener(), colorband_tools_fn(), console_main_region_listener(), blender::ed::curves::curve_draw_event_add(), curve_draw_event_add(), curve_draw_modal(), curve_profile_presets_fn(), curve_profile_tools_fn(), curve_profile_zoom_in(), curve_profile_zoom_out(), curvemap_buttons_redraw(), curvemap_buttons_zoom_in(), curvemap_buttons_zoom_out(), curvemap_tools_func(), blender::ed::curves::curves_draw_modal(), datadropper_id_sample_pt(), datadropper_set_draw_callback_region(), depthdropper_depth_sample_pt(), blender::ed::outliner::do_item_rename(), dopesheet_view_all_exec(), drop_color_invoke(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_modal(), ED_area_status_text(), ED_area_tag_redraw(), ED_area_tag_redraw_regiontype(), ED_area_tag_region_size_update(), ED_area_type_hud_clear(), ED_area_type_hud_ensure(), ED_region_do_listen(), ED_region_do_msg_notify_tag_redraw(), ED_region_tag_redraw_editor_overlays(), ED_slider_modal(), ED_view3d_smooth_view_ex(), edbm_bevel_cancel(), edbm_inset_cancel(), ViewOpsData::end_navigation(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), eyedropper_cryptomatte_sample_fl(), face_select_all_exec(), face_select_hide_exec(), face_vert_reveal_exec(), file_main_region_listener(), file_smoothscroll_invoke(), file_tool_props_region_listener(), file_tools_region_listener(), file_ui_region_listener(), blender::ed::spreadsheet::fit_column_invoke(), blender::ed::sculpt_paint::flush_update_done(), blender::ed::sculpt_paint::flush_update_step(), fly_modal(), grab_clone_apply(), graph_region_listener(), graphkeys_snap_cursor_value_exec(), blender::ed::greasepencil::grease_pencil_primitive_update_view(), hud_region_layout(), hud_region_listener(), image_buttons_region_listener(), image_header_region_listener(), image_main_region_listener(), image_tools_region_listener(), image_view_all_exec(), image_view_pan_exec(), image_view_pan_exit(), image_view_selected_exec(), image_view_zoom_border_exec(), image_view_zoom_exec(), image_view_zoom_exit(), image_view_zoom_in_exec(), image_view_zoom_invoke(), image_view_zoom_out_exec(), image_view_zoom_ratio_exec(), image_zoom_apply(), info_header_listener(), info_main_region_listener(), ViewOpsData::init_navigation(), knifetool_exit_ex(), knifetool_init(), knifetool_modal(), knifetool_update_mval(), loopcut_finish(), loopcut_modal(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_invoke(), blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_modal(), nla_footer_region_listener(), nla_main_region_listener(), nla_region_listener(), nla_track_region_listener(), blender::ed::space_node::node_add_nodes_modal(), blender::ed::space_node::node_insert_offset_modal(), blender::ed::space_node::node_link_modal(), blender::ed::space_node::node_region_listener(), blender::ed::space_node::node_resize_modal(), blender::ed::object::object_transform_axis_target_invoke(), blender::ed::object::object_transform_axis_target_modal(), blender::ed::outliner::outliner_header_region_listener(), blender::ed::outliner::outliner_item_do_activate_from_cursor(), blender::ed::outliner::outliner_main_region_listener(), blender::ed::outliner::outliner_one_level_exec(), blender::ed::outliner::outliner_show_hierarchy_exec(), blender::ed::outliner::outliner_tag_redraw_avoid_rebuild_on_open_change(), blender::ed::outliner::outliner_toggle_expanded_exec(), paint_2d_redraw(), paint_proj_redraw(), paint_proj_stroke(), paint_select_less_exec(), paint_select_linked_exec(), paint_select_linked_pick_invoke(), paint_select_more_exec(), paintface_mouse_select(), paintface_select_loop_invoke(), paintvert_select_less_exec(), paintvert_select_linked_exec(), paintvert_select_linked_pick_invoke(), paintvert_select_more_exec(), panel_activate_state(), pose_slide_modal(), radial_control_modal(), redraw_timer_step(), region_blend_end(), region_blend_invoke(), region_rect_recursive(), region_toggle_exec(), rename_anim_channels(), renamebutton_cb(), blender::ed::spreadsheet::reorder_columns_modal(), reset_exec(), blender::ed::spreadsheet::resize_column_modal(), ringsel_exit(), ringsel_init(), run_pyfile_exec(), blender::ed::outliner::scene_drop_invoke(), sclip_zoom_set_factor_exec(), screen_animation_region_tag_redraw(), SCULPT_tag_update_overlays(), select_anim_channel_keys(), blender::ed::vse::sequencer_buttons_region_listener(), blender::ed::vse::sequencer_footer_region_listener(), blender::ed::vse::sequencer_main_region_listener(), blender::ed::vse::sequencer_preview_region_listener(), blender::ed::vse::sequencer_view_zoom_ratio_exec(), blender::ed::sculpt_paint::set_pivot_position_exec(), blender::ed::space_node::snode_bg_viewmove_modal(), blender::ed::spreadsheet::spreadsheet_dataset_region_listener(), blender::ed::spreadsheet::spreadsheet_header_region_listener(), blender::ed::spreadsheet::spreadsheet_main_region_draw(), blender::ed::spreadsheet::spreadsheet_main_region_listener(), statusbar_header_region_listener(), stencil_control_modal(), stitch_modal(), blender::ed::sculpt_paint::stroke_redraw(), blender::ed::sculpt_paint::hide::tag_update_visibility(), text_text_search_exec(), topbar_header_listener(), topbar_main_region_listener(), ui_block_views_listen(), ui_but_pie_menu_apply(), UI_context_update_anim_flag(), ui_do_animate(), ui_do_but_extra_operator_icon(), ui_do_but_HOTKEYEVT(), ui_do_but_textedit(), ui_do_but_textedit_select(), ui_do_but_VIEW_ITEM(), ui_do_button(), ui_do_drag(), ui_drag_toggle_set(), ui_handle_layout_panel_header(), ui_handle_list_event(), ui_handle_menus_recursive(), ui_handle_panel_category_cycling(), ui_handle_panel_header(), ui_handler_panel_region(), ui_menu_scroll_apply_offset_y(), ui_numedit_apply(), ui_numedit_set_active(), ui_panel_category_show_active_tab(), ui_panel_drag_collapse(), ui_pie_handler(), ui_popup_block_refresh(), ui_popup_translate(), ui_searchbox_create_generic_ex(), ui_searchbox_select(), ui_searchbox_update(), ui_tooltip_create_with_data(), ui_view_drop_invoke(), ui_view_item_rename_exec(), ui_view_item_select_exec(), ui_view_scroll_invoke(), blender::ed::curves::pen_tool::CurvesPenToolOperation::update_view(), blender::ed::greasepencil::GreasePencilPenToolOperation::update_view(), uv_sculpt_stroke_modal(), vert_select_all_exec(), vert_select_hide_exec(), vert_select_ungrouped_exec(), view3d_all_exec(), view3d_boxview_copy(), view3d_boxview_sync(), view3d_buttons_region_listener(), view3d_clipping_invoke(), view3d_header_region_listener(), view3d_interactive_add_begin(), view3d_interactive_add_exit(), view3d_interactive_add_modal(), view3d_main_region_listener(), view3d_smoothview_apply_from_timer(), view_all_exec(), view_all_exec(), view_center_cursor_exec(), view_center_cursor_exec(), view_pan_exec(), view_pan_exit(), view_selected_exec(), view_zoom_apply(), view_zoom_apply_step(), view_zoom_exec(), view_zoom_exit(), view_zoom_in_exec(), view_zoom_out_exec(), view_zoom_ratio_exec(), viewdolly_apply(), viewdolly_exec(), viewdolly_invoke(), viewmove_apply(), viewpersportho_exec(), viewroll_apply(), viewrotate_apply(), viewzoom_apply_3d(), viewzoom_apply_camera(), blender::ed::object::voxel_size_edit_invoke(), blender::ed::object::voxel_size_edit_modal(), vpaint_stroke_update_step(), walk_modal(), weight_paint_set_exec(), WM_gizmo_do_msg_notify_tag_refresh(), wm_region_tag_draw_on_gizmo_delay_refresh_for_tweak(), WM_reinit_gizmomap_all(), and wpaint_stroke_update_step().

◆ ED_region_tag_redraw_cursor()

void ED_region_tag_redraw_cursor ( ARegion * region)

Definition at line 631 of file area.cc.

References RGN_DRAW, and ARegion::runtime.

Referenced by view3d_main_region_listener().

◆ ED_region_tag_redraw_editor_overlays()

◆ ED_region_tag_redraw_no_rebuild()

void ED_region_tag_redraw_no_rebuild ( ARegion * region)

Definition at line 638 of file area.cc.

References RGN_DRAW, RGN_DRAW_EDITOR_OVERLAYS, RGN_DRAW_NO_REBUILD, RGN_DRAW_PARTIAL, RGN_DRAWING, and ARegion::runtime.

Referenced by area_actionzone_refresh_xy(), button_activate_exit(), button_activate_state(), blender::ed::outliner::collection_drop_poll(), blender::ed::outliner::datastack_drop_poll(), blender::ed::outliner::do_outliner_operation_event(), ED_area_tag_redraw_no_rebuild(), ED_screen_set_active_region(), edge_pan_apply_delta(), force_activate_view_item_but(), blender::ed::outliner::outliner_box_select_exec(), blender::ed::outliner::outliner_deactivate(), blender::ed::outliner::outliner_highlight_update_invoke(), blender::ed::outliner::outliner_item_do_activate_from_cursor(), blender::ed::outliner::outliner_main_region_listener(), blender::ed::outliner::outliner_scroll_page_exec(), blender::ed::outliner::outliner_select_all_exec(), blender::ed::outliner::outliner_show_active_exec(), blender::ed::outliner::outliner_tag_redraw_avoid_rebuild_on_open_change(), blender::ed::outliner::parent_drop_poll(), blender::ed::asset::shelf::region_listen(), region_rect_recursive(), scroller_activate_apply(), scroller_activate_exit(), scroller_activate_init(), UI_but_ensure_in_view(), ui_do_but_extra_operator_icons_mousemove(), ui_do_button(), ui_handle_button_event(), ui_handle_viewlist_items_hover(), UI_view2d_edge_pan_cancel(), UI_view2d_smooth_view(), UI_view2d_sync(), view2d_smoothview_invoke(), view_pan_apply_ex(), view_zoomdrag_apply(), view_zoomstep_apply_ex(), wm_drags_exit(), and wm_region_test_render_do_draw().

◆ ED_region_tag_redraw_partial()

void ED_region_tag_redraw_partial ( ARegion * region,
const rcti * rct,
bool rebuild )

◆ ED_region_tag_refresh_ui()

◆ ED_region_toggle_hidden()

void ED_region_toggle_hidden ( bContext * C,
ARegion * region )

Exported to all editors, uses fading default.

Definition at line 2373 of file area.cc.

References C, and region_toggle_hidden().

Referenced by animchannels_select_filter_invoke(), region_toggle_exec(), and text_text_search_exec().

◆ ED_region_update_rect()

void ED_region_update_rect ( ARegion * region)

Call to move a popup window (keep OpenGL context free!)

Definition at line 2296 of file area.cc.

References region_update_rect().

Referenced by ui_popup_block_refresh(), and ui_popup_translate().

◆ ED_region_visibility_change_update()

◆ ED_region_visibility_change_update_ex()

void ED_region_visibility_change_update_ex ( bContext * C,
ScrArea * area,
ARegion * region,
bool is_hidden,
bool do_init )

◆ ED_region_visible_rect()

◆ ED_screen_areas_iter_first()

◆ ED_screen_areas_iter_next()

ScrArea * ED_screen_areas_iter_next ( const bScreen * screen,
const ScrArea * area )

◆ ed_workspace_status_icon_item()

void ed_workspace_status_icon_item ( WorkSpace * workspace,
const int icon,
const bool inverted = false )
static

◆ ed_workspace_status_item()

◆ ed_workspace_status_space()

void ed_workspace_status_space ( WorkSpace * workspace,
const float space_factor )
static

◆ ED_workspace_status_text()

void ED_workspace_status_text ( bContext * C,
const char * str )

Definition at line 1024 of file area.cc.

References C, status, and str.

Referenced by blender::ed::space_node::add_dragged_links_to_tree(), add_marker_at_click_modal(), area_join_exit(), area_move_exit(), area_split_exit(), area_swap_exit(), button_activate_state(), change_frame_modal(), blender::ed::curves::pen_tool::curves_pen_exit(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_cancel(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_invoke(), blender::ed::sculpt_paint::dyntopo::dyntopo_detail_size_edit_modal(), ED_screen_state_toggle(), ED_slider_destroy(), edbm_bevel_invoke(), edbm_bevel_modal(), edbm_inset_exit(), eyedropper_exit(), blender::ui::greasepencil::eyedropper_grease_pencil_exit(), blender::ui::greasepencil::eyedropper_grease_pencil_status_indicators(), blender::ed::sculpt_paint::expand::finish(), flyEnd(), blender::ed::sculpt_paint::grease_pencil_fill_exit(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_exit(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_modal(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_status_indicators(), blender::ed::greasepencil::grease_pencil_pen_exit(), blender::ed::greasepencil::grease_pencil_primitive_exit(), knifetool_modal(), loopcut_finish(), loopcut_modal(), minimize_stretch_exit(), minimize_stretch_iteration(), blender::ed::sculpt_paint::paint_stroke_modal(), point_normals_cancel(), pose_slide_modal(), poselib_blend_cleanup(), redraw_timer_exec(), sample_color_modal(), sample_color_update_header(), blender::ed::asset::screenshot_preview_exit(), blender::ed::sculpt_paint::expand::sculpt_expand_cancel(), blender::ed::sculpt_paint::filter::sculpt_mesh_filter_modal(), blender::ed::sculpt_paint::dyntopo::sculpt_sample_detail_size_invoke(), blender::ed::sculpt_paint::dyntopo::sculpt_sample_detail_size_modal(), blender::ed::vse::slip_cleanup(), stitch_exit(), blender::ed::sculpt_paint::stroke_done(), blender::ed::transform::transformEvent(), ui_block_open_end(), ui_handler_wait_for_input_remove(), UI_popup_block_close(), ui_popup_block_free(), ui_textedit_end(), blender::ed::object::voxel_size_edit_cancel(), blender::ed::object::voxel_size_edit_modal(), walkEnd(), and WM_operator_name_call_ptr_with_depends_on_cursor().

◆ ed_workspace_status_text_item()

void ed_workspace_status_text_item ( WorkSpace * workspace,
std::string text )
static

◆ fullscreen_azone_init()

◆ metadata_panel_draw_field()

void metadata_panel_draw_field ( const char * field,
const char * value,
void * ctx_v )
static

◆ panel_add_check()

bool panel_add_check ( const bContext * C,
const WorkSpace * workspace,
const char * contexts[],
const char * category_override,
PanelType * panel_type )
static

Check whether a panel should be added to the region's panel layout.

Definition at line 3151 of file area.cc.

References BKE_workspace_owner_id_check(), C, PanelType::category, PanelType::context, PanelType::draw, LIKELY, PanelType::owner_id, PanelType::parent, PanelType::poll, STREQ, and streq_array_any().

Referenced by ED_region_panels_layout_ex(), and ED_region_property_search().

◆ panel_draw_width_from_max_width_get()

int panel_draw_width_from_max_width_get ( const ARegion * region,
const PanelType * panel_type,
const int max_width )
static

Definition at line 3223 of file area.cc.

References UI_PANEL_MARGIN_X, and UI_panel_should_show_background().

Referenced by ED_region_panels_layout_ex().

◆ panel_property_search()

bool panel_property_search ( const bContext * C,
ARegion * region,
const uiStyle * style,
Panel * panel,
PanelType * panel_type,
const char * search_filter )
static

◆ rct_fits()

int rct_fits ( const rcti * rect,
const eScreenAxis dir_axis,
int size )
static

Definition at line 1390 of file area.cc.

References BLI_rcti_size_x(), BLI_rcti_size_y(), SCREEN_AXIS_H, and size().

Referenced by region_rect_recursive().

◆ region_align_info_from_area()

◆ region_align_info_to_area()

void region_align_info_to_area ( ScrArea * area,
const RegionTypeAlignInfo region_align_info_src[RGN_TYPE_NUM] )
static

◆ region_align_info_to_area_for_headers()

void region_align_info_to_area_for_headers ( const RegionTypeAlignInfo * region_align_info_src,
const RegionTypeAlignInfo * region_align_info_dst,
ARegion * region_by_type[RGN_TYPE_NUM] )
static

Notes on header alignment syncing.

This is as involved as it is because:

  • There are currently 3 kinds of headers.
  • All headers can independently visible & flipped to another side (except for the tool-header that depends on the header visibility).
  • We don't want the space-switching button to flip when switching spaces. From the user perspective it feels like a bug to move the button you click on to the opposite side of the area.
  • The space-switcher may be on either the header or the tool-header depending on the tool-header visibility.

How this works:

  • When headers match on both spaces, we copy the alignment from the previous regions to the next regions when syncing.
  • Otherwise detect the primary header (the one that shows the space type) and use this to set alignment for the headers in the destination area.
  • Header & tool-header/footer may be on opposite sides, this is preserved when syncing.

Definition at line 2520 of file area.cc.

References ARegion::alignment, RegionTypeAlignInfo::alignment, RegionTypeAlignInfo::by_type, RegionTypeAlignInfo::hidden, region_alignment_from_header_and_tool_header_state(), RGN_ALIGN_BOTTOM, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_FLAG_FROM_MASK, RGN_ALIGN_TOP, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_NUM, and RGN_TYPE_TOOL_HEADER.

Referenced by region_align_info_to_area().

◆ region_alignment_from_header_and_tool_header_state()

short region_alignment_from_header_and_tool_header_state ( const RegionTypeAlignInfo * region_align_info,
const short fallback )
static

Keeping alignment between headers keep the space-type selector button in the same place. This is complicated by the editor-type selector being placed on the header closest to the screen edge which changes based on hidden state.

The tool-header is used when visible, otherwise the header is used.

Definition at line 2473 of file area.cc.

References RegionTypeAlignInfo::alignment, RegionTypeAlignInfo::by_type, RegionTypeAlignInfo::hidden, RGN_TYPE_HEADER, and RGN_TYPE_TOOL_HEADER.

Referenced by region_align_info_to_area_for_headers().

◆ region_azone_edge()

◆ region_azone_edge_init()

void region_azone_edge_init ( ScrArea * area,
ARegion * region,
AZEdge edge,
const bool is_fullscreen )
static

◆ region_azone_edge_poll()

◆ region_azone_scrollbar_init()

◆ region_azone_tab_plus()

◆ region_azones_add()

◆ region_azones_add_edge()

void region_azones_add_edge ( ScrArea * area,
ARegion * region,
const int alignment,
const bool is_fullscreen )
static

◆ region_azones_scrollbars_init()

void region_azones_scrollbars_init ( ScrArea * area,
ARegion * region )
static

◆ region_background_color_id()

ThemeColorID region_background_color_id ( const bContext * ,
const ARegion * region )
static

◆ region_background_is_transparent()

bool region_background_is_transparent ( const ScrArea * area,
const ARegion * region )
static

Return true if the background color alpha is close to fully transparent. That is, a value of less than 50 on a [0-255] scale (rather arbitrary threshold). Assumes the region uses TH_BACK for its background.

Definition at line 1140 of file area.cc.

References ARegion::regiontype, ScrArea::spacetype, TH_BACK, UI_GetThemeColor4ubv(), UI_SetTheme(), UI_Theme_Restore(), and UI_Theme_Store().

Referenced by region_azone_edge().

◆ region_clear_fully_transparent()

void region_clear_fully_transparent ( const bContext * C)
static

Definition at line 2948 of file area.cc.

References C, GPU_clear_color(), and UI_view2d_view_restore().

Referenced by ED_region_header_draw_with_button_sections().

◆ region_draw_azone_tab_arrow()

◆ region_draw_azones()

◆ region_draw_blocks_in_view2d()

void region_draw_blocks_in_view2d ( const bContext * C,
const ARegion * region )
static

◆ region_draw_gradient()

◆ region_draw_status_text()

◆ region_evaulate_visibility()

void region_evaulate_visibility ( ARegion * region)
static

◆ region_overlap_fix()

◆ region_panels_collect_categories()

const char * region_panels_collect_categories ( ARegion * region,
LinkNode * panel_types_stack,
bool * use_category_tabs )
static

◆ region_rect_recursive()

void region_rect_recursive ( ScrArea * area,
ARegion * region,
rcti * remainder,
rcti * overlap_remainder,
int quad )
static
Note
Currently this window type is only used for RGN_TYPE_HUD, We expect the panel to resize itself to be larger.

This aligns to the lower left of the area.

Definition at line 1530 of file area.cc.

References ARegion::alignment, AREAMINX, BLI_assert, BLI_rcti_cent_x(), BLI_rcti_cent_y(), BLI_rcti_init(), BLI_rcti_is_valid(), BLI_rcti_isect(), BLI_rcti_resize(), BLI_rcti_sanitize(), BLI_rcti_size_x(), BLI_rcti_size_y(), count, ED_area_footersize(), ED_area_headersize(), ED_area_is_global(), ED_region_global_size_y(), ED_region_is_overlap(), ED_region_tag_redraw(), ED_region_tag_redraw_no_rebuild(), ELEM, ARegion::flag, G, G_DEBUG, blender::ed::asset::shelf::header_region_size(), HEADERY, max_ii(), ARegion::next, ARegion::overlap, ARegion::prev, printf, quad, rct_fits(), region_overlap_fix(), blender::ed::asset::shelf::region_prefsizey(), region_rect_recursive(), ARegion::regiontype, RGN_ALIGN_BOTTOM, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_FLOAT, RGN_ALIGN_HSPLIT, RGN_ALIGN_LEFT, RGN_ALIGN_NONE, RGN_ALIGN_QSPLIT, RGN_ALIGN_RIGHT, RGN_ALIGN_TOP, RGN_ALIGN_VSPLIT, RGN_FLAG_DYNAMIC_SIZE, RGN_FLAG_HIDDEN, RGN_FLAG_POLL_FAILED, RGN_FLAG_SIZE_CLAMP_X, RGN_FLAG_SIZE_CLAMP_Y, RGN_FLAG_TOO_SMALL, RGN_SPLIT_PREV, RGN_TYPE_ASSET_SHELF, RGN_TYPE_ASSET_SHELF_HEADER, RGN_TYPE_FOOTER, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, ARegion::runtime, SCREEN_AXIS_H, SCREEN_AXIS_V, ARegion::sizex, ARegion::sizey, SPACE_VIEW3D, ScrArea::spacetype, U, UI_SCALE_FAC, UI_UNIT_X, UI_UNIT_Y, ARegion::winrct, ARegion::winx, ARegion::winy, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.

Referenced by ED_area_init(), ED_area_update_region_sizes(), and region_rect_recursive().

◆ region_toggle_hidden()

◆ region_update_rect()

void region_update_rect ( ARegion * region)
static

◆ region_uses_category_tabs()

bool region_uses_category_tabs ( const ScrArea * area,
const ARegion * region )
static

◆ region_visible_rect_calc()

◆ streq_array_any()

BLI_INLINE bool streq_array_any ( const char * s,
const char * arr[] )

Definition at line 2956 of file area.cc.

References BLI_INLINE, i, and STREQ.

Referenced by panel_add_check().

Variable Documentation

◆ STATUS_AFTER_TEXT

float STATUS_AFTER_TEXT = 0.90f
staticconstexpr

Definition at line 927 of file area.cc.

Referenced by ed_workspace_status_text_item().

◆ STATUS_BEFORE_TEXT

float STATUS_BEFORE_TEXT = 0.17f
staticconstexpr

Definition at line 926 of file area.cc.

Referenced by ed_workspace_status_text_item().

◆ STATUS_MOUSE_ICON_PAD

float STATUS_MOUSE_ICON_PAD = -0.68f
staticconstexpr

Definition at line 928 of file area.cc.

Referenced by ed_workspace_status_icon_item().