mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 03:17:39 +01:00
add Editor::inside_track_area(double x, double y)
This commit is contained in:
parent
63dcc20fdb
commit
f48d821346
2 changed files with 15 additions and 0 deletions
|
|
@ -80,6 +80,7 @@
|
|||
#include "ardour/utils.h"
|
||||
|
||||
#include "canvas/debug.h"
|
||||
#include "canvas/scroll_group.h"
|
||||
#include "canvas/text.h"
|
||||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
|
@ -2580,6 +2581,18 @@ Editor::get_state ()
|
|||
return *node;
|
||||
}
|
||||
|
||||
/** Return true if coordinate given by (@param x, @param @y) is within what we define as the "track area".
|
||||
* Return false otherwise.
|
||||
*
|
||||
* @param x : x-axis coordinate in canvas coordinate space
|
||||
* @param y : x-axis coordinate in canvas coordinate space
|
||||
*/
|
||||
bool
|
||||
Editor::inside_track_area (double x, double y) const
|
||||
{
|
||||
return hv_scroll_group->covers (ArdourCanvas::Duple (x, y));
|
||||
}
|
||||
|
||||
/** if @param trackview_relative_offset is true, @param y y is an offset into the trackview area, in pixel units
|
||||
* if @param trackview_relative_offset is false, @param y y is a global canvas * coordinate, in pixel units
|
||||
*
|
||||
|
|
|
|||
|
|
@ -485,6 +485,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
|
||||
ArdourCanvas::GtkCanvasViewport* get_track_canvas () const;
|
||||
|
||||
bool inside_track_area (double x, double y) const;
|
||||
|
||||
void override_visible_track_count ();
|
||||
|
||||
/* Ruler metrics methods */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue