No more doxygen warnings for gtk2_arodur/*
[ardour.git] / gtk2_ardour / editor.h
index 37cc40275d15ebad4d7bbdb3ebca300c28072209..a560478c7e02d56d9c6992bb7a36182f5e577df2 100644 (file)
@@ -1,21 +1,35 @@
 /*
-    Copyright (C) 2000-2003 Paul Davis
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
+ * Copyright (C) 2005-2007 Doug McLain <doug@nostar.net>
+ * Copyright (C) 2005-2018 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2005 Karsten Wiese <fzuuzf@googlemail.com>
+ * Copyright (C) 2006-2009 Sampo Savolainen <v2@iki.fi>
+ * Copyright (C) 2006-2015 David Robillard <d@drobilla.net>
+ * Copyright (C) 2006-2017 Tim Mayberry <mojofunk@gmail.com>
+ * Copyright (C) 2007-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2008-2011 Sakari Bergen <sakari.bergen@beatwaves.net>
+ * Copyright (C) 2008 Hans Baier <hansfbaier@googlemail.com>
+ * Copyright (C) 2013-2015 Colin Fletcher <colin.m.fletcher@googlemail.com>
+ * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2014-2017 Nick Mainsbridge <mainsbridge@gmail.com>
+ * Copyright (C) 2014-2019 Ben Loftis <ben@harrisonconsoles.com>
+ * Copyright (C) 2015-2019 Damien Zammit <damien@zamaudio.com>
+ * Copyright (C) 2015 AndrĂ© Nusser <andre.nusser@googlemail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 #ifndef __ardour_editor_h__
 #define __ardour_editor_h__
@@ -61,7 +75,7 @@
 #include "selection_memento.h"
 #include "tempo_curve.h"
 
-#include "ptformat/ptfformat.h"
+#include "ptformat/ptformat.h"
 
 namespace Gtkmm2ext {
        class Bindings;
@@ -110,6 +124,7 @@ class EditorCursor;
 class EditorGroupTabs;
 class EditorLocations;
 class EditorRegions;
+class EditorSources;
 class EditorRoutes;
 class EditorRouteGroups;
 class EditorSnapshots;
@@ -145,7 +160,7 @@ public:
        Editor ();
        ~Editor ();
 
-       void             set_session (ARDOUR::Session *);
+       void             set_session (ARDOUR::Session*);
 
        Gtk::Window* use_own_window (bool and_fill_it);
 
@@ -155,7 +170,7 @@ public:
        samplepos_t leftmost_sample() const { return _leftmost_sample; }
 
        samplecnt_t current_page_samples() const {
-               return (samplecnt_t) _visible_canvas_width * samples_per_pixel;
+               return (samplecnt_t) _visible_canvas_width* samples_per_pixel;
        }
 
        double visible_canvas_height () const {
@@ -184,7 +199,7 @@ public:
        void step_mouse_mode (bool next);
        Editing::MouseMode current_mouse_mode () const { return mouse_mode; }
        Editing::MidiEditMode current_midi_edit_mode () const;
-       void remove_midi_note (ArdourCanvas::Item *, GdkEvent *);
+       void remove_midi_note (ArdourCanvas::Item*, GdkEvent*);
 
        bool internal_editing() const;
 
@@ -295,7 +310,7 @@ public:
 
        void               set_zoom_focus (Editing::ZoomFocus);
        Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
-       samplecnt_t         get_current_zoom () const { return samples_per_pixel; }
+       samplecnt_t        get_current_zoom () const { return samples_per_pixel; }
        void               cycle_zoom_focus ();
        void temporal_zoom_step (bool zoom_out);
        void temporal_zoom_step_scale (bool zoom_out, double scale);
@@ -387,6 +402,8 @@ public:
 
        void select_topmost_track ();
 
+       void cleanup_regions ();
+
        void prepare_for_cleanup ();
        void finish_cleanup ();
 
@@ -401,8 +418,8 @@ public:
        void reposition_and_zoom (samplepos_t, double);
 
        samplepos_t get_preferred_edit_position (Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE,
-                                               bool use_context_click = false,
-                                               bool from_outside_canvas = false);
+                                                bool use_context_click = false,
+                                                bool from_outside_canvas = false);
 
        bool update_mouse_speed ();
        bool decelerate_mouse_speed ();
@@ -432,13 +449,13 @@ public:
                        ARDOUR::SrcQuality                    quality,
                        ARDOUR::MidiTrackNameSource           mts,
                        ARDOUR::MidiTempoMapDisposition       mtd,
-                       samplepos_t&                           pos,
+                       samplepos_t&                          pos,
                        boost::shared_ptr<ARDOUR::PluginInfo> instrument = boost::shared_ptr<ARDOUR::PluginInfo>());
 
        void do_embed (std::vector<std::string>              paths,
                       Editing::ImportDisposition            disposition,
                       Editing::ImportMode                   mode,
-                      samplepos_t&                           pos,
+                      samplepos_t&                          pos,
                       boost::shared_ptr<ARDOUR::PluginInfo> instrument = boost::shared_ptr<ARDOUR::PluginInfo>());
 
        void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions, bool src_comparison);
@@ -451,14 +468,14 @@ public:
        TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
 
        void snap_to (ARDOUR::MusicSample& first,
-                     ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
-                     ARDOUR::SnapPref    pref = ARDOUR::SnapToAny_Visual,
-                     bool                ensure_snap = false);
+                     ARDOUR::RoundMode    direction = ARDOUR::RoundNearest,
+                     ARDOUR::SnapPref     pref = ARDOUR::SnapToAny_Visual,
+                     bool                 ensure_snap = false);
 
        void snap_to_with_modifier (ARDOUR::MusicSample& first,
-                                   GdkEvent const *    ev,
-                                   ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
-                                   ARDOUR::SnapPref    pref = ARDOUR::SnapToAny_Visual);
+                                   GdkEvent const*      ev,
+                                   ARDOUR::RoundMode    direction = ARDOUR::RoundNearest,
+                                   ARDOUR::SnapPref     pref = ARDOUR::SnapToAny_Visual);
 
        void set_snapped_cursor_position (samplepos_t pos);
 
@@ -484,7 +501,7 @@ public:
        void set_current_trimmable (boost::shared_ptr<ARDOUR::Trimmable>);
        void set_current_movable (boost::shared_ptr<ARDOUR::Movable>);
 
-       MouseCursors const * cursors () const {
+       MouseCursors const* cursors () const {
                return _cursors;
        }
 
@@ -576,8 +593,8 @@ private:
                VisualState (bool with_tracks);
                ~VisualState ();
                double              y_position;
-               samplecnt_t          samples_per_pixel;
-               samplepos_t          _leftmost_sample;
+               samplecnt_t         samples_per_pixel;
+               samplepos_t        _leftmost_sample;
                Editing::ZoomFocus  zoom_focus;
                GUIObjectState*     gui_state;
        };
@@ -595,8 +612,8 @@ private:
        void start_visual_state_op (uint32_t n);
        void cancel_visual_state_op (uint32_t n);
 
-       samplepos_t         _leftmost_sample;
-       samplecnt_t         samples_per_pixel;
+       samplepos_t       _leftmost_sample;
+       samplecnt_t        samples_per_pixel;
        Editing::ZoomFocus zoom_focus;
 
        void set_samples_per_pixel (samplecnt_t);
@@ -626,8 +643,8 @@ private:
        Gtk::VBox _editor_list_vbox;
        Gtk::Notebook _the_notebook;
        bool _notebook_shrunk;
-       void add_notebook_page (std::string const &, Gtk::Widget &);
-       bool notebook_tab_clicked (GdkEventButton *, Gtk::Widget *);
+       void add_notebook_page (std::string const&, Gtk::Widget&);
+       bool notebook_tab_clicked (GdkEventButton*, Gtk::Widget*);
 
        ArdourWidgets::HPane edit_pane;
        ArdourWidgets::VPane editor_summary_pane;
@@ -637,13 +654,13 @@ private:
        Gtk::HBox     marker_box;
        Gtk::VBox     scrollers_rulers_markers_box;
 
-       void location_changed (ARDOUR::Location *);
-       void location_flags_changed (ARDOUR::Location *);
+       void location_changed (ARDOUR::Location*);
+       void location_flags_changed (ARDOUR::Location*);
        void refresh_location_display ();
        void refresh_location_display_internal (const ARDOUR::Locations::LocationList&);
-       void add_new_location (ARDOUR::Location *);
-       ArdourCanvas::Container* add_new_location_internal (ARDOUR::Location *);
-       void location_gone (ARDOUR::Location *);
+       void add_new_location (ARDOUR::Location*);
+       ArdourCanvas::Container* add_new_location_internal (ARDOUR::Location*);
+       void location_gone (ARDOUR::Location*);
        void remove_marker (ArdourCanvas::Item&, GdkEvent*);
        gint really_remove_marker (ARDOUR::Location* loc);
        void goto_nth_marker (int nth);
@@ -683,18 +700,18 @@ private:
                void set_color_rgba (uint32_t);
        };
 
-       LocationMarkers  *find_location_markers (ARDOUR::Location *) const;
-       ARDOUR::Location* find_location_from_marker (ArdourMarker *, bool& is_start) const;
-       ArdourMarker* find_marker_from_location_id (PBD::ID const &, bool) const;
+       LocationMarkers*  find_location_markers (ARDOUR::Location*) const;
+       ARDOUR::Location* find_location_from_marker (ArdourMarker*, bool& is_start) const;
+       ArdourMarker* find_marker_from_location_id (PBD::ID const&, bool) const;
        ArdourMarker* entered_marker;
        bool _show_marker_lines;
 
-       typedef std::map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
+       typedef std::map<ARDOUR::Location*,LocationMarkers*> LocationMarkerMap;
        LocationMarkerMap location_markers;
 
        void update_marker_labels ();
-       void update_marker_labels (ArdourCanvas::Container *);
-       void check_marker_label (ArdourMarker *);
+       void update_marker_labels (ArdourCanvas::Container*);
+       void check_marker_label (ArdourMarker*);
 
        /** A set of lists of Markers that are in each of the canvas groups
         *  for the marker sections at the top of the editor.  These lists
@@ -702,8 +719,8 @@ private:
         *  a marker has moved we can decide whether we need to update the labels
         *  for all markers or for just a few.
         */
-       std::map<ArdourCanvas::Container *, std::list<ArdourMarker *> > _sorted_marker_lists;
-       void remove_sorted_marker (ArdourMarker *);
+       std::map<ArdourCanvas::Container*, std::list<ArdourMarker*> > _sorted_marker_lists;
+       void remove_sorted_marker (ArdourMarker*);
 
        void hide_marker (ArdourCanvas::Item*, GdkEvent*);
        void clear_marker_display ();
@@ -712,7 +729,7 @@ private:
        void mouse_add_new_punch (samplepos_t);
        bool choose_new_marker_name(std::string &name, bool is_range=false);
        void update_cd_marker_display ();
-       void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
+       void ensure_cd_marker_updated (LocationMarkers* lam, ARDOUR::Location* location);
 
        TimeAxisView*      clicked_axisview;
        RouteTimeAxisView* clicked_routeview;
@@ -736,7 +753,7 @@ private:
        void mapover_tracks_with_unique_playlists (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
 
        /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
-       void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView *, std::vector<RegionView*>*) const;
+       void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, std::vector<RegionView*>*) const;
        void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
        void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
        void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
@@ -745,7 +762,7 @@ private:
        bool button_release_can_deselect;
        bool _mouse_changed_selection;
 
-       void catch_vanishing_regionview (RegionView *);
+       void catch_vanishing_regionview (RegionView*);
 
        void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
        void select_all_tracks ();
@@ -757,8 +774,8 @@ private:
        bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set);
 
        bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::weak_ptr<ARDOUR::Region>);
-       void collect_new_region_view (RegionView *);
-       void collect_and_select_new_region_view (RegionView *);
+       void collect_new_region_view (RegionView*);
+       void collect_and_select_new_region_view (RegionView*);
 
        Gtk::Menu track_context_menu;
        Gtk::Menu track_region_context_menu;
@@ -777,15 +794,15 @@ private:
        void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
        Gtk::MenuItem* _popup_region_menu_item;
 
-       void popup_control_point_context_menu (ArdourCanvas::Item *, GdkEvent *);
+       void popup_control_point_context_menu (ArdourCanvas::Item*, GdkEvent*);
        Gtk::Menu _control_point_context_menu;
 
-       void popup_note_context_menu (ArdourCanvas::Item *, GdkEvent *);
+       void popup_note_context_menu (ArdourCanvas::Item*, GdkEvent*);
        Gtk::Menu _note_context_menu;
 
        void add_stripables (ARDOUR::StripableList&);
        void add_routes (ARDOUR::RouteList&);
-       void timeaxisview_deleted (TimeAxisView *);
+       void timeaxisview_deleted (TimeAxisView*);
        void add_vcas (ARDOUR::VCAList&);
 
        Gtk::HBox global_hpacker;
@@ -820,18 +837,18 @@ private:
        void parameter_changed (std::string);
        void ui_parameter_changed (std::string);
 
-       Gtk::EventBox             time_bars_event_box;
-       Gtk::VBox                 time_bars_vbox;
+       Gtk::EventBox            time_bars_event_box;
+       Gtk::VBox                time_bars_vbox;
 
-       ArdourCanvas::Container      *tempo_group;
-       ArdourCanvas::Container      *meter_group;
-       ArdourCanvas::Container      *marker_group;
-       ArdourCanvas::Container      *range_marker_group;
-       ArdourCanvas::Container      *transport_marker_group;
-       ArdourCanvas::Container*      cd_marker_group;
+       ArdourCanvas::Containertempo_group;
+       ArdourCanvas::Containermeter_group;
+       ArdourCanvas::Containermarker_group;
+       ArdourCanvas::Containerrange_marker_group;
+       ArdourCanvas::Containertransport_marker_group;
+       ArdourCanvas::Container* cd_marker_group;
 
        /* parent for groups which themselves contain time markers */
-       ArdourCanvas::Container*     _time_markers_group;
+       ArdourCanvas::Container* _time_markers_group;
 
        /* The group containing all other groups that are scrolled vertically
           and horizontally.
@@ -875,7 +892,7 @@ private:
        Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
        bool                            no_ruler_shown_update;
 
-       Gtk::Widget * ruler_grabbed_widget;
+       Gtk::Widget* ruler_grabbed_widget;
 
        RulerDialog* ruler_dialog;
 
@@ -1011,8 +1028,8 @@ private:
        void    cursor_to_next_region_point (EditorCursor*, ARDOUR::RegionPoint);
        void    cursor_to_previous_region_point (EditorCursor*, ARDOUR::RegionPoint);
        void    cursor_to_region_point (EditorCursor*, ARDOUR::RegionPoint, int32_t dir);
-       void    cursor_to_selection_start (EditorCursor *);
-       void    cursor_to_selection_end   (EditorCursor *);
+       void    cursor_to_selection_start (EditorCursor*);
+       void    cursor_to_selection_end   (EditorCursor*);
 
        void    selected_marker_to_region_boundary (bool with_selection, int32_t dir);
        void    selected_marker_to_next_region_boundary (bool with_selection);
@@ -1023,12 +1040,12 @@ private:
        void    selected_marker_to_selection_start ();
        void    selected_marker_to_selection_end   ();
 
-       void    select_all_selectables_using_cursor (EditorCursor *, bool);
+       void    select_all_selectables_using_cursor (EditorCursor*, bool);
        void    select_all_selectables_using_edit (bool, bool);
        void    select_all_selectables_between (bool within);
        void    select_range_between ();
 
-       boost::shared_ptr<ARDOUR::Region> find_next_region (ARDOUR::samplepos_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
+       boost::shared_ptr<ARDOUR::Region> find_next_region (ARDOUR::samplepos_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView** = 0);
        ARDOUR::samplepos_t find_next_region_boundary (ARDOUR::samplepos_t, int32_t dir, const TrackViewList&);
 
        std::vector<ARDOUR::samplepos_t> region_boundary_cache;
@@ -1071,8 +1088,8 @@ private:
        bool track_canvas_map_handler (GdkEventAny*);
 
        bool edit_controls_button_release (GdkEventButton*);
-       Gtk::Menu *edit_controls_left_menu;
-       Gtk::Menu *edit_controls_right_menu;
+       Gtk::Menuedit_controls_left_menu;
+       Gtk::Menuedit_controls_right_menu;
 
        Gtk::VBox           track_canvas_vbox;
        Gtk::VBox           edit_controls_vbox;
@@ -1105,10 +1122,10 @@ private:
                        VideoTimeline = 0x8
                };
 
-               Type       pending;
+               Type        pending;
                samplepos_t time_origin;
-               samplecnt_t samples_per_pixel;
-               double     y_origin;
+               samplecnt_t samples_per_pixel;
+               double      y_origin;
 
                int idle_handler_id;
                /** true if we are currently in the idle handler */
@@ -1125,7 +1142,7 @@ private:
 
        void pre_render ();
 
-       static int _idle_visual_changer (void *arg);
+       static int _idle_visual_changer (voidarg);
        int idle_visual_changer ();
        void visual_changer (const VisualChange&);
        void ensure_visual_change_idle_handler ();
@@ -1163,8 +1180,8 @@ private:
 
        bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
        bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
-       bool button_press_handler_1 (ArdourCanvas::Item *, GdkEvent *, ItemType);
-       bool button_press_handler_2 (ArdourCanvas::Item *, GdkEvent *, ItemType);
+       bool button_press_handler_1 (ArdourCanvas::Item*, GdkEvent*, ItemType);
+       bool button_press_handler_2 (ArdourCanvas::Item*, GdkEvent*, ItemType);
        bool button_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
        bool button_double_click_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
        bool button_press_dispatch (GdkEventButton*);
@@ -1188,7 +1205,7 @@ private:
        /* CUT/COPY/PASTE */
 
        samplepos_t last_paste_pos;
-       unsigned   paste_count;
+       unsigned    paste_count;
 
        void cut_copy (Editing::CutCopyOp);
        bool can_cut_copy () const;
@@ -1236,6 +1253,7 @@ private:
        void align_regions_relative (ARDOUR::RegionPoint point);
        void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, samplepos_t position);
        void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, samplepos_t position);
+       void recover_regions (ARDOUR::RegionList);
        void remove_selected_regions ();
        void remove_clicked_region ();
        void show_region_properties ();
@@ -1282,8 +1300,6 @@ private:
        void define_one_bar (samplepos_t start, samplepos_t end);
 
        void audition_region_from_region_list ();
-       void hide_region_from_region_list ();
-       void show_region_in_region_list ();
 
        void naturalize_region ();
 
@@ -1320,7 +1336,7 @@ private:
        void temporal_zoom_by_sample (samplepos_t start, samplepos_t end);
        void temporal_zoom_to_sample (bool coarser, samplepos_t sample);
 
-       void insert_region_list_selection (float times);
+       void insert_source_list_selection (float times);
 
        /* import & embed */
 
@@ -1340,7 +1356,7 @@ private:
                             Editing::ImportDisposition            disposition,
                             Editing::ImportMode                   mode,
                             ARDOUR::SrcQuality                    quality,
-                            samplepos_t&                           pos,
+                            samplepos_t&                          pos,
                             int                                   target_regions,
                             int                                   target_tracks,
                             boost::shared_ptr<ARDOUR::Track>&     track,
@@ -1352,7 +1368,7 @@ private:
                            bool&                                 check_sample_rate,
                            Editing::ImportDisposition            disposition,
                            Editing::ImportMode                   mode,
-                           samplepos_t&                           pos,
+                           samplepos_t&                          pos,
                            int                                   target_regions,
                            int                                   target_tracks,
                            boost::shared_ptr<ARDOUR::Track>&     track,
@@ -1360,7 +1376,7 @@ private:
 
        int add_sources (std::vector<std::string>              paths,
                         ARDOUR::SourceList&                   sources,
-                        samplepos_t&                           pos,
+                        samplepos_t&                          pos,
                         Editing::ImportDisposition            disposition,
                         Editing::ImportMode                   mode,
                         int                                   target_regions,
@@ -1372,7 +1388,7 @@ private:
        int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region>     region,
                                         uint32_t                              in_chans,
                                         uint32_t                              out_chans,
-                                        samplepos_t&                           pos,
+                                        samplepos_t&                          pos,
                                         Editing::ImportMode                   mode,
                                         boost::shared_ptr<ARDOUR::Track>&     existing_track,
                                         const std::string&                    new_track_name,
@@ -1394,7 +1410,7 @@ private:
        /* PT import specific */
        void external_pt_dialog ();
        ARDOUR::ImportStatus import_pt_status;
-       static void *_import_pt_thread (void *);
+       static void*_import_pt_thread (void*);
        void* import_pt_thread ();
        PTFFormat import_ptf;
 
@@ -1410,7 +1426,7 @@ private:
        };
 
        EditorImportStatus import_status;
-       static void *_import_thread (void *);
+       static void*_import_thread (void*);
        void* import_thread ();
        void finish_import ();
 
@@ -1440,6 +1456,11 @@ private:
        void toggle_skip_playback ();
 
        void remove_last_capture ();
+
+       void tag_last_capture ();
+       void tag_selected_region ();
+       void tag_regions (ARDOUR::RegionList);
+
        void select_all_selectables_using_time_selection ();
        void select_all_selectables_using_loop();
        void select_all_selectables_using_punch();
@@ -1545,8 +1566,8 @@ private:
 
        void region_view_item_click (AudioRegionView&, GdkEventButton*);
 
-       bool can_remove_control_point (ArdourCanvas::Item *);
-       void remove_control_point (ArdourCanvas::Item *);
+       bool can_remove_control_point (ArdourCanvas::Item*);
+       void remove_control_point (ArdourCanvas::Item*);
 
        void mouse_brush_insert_region (RegionView*, samplepos_t pos);
 
@@ -1576,9 +1597,9 @@ private:
        bool canvas_tempo_curve_event (GdkEvent* event,ArdourCanvas::Item*, TempoCurve*);
        bool canvas_meter_marker_event (GdkEvent* event,ArdourCanvas::Item*, MeterMarker*);
        bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*);
-       bool canvas_note_event (GdkEvent* event, ArdourCanvas::Item *);
+       bool canvas_note_event (GdkEvent* event, ArdourCanvas::Item*);
 
-       bool canvas_ruler_event (GdkEvent* event, ArdourCanvas::Item *, ItemType);
+       bool canvas_ruler_event (GdkEvent* event, ArdourCanvas::Item*, ItemType);
        bool canvas_tempo_bar_event (GdkEvent* event, ArdourCanvas::Item*);
        bool canvas_meter_bar_event (GdkEvent* event, ArdourCanvas::Item*);
        bool canvas_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
@@ -1606,6 +1627,7 @@ private:
        friend class DragManager;
        friend class EditorRouteGroups;
        friend class EditorRegions;
+       friend class EditorSources;
 
        /* non-public event handlers */
 
@@ -1620,8 +1642,8 @@ private:
        void track_canvas_viewport_allocate (Gtk::Allocation alloc);
        void track_canvas_viewport_size_allocated ();
        bool track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const &, int, int, guint);
-       bool track_canvas_key_press (GdkEventKey *);
-       bool track_canvas_key_release (GdkEventKey *);
+       bool track_canvas_key_press (GdkEventKey*);
+       bool track_canvas_key_release (GdkEventKey*);
 
        void set_playhead_cursor ();
 
@@ -1666,7 +1688,7 @@ private:
        void marker_menu_edit ();
        void marker_menu_remove ();
        void marker_menu_rename ();
-       void rename_marker (ArdourMarker *marker);
+       void rename_marker (ArdourMarkermarker);
        void toggle_marker_lock_style ();
        void toggle_tempo_clamped ();
        void toggle_tempo_type ();
@@ -1694,10 +1716,10 @@ private:
        void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
        void tempo_or_meter_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
        void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
-       void build_range_marker_menu (ARDOUR::Location *, bool, bool);
-       void build_marker_menu (ARDOUR::Location *);
-       void build_tempo_marker_menu (TempoMarker *, bool);
-       void build_meter_marker_menu (MeterMarker *, bool);
+       void build_range_marker_menu (ARDOUR::Location*, bool, bool);
+       void build_marker_menu (ARDOUR::Location*);
+       void build_tempo_marker_menu (TempoMarker*, bool);
+       void build_meter_marker_menu (MeterMarker*, bool);
        void build_new_transport_marker_menu ();
 
        void dynamic_cast_marker_object (void*, MeterMarker**, TempoMarker**) const;
@@ -1789,7 +1811,7 @@ private:
        void build_grid_type_menu ();
 
        ArdourWidgets::ArdourButton snap_mode_button;
-       bool snap_mode_button_clicked (GdkEventButton *);
+       bool snap_mode_button_clicked (GdkEventButton*);
 
        Gtk::HBox snap_box;
 
@@ -1895,6 +1917,7 @@ private:
        EditorRouteGroups* _route_groups;
        EditorRoutes*      _routes;
        EditorRegions*     _regions;
+       EditorSources*     _sources;
        EditorSnapshots*   _snapshots;
        EditorLocations*   _locations;
 
@@ -1922,7 +1945,7 @@ private:
        void stop_canvas_autoscroll ();
 
        /* trimming */
-       void point_trim (GdkEvent *, samplepos_t);
+       void point_trim (GdkEvent*, samplepos_t);
 
        void trim_region_front();
        void trim_region_back();
@@ -1971,7 +1994,8 @@ private:
                gint                                  y,
                const Gtk::SelectionData&             data,
                guint                                 info,
-               guint                                 time);
+               guint                                 time,
+               bool                                  from_region_list);
 
        void drop_routes (
                const Glib::RefPtr<Gdk::DragContext>& context,
@@ -1997,8 +2021,8 @@ private:
        uint32_t selection_op_cmd_depth;
        uint32_t selection_op_history_it;
 
-       std::list<XMLNode *> selection_op_history; /* used in *_reversible_selection_op */
-       std::list<XMLNode *> before; /* used in *_reversible_command */
+       std::list<XMLNode*> selection_op_history; /* used in *_reversible_selection_op */
+       std::list<XMLNode*> before; /* used in *_reversible_command */
 
        void update_title ();
        void update_title_s (const std::string & snapshot_name);
@@ -2025,19 +2049,19 @@ private:
        /** computes the timeline sample (sample) of an event whose coordinates
         * are in canvas units (pixels, scroll offset included).
         */
-       samplepos_t canvas_event_sample (GdkEvent const *, double* px = 0, double* py = 0) const;
+       samplepos_t canvas_event_sample (GdkEvent const*, double* px = 0, double* py = 0) const;
 
        /** computes the timeline sample (sample) of an event whose coordinates
         * are in window units (pixels, no scroll offset).
         */
-       samplepos_t window_event_sample (GdkEvent const *, double* px = 0, double* py = 0) const;
+       samplepos_t window_event_sample (GdkEvent const*, double* px = 0, double* py = 0) const;
 
        /* returns false if mouse pointer is not in track or marker canvas
         */
        bool mouse_sample (samplepos_t&, bool& in_track_canvas) const;
 
        TimeFXDialog* current_timefx;
-       static void* timefx_thread (void *arg);
+       static void* timefx_thread (voidarg);
        void do_timefx ();
 
        int time_stretch (RegionSelection&, float fraction);
@@ -2179,12 +2203,12 @@ private:
                                          ARDOUR::SnapPref    gpref);
 
        void snap_to_internal (ARDOUR::MusicSample& first,
-                              ARDOUR::RoundMode   direction = ARDOUR::RoundNearest,
-                              ARDOUR::SnapPref    gpref = ARDOUR::SnapToAny_Visual,
-                              bool                ensure_snap = false);
+                              ARDOUR::RoundMode    direction = ARDOUR::RoundNearest,
+                              ARDOUR::SnapPref     gpref = ARDOUR::SnapToAny_Visual,
+                              bool                 ensure_snap = false);
 
-       samplepos_t snap_to_marker (samplepos_t        presnap,
-                                   ARDOUR::RoundMode   direction = ARDOUR::RoundNearest);
+       samplepos_t snap_to_marker (samplepos_t       presnap,
+                                   ARDOUR::RoundMode direction = ARDOUR::RoundNearest);
 
        RhythmFerret* rhythm_ferret;
 
@@ -2219,11 +2243,11 @@ private:
        Gtk::HBox _summary_hbox;
        EditorSummary* _summary;
 
-       void region_view_added (RegionView *);
+       void region_view_added (RegionView*);
        void region_view_removed ();
 
        EditorGroupTabs* _group_tabs;
-       void fit_route_group (ARDOUR::RouteGroup *);
+       void fit_route_group (ARDOUR::RouteGroup*);
 
        void step_edit_status_change (bool);
        void start_step_editing ();
@@ -2286,12 +2310,12 @@ private:
 
        /* 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> 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);
-       void radio_reg_sens (Glib::RefPtr<Gtk::ActionGroup> action_group, Gtk::RadioAction::Group& radio_group, 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);
+       void radio_reg_sens (Glib::RefPtr<Gtk::ActionGroup> action_group, Gtk::RadioAction::Group& radio_group, char const* name, char const* label, sigc::slot<void> slot);
 
        friend class Drag;
        friend class RegionCutDrag;