Make FFT easier to use. right click on a range selection or a region and
[ardour.git] / gtk2_ardour / editor.h
index 27e563ccf813a3d246eccb2890ad912ab202cd6d..e729a27fc110b95d4aa18727de7c33632f7664cf 100644 (file)
 
 #include <cmath>
 
-#include <sndfile.h>
-
 #include <gtkmm/layout.h>
 #include <gtkmm/comboboxtext.h>
 
 #include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/click_box.h>
+#include <gtkmm2ext/dndtreeview.h>
 
 #include <ardour/stateful.h>
 #include <ardour/session.h>
 #include <ardour/tempo.h>
 #include <ardour/location.h>
 #include <ardour/region.h>
+#include <ardour/externalsource.h>
 
 #include "audio_clock.h"
 #include "gtk-custom-ruler.h"
@@ -55,6 +55,7 @@
 #include "enums.h"
 #include "region_selection.h"
 #include "canvas.h"
+#include "draginfo.h"
 
 namespace Gtkmm2ext {
        class TearOff;
@@ -101,6 +102,7 @@ class AutomationSelection;
 class MixerStrip;
 class StreamView;
 class ControlPoint;
+class AnalysisWindow;
 
 /* <CMT Additions> */
 class ImageFrameView;
@@ -141,11 +143,11 @@ class Editor : public PublicEditor
        void step_mouse_mode (bool next);
        Editing::MouseMode current_mouse_mode () { return mouse_mode; }
 
-       void add_imageframe_time_axis(ARDOUR::stringcr_t track_name, void*) ;
-       void add_imageframe_marker_time_axis(ARDOUR::stringcr_t track_name, TimeAxisView* marked_track, void*) ;
+       void add_imageframe_time_axis(const string & track_name, void*) ;
+       void add_imageframe_marker_time_axis(const string & track_name, TimeAxisView* marked_track, void*) ;
        void connect_to_image_compositor() ;
        void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
-       TimeAxisView* get_named_time_axis(ARDOUR::stringcr_t name) ;
+       TimeAxisView* get_named_time_axis(const string & name) ;
        /* </CMT Additions> */
 
        void consider_auditioning (ARDOUR::Region&);
@@ -214,8 +216,8 @@ class Editor : public PublicEditor
        Selection& get_cut_buffer() const { return *cut_buffer; }
 
        void play_selection ();
-       void select_all_in_track (bool add);
-       void select_all (bool add);
+       void select_all_in_track (Selection::Operation op);
+       void select_all (Selection::Operation op);
        void invert_selection_in_track ();
        void invert_selection ();
 
@@ -224,6 +226,10 @@ class Editor : public PublicEditor
        void set_show_measures (bool yn);
        bool show_measures () const { return _show_measures; }
 
+       /* analysis window */
+       void analyze_region_selection();
+       void analyze_range_selection();
+
        /* export */
 
        /* these initiate export ... */
@@ -253,13 +259,17 @@ class Editor : public PublicEditor
        jack_nframes_t leftmost_frame;
        void clear_playlist (ARDOUR::Playlist&);
 
+       void new_playlists ();
+       void copy_playlists ();
+       void clear_playlists ();
+
        TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0);
 
        Width editor_mixer_strip_width;
        void show_editor_mixer (bool yn);
        void set_selected_mixer_strip (TimeAxisView&);
-       void unselect_strip_in_display (TimeAxisView& tv);
-       void select_strip_in_display (TimeAxisView* tv);
+       void hide_track_in_display (TimeAxisView& tv);
+       void show_track_in_display (TimeAxisView& tv);
 
        /* nudge is initiated by transport controls owned by ARDOUR_UI */
 
@@ -277,6 +287,13 @@ class Editor : public PublicEditor
        void toggle_follow_playhead ();
        bool follow_playhead() const { return _follow_playhead; }
 
+       void toggle_waveform_visibility ();
+       void toggle_waveforms_while_recording ();
+       void toggle_measure_visibility ();
+
+       void set_meter_falloff (float);
+       void set_meter_hold (int32_t);
+
        /* xfades */
 
        void toggle_xfades_active();
@@ -302,6 +319,9 @@ class Editor : public PublicEditor
 
        void reposition_x_origin (jack_nframes_t sample);
 
+       void maximise_editing_space();
+       void restore_editing_space();
+
   protected:
        void map_transport_state ();
        void map_position_change (jack_nframes_t);
@@ -372,6 +392,7 @@ class Editor : public PublicEditor
        Editing::MouseMode mouse_mode;
        void      mouse_insert (GdkEventButton *);
 
+       int  pre_maximal_pane_position;
        void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
 
        Gtk::Notebook the_notebook;
@@ -430,11 +451,22 @@ class Editor : public PublicEditor
        CrossfadeView*     clicked_crossfadeview;
        ControlPoint*      clicked_control_point;
 
+       void mapover_audio_tracks (sigc::slot<void,AudioTimeAxisView&,uint32_t> sl);
+
+       /* functions to be passed to mapover_audio_tracks(), possibly with sigc::bind()-supplied arguments */
+
+       void mapped_set_selected_regionview_from_click (AudioTimeAxisView&, uint32_t, AudioRegionView*, vector<AudioRegionView*>*);
+       void mapped_use_new_playlist (AudioTimeAxisView&, uint32_t);
+       void mapped_use_copy_playlist (AudioTimeAxisView&, uint32_t);
+       void mapped_clear_playlist (AudioTimeAxisView&, uint32_t);
+
+       /* end */
+
        void catch_vanishing_audio_regionview (AudioRegionView *);
-       void set_selected_control_point_from_click (bool add = false, bool with_undo = true, bool no_remove=false);
-       void set_selected_track_from_click (bool add = false, bool with_undo = true, bool no_remove=false);
-       void set_selected_regionview_from_click (bool add = false, bool no_track_remove=false);
-       void set_selected_regionview_from_region_list (ARDOUR::Region& region, bool add = false);
+       void set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
+       void set_selected_track_from_click (Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
+       void set_selected_regionview_from_click (Selection::Operation op = Selection::Set, bool no_track_remove=false);
+       void set_selected_regionview_from_region_list (ARDOUR::Region& region, Selection::Operation op = Selection::Set);
        bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, ARDOUR::Region*);
        void collect_new_region_view (AudioRegionView *);
 
@@ -485,8 +517,8 @@ class Editor : public PublicEditor
        
        bool track_canvas_motion (GdkEvent*);
 
-       void set_verbose_canvas_cursor (ARDOUR::stringcr_t, double x, double y);
-       void set_verbose_canvas_cursor_text (ARDOUR::stringcr_t);
+       void set_verbose_canvas_cursor (const string &, double x, double y);
+       void set_verbose_canvas_cursor_text (const string &);
        void show_verbose_canvas_cursor();
        void hide_verbose_canvas_cursor();
 
@@ -623,6 +655,7 @@ class Editor : public PublicEditor
        void    cursor_to_region_point (Cursor*, ARDOUR::RegionPoint, int32_t dir);
        void    cursor_to_selection_start (Cursor *);
        void    cursor_to_selection_end   (Cursor *);
+       void    select_all_selectables_using_cursor (Cursor *, bool);
 
        ARDOUR::Region* find_next_region (jack_nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
 
@@ -642,8 +675,8 @@ class Editor : public PublicEditor
        Gtk::Adjustment     horizontal_adjustment;
 
        Gtk::Layout         controls_layout;
-       void set_layout_width(Gtk::Requisition *);
-       bool Editor::layout_expose (GdkEventExpose* ex);
+       bool control_layout_scroll (GdkEventScroll* ev);
+       void controls_layout_size_request (Gtk::Requisition*);
 
        Gtk::HScrollbar     edit_hscrollbar;
        bool                edit_hscroll_dragging;
@@ -683,18 +716,21 @@ class Editor : public PublicEditor
            RegionListDisplayModelColumns() {
                    add (name);
                    add (region);
+                   add (color_);
            }
            Gtk::TreeModelColumn<Glib::ustring> name;
            Gtk::TreeModelColumn<ARDOUR::Region*> region;
+               Gtk::TreeModelColumn<Gdk::Color> color_;
        };
            
        RegionListDisplayModelColumns    region_list_columns;
-       Gtk::TreeView                    region_list_display;
+       Gtkmm2ext::DnDTreeView           region_list_display;
        Glib::RefPtr<Gtk::TreeStore>     region_list_model;
-       Glib::RefPtr<Gtk::TreeModelSort> region_list_sort_model;
-       Glib::RefPtr<Gtk::Action>        toggle_full_region_list_action;
+       Glib::RefPtr<Gtk::ToggleAction>  toggle_full_region_list_action;
+       Glib::RefPtr<Gtk::ToggleAction>  toggle_show_auto_regions_action;
 
        void region_list_selection_changed ();
+       bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
 
        Gtk::Menu          *region_list_menu;
        Gtk::ScrolledWindow region_list_scroller;
@@ -707,12 +743,7 @@ class Editor : public PublicEditor
        void region_list_clear ();
        void region_list_selection_mapover (sigc::slot<void,ARDOUR::Region&>);
        void build_region_list_menu ();
-
-       Gtk::CheckMenuItem* toggle_auto_regions_item;
-       Gtk::CheckMenuItem* toggle_full_region_list_item;
-
-       Gtk::MenuItem* import_audio_item;
-       Gtk::MenuItem* embed_audio_item;
+       void show_region_list_display_context_menu (int button, int time);
 
        bool show_automatic_regions_in_region_list;
        Editing::RegionListSortType region_list_sort_type;
@@ -725,6 +756,26 @@ class Editor : public PublicEditor
 
        int region_list_sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
 
+       /* snapshots */
+
+       Gtk::ScrolledWindow      snapshot_display_scroller;
+       struct SnapshotDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
+           SnapshotDisplayModelColumns() { 
+                   add (visible_name);
+                   add (real_name);
+           }
+           Gtk::TreeModelColumn<Glib::ustring> visible_name;
+           Gtk::TreeModelColumn<Glib::ustring> real_name;
+       };
+
+       SnapshotDisplayModelColumns snapshot_display_columns;
+       Glib::RefPtr<Gtk::ListStore> snapshot_display_model;
+       Gtk::TreeView snapshot_display;
+
+       bool snapshot_display_button_press (GdkEventButton*);
+       void snapshot_display_selection_changed ();
+       void redisplay_snapshots();
+
        /* named selections */
 
        struct NamedSelectionDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
@@ -739,12 +790,12 @@ class Editor : public PublicEditor
        NamedSelectionDisplayModelColumns named_selection_columns;
        Glib::RefPtr<Gtk::TreeStore>     named_selection_model;
 
-       Gtk::TreeView          named_selection_display;
-       Gtk::ScrolledWindow named_selection_scroller;
+       Gtkmm2ext::DnDTreeView named_selection_display;
+       Gtk::ScrolledWindow    named_selection_scroller;
 
        void name_selection();
        void named_selection_name_chosen ();
-       void create_named_selection (ARDOUR::stringcr_t);
+       void create_named_selection (const string &);
        void paste_named_selection (float times);
 
        void handle_new_named_selection ();
@@ -833,6 +884,7 @@ class Editor : public PublicEditor
        void split_region_at (jack_nframes_t);
        void split_regions_at (jack_nframes_t, AudioRegionSelection&);
        void crop_region_to_selection ();
+       void set_a_regions_sync_position (ARDOUR::Region&, jack_nframes_t);
        void set_region_sync_from_edit_cursor ();
        void remove_region_sync();
        void align_selection (ARDOUR::RegionPoint, jack_nframes_t position);
@@ -896,25 +948,25 @@ class Editor : public PublicEditor
        void temporal_zoom_selection ();
        void temporal_zoom_session ();
        void temporal_zoom (gdouble scale);
-       void temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, ARDOUR::stringcr_t op);
+       void temporal_zoom_by_frame (jack_nframes_t start, jack_nframes_t end, const string & op);
        void temporal_zoom_to_frame (bool coarser, jack_nframes_t frame);
 
        void amplitude_zoom (gdouble scale);
        void amplitude_zoom_step (bool in);
 
-       void insert_region_list_drag (ARDOUR::AudioRegion&);
+       void insert_region_list_drag (ARDOUR::AudioRegion&, int x, int y);
        void insert_region_list_selection (float times);
 
        void insert_sndfile (bool as_tracks);
        void embed_audio ();    // inserts into region list
-       int  reject_because_rate_differs (ARDOUR::stringcr_t path, SF_INFO& finfo, ARDOUR::stringcr_t action, bool multiple_pending);
+       int  reject_because_rate_differs (const string & path, ARDOUR::SoundFileInfo& finfo, const string & action, bool multiple_pending);
 
        void do_embed_sndfiles (vector<string> paths, bool split);
        void embed_sndfile (string path, bool split, bool multiple_files, bool& check_sr);
 
        void do_insert_sndfile (vector<string> path, bool multi, jack_nframes_t frame);
        void insert_paths_as_new_tracks (std::vector<std::string> paths, bool multi); // inserts files as new tracks
-       void insert_sndfile_into (ARDOUR::stringcr_t path, bool multi, AudioTimeAxisView* tv, jack_nframes_t& frame, bool prompt=true);
+       void insert_sndfile_into (const string & path, bool multi, AudioTimeAxisView* tv, jack_nframes_t& frame, bool prompt=true);
        static void* _insert_sndfile_thread (void*);
        void*  insert_sndfile_thread (void*);
 
@@ -930,6 +982,7 @@ class Editor : public PublicEditor
        void interthread_cancel_clicked ();
        void build_interthread_progress_window ();
        ARDOUR::InterThreadInfo* current_interthread_info;
+       AnalysisWindow* analysis_window;
 
        /* import specific info */
 
@@ -972,7 +1025,9 @@ class Editor : public PublicEditor
        void cursor_align (bool playhead_to_edit);
 
        void remove_last_capture ();
-
+       void select_all_selectables_using_time_selection ();
+       void select_all_selectables_using_loop();
+       void select_all_selectables_using_punch();
        void set_selection_from_range (ARDOUR::Location&);
        void set_selection_from_punch ();
        void set_selection_from_loop ();
@@ -1001,51 +1056,15 @@ class Editor : public PublicEditor
        Editing::SnapMode snap_mode;
        double snap_threshold;
 
-       void soundfile_chosen_for_insert (ARDOUR::stringcr_t selection, bool split_channels);
-       void soundfile_chosen_for_embed (ARDOUR::stringcr_t selection, bool split_channels);
-       void soundfile_chosen_for_import (ARDOUR::stringcr_t selection, bool split_channels);
+       void soundfile_chosen_for_insert (const string & selection, bool split_channels);
+       void soundfile_chosen_for_embed (const string & selection, bool split_channels);
+       void soundfile_chosen_for_import (const string & selection, bool split_channels);
 
-       void handle_gui_changes (ARDOUR::stringcr_t, void *);
+       void handle_gui_changes (const string &, void *);
 
        void    hide_all_tracks (bool with_select);
 
-       void route_display_selection_changed ();
-       void redisplay_route_list();
-       gint route_list_reordered ();
-       bool ignore_route_list_reorder;
-       void queue_route_list_reordered ();
-
-       struct DragInfo {
-         ArdourCanvas::Item* item;
-           void* data;
-           jack_nframes_t last_frame_position;
-           int32_t pointer_frame_offset;
-           jack_nframes_t grab_frame;
-           jack_nframes_t last_pointer_frame;
-           jack_nframes_t current_pointer_frame;
-           double grab_x, grab_y;
-           double cumulative_x_drag;
-           double cumulative_y_drag;
-           double current_pointer_x;
-           double current_pointer_y;
-         void (Editor::*motion_callback)(ArdourCanvas::Item*, GdkEvent*);
-         void (Editor::*finished_callback)(ArdourCanvas::Item*, GdkEvent*);
-           TimeAxisView* last_trackview;
-           bool x_constrained;
-           bool copy;
-           bool was_rolling;
-           bool first_move;
-           bool move_threshold_passsed;
-           bool want_move_threshold;
-           bool brushing;
-           ARDOUR::Location* copied_location;
-       } drag_info;
-
-       struct LineDragInfo {
-           uint32_t before;
-           uint32_t after;
-       };
-
+       DragInfo drag_info;
        LineDragInfo current_line_drag_info;
 
        void start_grab (GdkEvent*, Gdk::Cursor* cursor = 0);
@@ -1093,7 +1112,9 @@ class Editor : public PublicEditor
        void start_line_grab_from_line (ArdourCanvas::Item*, GdkEvent*);
        void start_line_grab (AutomationLine *, GdkEvent*);
        void start_tempo_marker_grab (ArdourCanvas::Item*, GdkEvent*);
+       void start_tempo_marker_copy_grab (ArdourCanvas::Item*, GdkEvent*);
        void start_meter_marker_grab (ArdourCanvas::Item*, GdkEvent*);
+       void start_meter_marker_copy_grab (ArdourCanvas::Item*, GdkEvent*);
 
        void region_view_item_click (AudioRegionView&, GdkEventButton*);
 
@@ -1148,6 +1169,7 @@ class Editor : public PublicEditor
        bool canvas_playhead_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
        bool canvas_edit_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
        bool track_canvas_event (GdkEvent* event, ArdourCanvas::Item*);
+       bool track_canvas_scroll (GdkEventScroll* event);
 
        bool track_canvas_button_press_event (GdkEventButton *);
        bool track_canvas_button_release_event (GdkEventButton *);
@@ -1161,13 +1183,16 @@ class Editor : public PublicEditor
        void kbd_driver (sigc::slot<void,GdkEvent*>, bool use_track_canvas = true, bool use_time_canvas = true, bool can_select = true);
        void kbd_set_playhead_cursor ();
        void kbd_set_edit_cursor ();
+       void kbd_mute_unmute_region ();
        void kbd_split ();
+       void kbd_set_sync_position ();
        void kbd_align (ARDOUR::RegionPoint);
        void kbd_align_relative (ARDOUR::RegionPoint);
        void kbd_brush ();
        void kbd_audition ();
 
        void kbd_do_split (GdkEvent*);
+       void kbd_do_set_sync_position (GdkEvent* ev);
        void kbd_do_align (GdkEvent*, ARDOUR::RegionPoint);
        void kbd_do_align_relative (GdkEvent*, ARDOUR::RegionPoint);
        void kbd_do_brush (GdkEvent*);
@@ -1220,6 +1245,7 @@ class Editor : public PublicEditor
        void marker_menu_rename ();
        void marker_menu_hide ();
        void marker_menu_loop_range ();
+       void marker_menu_select_all_selectables_using_range ();
        void marker_menu_play_from ();
        void marker_menu_set_playhead ();
        void marker_menu_set_from_playhead ();
@@ -1233,6 +1259,7 @@ class Editor : public PublicEditor
        void tm_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
        void transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
        void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
+       void build_range_marker_menu ();
        void build_marker_menu ();
        void build_tm_marker_menu ();
        void build_transport_marker_menu ();
@@ -1406,7 +1433,7 @@ class Editor : public PublicEditor
        void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
        void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
 
-       bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, bool add);
+       bool select_all_within (jack_nframes_t start, jack_nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
        
        ArdourCanvas::SimpleRect   *rubberband_rect;
        
@@ -1424,39 +1451,59 @@ class Editor : public PublicEditor
        struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
            RouteDisplayModelColumns() { 
                    add (text);
+                   add (visible);
                    add (tv);
            }
            Gtk::TreeModelColumn<Glib::ustring>  text;
-           Gtk::TreeModelColumn<TimeAxisView*>    tv;
+           Gtk::TreeModelColumn<bool>           visible;
+           Gtk::TreeModelColumn<TimeAxisView*>  tv;
        };
 
-       RouteDisplayModelColumns    route_display_columns;
-       Glib::RefPtr<Gtk::ListStore> route_display_model;
+       RouteDisplayModelColumns         route_display_columns;
+       Glib::RefPtr<Gtk::ListStore>     route_display_model;
        Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
 
        gint route_list_compare_func (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
-       Gtk::TreeView          route_list; //GTK2FIX rename to route_display
-       Gtk::ScrolledWindow route_list_scroller;
-       Gtk::Menu          *route_list_menu;
+       Gtkmm2ext::DnDTreeView   route_list_display; 
+       Gtk::ScrolledWindow      route_list_scroller;
+       Gtk::Menu*               route_list_menu;
+
+       bool route_list_display_button_press (GdkEventButton*);
+       bool route_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
+
+       void route_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
+       void route_list_delete (const Gtk::TreeModel::Path&);
+       void initial_route_list_display ();
+       void redisplay_route_list();
+       void route_list_reordered (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* what);
+       bool ignore_route_list_reorder;
+       bool no_route_list_redisplay;
+       void queue_route_list_reordered ();
 
-       void route_list_column_click ();
        void build_route_list_menu ();
-       void select_all_routes ();
-       void unselect_all_routes ();
-       void select_all_audiotracks ();
-       void unselect_all_audiotracks ();
-       void select_all_audiobus ();
-       void unselect_all_audiobus ();
+       void show_route_list_menu ();
+
+       void show_all_routes ();
+       void hide_all_routes ();
+       void show_all_audiotracks ();
+       void hide_all_audiotracks ();
+       void show_all_audiobus ();
+       void hide_all_audiobus ();
+
+       void set_all_tracks_visibility (bool yn);
+       void set_all_audio_visibility (int type, bool yn);
 
        /* edit group management */
 
         struct GroupListModelColumns : public Gtk::TreeModel::ColumnRecord {
                 GroupListModelColumns () {
                       add (is_active);
+                      add (is_visible);
                        add (text);
                       add (routegroup);
                 }
                Gtk::TreeModelColumn<bool> is_active;
+               Gtk::TreeModelColumn<bool> is_visible;
                Gtk::TreeModelColumn<std::string> text;
                Gtk::TreeModelColumn<ARDOUR::RouteGroup*>   routegroup;
        };
@@ -1465,23 +1512,26 @@ class Editor : public PublicEditor
        Glib::RefPtr<Gtk::ListStore> group_model;
        Glib::RefPtr<Gtk::TreeSelection> group_selection;
 
-       Gtk::Button         edit_group_list_button;
-       Gtk::Label          edit_group_list_button_label;
-       Gtk::TreeView       edit_group_list;
-       Gtk::ScrolledWindow edit_group_list_scroller;
-       Gtk::Menu          *edit_group_list_menu;
-       Gtk::VBox           edit_group_vbox;
+       Gtk::TreeView          edit_group_display;
+       Gtk::ScrolledWindow    edit_group_display_scroller;
+       Gtk::Menu*             edit_group_list_menu;
 
-       void edit_group_list_column_click (gint);
        void build_edit_group_list_menu ();
-       void select_all_edit_groups ();
-       void unselect_all_edit_groups ();
+       void activate_all_edit_groups ();
+       void disable_all_edit_groups ();
+
+       bool in_edit_group_row_change;
+       void edit_group_row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
+       void edit_group_name_edit (const Glib::ustring&, const Glib::ustring&);
        void new_edit_group ();
        void edit_group_list_button_clicked ();
        gint edit_group_list_button_press_event (GdkEventButton* ev);
        void edit_group_selection_changed ();
        void fake_add_edit_group (ARDOUR::RouteGroup* group);
+       void fake_remove_edit_group (ARDOUR::RouteGroup* group);
        void add_edit_group (ARDOUR::RouteGroup* group);
+       void remove_selected_edit_group ();
+       void edit_groups_changed ();
        void group_flags_changed (void*, ARDOUR::RouteGroup*);
 
        Gtk::VBox           list_vpacker;
@@ -1524,31 +1574,49 @@ class Editor : public PublicEditor
        /* Drag-n-Drop */
 
        int convert_drop_to_paths (std::vector<std::string>& paths,
-                                  GdkDragContext     *context,
+                                  const Glib::RefPtr<Gdk::DragContext>& context,
                                   gint                x,
                                   gint                y,
-                                  GtkSelectionData   *data,
+                                  const Gtk::SelectionData& data,
                                   guint               info,
                                   guint               time);
 
-       void  track_canvas_drag_data_received  (GdkDragContext     *context,
+       void  track_canvas_drag_data_received  (const Glib::RefPtr<Gdk::DragContext>& context,
                                                gint                x,
                                                gint                y,
-                                               GtkSelectionData   *data,
+                                               const Gtk::SelectionData& data,
                                                guint               info,
                                                guint               time);
-
-       void  region_list_display_drag_data_received  (GdkDragContext     *context,
+       
+       void  region_list_display_drag_data_received  (const Glib::RefPtr<Gdk::DragContext>& context,
                                                       gint                x,
                                                       gint                y,
-                                                      GtkSelectionData   *data,
+                                                      const Gtk::SelectionData& data,
                                                       guint               info,
                                                       guint               time);
-       
+
+
+       void  drop_paths  (const Glib::RefPtr<Gdk::DragContext>& context,
+                          gint                x,
+                          gint                y,
+                          const Gtk::SelectionData& data,
+                          guint               info,
+                          guint               time);
+
+       void  drop_regions  (const Glib::RefPtr<Gdk::DragContext>& context,
+                            gint                x,
+                            gint                y,
+                            const Gtk::SelectionData& data,
+                            guint               info,
+                            guint               time);
+
        /* audio export */
 
        ExportDialog *export_dialog;
+       ExportDialog *export_range_markers_dialog;
+       
        void export_range (jack_nframes_t start, jack_nframes_t end);
+       void export_range_markers ();
 
        int  write_region_selection(AudioRegionSelection&);
        bool write_region (string path, ARDOUR::AudioRegion&);
@@ -1574,11 +1642,11 @@ class Editor : public PublicEditor
        UndoHistory visual_history;
        UndoCommand current_visual_command;
 
-       void begin_reversible_visual_command (ARDOUR::stringcr_t cmd_name);
+       void begin_reversible_visual_command (const string & cmd_name);
        void commit_reversible_visual_command ();
 
        void update_title ();   
-       void update_title_s (ARDOUR::stringcr_t snapshot_name);
+       void update_title_s (const string & snapshot_name);
 
        struct State {
            Selection* selection;
@@ -1678,8 +1746,8 @@ class Editor : public PublicEditor
        bool _xfade_visibility;
        
        /* <CMT Additions> */
-       void handle_new_imageframe_time_axis_view(ARDOUR::stringcr_t track_name, void* src) ;
-       void handle_new_imageframe_marker_time_axis_view(ARDOUR::stringcr_t track_name, TimeAxisView* marked_track) ;
+       void handle_new_imageframe_time_axis_view(const string & track_name, void* src) ;
+       void handle_new_imageframe_marker_time_axis_view(const string & track_name, TimeAxisView* marked_track) ;
 
        void start_imageframe_grab(ArdourCanvas::Item*, GdkEvent*) ;
        void start_markerview_grab(ArdourCanvas::Item*, GdkEvent*) ;
@@ -1769,10 +1837,9 @@ class Editor : public PublicEditor
        void toggle_gain_envelope_visibility ();
        void toggle_gain_envelope_active ();
        
-       typedef std::map<Editing::ColorID,std::string> ColorStyleMap;
-       void init_colormap ();
-
        bool on_key_press_event (GdkEventKey*);
+
+       void session_state_saved (string);
 };
 
 #endif /* __ardour_editor_h__ */