OSC: set Automation mode for fader
[ardour.git] / gtk2_ardour / editor.h
index 0efacd98eb1190aa763ae85ad499262579b55b29..60bf93494d83e5f5d7f3e2f47ef737b78f9f7e8f 100644 (file)
@@ -140,14 +140,13 @@ class TimeSelection;
 class RegionLayeringOrderEditor;
 class VerboseCursor;
 
-class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
+class Editor : public PublicEditor, public PBD::ScopedConnectionList
 {
- public:
+public:
        Editor ();
        ~Editor ();
 
        void             set_session (ARDOUR::Session *);
-       ARDOUR::Session* session() const { return _session; }
 
        Gtk::Window* use_own_window (bool and_fill_it);
 
@@ -243,8 +242,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
                return pixel * samples_per_pixel;
        }
 
-        double sample_to_pixel (framepos_t sample) const {
-               return round (sample / (double) samples_per_pixel);
+       double sample_to_pixel (framepos_t sample) const {
+               return round (sample / (double) samples_per_pixel);
        }
 
        double sample_to_pixel_unrounded (framepos_t sample) const {
@@ -257,6 +256,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        bool get_selection_extents (framepos_t &start, framepos_t &end) const;  // the time extents of the current selection, whether Range, Region(s), Control Points, or Notes
        Selection& get_cut_buffer() const { return *cut_buffer; }
 
+       void set_selection (std::list<Selectable*>, Selection::Operation);
+
        bool extend_selection_to_track (TimeAxisView&);
 
        void play_selection ();
@@ -329,6 +330,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void set_selected_mixer_strip (TimeAxisView&);
        void mixer_strip_width_changed ();
        void hide_track_in_display (TimeAxisView* tv, bool apply_to_selection = false);
+       void show_track_in_display (TimeAxisView* tv, bool move_into_view = false);
+       void tempo_curve_selected (ARDOUR::TempoSection* ts, bool yn);
 
        /* nudge is initiated by transport controls owned by ARDOUR_UI */
 
@@ -390,6 +393,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void scroll_left_half_page ();
        void scroll_right_half_page ();
 
+       void select_topmost_track ();
+
        void prepare_for_cleanup ();
        void finish_cleanup ();
 
@@ -421,7 +426,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void start_resize_line_ops ();
        void end_resize_line_ops ();
 
-       TrackViewList const & get_track_views () {
+       TrackViewList const & get_track_views () const {
                return track_views;
        }
 
@@ -552,16 +557,17 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void edit_tempo_section (ARDOUR::TempoSection*);
        void edit_meter_section (ARDOUR::MeterSection*);
 
-  protected:
+protected:
        void map_transport_state ();
        void map_position_change (framepos_t);
+       void transport_looped ();
 
        void on_realize();
 
        void suspend_route_redisplay ();
        void resume_route_redisplay ();
 
-  private:
+private:
 
        void color_handler ();
 
@@ -732,6 +738,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, PBD::PropertyID) const;
        RegionSelection get_equivalent_regions (RegionSelection &, PBD::PropertyID) const;
+       RegionView* regionview_from_region (boost::shared_ptr<ARDOUR::Region>) const;
+       RouteTimeAxisView* rtav_from_route (boost::shared_ptr<ARDOUR::Route>) const;
+
        void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
        void mapover_tracks_with_unique_playlists (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
 
@@ -1148,16 +1157,24 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        /* track views */
        TrackViewList track_views;
        std::pair<TimeAxisView*, double> trackview_by_y_position (double, bool trackview_relative_offset = true) const;
-       TimeAxisView* axis_view_from_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
+
+       AxisView* axis_view_by_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
+       AxisView* axis_view_by_control (boost::shared_ptr<ARDOUR::AutomationControl>) const;
+
+       TimeAxisView* time_axis_view_from_stripable (boost::shared_ptr<ARDOUR::Stripable> s) const {
+               return dynamic_cast<TimeAxisView*> (axis_view_by_stripable (s));
+       }
 
        TrackViewList get_tracks_for_range_action () const;
 
        sigc::connection super_rapid_screen_update_connection;
-       framepos_t last_update_frame;
        void center_screen_internal (framepos_t, float);
 
        void super_rapid_screen_update ();
 
+       int64_t _last_update_time;
+       double _err_screen_engine;
+
        void session_going_away ();
 
        framepos_t cut_buffer_start;
@@ -1260,6 +1277,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void normalize_region ();
        void reset_region_scale_amplitude ();
        void adjust_region_gain (bool up);
+       void reset_region_gain ();
        void quantize_region ();
        void quantize_regions (const RegionSelection& rs);
        void legatize_region (bool shrink_only);
@@ -1606,10 +1624,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void queue_visual_videotimeline_update ();
        void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true);
 
+       bool track_selection_change_without_scroll () const {
+               return _track_selection_change_without_scroll;
+       }
+
        PBD::Signal0<void> EditorFreeze;
        PBD::Signal0<void> EditorThaw;
 
-  private:
+private:
        friend class DragManager;
        friend class EditorRouteGroups;
        friend class EditorRegions;
@@ -1636,8 +1658,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void initialize_canvas ();
 
-       void set_script_action_name (int i, const std::string&);
-
        /* display control */
 
        bool _show_measures;
@@ -1678,7 +1698,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void marker_menu_rename ();
        void rename_marker (ArdourMarker *marker);
        void toggle_marker_lock_style ();
+       void toggle_tempo_clamped ();
        void toggle_tempo_type ();
+       void continue_previous_tempo ();
+       void ramp_to_next_tempo ();
        void toggle_marker_menu_lock ();
        void toggle_marker_menu_glue ();
        void marker_menu_hide ();
@@ -1831,8 +1854,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void setup_midi_toolbar ();
 
-       void presentation_info_changed (PBD::PropertyChange const &);
-
        /* selection process */
 
        Selection* selection;
@@ -1841,7 +1862,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void time_selection_changed ();
        void update_time_selection_display ();
-       void track_selection_changed ();
+       void presentation_info_changed (PBD::PropertyChange const &);
        void region_selection_changed ();
        sigc::connection editor_regions_selection_changed_connection;
        void sensitize_all_region_actions (bool);
@@ -1856,6 +1877,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void point_selection_changed ();
        void marker_selection_changed ();
 
+       bool _track_selection_change_without_scroll;
+
        void cancel_selection ();
        void cancel_time_selection ();