summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-11-03 10:07:00 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2013-11-03 10:07:00 -0500
commit08b485db75082a21c3814b0a4517f2b2fc994b77 (patch)
tree9ab7d5bf9190977d58767de9e246bf24fbe628a8 /gtk2_ardour
parent85daa31ab56b078c556addb3c9faee0f88697c4d (diff)
send enter events to EVERY newly entered item (ignore the bool return from the event handler); other canvas debugging aids;switch items_at_point() to use canvas coordinates
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/automation_time_axis.cc7
-rw-r--r--gtk2_ardour/editor_canvas.cc3
-rw-r--r--gtk2_ardour/ghostregion.cc2
-rw-r--r--gtk2_ardour/route_time_axis.cc7
-rw-r--r--gtk2_ardour/time_axis_view.cc6
-rw-r--r--gtk2_ardour/time_axis_view.h2
6 files changed, 24 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index fd3c7aab52..21360bcab7 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -31,6 +31,8 @@
#include "ardour/route.h"
#include "ardour/session.h"
+#include "canvas/debug.h"
+
#include "ardour_ui.h"
#include "automation_time_axis.h"
#include "automation_streamview.h"
@@ -88,6 +90,10 @@ AutomationTimeAxisView::AutomationTimeAxisView (
, auto_button (X_("")) /* force addition of a label */
, _show_regions (show_regions)
{
+ CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name()));
+ CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, r->name()));
+ CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, r->name()));
+
if (!have_name_font) {
name_font = get_font_for_style (X_("AutomationTrackName"));
have_name_font = true;
@@ -109,6 +115,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
first_call_to_set_height = true;
_base_rect = new ArdourCanvas::Rectangle (_canvas_display);
+ CANVAS_DEBUG_NAME (_base_rect, string_compose ("base rect for %1", _name));
_base_rect->set_x1 (ArdourCanvas::COORD_MAX);
_base_rect->set_outline_color (ARDOUR_UI::config()->get_canvasvar_AutomationTrackOutline());
diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc
index e0ceb7a8e2..ac4c845dd6 100644
--- a/gtk2_ardour/editor_canvas.cc
+++ b/gtk2_ardour/editor_canvas.cc
@@ -91,11 +91,14 @@ Editor::initialize_canvas ()
/* a group to hold time (measure) lines */
time_line_group = new ArdourCanvas::Group (_track_canvas->root());
+ CANVAS_DEBUG_NAME (time_line_group, "time line group");
transport_loop_range_rect = new ArdourCanvas::Rectangle (time_line_group, ArdourCanvas::Rect (0.0, 0.0, 0.0, ArdourCanvas::COORD_MAX));
+ CANVAS_DEBUG_NAME (transport_loop_range_rect, "loop rect");
transport_loop_range_rect->hide();
transport_punch_range_rect = new ArdourCanvas::Rectangle (time_line_group, ArdourCanvas::Rect (0.0, 0.0, 0.0, ArdourCanvas::COORD_MAX));
+ CANVAS_DEBUG_NAME (transport_punch_range_rect, "punch rect");
transport_punch_range_rect->hide();
_trackview_group = new ArdourCanvas::Group (_track_canvas->root());
diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc
index 5350a0e459..f75982cc76 100644
--- a/gtk2_ardour/ghostregion.cc
+++ b/gtk2_ardour/ghostregion.cc
@@ -43,7 +43,7 @@ GhostRegion::GhostRegion (ArdourCanvas::Group* parent, TimeAxisView& tv, TimeAxi
, source_trackview (source_tv)
{
group = new ArdourCanvas::Group (parent);
- CANVAS_DEBUG_NAME (group, "ghost region group");
+ CANVAS_DEBUG_NAME (group, "ghost region");
group->set_position (ArdourCanvas::Duple (initial_pos, 0));
base_rect = new ArdourCanvas::Rectangle (group);
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index ad2ad2233d..b1f758fd26 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -50,8 +50,11 @@
#include "ardour/route_group.h"
#include "ardour/session.h"
#include "ardour/session_playlists.h"
+
#include "evoral/Parameter.hpp"
+#include "canvas/debug.h"
+
#include "ardour_ui.h"
#include "ardour_button.h"
#include "debug.h"
@@ -111,6 +114,10 @@ RouteTimeAxisView::set_route (boost::shared_ptr<Route> rt)
{
RouteUI::set_route (rt);
+ CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for %1", rt->name()));
+ CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for %1", rt->name()));
+ CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for %1", rt->name()));
+
int meter_width = 3;
if (_route && _route->shared_peak_meter()->input_streams().n_total() == 1) {
meter_width = 6;
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index fa181476cf..c45887cb7e 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -26,6 +26,7 @@
#include "pbd/error.h"
#include "pbd/convert.h"
+#include "pbd/stacktrace.h"
#include <gtkmm2ext/doi.h>
#include <gtkmm2ext/utils.h>
@@ -76,6 +77,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
, display_menu (0)
, parent (rent)
, selection_group (0)
+ , _ghost_group (0)
, _hidden (false)
, in_destructor (false)
, _size_menu (0)
@@ -89,7 +91,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
, _resize_drag_start (-1)
, _preresize_cursor (0)
, _have_preresize_cursor (false)
- , _ghost_group (0)
, _ebox_release_can_act (true)
{
if (extra_height == 0) {
@@ -97,13 +98,16 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
}
_canvas_display = new Group (ed.get_trackview_group (), ArdourCanvas::Duple (0.0, 0.0));
+ CANVAS_DEBUG_NAME (_canvas_display, "main for TAV");
_canvas_display->hide(); // reveal as needed
selection_group = new Group (_canvas_display);
+ CANVAS_DEBUG_NAME (selection_group, "selection for TAV");
selection_group->set_data (X_("timeselection"), (void *) 1);
selection_group->hide();
_ghost_group = new Group (_canvas_display);
+ CANVAS_DEBUG_NAME (_ghost_group, "ghost for TAV");
_ghost_group->lower_to_bottom();
_ghost_group->show();
diff --git a/gtk2_ardour/time_axis_view.h b/gtk2_ardour/time_axis_view.h
index 7dc3ba9494..a22ba94439 100644
--- a/gtk2_ardour/time_axis_view.h
+++ b/gtk2_ardour/time_axis_view.h
@@ -212,6 +212,7 @@ class TimeAxisView : public virtual AxisView
Gtk::Menu* display_menu; /* The standard LHS Track control popup-menus */
TimeAxisView* parent;
ArdourCanvas::Group* selection_group;
+ ArdourCanvas::Group* _ghost_group;
std::list<GhostRegion*> ghosts;
std::list<SelectionRect*> free_selection_rects;
std::list<SelectionRect*> used_selection_rects;
@@ -284,7 +285,6 @@ private:
double _resize_drag_start;
GdkCursor* _preresize_cursor;
bool _have_preresize_cursor;
- ArdourCanvas::Group* _ghost_group;
bool _ebox_release_can_act;
static uint32_t button_height;