Blender
V3.3
|
#include "DNA_userdef_types.h"
#include "BLI_blenlib.h"
#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "RNA_types.h"
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_view2d.h"
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.c.
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 178 of file area_query.c.
References blender::compositor::area(), ED_region_contains_xy(), ELEM, LISTBASE_FOREACH, NULL, and RGN_TYPE_ANY.
Referenced by wm_drags_draw(), and wm_event_do_handlers_area_regions().
Definition at line 129 of file area_query.c.
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, NULL, 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().
Definition at line 50 of file area_query.c.
References blender::compositor::area(), ED_region_is_overlap(), ED_region_overlap_isect_xy(), and LISTBASE_FOREACH.
Referenced by image_drop_poll(), view3d_drop_id_in_main_region_poll_get_id_type(), view3d_drop_in_main_region_poll(), and view3d_ima_drop_poll().
Definition at line 22 of file area_query.c.
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 93 of file area_query.c.
References BLI_assert, View2D::mask, ARegion::overlap, View2D::tot, UI_view2d_region_to_view_x(), ARegion::v2d, ARegion::winrct, rcti::xmax, rctf::xmax, rcti::xmin, and rctf::xmin.
Referenced by ED_region_contains_xy(), and ED_region_overlap_isect_xy_with_margin().
Definition at line 44 of file area_query.c.
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 121 of file area_query.c.
References ED_region_overlap_isect_x_with_margin(), and ED_region_overlap_isect_y_with_margin().
Referenced by ED_region_contains_xy().
Definition at line 33 of file area_query.c.
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 107 of file area_query.c.
References BLI_assert, View2D::mask, ARegion::overlap, View2D::tot, UI_view2d_region_to_view_y(), ARegion::v2d, ARegion::winrct, rcti::ymax, rctf::ymax, rcti::ymin, and rctf::ymin.
Referenced by ED_region_contains_xy(), and ED_region_overlap_isect_xy_with_margin().
Definition at line 62 of file area_query.c.
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().
Definition at line 84 of file area_query.c.
References BLI_rcti_isect_pt_v(), and ED_region_panel_category_gutter_calc_rect().
Referenced by ED_region_contains_xy().