Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area_query.c
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| bool ED_region_overlap_isect_xy(const ARegion *region, const int event_xy[2]) | bool ED_region_overlap_isect_xy(const ARegion *region, const int event_xy[2]) | ||||
| { | { | ||||
| return (ED_region_overlap_isect_x(region, event_xy[0]) && | return (ED_region_overlap_isect_x(region, event_xy[0]) && | ||||
| ED_region_overlap_isect_y(region, event_xy[1])); | ED_region_overlap_isect_y(region, event_xy[1])); | ||||
| } | } | ||||
| bool ED_region_overlap_isect_any_xy(const ScrArea *area, const int event_xy[2]) | |||||
| { | |||||
| LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { | |||||
| if (ED_region_is_overlap(area->spacetype, region->regiontype)) { | |||||
| if (ED_region_overlap_isect_xy(region, event_xy)) { | |||||
| return true; | |||||
| } | |||||
| } | |||||
| } | |||||
| 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_ar_gutter) | ||||
| { | { | ||||
| *r_ar_gutter = region->winrct; | *r_ar_gutter = region->winrct; | ||||
| if (UI_panel_category_is_visible(region)) { | if (UI_panel_category_is_visible(region)) { | ||||
| const int category_tabs_width = round_fl_to_int(UI_view2d_scale_get_x(®ion->v2d) * | const int category_tabs_width = round_fl_to_int(UI_view2d_scale_get_x(®ion->v2d) * | ||||
| UI_PANEL_CATEGORY_MARGIN_WIDTH); | UI_PANEL_CATEGORY_MARGIN_WIDTH); | ||||
| const int alignment = RGN_ALIGN_ENUM_FROM_MASK(region->alignment); | const int alignment = RGN_ALIGN_ENUM_FROM_MASK(region->alignment); | ||||
| ▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines | |||||