UI: Attempt to restore region for redo from Adjust Last Operation panel #108892
|
@ -489,37 +489,39 @@ struct ARegion *BKE_region_find_in_listbase_by_type(const struct ListBase *regio
|
|||
* Use #BKE_spacedata_find_region_type if that may be the case.
|
||||
*/
|
||||
struct ARegion *BKE_area_find_region_type(const struct ScrArea *area, int type);
|
||||
struct ARegion *BKE_area_find_region_active_win(struct ScrArea *area);
|
||||
struct ARegion *BKE_area_find_region_xy(struct ScrArea *area, int regiontype, const int xy[2])
|
||||
ATTR_NONNULL(3);
|
||||
struct ARegion *BKE_area_find_region_active_win(const struct ScrArea *area);
|
||||
struct ARegion *BKE_area_find_region_xy(const struct ScrArea *area,
|
||||
int regiontype,
|
||||
const int xy[2]) ATTR_NONNULL(3);
|
||||
/**
|
||||
* \note This is only for screen level regions (typically menus/popups).
|
||||
*/
|
||||
struct ARegion *BKE_screen_find_region_xy(struct bScreen *screen,
|
||||
struct ARegion *BKE_screen_find_region_xy(const struct bScreen *screen,
|
||||
int regiontype,
|
||||
const int xy[2]) ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_NONNULL(1, 3);
|
||||
|
||||
struct ARegion *BKE_screen_find_main_region_at_xy(struct bScreen *screen,
|
||||
struct ARegion *BKE_screen_find_main_region_at_xy(const struct bScreen *screen,
|
||||
int space_type,
|
||||
const int xy[2]) ATTR_NONNULL(1, 3);
|
||||
/**
|
||||
* \note Ideally we can get the area from the context,
|
||||
* there are a few places however where this isn't practical.
|
||||
*/
|
||||
struct ScrArea *BKE_screen_find_area_from_space(struct bScreen *screen,
|
||||
struct SpaceLink *sl) ATTR_WARN_UNUSED_RESULT
|
||||
struct ScrArea *BKE_screen_find_area_from_space(const struct bScreen *screen,
|
||||
const struct SpaceLink *sl) ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_NONNULL(1, 2);
|
||||
/**
|
||||
* \note Using this function is generally a last resort, you really want to be
|
||||
* using the context when you can - campbell
|
||||
*/
|
||||
struct ScrArea *BKE_screen_find_big_area(struct bScreen *screen, int spacetype, short min);
|
||||
struct ScrArea *BKE_screen_find_big_area(const struct bScreen *screen, int spacetype, short min);
|
||||
struct ScrArea *BKE_screen_area_map_find_area_xy(const struct ScrAreaMap *areamap,
|
||||
int spacetype,
|
||||
const int xy[2]) ATTR_NONNULL(1, 3);
|
||||
struct ScrArea *BKE_screen_find_area_xy(struct bScreen *screen, int spacetype, const int xy[2])
|
||||
ATTR_NONNULL(1, 3);
|
||||
struct ScrArea *BKE_screen_find_area_xy(const struct bScreen *screen,
|
||||
int spacetype,
|
||||
const int xy[2]) ATTR_NONNULL(1, 3);
|
||||
|
||||
void BKE_screen_gizmo_tag_refresh(struct bScreen *screen);
|
||||
|
||||
|
|
|
@ -986,7 +986,7 @@ ARegion *BKE_area_find_region_type(const ScrArea *area, int region_type)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
ARegion *BKE_area_find_region_active_win(ScrArea *area)
|
||||
ARegion *BKE_area_find_region_active_win(const ScrArea *area)
|
||||
{
|
||||
if (area == nullptr) {
|
||||
return nullptr;
|
||||
|
@ -1002,7 +1002,7 @@ ARegion *BKE_area_find_region_active_win(ScrArea *area)
|
|||
return BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
|
||||
}
|
||||
|
||||
ARegion *BKE_area_find_region_xy(ScrArea *area, const int regiontype, const int xy[2])
|
||||
ARegion *BKE_area_find_region_xy(const ScrArea *area, const int regiontype, const int xy[2])
|
||||
{
|
||||
if (area == nullptr) {
|
||||
return nullptr;
|
||||
|
@ -1018,7 +1018,7 @@ ARegion *BKE_area_find_region_xy(ScrArea *area, const int regiontype, const int
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
ARegion *BKE_screen_find_region_xy(bScreen *screen, const int regiontype, const int xy[2])
|
||||
ARegion *BKE_screen_find_region_xy(const bScreen *screen, const int regiontype, const int xy[2])
|
||||
{
|
||||
LISTBASE_FOREACH (ARegion *, region, &screen->regionbase) {
|
||||
if (ELEM(regiontype, RGN_TYPE_ANY, region->regiontype)) {
|
||||
|
@ -1030,7 +1030,7 @@ ARegion *BKE_screen_find_region_xy(bScreen *screen, const int regiontype, const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
ScrArea *BKE_screen_find_area_from_space(bScreen *screen, SpaceLink *sl)
|
||||
ScrArea *BKE_screen_find_area_from_space(const bScreen *screen, const SpaceLink *sl)
|
||||
{
|
||||
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
|
||||
if (BLI_findindex(&area->spacedata, sl) != -1) {
|
||||
|
@ -1041,7 +1041,7 @@ ScrArea *BKE_screen_find_area_from_space(bScreen *screen, SpaceLink *sl)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
ScrArea *BKE_screen_find_big_area(bScreen *screen, const int spacetype, const short min)
|
||||
ScrArea *BKE_screen_find_big_area(const bScreen *screen, const int spacetype, const short min)
|
||||
{
|
||||
ScrArea *big = nullptr;
|
||||
int maxsize = 0;
|
||||
|
@ -1078,7 +1078,7 @@ ScrArea *BKE_screen_area_map_find_area_xy(const ScrAreaMap *areamap,
|
|||
}
|
||||
return nullptr;
|
||||
}
|
||||
ScrArea *BKE_screen_find_area_xy(bScreen *screen, const int spacetype, const int xy[2])
|
||||
ScrArea *BKE_screen_find_area_xy(const bScreen *screen, const int spacetype, const int xy[2])
|
||||
{
|
||||
return BKE_screen_area_map_find_area_xy(AREAMAP_FROM_SCREEN(screen), spacetype, xy);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue