Remove ugly/fragile special case in `view2d_masks()` that would clamp the scrollbar-masks by the scrubbing UI. It's now possible to pass custom scrollbar-masks to `View2D` via `UI_view2d_scrollers_draw()`. So use this instead, making region code control its own masks, rather than relying on special case handling in generic `View2D` code. Also update comment in `scroller_activate_init()` to make the implicit relationship explicit. Alternative to, and based on the investigation in !117685. Pull Request: https://projects.blender.org/blender/blender/pulls/117984
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
/* SPDX-FileCopyrightText: 2019 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup editors
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
struct bContext;
|
|
struct bDopeSheet;
|
|
struct wmEvent;
|
|
struct rcti;
|
|
|
|
void ED_time_scrub_draw_current_frame(const ARegion *region,
|
|
const Scene *scene,
|
|
bool display_seconds);
|
|
|
|
void ED_time_scrub_draw(const ARegion *region,
|
|
const Scene *scene,
|
|
bool display_seconds,
|
|
bool discrete_frames);
|
|
/**
|
|
* Scroll-bars shouldn't overlap the time scrub UI. So this returns a mask adjusted to exclude it,
|
|
* which can be passed to #UI_view2d_scrollers_draw().
|
|
*
|
|
* \param scroller_mask: Typically #View2D.mask (or something smaller, if further parts have been
|
|
* masked out already).
|
|
*/
|
|
rcti ED_time_scrub_clamp_scroller_mask(const rcti &scroller_mask);
|
|
|
|
bool ED_time_scrub_event_in_region(const ARegion *region, const wmEvent *event);
|
|
|
|
void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDopeSheet *dopesheet);
|
|
void ED_time_scrub_region_rect_get(const ARegion *region, rcti *rect);
|