Add convenience methods to test for active drags

This commit is contained in:
Robin Gareus 2019-11-09 01:35:55 +01:00
parent 3cecc3d26b
commit a701882e66
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 17 additions and 0 deletions

View file

@ -493,6 +493,9 @@ public:
return _drags; return _drags;
} }
bool drag_active () const;
bool preview_video_drag_active () const;
void maybe_autoscroll (bool, bool, bool); void maybe_autoscroll (bool, bool, bool);
bool autoscroll_active() const; bool autoscroll_active() const;

View file

@ -587,6 +587,18 @@ Editor::maybe_autoscroll (bool allow_horiz, bool allow_vert, bool from_headers)
} }
} }
bool
Editor::drag_active () const
{
return _drags->active();
}
bool
Editor::preview_video_drag_active () const
{
return false;
}
bool bool
Editor::autoscroll_active () const Editor::autoscroll_active () const
{ {

View file

@ -447,6 +447,8 @@ public:
virtual TrackViewList const & get_track_views () const = 0; virtual TrackViewList const & get_track_views () const = 0;
virtual DragManager* drags () const = 0; virtual DragManager* drags () const = 0;
virtual bool drag_active () const = 0;
virtual bool preview_video_drag_active () const = 0;
virtual void maybe_autoscroll (bool, bool, bool from_headers) = 0; virtual void maybe_autoscroll (bool, bool, bool from_headers) = 0;
virtual void stop_canvas_autoscroll () = 0; virtual void stop_canvas_autoscroll () = 0;
virtual bool autoscroll_active() const = 0; virtual bool autoscroll_active() const = 0;