Blender V4.3
area.cc File Reference
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_linklist_stack.h"
#include "BLI_rand.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_state.hh"
#include "BLF_api.hh"
#include "IMB_metadata.hh"
#include "UI_interface.hh"
#include "UI_interface_icons.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
 

Enumerations

enum  RegionEmbossSide {
  REGION_EMBOSS_LEFT = (1 << 0) , REGION_EMBOSS_TOP = (1 << 1) , REGION_EMBOSS_BOTTOM = (1 << 2) , REGION_EMBOSS_RIGHT = (1 << 3) ,
  REGION_EMBOSS_ALL
}
 

Functions

static void region_draw_emboss (const ARegion *region, const rcti *scirct, int sides)
 
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 (short, short, short, short)
 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)
 
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 (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 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 (ScrArea *area, const rcti *window_rect)
 
static void region_evaulate_visibility (ARegion *region)
 
static bool event_in_markers_region (const ARegion *region, const wmEvent *event)
 
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_init (wmWindowManager *wm, 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, wmOperatorCallContext 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, wmOperatorCallContext op_context, const char *contexts[], const char *category_override)
 
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, wmOperatorCallContext 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)
 
static void layout_coordinates_correct_for_drawable_rect (const wmWindow *win, const ScrArea *area, const ARegion *region, int *, int *r_yco)
 
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_AFTER_TEXT = 0.7f
 
static constexpr float STATUS_MOUSE_ICON_PAD = -0.5f
 
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)
 

Enumeration Type Documentation

◆ RegionEmbossSide

Enumerator
REGION_EMBOSS_LEFT 
REGION_EMBOSS_TOP 
REGION_EMBOSS_BOTTOM 
REGION_EMBOSS_RIGHT 
REGION_EMBOSS_ALL 

Definition at line 58 of file area.cc.

Function Documentation

◆ area_azone_init()

◆ area_azone_tag_update()

static void area_azone_tag_update ( ScrArea * area)
static

Definition at line 292 of file area.cc.

References AREA_FLAG_ACTIONZONES_UPDATE.

Referenced by region_draw_azones().

◆ area_calc_totrct()

static void area_calc_totrct ( ScrArea * area,
const rcti * window_rect )
static

◆ area_draw_azone()

static void area_draw_azone ( short ,
short ,
short ,
short  )
static

Corner widgets use for dragging and splitting the view.

Definition at line 195 of file area.cc.

Referenced by region_draw_azones().

◆ area_draw_azone_fullscreen()

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

Corner widget use for quitting full-screen.

Definition at line 179 of file area.cc.

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

Referenced by region_draw_azones().

◆ area_get_prevspace()

static SpaceLink * area_get_prevspace ( ScrArea * area)
static

Definition at line 2720 of file area.cc.

References SpaceLink::next, SPACE_FLAG_TYPE_TEMPORARY, and SPACE_FLAG_TYPE_WAS_ACTIVE.

Referenced by ED_area_prevspace().

◆ area_init_type_fallback()

static void area_init_type_fallback ( ScrArea * area,
eSpace_Type space_type )
static

Setup a known space type in the event a file with an unknown space-type is loaded.

Definition at line 2006 of file area.cc.

References BKE_spacetype_from_id(), BLI_addhead(), BLI_assert, BLI_listbase_clear(), BLI_remlink(), LIKELY, LISTBASE_FOREACH, SpaceLink::regionbase, and screen_area_spacelink_add().

Referenced by ED_area_init().

◆ area_is_pseudo_minimized()

static 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 471 of file area.cc.

Referenced by ED_region_do_draw(), and ED_region_do_layout().

◆ area_offscreen_exit()

◆ area_offscreen_init()

static void area_offscreen_init ( ScrArea * area)
static

◆ draw_azone_arrow()

◆ 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 159 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 404 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 167 of file area.cc.

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 3698 of file area.cc.

References BKE_screen_find_area_xy(), 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(), and area_swap_modal().

◆ ED_area_footersize()

int ED_area_footersize ( )

Definition at line 3672 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)

Definition at line 3687 of file area.cc.

References BLI_assert, ED_area_is_global(), round_fl_to_int(), and UI_SCALE_FAC.

Referenced by area_move_set_limits().

◆ ED_area_global_min_size_y()

int ED_area_global_min_size_y ( const ScrArea * area)

Definition at line 3682 of file area.cc.

References BLI_assert, ED_area_is_global(), round_fl_to_int(), and UI_SCALE_FAC.

Referenced by area_move_set_limits().

◆ 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 3677 of file area.cc.

References BLI_assert, ED_area_is_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 1998 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 2766 of file area.cc.

References CTX_wm_area(), CTX_wm_screen(), RNA_pointer_create(), UI_BTYPE_MENU, and uiDefButR().

Referenced by uiTemplateHeader().

◆ ED_area_headersize()

◆ ED_area_init()

◆ ED_area_is_global()

◆ 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 2184 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 777 of file area.cc.

References ED_buttons_search_string_get(), RGN_TYPE_WINDOW, and SPACE_PROPERTIES.

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 803 of file area.cc.

References BLI_str_rstrip(), BLI_strncpy(), ED_region_tag_redraw(), ARegion::headerstr, LISTBASE_FOREACH, MEM_mallocN, MEM_SAFE_FREE, RGN_TYPE_HEADER, RGN_TYPE_TOOL_HEADER, str, and UI_MAX_DRAW_STR.

Referenced by apply_shear(), apply_value_impl(), applyAlign(), applyBakeTime(), applyBoneEnvelope(), applyBoneRoll(), applyBoneSize(), applyCurveShrinkFatten(), applyEdgeSlide(), applyGPOpacity(), applyGPShrinkFatten(), applyMaskShrinkFatten(), applyMirror(), applyNormalRotation(), applyPushPull(), applyResize(), applyRotation(), applySeqSlide(), applyShrinkFatten(), applySkinResize(), applyTilt(), applyTimeScale(), applyTimeSlide(), applyTimeTranslate(), applyToSphere(), applyTrackball(), applyTranslation(), applyVertSlide(), Bend(), 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(), point_normals_cancel(), point_normals_update_header(), pose_slide_draw_status(), pose_slide_modal(), poselib_blend_cleanup(), radial_control_cancel(), radial_control_update_header(), sequencer_slip_modal(), sequencer_slip_update_header(), ui_handler_wait_for_input_remove(), 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 708 of file area.cc.

References ED_region_tag_redraw(), and LISTBASE_FOREACH.

Referenced by action_listener(), action_refresh(), actkeys_viewall(), area_actionzone_refresh_xy(), 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(), console_modal_select_all_invoke(), console_modal_select_apply(), console_move_exec(), console_paste_exec(), console_scrollback_append_exec(), 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(), scroll_exit(), select_report_pick_exec(), seq_build_proxy(), seq_proxy_build_job(), sequencer_listener(), sequencer_preview_add_sound(), sequencer_refresh(), sequencer_sample_apply(), 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(), 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)

Definition at line 717 of file area.cc.

References ED_region_tag_redraw_no_rebuild(), and LISTBASE_FOREACH.

Referenced by area_actionzone_refresh_xy(), and area_move_apply_do().

◆ 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 744 of file area.cc.

References ARegion::alignment, AREA_FLAG_REGION_SIZE_UPDATE, ED_region_tag_redraw(), 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()

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,
wmOperatorCallContext 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 2849 of file area.cc.

References BKE_ST_MAXNAME, BLI_string_join, Panel::children, PanelType::children, LayoutPanels::clear(), PanelType::draw, PanelType::draw_header, PanelType::draw_header_preset, ed_panel_draw(), PanelType::flag, PanelType::idname, INSTANCED_PANEL_UNIQUE_STR_SIZE, Panel::labelofs, Panel::layout, Panel_Runtime::layout_panels, LISTBASE_FOREACH, PANEL_TYPE_HEADER_EXPAND, PANEL_TYPE_LAYOUT_VERT_BAR, PANEL_TYPE_NO_HEADER, uiStyle::panelspace, PanelType::poll, RGN_TYPE_TOOLS, Panel::runtime, STRNCPY, UI_block_apply_search_filter(), UI_block_begin(), UI_block_end(), UI_block_layout(), UI_block_layout_resolve(), UI_block_translate(), UI_EMBOSS, UI_LAYOUT_HEADER, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_PANEL, UI_LAYOUT_TOOLBAR, UI_LAYOUT_VERT_BAR, UI_LAYOUT_VERTICAL, 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(), uiLayoutRow(), uiLayoutSetOperatorContext(), 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 )

◆ ED_region_do_layout()

void ED_region_do_layout ( bContext * C,
ARegion * region )

◆ ED_region_do_listen()

void ED_region_do_listen ( wmRegionListenerParams * params)

◆ ED_region_do_msg_notify_tag_redraw()

◆ ED_region_floating_init()

void ED_region_floating_init ( ARegion * region)

Externally called for floating regions like menus.

Definition at line 2206 of file area.cc.

References BLI_assert, region_evaulate_visibility(), region_update_rect(), and RGN_ALIGN_FLOAT.

Referenced by ED_area_type_hud_ensure(), ui_popup_block_refresh(), ui_searchbox_create_generic_ex(), and ui_tooltip_create_with_data().

◆ 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 3757 of file area.cc.

References ED_area_headersize().

Referenced by region_rect_recursive().

◆ ED_region_grid_draw()

◆ ED_region_header()

◆ ED_region_header_draw()

void ED_region_header_draw ( const bContext * C,
ARegion * region )

◆ 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 3838 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 4085 of file area.cc.

References BLI_listbase_is_empty(), params, 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,
wmOperatorCallContext 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,
wmOperatorCallContext op_context,
const char * contexts[],
const char * category_override )

◆ ED_region_pixelspace()

◆ 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 )

Set the temporary update flag for property search.

Definition at line 790 of file area.cc.

References ED_area_region_search_filter_get(), RGN_FLAG_SEARCH_FILTER_ACTIVE, RGN_FLAG_SEARCH_FILTER_UPDATE, RGN_TYPE_WINDOW, and SET_FLAG_FROM_TEST.

Referenced by buttons_clear_filter_exec().

◆ ED_region_snap_size_apply()

bool ED_region_snap_size_apply ( ARegion * region,
int snap_flag )

Definition at line 4117 of file area.cc.

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 4104 of file area.cc.

References abs().

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 634 of file area.cc.

References RGN_DRAW, RGN_DRAW_EDITOR_OVERLAYS, RGN_DRAW_NO_REBUILD, RGN_DRAW_PARTIAL, and RGN_DRAWING.

Referenced by action_channel_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(), asset_view_listener(), 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::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(), 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_main_region_listener(), nla_region_listener(), nla_track_region_listener(), blender::ed::space_node::node_add_file_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(), reset_exec(), ringsel_exit(), ringsel_init(), run_pyfile_exec(), sclip_zoom_set_factor_exec(), screen_animation_region_tag_redraw(), SCULPT_tag_update_overlays(), select_anim_channel_keys(), sequencer_buttons_region_listener(), sequencer_main_region_listener(), sequencer_preview_region_listener(), 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_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_scroll_invoke(), 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 646 of file area.cc.

References RGN_DRAW.

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 653 of file area.cc.

References RGN_DRAW, RGN_DRAW_EDITOR_OVERLAYS, RGN_DRAW_NO_REBUILD, RGN_DRAW_PARTIAL, and RGN_DRAWING.

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_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 2276 of file area.cc.

References 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 2201 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()

ScrArea * ED_screen_areas_iter_first ( const wmWindow * win,
const bScreen * screen )

◆ ED_screen_areas_iter_next()

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

Definition at line 3742 of file area.cc.

References GLOBAL_AREA_IS_HIDDEN, and ScrArea::next.

Referenced by ED_screen_areas_iter_first().

◆ ed_workspace_status_icon_item()

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

◆ ed_workspace_status_item()

◆ ed_workspace_status_space()

static 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 966 of file area.cc.

References WorkspaceStatus::item(), and str.

Referenced by blender::ed::space_node::add_dragged_links_to_tree(), add_marker_at_click_invoke(), add_marker_at_click_modal(), annotation_draw_status_indicators(), area_join_exit(), area_move_exit(), area_split_exit(), area_swap_exit(), button_activate_state(), common_draw_status_header(), decimate_draw_status(), 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(), ease_draw_status_header(), ED_screen_state_toggle(), ED_slider_destroy(), edbm_bevel_invoke(), edbm_bevel_modal(), edbm_inset_exit(), blender::ui::greasepencil::eyedropper_grease_pencil_exit(), blender::ui::greasepencil::eyedropper_grease_pencil_status_indicators(), blender::ed::sculpt_paint::expand::finish(), blender::ed::sculpt_paint::grease_pencil_fill_exit(), blender::ed::sculpt_paint::grease_pencil_fill_status_indicators(), 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_primitive_exit(), blender::ed::greasepencil::grease_pencil_primitive_status_indicators(), knifetool_modal(), loopcut_finish(), loopcut_modal(), mesh_bisect_invoke(), minimize_stretch_exit(), minimize_stretch_iteration(), pose_slide_draw_status(), pose_slide_modal(), poselib_blend_cleanup(), poselib_blend_modal(), sample_color_modal(), sample_color_update_header(), scale_from_neighbor_draw_status_header(), 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(), shear_draw_status_header(), stitch_exit(), stitch_update_header(), 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(), and WM_operator_name_call_ptr_with_depends_on_cursor().

◆ ed_workspace_status_text_item()

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

◆ event_in_markers_region()

static bool event_in_markers_region ( const ARegion * region,
const wmEvent * event )
static

Definition at line 1845 of file area.cc.

References BLI_rcti_isect_pt_v(), UI_MARKER_MARGIN_Y, wmEvent::xy, rcti::ymax, and rcti::ymin.

Referenced by ed_default_handlers().

◆ fullscreen_azone_init()

◆ layout_coordinates_correct_for_drawable_rect()

static void layout_coordinates_correct_for_drawable_rect ( const wmWindow * win,
const ScrArea * area,
const ARegion * region,
int * ,
int * r_yco )
static

The drawable part of the region might be slightly smaller because of area edges. This is especially visible for header-like regions, where vertical space around widgets is small, and it's quite visible when widgets aren't centered properly.

Definition at line 3502 of file area.cc.

References WM_window_rect_calc(), rcti::ymax, and rcti::ymin.

Referenced by ED_region_header_layout().

◆ metadata_panel_draw_field()

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

Definition at line 3851 of file area.cc.

References MetadataPanelDrawContext::layout, uiItemL(), and uiLayoutRow().

Referenced by ED_region_image_metadata_panel_draw().

◆ panel_add_check()

static 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 3017 of file area.cc.

References BKE_workspace_owner_id_check(), 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()

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

Definition at line 3089 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()

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

◆ rct_fits()

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

Definition at line 1319 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()

static 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()

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

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 2423 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, and RGN_TYPE_TOOL_HEADER.

Referenced by region_align_info_to_area().

◆ region_alignment_from_header_and_tool_header_state()

static 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 2376 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()

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

◆ region_azone_edge_poll()

static bool region_azone_edge_poll ( const ARegion * region,
const bool is_fullscreen )
static

◆ region_azone_scrollbar_init()

static void region_azone_scrollbar_init ( ScrArea * area,
ARegion * region,
AZScrollDirection direction )
static

◆ region_azone_tab_plus()

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

◆ region_azones_add()

static void region_azones_add ( const bScreen * screen,
ScrArea * area,
ARegion * region )
static

◆ region_azones_add_edge()

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

◆ region_azones_scrollbars_init()

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

◆ region_background_color_id()

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

◆ region_background_is_transparent()

static 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 1077 of file area.cc.

References TH_BACK, UI_GetThemeColor4ubv(), UI_SetTheme(), UI_Theme_Restore(), and UI_Theme_Store().

Referenced by region_azone_edge().

◆ region_clear_fully_transparent()

static void region_clear_fully_transparent ( const bContext * C)
static

Definition at line 2822 of file area.cc.

References 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()

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

◆ region_draw_emboss()

◆ region_draw_status_text()

◆ region_evaulate_visibility()

static void region_evaulate_visibility ( ARegion * region)
static

◆ region_overlap_fix()

◆ region_panels_collect_categories()

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

◆ region_rect_recursive()

static void region_rect_recursive ( ScrArea * area,
ARegion * region,
rcti * remainder,
rcti * overlap_remainder,
int quad )
static

◆ region_toggle_hidden()

void region_toggle_hidden ( bContext * C,
ARegion * region,
const bool do_fade )

◆ region_update_rect()

static void region_update_rect ( ARegion * region)
static

Definition at line 2192 of file area.cc.

References BLI_rcti_init(), BLI_rcti_size_x(), and BLI_rcti_size_y().

Referenced by ED_region_floating_init(), and ED_region_update_rect().

◆ region_uses_category_tabs()

static 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 2830 of file area.cc.

References STREQ.

Referenced by panel_add_check().

Variable Documentation

◆ STATUS_AFTER_TEXT

float STATUS_AFTER_TEXT = 0.7f
staticconstexpr

Definition at line 878 of file area.cc.

Referenced by ed_workspace_status_text_item().

◆ STATUS_MOUSE_ICON_PAD

float STATUS_MOUSE_ICON_PAD = -0.5f
staticconstexpr

Definition at line 879 of file area.cc.

Referenced by ed_workspace_status_icon_item().