|
Blender V5.0
|
#include "BKE_screen.hh"#include "BLI_listbase.h"#include "BLI_math_base.h"#include "BLI_utildefines.h"#include "ED_screen.hh"#include "UI_interface.hh"#include "UI_view2d.hh"Go to the source code of this file.
Functions | |
| bool | ED_region_overlap_isect_x (const ARegion *region, const int event_x) |
| bool | ED_region_overlap_isect_y (const ARegion *region, const int event_y) |
| bool | ED_region_overlap_isect_xy (const ARegion *region, const int event_xy[2]) |
| bool | ED_region_overlap_isect_any_xy (const ScrArea *area, const int event_xy[2]) |
| bool | ED_region_panel_category_gutter_calc_rect (const ARegion *region, rcti *r_region_gutter) |
| bool | ED_region_panel_category_gutter_isect_xy (const ARegion *region, const int event_xy[2]) |
| bool | ED_region_overlap_isect_x_with_margin (const ARegion *region, const int event_x, const int margin) |
| bool | ED_region_overlap_isect_y_with_margin (const ARegion *region, const int event_y, const int margin) |
| bool | ED_region_overlap_isect_xy_with_margin (const ARegion *region, const int event_xy[2], const int margin) |
| bool | ED_region_contains_xy (const ARegion *region, const int event_xy[2]) |
| ARegion * | ED_area_find_region_xy_visual (const ScrArea *area, const int regiontype, const int event_xy[2]) |
Query functions for area/region.
Definition in file area_query.cc.
| ARegion * ED_area_find_region_xy_visual | ( | const ScrArea * | area, |
| int | regiontype, | ||
| const int | event_xy[2] ) |
Similar to BKE_area_find_region_xy() but when event_xy intersects an overlapping region, this returns the region that is visually under the cursor. E.g. when over the transparent part of the region, it returns the region underneath.
The overlapping region is determined using the ED_region_contains_xy() query.
Definition at line 193 of file area_query.cc.
References ED_region_contains_xy(), ELEM, LISTBASE_FOREACH, ScrArea::regionbase, and RGN_TYPE_ANY.
Referenced by wm_drags_draw(), and wm_event_do_handlers_area_regions().
| bool ED_region_contains_xy | ( | const ARegion * | region, |
| const int | event_xy[2] ) |
Definition at line 144 of file area_query.cc.
References ARegion::alignment, BLI_rcti_init_pt_radius(), BLI_rcti_isect_pt_v(), ED_region_overlap_isect_x_with_margin(), ED_region_overlap_isect_xy_with_margin(), ED_region_overlap_isect_y_with_margin(), ED_region_panel_category_gutter_isect_xy(), ELEM, View2D::keeptot, ARegion::overlap, RGN_ALIGN_BOTTOM, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, RGN_ALIGN_TOP, UI_region_but_find_rect_over(), UI_REGION_OVERLAP_MARGIN, ARegion::v2d, V2D_KEEPTOT_STRICT, and ARegion::winrct.
Referenced by ED_area_find_region_xy_visual(), and ED_screen_set_active_region().
| bool ED_region_overlap_isect_any_xy | ( | const ScrArea * | area, |
| const int | event_xy[2] ) |
Definition at line 56 of file area_query.cc.
References ED_region_is_overlap(), ED_region_overlap_isect_xy(), LISTBASE_FOREACH, ScrArea::regionbase, and ScrArea::spacetype.
Referenced by view3d_drop_id_in_main_region_poll_get_id_type(), view3d_drop_in_main_region_poll(), and view3d_ima_drop_poll().
| bool ED_region_overlap_isect_x | ( | const ARegion * | region, |
| const int | event_x ) |
Definition at line 22 of file area_query.cc.
References BLI_assert, BLI_rctf_isect_x(), View2D::mask, ARegion::overlap, View2D::tot, UI_view2d_region_to_view_x(), ARegion::v2d, ARegion::winrct, rcti::xmax, and rcti::xmin.
Referenced by ED_region_overlap_isect_xy().
| bool ED_region_overlap_isect_x_with_margin | ( | const ARegion * | region, |
| const int | event_x, | ||
| const int | margin ) |
Definition at line 102 of file area_query.cc.
References BLI_assert, View2D::mask, ARegion::overlap, View2D::tot, UI_view2d_region_to_view_x(), ARegion::v2d, ARegion::winrct, rctf::xmax, rcti::xmax, rctf::xmin, and rcti::xmin.
Referenced by ED_region_contains_xy(), and ED_region_overlap_isect_xy_with_margin().
| bool ED_region_overlap_isect_xy | ( | const ARegion * | region, |
| const int | event_xy[2] ) |
Definition at line 50 of file area_query.cc.
References ED_region_overlap_isect_x(), and ED_region_overlap_isect_y().
Referenced by ED_region_overlap_isect_any_xy(), and v3d_cursor_snap_poll_fn().
| bool ED_region_overlap_isect_xy_with_margin | ( | const ARegion * | region, |
| const int | event_xy[2], | ||
| const int | margin ) |
Definition at line 136 of file area_query.cc.
References ED_region_overlap_isect_x_with_margin(), and ED_region_overlap_isect_y_with_margin().
Referenced by ED_region_contains_xy().
| bool ED_region_overlap_isect_y | ( | const ARegion * | region, |
| const int | event_y ) |
Definition at line 36 of file area_query.cc.
References BLI_assert, BLI_rctf_isect_y(), View2D::mask, ARegion::overlap, View2D::tot, UI_view2d_region_to_view_y(), ARegion::v2d, ARegion::winrct, rcti::ymax, and rcti::ymin.
Referenced by ED_region_overlap_isect_xy().
| bool ED_region_overlap_isect_y_with_margin | ( | const ARegion * | region, |
| const int | event_y, | ||
| const int | margin ) |
Definition at line 119 of file area_query.cc.
References BLI_assert, View2D::mask, ARegion::overlap, View2D::tot, UI_view2d_region_to_view_y(), ARegion::v2d, ARegion::winrct, rctf::ymax, rcti::ymax, rctf::ymin, and rcti::ymin.
Referenced by ED_region_contains_xy(), and ED_region_overlap_isect_xy_with_margin().
Definition at line 71 of file area_query.cc.
References ARegion::alignment, BLI_assert_msg, RGN_ALIGN_ENUM_FROM_MASK, RGN_ALIGN_LEFT, RGN_ALIGN_RIGHT, round_fl_to_int(), UI_panel_category_is_visible(), UI_PANEL_CATEGORY_MARGIN_WIDTH, UI_view2d_scale_get_x(), ARegion::v2d, ARegion::winrct, rcti::xmax, and rcti::xmin.
Referenced by ED_region_panel_category_gutter_isect_xy().
| bool ED_region_panel_category_gutter_isect_xy | ( | const ARegion * | region, |
| const int | event_xy[2] ) |
Definition at line 93 of file area_query.cc.
References BLI_rcti_isect_pt_v(), and ED_region_panel_category_gutter_calc_rect().
Referenced by ED_region_contains_xy(), ui_panel_category_show_active_tab(), view_pan_invoke(), view_scrolldown_exec(), and view_scrollup_exec().