using namespace Gtk;
using namespace Gdk;
using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
using namespace PBD;
using namespace Editing;
using namespace ArdourCanvas;
compute_heights ();
}
- _canvas_display = new Group (ed.get_trackview_group (), ArdourCanvas::Duple (0.0, 0.0));
+ _canvas_display = new ArdourCanvas::Container (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);
+ selection_group = new ArdourCanvas::Container (_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);
+
+ _ghost_group = new ArdourCanvas::Container (_canvas_display);
CANVAS_DEBUG_NAME (_ghost_group, "ghost for TAV");
_ghost_group->lower_to_bottom();
_ghost_group->show();
bool
TimeAxisView::controls_ebox_scroll (GdkEventScroll* ev)
{
+ switch (ev->direction) {
+ case GDK_SCROLL_UP:
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
+ /* See Editor::_stepping_axis_view for notes on this hack */
+ Editor& e = dynamic_cast<Editor&> (_editor);
+ if (!e.stepping_axis_view ()) {
+ e.set_stepping_axis_view (this);
+ }
+ e.stepping_axis_view()->step_height (false);
+ return true;
+ }
+ break;
+
+ case GDK_SCROLL_DOWN:
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::ScrollZoomVerticalModifier)) {
+ /* See Editor::_stepping_axis_view for notes on this hack */
+ Editor& e = dynamic_cast<Editor&> (_editor);
+ if (!e.stepping_axis_view ()) {
+ e.set_stepping_axis_view (this);
+ }
+ e.stepping_axis_view()->step_height (true);
+ return true;
+ }
+ break;
+
+ default:
+ /* no handling for left/right, yet */
+ break;
+ }
+
/* Just forward to the normal canvas scroll method. The coordinate
systems are different but since the canvas is always larger than the
track headers, and aligned with the trackview area, this will work.
In the not too distant future this layout is going away anyway and
headers will be on the canvas.
*/
- return _editor.canvas_scroll_event (ev);
+ return _editor.canvas_scroll_event (ev, false);
}
bool
}
if ((i != allviews.end()) && (*i != this) && !(*i)->hidden()) {
- _editor.ensure_time_axis_view_is_visible (**i);
+ _editor.ensure_time_axis_view_is_visible (**i, false);
(*i)->begin_name_edit ();
}
}
if ((i != allviews.end()) && (*i != this) && !(*i)->hidden()) {
- _editor.ensure_time_axis_view_is_visible (**i);
+ _editor.ensure_time_axis_view_is_visible (**i, false);
(*i)->begin_name_edit ();
}
}
x1 = _editor.sample_to_pixel (start);
x2 = _editor.sample_to_pixel (start + cnt - 1);
- y2 = current_height();
+ y2 = current_height() - 1;
- rect->rect->set (ArdourCanvas::Rect (x1, 1, x2, y2));
+ rect->rect->set (ArdourCanvas::Rect (x1, 0, x2, y2));
// trim boxes are at the top for selections
rect->rect->set_fill_color (ARDOUR_UI::config()->get_canvasvar_SelectionRect());
rect->start_trim = new ArdourCanvas::Rectangle (selection_group);
- CANVAS_DEBUG_NAME (rect->rect, "selection rect start trim");
+ CANVAS_DEBUG_NAME (rect->start_trim, "selection rect start trim");
rect->start_trim->set_outline (false);
rect->start_trim->set_fill (false);
rect->end_trim = new ArdourCanvas::Rectangle (selection_group);
- CANVAS_DEBUG_NAME (rect->rect, "selection rect end trim");
+ CANVAS_DEBUG_NAME (rect->end_trim, "selection rect end trim");
rect->end_trim->set_outline (false);
rect->end_trim->set_fill (false);