final use of "stop_signal.h" removed
[ardour.git] / gtk2_ardour / editor.cc
index b4e952970b2c4d53595b71d8539223ff302ae5cf..62edad9991165d038ea656418e608ba7406fd64e 100644 (file)
@@ -145,10 +145,19 @@ static const gchar *_snap_type_strings[] = {
        N_("Seconds"),
        N_("Minutes"),
        N_("Beats/32"),
+       N_("Beats/28"),
+       N_("Beats/24"),
        N_("Beats/16"),
+       N_("Beats/14"),
+       N_("Beats/12"),
+       N_("Beats/10"),
        N_("Beats/8"),
+       N_("Beats/7"),
+       N_("Beats/6"),
+       N_("Beats/5"),
        N_("Beats/4"),
        N_("Beats/3"),
+       N_("Beats/2"),
        N_("Beats"),
        N_("Bars"),
        N_("Marks"),
@@ -262,7 +271,6 @@ Editor::Editor ()
          */
 
        , vertical_adjustment (0.0, 0.0, 10.0, 400.0)
-       , horizontal_adjustment (0.0, 0.0, 20.0, 1200.0)
 
          /* tool bar related */
 
@@ -346,7 +354,7 @@ Editor::Editor ()
        session_range_marker_menu = 0;
        range_marker_menu = 0;
        marker_menu_item = 0;
-       tm_marker_menu = 0;
+       tempo_or_meter_marker_menu = 0;
        transport_marker_menu = 0;
        new_transport_marker_menu = 0;
        editor_mixer_strip_width = Wide;
@@ -468,7 +476,6 @@ Editor::Editor ()
        selection->MarkersChanged.connect (sigc::mem_fun(*this, &Editor::marker_selection_changed));
 
        edit_controls_vbox.set_spacing (0);
-       horizontal_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &Editor::scroll_canvas_horizontally), false);
        vertical_adjustment.signal_value_changed().connect (sigc::mem_fun(*this, &Editor::tie_vertical_scrolling), true);
        track_canvas->signal_map_event().connect (sigc::mem_fun (*this, &Editor::track_canvas_map_handler));
 
@@ -547,7 +554,7 @@ Editor::Editor ()
        nlabel = manage (new Label (_("Regions")));
        nlabel->set_angle (-90);
        the_notebook.append_page (_regions->widget (), *nlabel);
-       nlabel = manage (new Label (_("Tracks/Busses")));
+       nlabel = manage (new Label (_("Tracks & Busses")));
        nlabel->set_angle (-90);
        the_notebook.append_page (_routes->widget (), *nlabel);
        nlabel = manage (new Label (_("Snapshots")));
@@ -992,24 +999,6 @@ Editor::center_screen_internal (nframes64_t frame, float page)
        reset_x_origin (frame);
 }
 
-void
-Editor::handle_new_duration ()
-{
-       if (!_session) {
-               return;
-       }
-
-       ENSURE_GUI_THREAD (*this, &Editor::handle_new_duration)
-       nframes64_t new_end = _session->current_end_frame() + (nframes64_t) floorf (current_page_frames() * 0.10f);
-
-       horizontal_adjustment.set_upper (new_end / frames_per_unit);
-       horizontal_adjustment.set_page_size (current_page_frames()/frames_per_unit);
-
-       if (horizontal_adjustment.get_value() + _canvas_width > horizontal_adjustment.get_upper()) {
-               horizontal_adjustment.set_value (horizontal_adjustment.get_upper() - _canvas_width);
-       }
-       //cerr << "Editor::handle_new_duration () called ha v:l:u:ps:lcf = " << horizontal_adjustment.get_value() << ":" << horizontal_adjustment.get_lower() << ":" << horizontal_adjustment.get_upper() << ":" << horizontal_adjustment.get_page_size() << ":" << endl;//DEBUG
-}
 
 void
 Editor::update_title ()
@@ -1092,7 +1081,6 @@ Editor::set_session (Session *t)
        _session->TransportStateChange.connect (_session_connections, invalidator (*this), boost::bind (&Editor::map_transport_state, this), gui_context());
        _session->PositionChanged.connect (_session_connections, invalidator (*this), ui_bind (&Editor::map_position_change, this, _1), gui_context());
        _session->RouteAdded.connect (_session_connections, invalidator (*this), ui_bind (&Editor::handle_new_route, this, _1), gui_context());
-       _session->DurationChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::handle_new_duration, this), gui_context());
        _session->DirtyChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_title, this), gui_context());
        _session->TimecodeOffsetChanged.connect (_session_connections, invalidator (*this), boost::bind (&Editor::update_just_timecode, this), gui_context());
        _session->tempo_map().PropertyChanged.connect (_session_connections, invalidator (*this), ui_bind (&Editor::tempo_map_changed, this, _1), gui_context());
@@ -1103,7 +1091,6 @@ Editor::set_session (Session *t)
        _session->locations()->removed.connect (_session_connections, invalidator (*this), ui_bind (&Editor::location_gone, this, _1), gui_context());
        _session->locations()->changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::refresh_location_display, this), gui_context());
        _session->locations()->StateChanged.connect (_session_connections, invalidator (*this), ui_bind (&Editor::refresh_location_display_s, this, _1), gui_context());
-       _session->locations()->session_range_location()->changed.connect (_session_connections, invalidator (*this), ui_bind (&Editor::session_range_location_changed, this, _1), gui_context());
        _session->history().Changed.connect (_session_connections, invalidator (*this), boost::bind (&Editor::history_changed, this), gui_context());
 
        if (Profile->get_sae()) {
@@ -1152,7 +1139,6 @@ Editor::set_session (Session *t)
        _session->config.map_parameters (pc);
 
        refresh_location_display ();
-       handle_new_duration ();
 
        restore_ruler_visibility ();
        //tempo_map_changed (PropertyChange (0));
@@ -1386,16 +1372,13 @@ Editor::popup_track_context_menu (int button, int32_t time, ItemType item_type,
                                        ActionManager::set_sensitive (ActionManager::edit_point_in_region_sensitive_actions, false);
                                }
                        }
-                       /*
                        if (region_edit_menu_split_multichannel_item) {
-                               if (clicked_regionview && clicked_regionview->region().n_channels() > 1) {
-                                       // GTK2FIX find the action, change its sensitivity
-                                       // region_edit_menu_split_multichannel_item->set_sensitive (true);
+                               if (clicked_regionview && clicked_regionview->region()->n_channels() > 1) {
+                                       region_edit_menu_split_multichannel_item->set_sensitive (true);
                                } else {
-                                       // GTK2FIX see above
-                                       // region_edit_menu_split_multichannel_item->set_sensitive (false);
+                                       region_edit_menu_split_multichannel_item->set_sensitive (false);
                                }
-                       }*/
+                       }
                }
                break;
 
@@ -1687,11 +1670,10 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
                        sigc::bind (sigc::mem_fun(*this, &Editor::set_selected_regionview_from_map_event), sv, boost::weak_ptr<Region>(region)));
 
                items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &Editor::rename_region)));
-               if (mr && internal_editing()) {
-                       items.push_back (MenuElem (_("List editor..."), sigc::mem_fun(*this, &Editor::show_midi_list_editor)));
-               } else {
-                       items.push_back (MenuElem (_("Region Properties..."), sigc::mem_fun(*this, &Editor::edit_region)));
+               if (mr) {
+                       items.push_back (MenuElem (_("List Editor..."), sigc::mem_fun(*this, &Editor::show_midi_list_editor)));
                }
+               items.push_back (MenuElem (_("Region Properties..."), sigc::mem_fun(*this, &Editor::edit_region)));
        }
 
        items.push_back (MenuElem (_("Raise to Top Layer"), sigc::mem_fun(*this, &Editor::raise_region_to_top)));
@@ -1705,11 +1687,11 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
        items.push_back (SeparatorElem());
 
        items.push_back (MenuElem (_("Audition"), sigc::mem_fun(*this, &Editor::play_selected_region)));
-       items.push_back (MenuElem (_("Export"), sigc::mem_fun(*this, &Editor::export_region)));
+       items.push_back (MenuElem (_("Export..."), sigc::mem_fun(*this, &Editor::export_region)));
        items.push_back (MenuElem (_("Bounce"), sigc::mem_fun(*this, &Editor::bounce_region_selection)));
 
        if (ar) {
-               items.push_back (MenuElem (_("Spectral Analysis"), sigc::mem_fun(*this, &Editor::analyze_region_selection)));
+               items.push_back (MenuElem (_("Spectral Analysis..."), sigc::mem_fun(*this, &Editor::analyze_region_selection)));
        }
 
        items.push_back (SeparatorElem());
@@ -1742,7 +1724,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
                break;
        }
 
-       bbt_glue_item->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &Editor::set_region_lock_style), Region::MusicTime));
+       bbt_glue_item->signal_activate().connect (sigc::mem_fun (*this, &Editor::toggle_region_lock_style));
 
        items.push_back (CheckMenuElem (_("Mute")));
        CheckMenuItem* region_mute_item = static_cast<CheckMenuItem*>(&items.back());
@@ -1753,7 +1735,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
                fooc.block (false);
        }
         
-        items.push_back (MenuElem (_("Transpose"), mem_fun(*this, &Editor::pitch_shift_regions)));
+        items.push_back (MenuElem (_("Transpose..."), mem_fun(*this, &Editor::pitch_shift_regions)));
 
        if (!Profile->get_sae()) {
                items.push_back (CheckMenuElem (_("Opaque")));
@@ -1803,13 +1785,14 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
                        items.push_back (SeparatorElem());
                }
 
-               items.push_back (MenuElem (_("Normalize"), sigc::mem_fun(*this, &Editor::normalize_region)));
+               items.push_back (MenuElem (_("Normalize..."), sigc::mem_fun(*this, &Editor::normalize_region)));
                if (ar->scale_amplitude() != 1) {
                        items.push_back (MenuElem (_("Reset Gain"), sigc::mem_fun(*this, &Editor::reset_region_scale_amplitude)));
                }
 
        } else if (mr) {
                items.push_back (MenuElem (_("Quantize"), sigc::mem_fun(*this, &Editor::quantize_region)));
+               items.push_back (MenuElem (_("Fork"), sigc::mem_fun(*this, &Editor::fork_region)));
                items.push_back (SeparatorElem());
        }
 
@@ -1873,7 +1856,7 @@ Editor::add_region_context_items (StreamView* sv, boost::shared_ptr<Region> regi
        region_edit_menu_split_multichannel_item = &items.back();
 
        items.push_back (MenuElem (_("Duplicate"), (sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), false))));
-       items.push_back (MenuElem (_("Multi-Duplicate"), (sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true))));
+       items.push_back (MenuElem (_("Multi-Duplicate..."), (sigc::bind (sigc::mem_fun(*this, &Editor::duplicate_dialog), true))));
        items.push_back (MenuElem (_("Fill Track"), (sigc::mem_fun(*this, &Editor::region_fill_track))));
        items.push_back (SeparatorElem());
        items.push_back (MenuElem (_("Remove"), sigc::mem_fun(*this, &Editor::remove_selected_regions)));
@@ -1942,7 +1925,7 @@ Editor::add_selection_context_items (Menu_Helpers::MenuList& edit_items)
        edit_items.push_back (MenuElem (_("Consolidate Range With Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), true, true)));
        edit_items.push_back (MenuElem (_("Bounce Range to Region List"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, false)));
        edit_items.push_back (MenuElem (_("Bounce Range to Region List With Processing"), sigc::bind (sigc::mem_fun(*this, &Editor::bounce_range_selection), false, true)));
-       edit_items.push_back (MenuElem (_("Export Range"), sigc::mem_fun(*this, &Editor::export_range)));
+       edit_items.push_back (MenuElem (_("Export Range"), sigc::mem_fun(*this, &Editor::export_selection)));
 }
 
 
@@ -2116,11 +2099,20 @@ Editor::set_snap_to (SnapType st)
        instant_save ();
 
        switch (_snap_type) {
-       case SnapToAThirtysecondBeat:
-       case SnapToASixteenthBeat:
-       case SnapToAEighthBeat:
-       case SnapToAQuarterBeat:
-       case SnapToAThirdBeat:
+       case SnapToBeatDiv32:
+       case SnapToBeatDiv28:
+       case SnapToBeatDiv24:
+       case SnapToBeatDiv16:
+       case SnapToBeatDiv14:
+       case SnapToBeatDiv12:
+       case SnapToBeatDiv10:
+       case SnapToBeatDiv8:
+       case SnapToBeatDiv7:
+       case SnapToBeatDiv6:
+       case SnapToBeatDiv5:
+       case SnapToBeatDiv4:
+       case SnapToBeatDiv3:
+       case SnapToBeatDiv2:
                compute_bbt_ruler_scale (leftmost_frame, leftmost_frame + current_page_frames());
                update_tempo_based_rulers ();
                break;
@@ -2135,7 +2127,9 @@ Editor::set_snap_to (SnapType st)
        default:
                /* relax */
                break;
-    }
+       }
+
+       SnapChanged (); /* EMIT SIGNAL */
 }
 
 void
@@ -2668,25 +2662,48 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
                start = _session->tempo_map().round_to_beat (start, direction);
                break;
 
-       case SnapToAThirtysecondBeat:
+       case SnapToBeatDiv32:
                start = _session->tempo_map().round_to_beat_subdivision (start, 32, direction);
                break;
-
-       case SnapToASixteenthBeat:
+       case SnapToBeatDiv28:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 28, direction);
+               break;
+       case SnapToBeatDiv24:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 24, direction);
+               break;
+       case SnapToBeatDiv16:
                start = _session->tempo_map().round_to_beat_subdivision (start, 16, direction);
                break;
-
-       case SnapToAEighthBeat:
+       case SnapToBeatDiv14:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 14, direction);
+               break;
+       case SnapToBeatDiv12:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 12, direction);
+               break;
+       case SnapToBeatDiv10:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 10, direction);
+               break;
+       case SnapToBeatDiv8:
                start = _session->tempo_map().round_to_beat_subdivision (start, 8, direction);
                break;
-
-       case SnapToAQuarterBeat:
+       case SnapToBeatDiv7:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 7, direction);
+               break;
+       case SnapToBeatDiv6:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 6, direction);
+               break;
+       case SnapToBeatDiv5:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 5, direction);
+               break;
+       case SnapToBeatDiv4:
                start = _session->tempo_map().round_to_beat_subdivision (start, 4, direction);
                break;
-
-       case SnapToAThirdBeat:
+       case SnapToBeatDiv3:
                start = _session->tempo_map().round_to_beat_subdivision (start, 3, direction);
                break;
+       case SnapToBeatDiv2:
+               start = _session->tempo_map().round_to_beat_subdivision (start, 2, direction);
+               break;
 
        case SnapToMark:
                if (for_mark) {
@@ -2993,7 +3010,6 @@ void
 Editor::setup_tooltips ()
 {
        ARDOUR_UI::instance()->set_tip (mouse_move_button, _("Select/Move Objects"));
-       ARDOUR_UI::instance()->set_tip (mouse_select_button, _("Select/Move Ranges"));
        ARDOUR_UI::instance()->set_tip (mouse_gain_button, _("Draw Gain Automation"));
        ARDOUR_UI::instance()->set_tip (mouse_zoom_button, _("Select Zoom Range"));
        ARDOUR_UI::instance()->set_tip (mouse_timefx_button, _("Stretch/Shrink Regions"));
@@ -3275,7 +3291,7 @@ Editor::duplicate_dialog (bool with_dialog)
        if (with_dialog) {
 
                ArdourDialog win (_("Duplicate"));
-               Label label (_("Number of Duplications:"));
+               Label label (_("Number of duplications:"));
                Adjustment adjustment (1.0, 1.0, 1000000.0, 1.0, 5.0);
                SpinButton spinner (adjustment, 0.0, 1);
                HBox hbox;
@@ -3445,16 +3461,34 @@ Editor::snap_type_selection_done ()
        string choice = snap_type_selector.get_active_text();
        SnapType snaptype = SnapToBeat;
 
-       if (choice == _("Beats/3")) {
-               snaptype = SnapToAThirdBeat;
+       if (choice == _("Beats/2")) {
+               snaptype = SnapToBeatDiv2;
+       } else if (choice == _("Beats/3")) {
+               snaptype = SnapToBeatDiv3;
        } else if (choice == _("Beats/4")) {
-               snaptype = SnapToAQuarterBeat;
+               snaptype = SnapToBeatDiv4;
+       } else if (choice == _("Beats/5")) {
+               snaptype = SnapToBeatDiv5;
+       } else if (choice == _("Beats/6")) {
+               snaptype = SnapToBeatDiv6;
+       } else if (choice == _("Beats/7")) {
+               snaptype = SnapToBeatDiv7;
        } else if (choice == _("Beats/8")) {
-               snaptype = SnapToAEighthBeat;
+               snaptype = SnapToBeatDiv8;
+       } else if (choice == _("Beats/10")) {
+               snaptype = SnapToBeatDiv10;
+       } else if (choice == _("Beats/12")) {
+               snaptype = SnapToBeatDiv12;
+       } else if (choice == _("Beats/14")) {
+               snaptype = SnapToBeatDiv14;
        } else if (choice == _("Beats/16")) {
-               snaptype = SnapToASixteenthBeat;
+               snaptype = SnapToBeatDiv16;
+       } else if (choice == _("Beats/24")) {
+               snaptype = SnapToBeatDiv24;
+       } else if (choice == _("Beats/28")) {
+               snaptype = SnapToBeatDiv28;
        } else if (choice == _("Beats/32")) {
-               snaptype = SnapToAThirtysecondBeat;
+               snaptype = SnapToBeatDiv32;
        } else if (choice == _("Beats")) {
                snaptype = SnapToBeat;
        } else if (choice == _("Bars")) {
@@ -3815,25 +3849,48 @@ Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
                return 1.0;
                break;
 
-       case SnapToAThirtysecondBeat:
+       case SnapToBeatDiv32:
                return 1.0/32.0;
                break;
-
-       case SnapToASixteenthBeat:
+       case SnapToBeatDiv28:
+               return 1.0/28.0;
+               break;
+       case SnapToBeatDiv24:
+               return 1.0/24.0;
+               break;
+       case SnapToBeatDiv16:
                return 1.0/16.0;
                break;
-
-       case SnapToAEighthBeat:
+       case SnapToBeatDiv14:
+               return 1.0/14.0;
+               break;
+       case SnapToBeatDiv12:
+               return 1.0/12.0;
+               break;
+       case SnapToBeatDiv10:
+               return 1.0/10.0;
+               break;
+       case SnapToBeatDiv8:
                return 1.0/8.0;
                break;
-
-       case SnapToAQuarterBeat:
+       case SnapToBeatDiv7:
+               return 1.0/7.0;
+               break;
+       case SnapToBeatDiv6:
+               return 1.0/6.0;
+               break;
+       case SnapToBeatDiv5:
+               return 1.0/5.0;
+               break;
+       case SnapToBeatDiv4:
                return 1.0/4.0;
                break;
-
-       case SnapToAThirdBeat:
+       case SnapToBeatDiv3:
                return 1.0/3.0;
                break;
+       case SnapToBeatDiv2:
+               return 1.0/2.0;
+               break;
 
        case SnapToBar:
                if (_session) {
@@ -3870,19 +3927,10 @@ Editor::get_nudge_distance (nframes64_t pos, nframes64_t& next)
        return ret;
 }
 
-void
-Editor::session_range_location_changed (Location* location)
-{
-       ENSURE_GUI_THREAD (*this, &Editor::session_range_location_changed, location)
-       //reset_scrolling_region ();
-       nframes64_t const session_span = location->end() + (nframes64_t) floorf (current_page_frames() * 0.10f);
-       horizontal_adjustment.set_upper (session_span / frames_per_unit);
-}
-
 int
 Editor::playlist_deletion_dialog (boost::shared_ptr<Playlist> pl)
 {
-       ArdourDialog dialog ("playlist deletion dialog");
+       ArdourDialog dialog (_("Playlist Deletion"));
        Label  label (string_compose (_("Playlist %1 is currently unused.\n"
                                        "If left alone, no audio files used by it will be cleaned.\n"
                                        "If deleted, audio files used by it alone by will cleaned."),
@@ -4142,7 +4190,6 @@ Editor::reset_zoom (double fpu)
 void
 Editor::reposition_and_zoom (nframes64_t frame, double fpu)
 {
-       //cerr << "Editor::reposition_and_zoom () called ha v:l:u:ps:fpu = " << horizontal_adjustment.get_value() << ":" << horizontal_adjustment.get_lower() << ":" << horizontal_adjustment.get_upper() << ":" << horizontal_adjustment.get_page_size() << ":" << frames_per_unit << endl;//DEBUG
        reset_x_origin (frame);
        reset_zoom (fpu);
 
@@ -4273,8 +4320,6 @@ Editor::set_frames_per_unit (double fpu)
 void
 Editor::post_zoom ()
 {
-       nframes64_t cef = 0;
-
        // convert fpu to frame count
 
        nframes64_t frames = (nframes64_t) floor (frames_per_unit * _canvas_width);
@@ -4289,15 +4334,8 @@ Editor::post_zoom ()
                }
        }
 
-       leftmost_frame = (nframes64_t) floor (horizontal_adjustment.get_value() * frames_per_unit);
-
        ZoomChanged (); /* EMIT_SIGNAL */
 
-       if (_session) {
-               cef = _session->current_end_frame() + (current_page_frames() / 10);// Add a little extra so we can see the end marker
-       }
-       horizontal_adjustment.set_upper (cef / frames_per_unit);
-
        //reset_scrolling_region ();
 
        if (playhead_cursor) {
@@ -4314,17 +4352,7 @@ void
 Editor::queue_visual_change (nframes64_t where)
 {
        pending_visual_change.add (VisualChange::TimeOrigin);
-
-       /* if we're moving beyond the end, make sure the upper limit of the horizontal adjustment
-          can reach.
-       */
-
-       if (_session && (where > _session->current_end_frame())) {
-               horizontal_adjustment.set_upper ((where + current_page_frames()) / frames_per_unit);
-       }
-
        pending_visual_change.time_origin = where;
-
        ensure_visual_change_idle_handler ();
 }
 
@@ -4366,7 +4394,7 @@ Editor::idle_visual_changer ()
        VisualChange::Type p = pending_visual_change.pending;
        pending_visual_change.pending = (VisualChange::Type) 0;
 
-       double last_time_origin = horizontal_adjustment.get_value();
+       double last_time_origin = horizontal_position ();
 
        if (p & VisualChange::ZoomLevel) {
                set_frames_per_unit (pending_visual_change.frames_per_unit);
@@ -4377,13 +4405,13 @@ Editor::idle_visual_changer ()
                update_tempo_based_rulers ();
        }
        if (p & VisualChange::TimeOrigin) {
-               horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit);
+               set_horizontal_position (pending_visual_change.time_origin / frames_per_unit);
        }
        if (p & VisualChange::YOrigin) {
                vertical_adjustment.set_value (pending_visual_change.y_origin);
        }
 
-       if (last_time_origin == horizontal_adjustment.get_value()) {
+       if (last_time_origin == horizontal_position ()) {
                /* changed signal not emitted */
                update_fixed_rulers ();
                redisplay_tempo (true);
@@ -4391,7 +4419,6 @@ Editor::idle_visual_changer ()
 
        _summary->set_overlays_dirty ();
 
-       // cerr << "Editor::idle_visual_changer () called ha v:l:u:ps:fpu = " << horizontal_adjustment.get_value() << ":" << horizontal_adjustment.get_lower() << ":" << horizontal_adjustment.get_upper() << ":" << horizontal_adjustment.get_page_size() << ":" << frames_per_unit << endl;//DEBUG
        pending_visual_change.idle_handler_id = -1;
        return 0; /* this is always a one-shot call */
 }
@@ -4754,8 +4781,8 @@ Editor::add_to_idle_resize (TimeAxisView* view, int32_t h)
        }
 
        /* clamp */
-       if (uint32_t (min_resulting) < TimeAxisView::hSmall) {
-               _pending_resize_amount += TimeAxisView::hSmall - min_resulting;
+       if (uint32_t (min_resulting) < TimeAxisView::preset_height (HeightSmall)) {
+               _pending_resize_amount += TimeAxisView::preset_height (HeightSmall) - min_resulting;
        }
 }
 
@@ -4946,16 +4973,16 @@ Editor::timeaxisview_deleted (TimeAxisView *tv)
 }
 
 void
-Editor::hide_track_in_display (TimeAxisView& tv, bool /*temponly*/)
+Editor::hide_track_in_display (TimeAxisView* tv, bool /*temponly*/)
 {
-       RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (&tv);
+       RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (tv);
 
        if (rtv && current_mixer_strip && (rtv->route() == current_mixer_strip->route())) {
                // this will hide the mixer strip
-               set_selected_mixer_strip (tv);
+               set_selected_mixer_strip (*tv);
        }
 
-       _routes->hide_track_in_display (tv);
+       _routes->hide_track_in_display (*tv);
 }
 
 bool
@@ -5212,7 +5239,7 @@ Editor::super_rapid_screen_update ()
                         }
                         
                         current = target;
-                        horizontal_adjustment.set_value (current);
+                        set_horizontal_position (current);
 #endif
                 }