NO-OP; clean up script spacing and remove goto
[ardour.git] / gtk2_ardour / editor.h
index 14151b95ff67db0b019cf57a416ccf0295d869bb..458753d638a891da9461b210cdcd4d1578ef15e3 100644 (file)
@@ -256,15 +256,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        Selection& get_selection() const { return *selection; }
        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 track_mixer_selection ();
 
        bool extend_selection_to_track (TimeAxisView&);
 
        void play_selection ();
-       framepos_t get_preroll (framepos_t);
        void maybe_locate_with_edit_preroll (framepos_t);
        void play_with_preroll ();
        void rec_with_preroll ();
+       void rec_with_count_in ();
        void select_all_in_track (Selection::Operation op);
        void select_all_objects (Selection::Operation op);
        void invert_selection_in_track ();
@@ -368,8 +367,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        /* fades */
 
-       void toggle_region_fades (int dir);
-       void update_region_fade_visibility ();
+       void toggle_region_fades (int dir);
+       void update_region_fade_visibility ();
 
        /* redirect shared ops menu. caller must free returned menu */
 
@@ -454,20 +453,20 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
 
-       void snap_to (framepos_t&       first,
-                     ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
-                     bool              for_mark  = false,
-                     bool              ensure_snap = false);
+       void snap_to (ARDOUR::MusicFrame& first,
+                     ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
+                     bool                for_mark  = false,
+                     bool                ensure_snap = false);
 
-       void snap_to_with_modifier (framepos_t&       first,
-                                   GdkEvent const *  ev,
-                                   ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
-                                   bool              for_mark  = false);
+       void snap_to_with_modifier (ARDOUR::MusicFrame& first,
+                                   GdkEvent const *    ev,
+                                   ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
+                                   bool                for_mark  = false);
 
-       void snap_to (framepos_t&       first,
-                     framepos_t&       last,
-                     ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
-                     bool              for_mark  = false);
+       void snap_to (ARDOUR::MusicFrame& first,
+                     ARDOUR::MusicFrame& last,
+                     ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
+                     bool                for_mark  = false);
 
        void begin_selection_op_history ();
        void begin_reversible_selection_op (std::string cmd_name);
@@ -544,7 +543,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        /* editing operations that need to be public */
        void mouse_add_new_marker (framepos_t where, bool is_cd=false);
-       void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num, bool snap = true);
+       void split_regions_at (ARDOUR::MusicFrame, RegionSelection&, bool snap = true);
        void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
        RegionSelection get_regions_from_selection_and_mouse (framepos_t);
 
@@ -1607,6 +1606,10 @@ 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;
 
@@ -1637,8 +1640,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;
@@ -1730,7 +1731,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void compute_current_bbt_points (std::vector<ARDOUR::TempoMap::BBTPoint>& grid, framepos_t left, framepos_t right);
 
        void tempo_map_changed (const PBD::PropertyChange&);
-       void marker_position_changed ();
+       void tempometric_position_changed (const PBD::PropertyChange&);
        void redisplay_tempo (bool immediate_redraw);
 
        uint32_t bbt_beat_subdivision;
@@ -1832,6 +1833,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
 
        void setup_midi_toolbar ();
 
+       void presentation_info_changed (PBD::PropertyChange const &);
+
        /* selection process */
 
        Selection* selection;
@@ -1844,7 +1847,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void region_selection_changed ();
        sigc::connection editor_regions_selection_changed_connection;
        void sensitize_all_region_actions (bool);
-       void sensitize_the_right_region_actions ();
+       void sensitize_the_right_region_actions (bool because_canvas_crossing);
        bool _all_region_actions_sensitized;
        /** Flag to block region action handlers from doing what they normally do;
         *  I tried Gtk::Action::block_activate() but this doesn't work (ie it doesn't
@@ -1855,6 +1858,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 ();
 
@@ -2142,7 +2147,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void get_regions_at (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
        void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
 
-       RegionSelection get_regions_from_selection_and_edit_point ();
+       RegionSelection get_regions_from_selection_and_edit_point (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE,
+                                                                  bool use_context_click = false,
+                                                                  bool from_outside_canvas = false);
        RegionSelection get_regions_from_selection_and_entered () const;
 
        void start_updating_meters ();
@@ -2152,14 +2159,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        void select_next_route ();
        void select_prev_route ();
 
-       void snap_to_internal (framepos_t&       first,
-                              ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
-                              bool              for_mark  = false,
-                              bool              ensure_snap = false);
+       void snap_to_internal (ARDOUR::MusicFrame& first,
+                              ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
+                              bool                for_mark  = false,
+                              bool                ensure_snap = false);
 
-       void timecode_snap_to_internal (framepos_t&       first,
-                                       ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
-                                       bool              for_mark  = false);
+       void timecode_snap_to_internal (ARDOUR::MusicFrame& first,
+                                       ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
+                                       bool                for_mark  = false);
 
        RhythmFerret* rhythm_ferret;
 
@@ -2222,8 +2229,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        bool _region_selection_change_updates_region_list;
 
        void setup_fade_images ();
-       std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_in_images;
-       std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_out_images;
        std::map<ARDOUR::FadeShape, Gtk::Image*> _xfade_in_images;
        std::map<ARDOUR::FadeShape, Gtk::Image*> _xfade_out_images;
 
@@ -2261,7 +2266,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
        QuantizeDialog* quantize_dialog;
        MainMenuDisabler* _main_menu_disabler;
 
-       /* private helper functions to help with registering axis */
+       /* private helper functions to help with registering region actions */
+
+       Glib::RefPtr<Gtk::Action> register_region_action (Glib::RefPtr<Gtk::ActionGroup> group, Editing::RegionActionTarget, char const * name, char const * label, sigc::slot<void> slot);
+       void register_toggle_region_action (Glib::RefPtr<Gtk::ActionGroup> group, Editing::RegionActionTarget, char const * name, char const * label, sigc::slot<void> slot);
 
        Glib::RefPtr<Gtk::Action> reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot);
        void toggle_reg_sens (Glib::RefPtr<Gtk::ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot);