X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Faudio_streamview.cc;h=85812b43d6d49ce90015b1f0cc21340932a8b6cf;hb=3705a2d6307cf443acbf8419b0e0f560591f2016;hp=ed585a91e1989f3e08b2eddd74e53c8415bb3514;hpb=bc89fe0147c04b67141936d109c00dfd4d69cc4b;p=ardour.git diff --git a/gtk2_ardour/audio_streamview.cc b/gtk2_ardour/audio_streamview.cc index ed585a91e1..85812b43d6 100644 --- a/gtk2_ardour/audio_streamview.cc +++ b/gtk2_ardour/audio_streamview.cc @@ -65,7 +65,7 @@ AudioStreamView::AudioStreamView (AudioTimeAxisView& tv) color_handler (); _amplitude_above_axis = 1.0; - use_rec_regions = tv.editor.show_waveforms_recording (); + use_rec_regions = tv.editor().show_waveforms_recording (); } AudioStreamView::~AudioStreamView () @@ -155,6 +155,7 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr r, bool wai region_view->init (region_color, wait_for_waves); region_view->set_amplitude_above_axis(_amplitude_above_axis); + region_view->set_height (child_height ()); region_views.push_front (region_view); /* if its the special single-sample length that we use for rec-regions, make it @@ -188,7 +189,7 @@ AudioStreamView::add_region_view_internal (boost::shared_ptr r, bool wai /* follow global waveform setting */ - region_view->set_waveform_visible(_trackview.editor.show_waveforms()); + region_view->set_waveform_visible(_trackview.editor().show_waveforms()); /* catch regionview going away */ region->GoingAway.connect (bind (mem_fun (*this, &AudioStreamView::remove_region_view), boost::weak_ptr (r))); @@ -307,7 +308,7 @@ AudioStreamView::add_crossfade (boost::shared_ptr crossfade) for (list::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) { if ((*i)->crossfade == crossfade) { - if (!crossfades_visible || layer_display == Stacked) { + if (!crossfades_visible || _layer_display == Stacked) { (*i)->hide(); } else { (*i)->show (); @@ -330,7 +331,7 @@ AudioStreamView::add_crossfade (boost::shared_ptr crossfade) } } - CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display, + CrossfadeView *cv = new CrossfadeView (_trackview.canvas_display (), _trackview, crossfade, _samples_per_unit, @@ -339,7 +340,7 @@ AudioStreamView::add_crossfade (boost::shared_ptr crossfade) cv->set_valid (true); crossfade->Invalidated.connect (mem_fun (*this, &AudioStreamView::remove_crossfade)); crossfade_views.push_back (cv); - if (!Config->get_xfades_visible() || !crossfades_visible || layer_display == Stacked) { + if (!Config->get_xfades_visible() || !crossfades_visible || _layer_display == Stacked) { cv->hide (); } } @@ -372,7 +373,7 @@ AudioStreamView::redisplay_diskstream () for (xi = crossfade_views.begin(); xi != crossfade_views.end(); ++xi) { (*xi)->set_valid (false); - if ((*xi)->visible() && layer_display != Stacked) { + if ((*xi)->visible() && _layer_display != Stacked) { (*xi)->show (); } } @@ -534,7 +535,6 @@ AudioStreamView::setup_rec_box () (RegionFactory::create (sources, start, 1 , "", 0, (Region::Flag)(Region::DefaultFlags | Region::DoNotSaveState), false))); assert(region); region->set_position (_trackview.session().transport_frame(), this); - rec_regions.push_back (make_pair(region, (RegionView*)0)); } @@ -545,7 +545,7 @@ AudioStreamView::setup_rec_box () at = _trackview.audio_track(); /* we know what it is already */ boost::shared_ptr ds = at->audio_diskstream(); nframes_t frame_pos = ds->current_capture_start (); - gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos); + gdouble xstart = _trackview.editor().frame_to_pixel (frame_pos); gdouble xend; uint32_t fill_color; @@ -569,7 +569,7 @@ AudioStreamView::setup_rec_box () rec_rect->property_x1() = xstart; rec_rect->property_y1() = 1.0; rec_rect->property_x2() = xend; - rec_rect->property_y2() = (double) _trackview.current_height() - 1; + rec_rect->property_y2() = child_height (); rec_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_TimeAxisFrame.get(); rec_rect->property_outline_what() = 0x1 | 0x2 | 0x4 | 0x8; rec_rect->property_fill_color_rgba() = fill_color; @@ -720,7 +720,7 @@ AudioStreamView::update_rec_regions () /* also update rect */ ArdourCanvas::SimpleRect * rect = rec_rects[n].rectangle; - gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length()); + gdouble xend = _trackview.editor().frame_to_pixel (region->position() + region->length()); rect->property_x2() = xend; } } @@ -806,7 +806,7 @@ void AudioStreamView::reveal_xfades_involving (AudioRegionView& rv) { for (list::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) { - if ((*i)->crossfade->involves (rv.audio_region()) && (*i)->visible() && layer_display != Stacked) { + if ((*i)->crossfade->involves (rv.audio_region()) && (*i)->visible() && _layer_display != Stacked) { (*i)->show (); } } @@ -836,7 +836,7 @@ AudioStreamView::update_contents_height () StreamView::update_contents_height (); for (CrossfadeViewList::iterator i = crossfade_views.begin(); i != crossfade_views.end(); ++i) { - if (layer_display == Overlaid) { + if (_layer_display == Overlaid) { (*i)->show (); (*i)->set_height (height); } else {