diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 13:51:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 13:54:28 +0300 |
commit | 10c2254d412d7cbee0b0d9f8b7c74a9d3ce69b69 (patch) | |
tree | c430e46e04ed888bcbf44af39b780a2986f513ea /source/blender/editors/screen | |
parent | 7ec59cc7b700952fdbddfbb44a55977e0bf3bcb6 (diff) |
Cleanup: Continue renaming ARegion variables from ar to region
Continuation of b2ee1770d4c3, now non-single word variables are also
renamed.
Part of T74432.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 8 | ||||
-rw-r--r-- | source/blender/editors/screen/area_query.c | 14 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 18 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 42 |
4 files changed, 41 insertions, 41 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 56ea59c1d6e..efa98c358df 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2076,9 +2076,9 @@ void ED_area_swapspace(bContext *C, ScrArea *sa1, ScrArea *sa2) } /** - * \param skip_ar_exit: Skip calling area exit callback. Set for opening temp spaces. + * \param skip_region_exit: Skip calling area exit callback. Set for opening temp spaces. */ -void ED_area_newspace(bContext *C, ScrArea *sa, int type, const bool skip_ar_exit) +void ED_area_newspace(bContext *C, ScrArea *sa, int type, const bool skip_region_exit) { wmWindow *win = CTX_wm_window(C); @@ -2104,14 +2104,14 @@ void ED_area_newspace(bContext *C, ScrArea *sa, int type, const bool skip_ar_exi /* in some cases (opening temp space) we don't want to * call area exit callback, so we temporarily unset it */ - if (skip_ar_exit && sa->type) { + if (skip_region_exit && sa->type) { sa->type->exit = NULL; } ED_area_exit(C, sa); /* restore old area exit callback */ - if (skip_ar_exit && sa->type) { + if (skip_region_exit && sa->type) { sa->type->exit = sa_exit; } diff --git a/source/blender/editors/screen/area_query.c b/source/blender/editors/screen/area_query.c index 739f1b93e07..d569e56e11b 100644 --- a/source/blender/editors/screen/area_query.c +++ b/source/blender/editors/screen/area_query.c @@ -73,19 +73,19 @@ bool ED_region_overlap_isect_any_xy(const ScrArea *area, const int event_xy[2]) return false; } -bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_ar_gutter) +bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_region_gutter) { - *r_ar_gutter = region->winrct; + *r_region_gutter = region->winrct; if (UI_panel_category_is_visible(region)) { const int category_tabs_width = round_fl_to_int(UI_view2d_scale_get_x(®ion->v2d) * UI_PANEL_CATEGORY_MARGIN_WIDTH); const int alignment = RGN_ALIGN_ENUM_FROM_MASK(region->alignment); if (alignment == RGN_ALIGN_LEFT) { - r_ar_gutter->xmax = r_ar_gutter->xmin + category_tabs_width; + r_region_gutter->xmax = r_region_gutter->xmin + category_tabs_width; } else if (alignment == RGN_ALIGN_RIGHT) { - r_ar_gutter->xmin = r_ar_gutter->xmax - category_tabs_width; + r_region_gutter->xmin = r_region_gutter->xmax - category_tabs_width; } else { BLI_assert(!"Unsupported alignment"); @@ -97,9 +97,9 @@ bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_ar bool ED_region_panel_category_gutter_isect_xy(const ARegion *region, const int event_xy[2]) { - rcti ar_gutter; - if (ED_region_panel_category_gutter_calc_rect(region, &ar_gutter)) { - return BLI_rcti_isect_pt_v(&ar_gutter, event_xy); + rcti region_gutter; + if (ED_region_panel_category_gutter_calc_rect(region, ®ion_gutter)) { + return BLI_rcti_isect_pt_v(®ion_gutter, event_xy); } return false; } diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 0151a0fcb0d..01a30f7d6a4 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -687,7 +687,7 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) ScrArea *sa = NULL; ARegion *region; - ARegion *ar_prev = scr->active_region; + ARegion *region_prev = scr->active_region; ED_screen_areas_iter(win, scr, area_iter) { @@ -714,7 +714,7 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) } /* Check for redraw headers. */ - if (ar_prev != scr->active_region) { + if (region_prev != scr->active_region) { ED_screen_areas_iter(win, scr, area_iter) { @@ -723,20 +723,20 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) for (region = area_iter->regionbase.first; region; region = region->next) { /* Call old area's deactivate if assigned. */ - if (region == ar_prev && area_iter->type->deactivate) { + if (region == region_prev && area_iter->type->deactivate) { area_iter->type->deactivate(area_iter); } - if (region == ar_prev && region != scr->active_region) { - wmGizmoMap *gzmap = ar_prev->gizmo_map; + if (region == region_prev && region != scr->active_region) { + wmGizmoMap *gzmap = region_prev->gizmo_map; if (gzmap) { if (WM_gizmo_highlight_set(gzmap, NULL)) { - ED_region_tag_redraw_no_rebuild(ar_prev); + ED_region_tag_redraw_no_rebuild(region_prev); } } } - if (region == ar_prev || region == scr->active_region) { + if (region == region_prev || region == scr->active_region) { do_draw = true; } } @@ -758,9 +758,9 @@ void ED_screen_set_active_region(bContext *C, wmWindow *win, const int xy[2]) } else { /* Notifier invokes freeing the buttons... causing a bit too much redraws. */ - region_cursor_set_ex(win, sa, scr->active_region, ar_prev != scr->active_region); + region_cursor_set_ex(win, sa, scr->active_region, region_prev != scr->active_region); - if (ar_prev != scr->active_region) { + if (region_prev != scr->active_region) { /* This used to be a notifier, but needs to be done immediate * because it can undo setting the right button as active due * to delayed notifier handling. */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index ae8dd829d8d..5eb676cd25c 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -2641,11 +2641,11 @@ static void region_scale_toggle_hidden(bContext *C, RegionMoveData *rmd) if ((rmd->region->flag & RGN_FLAG_HIDDEN) == 0) { if (rmd->region->regiontype == RGN_TYPE_HEADER) { - ARegion *ar_tool_header = BKE_area_find_region_type(rmd->sa, RGN_TYPE_TOOL_HEADER); - if (ar_tool_header != NULL) { - if ((ar_tool_header->flag & RGN_FLAG_HIDDEN_BY_USER) == 0 && - (ar_tool_header->flag & RGN_FLAG_HIDDEN) != 0) { - region_toggle_hidden(C, ar_tool_header, 0); + ARegion *region_tool_header = BKE_area_find_region_type(rmd->sa, RGN_TYPE_TOOL_HEADER); + if (region_tool_header != NULL) { + if ((region_tool_header->flag & RGN_FLAG_HIDDEN_BY_USER) == 0 && + (region_tool_header->flag & RGN_FLAG_HIDDEN) != 0) { + region_toggle_hidden(C, region_tool_header, 0); } } } @@ -3848,17 +3848,17 @@ static int region_quadview_exec(bContext *C, wmOperator *op) region->alignment = 0; if (sa->spacetype == SPACE_VIEW3D) { - ARegion *ar_iter; + ARegion *region_iter; RegionView3D *rv3d = region->regiondata; /* if this is a locked view, use settings from 'User' view */ if (rv3d->viewlock) { View3D *v3d_user; - ARegion *ar_user; + ARegion *region_user; - if (ED_view3d_context_user_region(C, &v3d_user, &ar_user)) { - if (region != ar_user) { - SWAP(void *, region->regiondata, ar_user->regiondata); + if (ED_view3d_context_user_region(C, &v3d_user, ®ion_user)) { + if (region != region_user) { + SWAP(void *, region->regiondata, region_user->regiondata); rv3d = region->regiondata; } } @@ -3869,9 +3869,9 @@ static int region_quadview_exec(bContext *C, wmOperator *op) rv3d->rflag &= ~RV3D_CLIPPING; /* Accumulate locks, in case they're mixed. */ - for (ar_iter = sa->regionbase.first; ar_iter; ar_iter = ar_iter->next) { - if (ar_iter->regiontype == RGN_TYPE_WINDOW) { - RegionView3D *rv3d_iter = ar_iter->regiondata; + for (region_iter = sa->regionbase.first; region_iter; region_iter = region_iter->next) { + if (region_iter->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3d_iter = region_iter->regiondata; rv3d->viewlock_quad |= rv3d_iter->viewlock; } } @@ -4140,9 +4140,9 @@ void ED_screens_header_tools_menu_create(bContext *C, uiLayout *layout, void *UN uiItemR(layout, &ptr, "show_region_header", 0, IFACE_("Show Header"), ICON_NONE); } - ARegion *ar_header = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ARegion *region_header = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); uiLayout *col = uiLayoutColumn(layout, 0); - uiLayoutSetActive(col, (ar_header->flag & RGN_FLAG_HIDDEN) == 0); + uiLayoutSetActive(col, (region_header->flag & RGN_FLAG_HIDDEN) == 0); if (BKE_area_find_region_type(sa, RGN_TYPE_TOOL_HEADER)) { uiItemR(col, &ptr, "show_region_tool_header", 0, IFACE_("Show Tool Settings"), ICON_NONE); @@ -5070,7 +5070,7 @@ static void SCREEN_OT_delete(wmOperatorType *ot) typedef struct RegionAlphaInfo { ScrArea *sa; - ARegion *region, *child_ar; /* other region */ + ARegion *region, *child_region; /* other region */ int hidden; } RegionAlphaInfo; @@ -5107,8 +5107,8 @@ static void region_blend_end(bContext *C, ARegion *region, const bool is_running /* always send redraw */ ED_region_tag_redraw(region); - if (rgi->child_ar) { - ED_region_tag_redraw(rgi->child_ar); + if (rgi->child_region) { + ED_region_tag_redraw(rgi->child_region); } /* if running timer was hiding, the flag toggle went wrong */ @@ -5159,7 +5159,7 @@ void ED_region_visibility_change_update_animated(bContext *C, ScrArea *sa, ARegi if (region->next) { if (region->next->alignment & RGN_SPLIT_PREV) { - rgi->child_ar = region->next; + rgi->child_region = region->next; } } @@ -5183,8 +5183,8 @@ static int region_blend_invoke(bContext *C, wmOperator *UNUSED(op), const wmEven /* always send redraws */ ED_region_tag_redraw(rgi->region); - if (rgi->child_ar) { - ED_region_tag_redraw(rgi->child_ar); + if (rgi->child_region) { + ED_region_tag_redraw(rgi->child_region); } /* end timer? */ |