changes to help strp silence
[ardour.git] / gtk2_ardour / editor.h
index e3cf417fa0ddd053d83961023634c2f3c5322866..9088312924775ad80c0cb276dfd2062d8d0706eb 100644 (file)
@@ -107,7 +107,7 @@ class AutomationTimeAxisView;
 class BundleManager;
 class ControlPoint;
 class CrossfadeView;
-class Drag;
+class DragManager;
 class GlobalPortMatrixWindow;
 class GroupedButtons;
 class Marker;
@@ -401,6 +401,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void restore_editing_space();
 
        void reset_x_origin (nframes64_t);
+       void reset_x_origin_to_follow_playhead ();
        void reset_y_origin (double);
        void reset_zoom (double);
        void reposition_and_zoom (nframes64_t, double);
@@ -487,6 +488,19 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        Editing::MouseMode mouse_mode;
        bool _internal_editing;
+       Editing::MouseMode effective_mouse_mode () const;
+
+       enum JoinObjectRangeState {
+               JOIN_OBJECT_RANGE_NONE,
+               /** `join object/range' mode is active and the mouse is over a place where object mode should happen */
+               JOIN_OBJECT_RANGE_OBJECT,
+               /** `join object/range' mode is active and the mouse is over a place where range mode should happen */
+               JOIN_OBJECT_RANGE_RANGE
+       };
+
+       JoinObjectRangeState _join_object_range_state;
+
+       void update_join_object_range_location (double, double);
 
        int  post_maximal_editor_width;
        int  post_maximal_pane_position;
@@ -506,7 +520,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void location_changed (ARDOUR::Location *);
        void location_flags_changed (ARDOUR::Location *, void *);
        void refresh_location_display ();
-       void refresh_location_display_s (ARDOUR::Change);
+       void refresh_location_display_s (const PBD::PropertyChange&);
        void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
        void add_new_location (ARDOUR::Location *);
        void location_gone (ARDOUR::Location *);
@@ -564,9 +578,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void sort_track_selection (TrackViewList* sel = 0);
 
-       void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, ARDOUR::RouteGroup::Property) const;
-       RegionSelection get_equivalent_regions (RegionSelection &, ARDOUR::RouteGroup::Property) const;
-       void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, ARDOUR::RouteGroup::Property) const;
+       void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, PBD::PropertyID) const;
+       RegionSelection get_equivalent_regions (RegionSelection &, PBD::PropertyID) const;
+       void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
 
        /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
 
@@ -594,6 +608,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void collect_new_region_view (RegionView *);
        void collect_and_select_new_region_view (RegionView *);
 
+       long select_range_around_region (RegionView *);
+
        Gtk::Menu track_context_menu;
        Gtk::Menu track_region_context_menu;
        Gtk::Menu track_selection_context_menu;
@@ -618,8 +634,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
 
        void handle_new_route (ARDOUR::RouteList&);
-       void remove_route (TimeAxisView *);
-       bool route_removal;
+       void timeaxisview_deleted (TimeAxisView *);
 
        Gtk::HBox           global_hpacker;
        Gtk::VBox           global_vpacker;
@@ -973,11 +988,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        static void build_cursors ();
 
-       sigc::connection scroll_connection;
+       sigc::connection super_rapid_screen_update_connection;
        nframes64_t last_update_frame;
        void center_screen_internal (nframes64_t, float);
 
-       void update_current_screen ();
+       void super_rapid_screen_update ();
 
        void session_going_away ();
 
@@ -1239,14 +1254,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void reverse_selection ();
        void edit_envelope ();
 
-       void start_scrolling ();
-       void stop_scrolling ();
-
        double last_scrub_x;
        int scrubbing_direction;
        int scrub_reversals;
        int scrub_reverse_distance;
-       void scrub ();
+       void scrub (nframes64_t, double);
 
        void keyboard_selection_begin ();
        void keyboard_selection_finish (bool add);
@@ -1265,9 +1277,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        bool ignore_gui_changes;
 
-       Drag* _drag;
+       DragManager* _drags;
 
-       void break_drag ();
+       void escape ();
 
        Gtk::Menu fade_context_menu;
        void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
@@ -1290,10 +1302,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        gint mouse_rename_region (ArdourCanvas::Item*, GdkEvent*);
 
-       void start_region_grab (ArdourCanvas::Item*, GdkEvent*, RegionView*);
+       void add_region_drag (ArdourCanvas::Item*, GdkEvent*, RegionView*);
        void start_create_region_grab (ArdourCanvas::Item*, GdkEvent*);
-       void start_region_copy_grab (ArdourCanvas::Item*, GdkEvent*, RegionView*);
-       void start_region_brush_grab (ArdourCanvas::Item*, GdkEvent*, RegionView*);
+       void add_region_copy_drag (ArdourCanvas::Item*, GdkEvent*, RegionView*);
+       void add_region_brush_drag (ArdourCanvas::Item*, GdkEvent*, RegionView*);
        void start_selection_grab (ArdourCanvas::Item*, GdkEvent*);
 
        void region_view_item_click (AudioRegionView&, GdkEventButton*);
@@ -1463,7 +1475,7 @@ public:
        void draw_metric_marks (const ARDOUR::Metrics& metrics);
 
        void compute_current_bbt_points (nframes_t left, nframes_t right);
-       void tempo_map_changed (ARDOUR::Change);
+       void tempo_map_changed (const PBD::PropertyChange&);
        void redisplay_tempo (bool immediate_redraw);
 
        void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
@@ -1493,7 +1505,6 @@ public:
        Gtk::Table               toolbar_selection_clock_table;
        Gtk::Label               toolbar_selection_cursor_label;
 
-       Gtk::HBox                mouse_mode_button_box;
        Gtkmm2ext::TearOff*      mouse_mode_tearoff;
        Gtk::ToggleButton         mouse_select_button;
        Gtk::ToggleButton         mouse_move_button;
@@ -1501,6 +1512,7 @@ public:
        Gtk::ToggleButton         mouse_zoom_button;
        Gtk::ToggleButton         mouse_timefx_button;
        Gtk::ToggleButton         mouse_audition_button;
+       Gtk::ToggleButton         join_object_range_button;
 
        void                     mouse_mode_toggled (Editing::MouseMode m);
        bool                     ignore_mouse_mode_toggle;
@@ -1554,6 +1566,8 @@ public:
 
        void setup_toolbar ();
 
+       void setup_tooltips ();
+
        Gtkmm2ext::TearOff*      tools_tearoff;
        Gtk::HBox                toolbar_hbox;
        Gtk::EventBox            toolbar_base;
@@ -1616,7 +1630,7 @@ public:
 
        /* object rubberband select process */
 
-       bool select_all_within (nframes64_t start, nframes64_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
+       bool select_all_within (nframes64_t, nframes64_t, double, double, TrackViewList const &, Selection::Operation op);
 
        ArdourCanvas::SimpleRect   *rubberband_rect;
 
@@ -1661,7 +1675,7 @@ public:
        bool allow_vertical_scroll;
 
        /* trimming */
-       void point_trim (GdkEvent*);
+       void point_trim (GdkEvent *, nframes64_t);
        void single_contents_trim (RegionView&, nframes64_t, bool, bool, bool);
        void single_start_trim (RegionView&, nframes64_t, bool, bool, bool);
        void single_end_trim (RegionView&, nframes64_t, bool, bool, bool);
@@ -1803,9 +1817,7 @@ public:
        bool show_editor_mixer_when_tracks_arrive;
        Gtk::VBox current_mixer_strip_vbox;
        void cms_new (boost::shared_ptr<ARDOUR::Route>);
-       void cms_deleted ();
        void current_mixer_strip_hidden ();
-       void current_mixer_strip_removed ();
 
        void detach_tearoff (Gtk::Box* b, Gtk::Window* w);
        void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n);
@@ -1954,10 +1966,8 @@ public:
 
        void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
 
-       sigc::connection fast_screen_update_connection;
-       gint start_updating ();
-       gint stop_updating ();
-       void fast_update_strips ();
+       void start_updating_meters ();
+       void stop_updating_meters ();
        bool meters_running;
 
        void select_next_route ();
@@ -1987,8 +1997,17 @@ public:
        void visible_order_range (int*, int*) const;
 
        void located ();
+       
+       /** true if we've made a locate request that hasn't yet been processed */
        bool _pending_locate_request;
+       
+       /** if true, there is a pending Session locate which is the initial one when loading a session;
+           we need to know this so that we don't (necessarily) set the viewport to show the playhead
+           initially.
+       */
+       bool _pending_initial_locate;
 
+       Gtk::HBox _summary_hbox;
        EditorSummary* _summary;
        void region_view_added (RegionView *);