2 Copyright (C) 2000-2003 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __ardour_editor_h__
21 #define __ardour_editor_h__
29 #include <glibmm/ustring.h>
31 #include <boost/optional.hpp>
33 #include <libgnomecanvasmm/canvas.h>
34 #include <libgnomecanvasmm/group.h>
35 #include <libgnomecanvasmm/line.h>
36 #include <libgnomecanvasmm/pixbuf.h>
40 #include <gtkmm/layout.h>
41 #include <gtkmm/comboboxtext.h>
43 #include <gtkmm2ext/selector.h>
44 #include <gtkmm2ext/click_box.h>
45 #include <gtkmm2ext/dndtreeview.h>
47 #include <pbd/stateful.h>
48 #include <ardour/session.h>
49 #include <ardour/tempo.h>
50 #include <ardour/location.h>
51 #include <ardour/audioregion.h>
53 #include "audio_clock.h"
54 #include "gtk-custom-ruler.h"
55 #include "ardour_dialog.h"
56 #include "public_editor.h"
59 #include "editor_items.h"
60 #include "region_selection.h"
63 #include "tempo_lines.h"
70 class AudioDiskstream;
89 class AudioTimeAxisView;
90 class AutomationTimeAxisView;
91 class AudioRegionView;
94 class PlaylistSelector;
98 class UIExportSpecification;
102 class TrackSelection;
103 class AutomationSelection;
106 class AudioStreamView;
108 class SoundFileOmega;
110 class AnalysisWindow;
113 /* <CMT Additions> */
114 class ImageFrameView;
115 class ImageFrameTimeAxisView;
116 class ImageFrameTimeAxis;
117 class MarkerTimeAxis ;
119 class ImageFrameSocketHandler ;
120 class TimeAxisViewItem ;
121 /* </CMT Additions> */
124 class Editor : public PublicEditor
130 void connect_to_session (ARDOUR::Session *);
131 ARDOUR::Session* current_session() const { return session; }
133 nframes_t leftmost_position() const { return leftmost_frame; }
134 nframes_t current_page_frames() const {
135 return (nframes_t) floor (canvas_width * frames_per_unit);
138 void set_snap_to (Editing::SnapType);
139 void set_snap_mode (Editing::SnapMode);
140 void set_snap_threshold (double pixel_distance) {snap_threshold = pixel_distance;}
142 void undo (uint32_t n = 1);
143 void redo (uint32_t n = 1);
145 XMLNode& get_state ();
146 int set_state (const XMLNode& );
148 void set_mouse_mode (Editing::MouseMode, bool force=true);
149 void step_mouse_mode (bool next);
150 Editing::MouseMode current_mouse_mode () const { return mouse_mode; }
152 void set_midi_edit_cursor (Editing::MidiEditMode);
153 void set_midi_edit_mode (Editing::MidiEditMode, bool force=true);
154 Editing::MidiEditMode current_midi_edit_mode () const { return midi_edit_mode; }
157 void add_imageframe_time_axis(const std::string & track_name, void*) ;
158 void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) ;
159 void connect_to_image_compositor() ;
160 void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
161 TimeAxisView* get_named_time_axis(const std::string & name) ;
164 void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
165 void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
166 void remove_a_region (boost::shared_ptr<ARDOUR::Region>);
168 /* option editor-access */
170 void set_show_waveforms (bool yn);
171 bool show_waveforms() const { return _show_waveforms; }
173 void set_show_waveforms_recording (bool yn);
174 bool show_waveforms_recording() const { return _show_waveforms_recording; }
176 /* things that need to be public to be used in the main menubar */
178 void new_region_from_selection ();
179 void separate_region_from_selection ();
180 void separate_regions_using_location (ARDOUR::Location&);
181 void toggle_playback (bool with_abort);
182 void transition_to_rolling (bool forward);
186 nframes_t unit_to_frame (double unit) {
187 return (nframes_t) rint (unit * frames_per_unit);
190 double frame_to_unit (nframes_t frame) {
191 return rint ((double) frame / (double) frames_per_unit);
194 double frame_to_unit (double frame) {
195 return rint (frame / frames_per_unit);
198 /* NOTE: these functions assume that the "pixel" coordinate is
199 the result of using the world->canvas affine transform on a
200 world coordinate. These coordinates already take into
201 account any scrolling carried out by adjusting the
205 nframes_t pixel_to_frame (double pixel) {
207 /* pixel can be less than zero when motion events
208 are processed. since we've already run the world->canvas
209 affine, that means that the location *really* is "off
210 to the right" and thus really is "before the start".
214 return (nframes_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit);
220 gulong frame_to_pixel (nframes_t frame) {
221 return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas.gobj())->pixels_per_unit)));
226 Selection& get_selection() const { return *selection; }
227 Selection& get_cut_buffer() const { return *cut_buffer; }
229 bool extend_selection_to_track (TimeAxisView&);
231 void play_selection ();
232 void select_all_in_selected_tracks (Selection::Operation op);
233 void select_all (Selection::Operation op);
234 void invert_selection_in_selected_tracks ();
235 void invert_selection ();
239 void set_show_measures (bool yn);
240 bool show_measures () const { return _show_measures; }
241 bool initial_ruler_update_required;
244 /* analysis window */
245 void analyze_region_selection();
246 void analyze_range_selection();
251 /* these initiate export ... */
253 void export_session();
254 void export_selection();
257 void add_toplevel_controls (Gtk::Container&);
258 Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; }
260 void set_zoom_focus (Editing::ZoomFocus);
261 Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
262 gdouble get_current_zoom () { return frames_per_unit; }
264 void temporal_zoom_step (bool coarser);
266 /* stuff that AudioTimeAxisView and related classes use */
268 PlaylistSelector& playlist_selector() const;
269 void route_name_changed (TimeAxisView *);
270 gdouble frames_per_unit;
271 nframes_t leftmost_frame;
272 void clear_playlist (boost::shared_ptr<ARDOUR::Playlist>);
274 void new_playlists (TimeAxisView* v);
275 void copy_playlists (TimeAxisView* v);
276 void clear_playlists (TimeAxisView* v);
278 TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0);
280 Width editor_mixer_strip_width;
281 void maybe_add_mixer_strip_width (XMLNode&);
282 void show_editor_mixer (bool yn);
283 void show_editor_list (bool yn);
284 void set_selected_mixer_strip (TimeAxisView&);
285 void hide_track_in_display (TimeAxisView& tv);
286 void show_track_in_display (TimeAxisView& tv);
288 /* nudge is initiated by transport controls owned by ARDOUR_UI */
290 void nudge_forward (bool next);
291 void nudge_backward (bool next);
293 /* nudge initiated from context menu */
295 void nudge_forward_capture_offset ();
296 void nudge_backward_capture_offset ();
298 /* playhead/screen stuff */
300 void set_follow_playhead (bool yn);
301 void toggle_follow_playhead ();
302 bool follow_playhead() const { return _follow_playhead; }
303 bool dragging_playhead () const { return _dragging_playhead; }
305 void toggle_waveform_visibility ();
306 void toggle_waveforms_while_recording ();
307 void toggle_measure_visibility ();
308 void toggle_logo_visibility ();
310 /* SMPTE timecode & video sync */
312 void smpte_fps_chosen (ARDOUR::SmpteFormat format);
313 void video_pullup_chosen (ARDOUR::Session::PullupFormat pullup);
314 void subframes_per_frame_chosen (uint32_t);
316 void update_smpte_mode();
317 void update_video_pullup();
318 void update_subframes_per_frame ();
321 void toggle_auto_xfade ();
322 void toggle_xfades_active ();
323 void toggle_xfade_visibility ();
324 bool xfade_visibility() const { return _xfade_visibility; }
325 void update_xfade_visibility ();
326 void update_crossfade_model ();
327 void set_crossfade_model (ARDOUR::CrossfadeModel);
330 void set_layer_model (ARDOUR::LayerModel);
331 void update_layering_model ();
333 /* redirect shared ops menu. caller must free returned menu */
335 Gtk::Menu* redirect_menu ();
337 /* floating windows/transient */
339 void ensure_float (Gtk::Window&);
343 void scroll_tracks_down_line ();
344 void scroll_tracks_up_line ();
346 bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
347 void prepare_for_cleanup ();
349 void maximise_editing_space();
350 void restore_editing_space();
352 void reset_x_origin (nframes_t);
353 void reset_zoom (double);
354 void reposition_and_zoom (nframes_t, double);
356 nframes_t edit_cursor_position(bool);
357 bool update_mouse_speed ();
358 bool decelerate_mouse_speed ();
361 void map_transport_state ();
362 void map_position_change (nframes_t);
368 /// The session that we are editing, or 0
369 void color_handler ();
370 ARDOUR::Session *session;
373 // to keep track of the playhead position for control_scroll
374 boost::optional<nframes_t> _control_scroll_target;
376 PlaylistSelector* _playlist_selector;
378 void set_frames_per_unit (double);
380 Editing::MouseMode mouse_mode;
381 Editing::MidiEditMode midi_edit_mode;
383 int post_maximal_editor_width;
384 int post_maximal_pane_position;
385 int pre_maximal_pane_position;
386 int pre_maximal_editor_width;
387 void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
389 Gtk::Notebook the_notebook;
390 Gtk::HPaned edit_pane;
392 Gtk::EventBox meter_base;
394 Gtk::EventBox marker_base;
395 Gtk::HBox marker_box;
396 Gtk::VBox scrollers_rulers_markers_box;
398 void location_changed (ARDOUR::Location *);
399 void location_flags_changed (ARDOUR::Location *, void *);
400 void refresh_location_display ();
401 void refresh_location_display_s (ARDOUR::Change);
402 void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
403 void add_new_location (ARDOUR::Location *);
404 void location_gone (ARDOUR::Location *);
405 void remove_marker (ArdourCanvas::Item&, GdkEvent*);
406 gint really_remove_marker (ARDOUR::Location* loc);
408 uint32_t location_marker_color;
409 uint32_t location_range_color;
410 uint32_t location_loop_color;
411 uint32_t location_punch_color;
412 uint32_t location_cd_marker_color;
414 struct LocationMarkers {
422 void set_name (const string&);
423 void set_position (nframes_t start, nframes_t end = 0);
424 void set_color_rgba (uint32_t);
427 LocationMarkers *find_location_markers (ARDOUR::Location *);
428 ARDOUR::Location* find_location_from_marker (Marker *, bool& is_start);
430 typedef std::map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
431 LocationMarkerMap location_markers;
433 void hide_marker (ArdourCanvas::Item*, GdkEvent*);
434 void clear_marker_display ();
435 void mouse_add_new_marker (nframes_t where);
437 TimeAxisView* clicked_axisview;
438 RouteTimeAxisView* clicked_routeview;
439 /** The last RegionView that was clicked on, or 0 if the last click was not
440 * on a RegionView. This is set up by the canvas event handlers in
441 * editor_canvas_events.cc
443 RegionView* clicked_regionview;
445 RegionView* latest_regionview;
446 uint32_t clicked_selection;
447 CrossfadeView* clicked_crossfadeview;
448 ControlPoint* clicked_control_point;
450 void sort_track_selection ();
452 void get_relevant_tracks (std::set<RouteTimeAxisView*>& relevant_tracks);
453 void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&) const;
454 void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*) const;
456 /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
458 void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, vector<RegionView*>*) const;
459 void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t);
460 void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t);
461 void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
465 void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
466 bool button_release_can_deselect;
468 void catch_vanishing_regionview (RegionView *);
470 bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
471 void select_all_tracks ();
473 bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
474 bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
475 bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false);
477 void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
478 void collect_new_region_view (RegionView *);
480 Gtk::MenuItem* region_edit_menu_split_item;
481 Gtk::MenuItem* region_edit_menu_split_multichannel_item;
483 void popup_track_context_menu (int, int, nframes_t);
484 Gtk::Menu* build_track_context_menu (nframes_t);
485 void add_bus_or_audio_track_context_items (Gtk::Menu_Helpers::MenuList&);
486 void add_region_context_items (Gtk::Menu_Helpers::MenuList&);
487 void add_crossfade_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Crossfade>, Gtk::Menu_Helpers::MenuList&, bool many);
488 void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
490 void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList&, Gtk::Menu_Helpers::MenuElem, bool) const;
492 void handle_new_route (ARDOUR::Session::RouteList&);
493 void remove_route (TimeAxisView *);
496 Gtk::HBox global_hpacker;
497 Gtk::VBox global_vpacker;
500 Gdk::Cursor* current_canvas_cursor;
502 ArdourCanvas::CanvasAA track_canvas;
503 ArdourCanvas::CanvasAA time_canvas;
505 ArdourCanvas::Text* first_action_message;
506 ArdourCanvas::Text* verbose_canvas_cursor;
507 bool verbose_cursor_visible;
509 void parameter_changed (const char *);
511 bool track_canvas_motion (GdkEvent*);
513 void set_verbose_canvas_cursor (const string &, double x, double y);
514 void set_verbose_canvas_cursor_text (const string &);
515 void show_verbose_canvas_cursor();
516 void hide_verbose_canvas_cursor();
518 bool verbose_cursor_on; // so far unused
520 Gtk::EventBox time_canvas_event_box;
521 Gtk::EventBox track_canvas_event_box;
522 Gtk::EventBox time_button_event_box;
523 Gtk::Frame time_button_frame;
525 ArdourCanvas::Group *minsec_group;
526 ArdourCanvas::Pixbuf *logo_item;
527 ArdourCanvas::Group *bbt_group;
528 ArdourCanvas::Group *smpte_group;
529 ArdourCanvas::Group *frame_group;
530 ArdourCanvas::Group *tempo_group;
531 ArdourCanvas::Group *meter_group;
532 ArdourCanvas::Group *marker_group;
533 ArdourCanvas::Group *range_marker_group;
534 ArdourCanvas::Group *transport_marker_group;
537 ruler_metric_smpte = 0,
538 ruler_metric_bbt = 1,
539 ruler_metric_frames = 2,
540 ruler_metric_minsec = 3,
542 ruler_time_tempo = 4,
543 ruler_time_meter = 5,
544 ruler_time_marker = 6,
545 ruler_time_range_marker = 7,
546 ruler_time_transport_marker = 8,
549 static GtkCustomMetric ruler_metrics[4];
551 bool no_ruler_shown_update;
553 gint ruler_button_press (GdkEventButton*);
554 gint ruler_button_release (GdkEventButton*);
555 gint ruler_mouse_motion (GdkEventMotion*);
557 gint ruler_pressed_button;
558 Gtk::Widget * ruler_grabbed_widget;
560 void initialize_rulers ();
561 void update_just_smpte ();
562 void update_fixed_rulers ();
563 void update_tempo_based_rulers ();
564 void popup_ruler_menu (nframes_t where = 0, ItemType type = RegionItem);
565 void update_ruler_visibility ();
566 void ruler_toggled (int);
567 gint ruler_label_button_release (GdkEventButton*);
568 void store_ruler_visibility ();
569 void restore_ruler_visibility ();
571 static gint _metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
572 static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
573 static gint _metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
574 static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
576 gint metric_get_smpte (GtkCustomRulerMark **, gdouble, gdouble, gint);
577 gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
578 gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
579 gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
581 Gtk::Widget *_ruler_separator;
582 GtkWidget *_smpte_ruler;
583 GtkWidget *_bbt_ruler;
584 GtkWidget *_frames_ruler;
585 GtkWidget *_minsec_ruler;
586 Gtk::Widget *smpte_ruler;
587 Gtk::Widget *bbt_ruler;
588 Gtk::Widget *frames_ruler;
589 Gtk::Widget *minsec_ruler;
590 static Editor *ruler_editor;
592 static const double timebar_height;
593 guint32 visible_timebars;
594 Gtk::Menu *editor_ruler_menu;
596 ArdourCanvas::SimpleRect* tempo_bar;
597 ArdourCanvas::SimpleRect* meter_bar;
598 ArdourCanvas::SimpleRect* marker_bar;
599 ArdourCanvas::SimpleRect* range_marker_bar;
600 ArdourCanvas::SimpleRect* transport_marker_bar;
602 Gtk::Label minsec_label;
603 Gtk::Label bbt_label;
604 Gtk::Label smpte_label;
605 Gtk::Label frame_label;
606 Gtk::Label tempo_label;
607 Gtk::Label meter_label;
608 Gtk::Label mark_label;
609 Gtk::Label range_mark_label;
610 Gtk::Label transport_mark_label;
613 Gtk::VBox time_button_vbox;
614 Gtk::HBox time_button_hbox;
618 ArdourCanvas::Points points;
619 ArdourCanvas::Line canvas_item;
620 nframes_t current_frame;
623 Cursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
626 void set_position (nframes_t);
627 void set_length (double units);
628 void set_y_axis (double position);
631 friend struct Cursor; /* it needs access to several private
635 Cursor* playhead_cursor;
637 ArdourCanvas::Group* cursor_group;
639 void cursor_to_next_region_point (Cursor*, ARDOUR::RegionPoint);
640 void cursor_to_previous_region_point (Cursor*, ARDOUR::RegionPoint);
641 void cursor_to_region_point (Cursor*, ARDOUR::RegionPoint, int32_t dir);
642 void cursor_to_selection_start (Cursor *);
643 void cursor_to_selection_end (Cursor *);
644 void select_all_selectables_using_cursor (Cursor *, bool);
645 void select_all_selectables_between_cursors (Cursor *, Cursor *);
647 boost::shared_ptr<ARDOUR::Region> find_next_region (nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
649 vector<nframes_t> region_boundary_cache;
650 void build_region_boundary_cache ();
652 Gtk::VBox trackview_vpacker;
655 Gtk::HBox bottom_hbox;
657 Gtk::Table edit_packer;
658 Gtk::VScrollbar edit_vscrollbar;
660 Gtk::Adjustment vertical_adjustment;
661 Gtk::Adjustment horizontal_adjustment;
663 Gtk::Layout controls_layout;
664 bool control_layout_scroll (GdkEventScroll* ev);
665 void controls_layout_size_request (Gtk::Requisition*);
667 Gtk::HScrollbar edit_hscrollbar;
668 bool _dragging_hscrollbar;
670 void reset_hscrollbar_stepping ();
672 bool hscrollbar_button_press (GdkEventButton*);
673 bool hscrollbar_button_release (GdkEventButton*);
674 void hscrollbar_allocate (Gtk::Allocation &alloc);
677 double canvas_height;
678 double full_canvas_height;
679 nframes_t last_canvas_frame;
681 bool track_canvas_map_handler (GdkEventAny*);
682 bool time_canvas_map_handler (GdkEventAny*);
684 gint edit_controls_button_release (GdkEventButton*);
685 Gtk::Menu *edit_controls_left_menu;
686 Gtk::Menu *edit_controls_right_menu;
688 Gtk::VBox track_canvas_vbox;
689 Gtk::VBox time_canvas_vbox;
690 Gtk::VBox edit_controls_vbox;
691 Gtk::HBox edit_controls_hbox;
693 void control_scroll (float);
694 bool deferred_control_scroll (nframes_t);
695 sigc::connection control_scroll_connection;
697 void tie_vertical_scrolling ();
698 void canvas_horizontally_scrolled ();
700 struct VisualChange {
707 nframes_t time_origin;
708 double frames_per_unit;
712 VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {}
716 VisualChange pending_visual_change;
718 static int _idle_visual_changer (void *arg);
719 int idle_visual_changer ();
721 void queue_visual_change (nframes_t);
722 void queue_visual_change (double);
724 void end_location_changed (ARDOUR::Location*);
726 struct RegionListDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
727 RegionListDisplayModelColumns() {
732 Gtk::TreeModelColumn<Glib::ustring> name;
733 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
734 Gtk::TreeModelColumn<Gdk::Color> color_;
737 RegionListDisplayModelColumns region_list_columns;
738 Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Region> > region_list_display;
740 Glib::RefPtr<Gtk::TreeStore> region_list_model;
741 Glib::RefPtr<Gtk::ToggleAction> toggle_full_region_list_action;
742 Glib::RefPtr<Gtk::ToggleAction> toggle_show_auto_regions_action;
744 void region_list_selection_changed ();
745 bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
747 Gtk::Menu *region_list_menu;
748 Gtk::ScrolledWindow region_list_scroller;
749 Gtk::Frame region_list_frame;
751 bool region_list_display_key_press (GdkEventKey *);
752 bool region_list_display_key_release (GdkEventKey *);
753 bool region_list_display_button_press (GdkEventButton *);
754 bool region_list_display_button_release (GdkEventButton *);
755 void region_list_clear ();
756 void region_list_selection_mapover (sigc::slot<void,boost::shared_ptr<ARDOUR::Region> >);
757 void build_region_list_menu ();
758 void show_region_list_display_context_menu (int button, int time);
760 bool show_automatic_regions_in_region_list;
761 Editing::RegionListSortType region_list_sort_type;
763 void reset_region_list_sort_direction (bool);
764 void reset_region_list_sort_type (Editing::RegionListSortType);
766 void toggle_full_region_list ();
767 void toggle_show_auto_regions ();
769 int region_list_sorter (Gtk::TreeModel::iterator, Gtk::TreeModel::iterator);
773 Gtk::ScrolledWindow snapshot_display_scroller;
774 struct SnapshotDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
775 SnapshotDisplayModelColumns() {
779 Gtk::TreeModelColumn<Glib::ustring> visible_name;
780 Gtk::TreeModelColumn<Glib::ustring> real_name;
783 SnapshotDisplayModelColumns snapshot_display_columns;
784 Glib::RefPtr<Gtk::ListStore> snapshot_display_model;
785 Gtk::TreeView snapshot_display;
786 Gtk::Menu snapshot_context_menu;
788 bool snapshot_display_button_press (GdkEventButton*);
789 void snapshot_display_selection_changed ();
790 void redisplay_snapshots();
791 void popup_snapshot_context_menu (int, int32_t, Glib::ustring);
793 /* named selections */
795 struct NamedSelectionDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
796 NamedSelectionDisplayModelColumns() {
800 Gtk::TreeModelColumn<Glib::ustring> text;
801 Gtk::TreeModelColumn<ARDOUR::NamedSelection*> selection;
804 NamedSelectionDisplayModelColumns named_selection_columns;
805 Glib::RefPtr<Gtk::TreeStore> named_selection_model;
807 Gtkmm2ext::DnDTreeView<ARDOUR::NamedSelection*> named_selection_display;
808 Gtk::ScrolledWindow named_selection_scroller;
810 void create_named_selection ();
811 void paste_named_selection (float times);
812 void remove_selected_named_selections ();
813 void remove_snapshot (Glib::ustring);
814 void rename_snapshot (Glib::ustring);
816 void handle_new_named_selection ();
817 void add_named_selection_to_named_selection_display (ARDOUR::NamedSelection&);
818 void redisplay_named_selections ();
820 bool named_selection_display_button_release (GdkEventButton *ev);
821 bool named_selection_display_key_release (GdkEventKey *ev);
822 void named_selection_display_selection_changed ();
825 TrackViewList track_views;
826 TimeAxisView *trackview_by_y_position (double ypos);
828 static Gdk::Cursor* cross_hair_cursor;
829 static Gdk::Cursor* trimmer_cursor;
830 static Gdk::Cursor* selector_cursor;
831 static Gdk::Cursor* grabber_cursor;
832 static Gdk::Cursor* zoom_cursor;
833 static Gdk::Cursor* time_fx_cursor;
834 static Gdk::Cursor* fader_cursor;
835 static Gdk::Cursor* speaker_cursor;
836 static Gdk::Cursor* midi_pencil_cursor;
837 static Gdk::Cursor* midi_select_cursor;
838 static Gdk::Cursor* midi_erase_cursor;
839 static Gdk::Cursor* wait_cursor;
840 static Gdk::Cursor* timebar_cursor;
842 static void build_cursors ();
844 sigc::connection scroll_connection;
845 nframes_t last_update_frame;
846 void center_screen (nframes_t);
847 void center_screen_internal (nframes_t, float);
849 void update_current_screen ();
851 void session_going_away ();
853 nframes_t cut_buffer_start;
854 nframes_t cut_buffer_length;
856 bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
857 bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
858 bool button_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
859 bool motion_handler (ArdourCanvas::Item*, GdkEvent*, ItemType, bool from_autoscroll = false);
860 bool enter_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
861 bool leave_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
863 /* KEYMAP HANDLING */
865 void register_actions ();
867 int ensure_cursor (nframes_t* pos);
869 void handle_new_region (boost::weak_ptr<ARDOUR::Region>);
870 void handle_region_removed (boost::weak_ptr<ARDOUR::Region>);
871 void add_region_to_region_display (boost::shared_ptr<ARDOUR::Region>);
872 void region_hidden (boost::shared_ptr<ARDOUR::Region>);
873 void redisplay_regions ();
874 void insert_into_tmp_regionlist(boost::shared_ptr<ARDOUR::Region>);
876 list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list;
878 void cut_copy (Editing::CutCopyOp);
879 bool can_cut_copy () const;
880 void cut_copy_points (Editing::CutCopyOp);
881 void cut_copy_regions (Editing::CutCopyOp);
882 void cut_copy_ranges (Editing::CutCopyOp);
885 void paste_internal (nframes_t position, float times);
887 /* EDITING OPERATIONS */
889 void reset_point_selection ();
890 void toggle_region_mute ();
891 void toggle_region_lock ();
892 void toggle_region_opaque ();
893 void toggle_region_position_lock ();
894 void raise_region_to_top ();
895 void lower_region_to_bottom ();
896 void split_region ();
897 void split_region_at (nframes_t);
898 void split_regions_at (nframes_t, RegionSelection&);
899 void crop_region_to_selection ();
900 void set_a_regions_sync_position (boost::shared_ptr<ARDOUR::Region>, nframes_t);
901 void set_region_sync_from_edit_cursor ();
902 void remove_region_sync();
903 void align_selection (ARDOUR::RegionPoint, nframes_t position);
904 void align_selection_relative (ARDOUR::RegionPoint point, nframes_t position);
905 void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
906 void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
907 void remove_selected_regions ();
908 void remove_clicked_region ();
910 void duplicate_some_regions (RegionSelection&, float times);
911 void duplicate_selection (float times);
912 void region_fill_selection ();
914 void region_fill_track ();
915 void audition_playlist_region_standalone (boost::shared_ptr<ARDOUR::Region>);
916 void audition_playlist_region_via_route (boost::shared_ptr<ARDOUR::Region>, ARDOUR::Route&);
917 void split_multichannel_region();
918 void reverse_regions ();
919 void normalize_regions ();
920 void denormalize_regions ();
921 void quantize_regions ();
923 void audition_region_from_region_list ();
924 void hide_region_from_region_list ();
925 void remove_region_from_region_list ();
927 void align (ARDOUR::RegionPoint);
928 void align_relative (ARDOUR::RegionPoint);
935 void paste (float times);
937 int get_prefix (float&, bool&);
939 void keyboard_paste ();
940 void keyboard_duplicate_region ();
941 void keyboard_duplicate_selection ();
942 void keyboard_insert_region_list_selection ();
944 void region_from_selection ();
945 void create_region_from_selection (std::vector<boost::shared_ptr<ARDOUR::AudioRegion> >&);
948 void rename_region ();
949 void rename_region_finished (bool);
951 void play_from_start ();
952 void play_from_edit_cursor ();
953 void play_selected_region ();
954 void audition_selected_region ();
955 void loop_selected_region ();
956 void play_location (ARDOUR::Location&);
957 void loop_location (ARDOUR::Location&);
959 Editing::ZoomFocus zoom_focus;
961 void temporal_zoom_selection ();
962 void temporal_zoom_session ();
963 void temporal_zoom (gdouble scale);
964 void temporal_zoom_by_frame (nframes_t start, nframes_t end, const string & op);
965 void temporal_zoom_to_frame (bool coarser, nframes_t frame);
967 void amplitude_zoom (gdouble scale);
968 void amplitude_zoom_step (bool in);
970 void insert_region_list_drag (boost::shared_ptr<ARDOUR::Region>, int x, int y);
971 void insert_region_list_selection (float times);
975 void add_external_audio_action (Editing::ImportMode);
976 void external_audio_dialog ();
977 bool check_multichannel_status (const std::vector<Glib::ustring>& paths);
979 SoundFileOmega* sfbrowser;
981 void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos);
982 void do_import (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&);
984 void _do_embed (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
985 void do_embed (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
986 bool idle_do_embed (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
988 int import_sndfiles (vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos,
989 int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::AudioTrack>&);
990 int embed_sndfiles (vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
991 nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::AudioTrack>&);
993 int add_sources (vector<Glib::ustring> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode,
994 int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::AudioTrack>&, bool add_channel_suffix);
995 int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, nframes64_t& pos, Editing::ImportMode mode,
996 boost::shared_ptr<ARDOUR::AudioTrack>& existing_track);
998 boost::shared_ptr<ARDOUR::AudioTrack> get_nth_selected_audio_track (int nth) const;
1000 /* generic interthread progress window */
1002 ArdourDialog* interthread_progress_window;
1003 Gtk::Label interthread_progress_label;
1004 Gtk::VBox interthread_progress_vbox;
1005 Gtk::ProgressBar interthread_progress_bar;
1006 Gtk::Button interthread_cancel_button;
1007 Gtk::Label interthread_cancel_label;
1008 sigc::connection interthread_progress_connection;
1009 void interthread_cancel_clicked ();
1010 void build_interthread_progress_window ();
1011 ARDOUR::InterThreadInfo* current_interthread_info;
1014 AnalysisWindow* analysis_window;
1017 /* import specific info */
1019 ARDOUR::Session::import_status import_status;
1020 gint import_progress_timeout (void *);
1021 static void *_import_thread (void *);
1022 void* import_thread ();
1024 /* to support this ... */
1026 void import_audio (bool as_tracks);
1027 void do_import (vector<Glib::ustring> paths, bool split, bool as_tracks);
1029 void move_to_start ();
1030 void move_to_end ();
1032 void center_playhead ();
1033 void center_edit_cursor ();
1034 void edit_cursor_backward ();
1035 void edit_cursor_forward ();
1036 void playhead_backward ();
1037 void playhead_forward ();
1038 void scroll_playhead (bool forward);
1039 void scroll_backward (float pages=0.8f);
1040 void scroll_forward (float pages=0.8f);
1041 void scroll_tracks_down ();
1042 void scroll_tracks_up ();
1043 void delete_sample_forward ();
1044 void delete_sample_backward ();
1045 void delete_screen ();
1046 void search_backwards ();
1047 void search_forwards ();
1049 void clear_markers ();
1050 void clear_ranges ();
1051 void clear_locations ();
1052 void unhide_markers ();
1053 void unhide_ranges ();
1054 void jump_forward_to_mark ();
1055 void jump_backward_to_mark ();
1056 void cursor_align (bool playhead_to_edit);
1058 void remove_last_capture ();
1059 void select_all_selectables_using_time_selection ();
1060 void select_all_selectables_using_loop();
1061 void select_all_selectables_using_punch();
1062 void set_selection_from_range (ARDOUR::Location&);
1063 void set_selection_from_punch ();
1064 void set_selection_from_loop ();
1065 void set_selection_from_audio_region ();
1067 void add_location_from_audio_region ();
1068 void add_location_from_selection ();
1069 void set_loop_from_selection (bool play);
1070 void set_punch_from_selection ();
1072 void set_loop_range (nframes_t start, nframes_t end, std::string cmd);
1073 void set_punch_range (nframes_t start, nframes_t end, std::string cmd);
1075 void add_location_from_playhead_cursor ();
1077 void reverse_selection ();
1078 void edit_envelope ();
1080 void start_scrolling ();
1081 void stop_scrolling ();
1084 bool have_full_mouse_speed;
1085 nframes64_t last_scrub_frame;
1086 double last_scrub_time;
1087 int mouse_speed_update;
1088 double mouse_direction;
1089 double compute_mouse_speed ();
1090 void add_mouse_speed (double, double);
1091 double* mouse_speed;
1092 size_t mouse_speed_entries;
1093 size_t mouse_speed_size;
1095 void keyboard_selection_begin ();
1096 void keyboard_selection_finish (bool add);
1097 bool have_pending_keyboard_selection;
1098 nframes_t pending_keyboard_selection_start;
1100 boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
1101 void extend_selection_to_end_of_region (bool next);
1102 void extend_selection_to_start_of_region (bool previous);
1104 Editing::SnapType snap_type;
1105 Editing::SnapMode snap_mode;
1107 /// Snap threshold in pixels
1108 double snap_threshold;
1110 void handle_gui_changes (const string &, void *);
1112 void hide_all_tracks (bool with_select);
1115 LineDragInfo current_line_drag_info;
1117 void start_grab (GdkEvent*, Gdk::Cursor* cursor = 0);
1118 bool end_grab (ArdourCanvas::Item*, GdkEvent*);
1119 void swap_grab (ArdourCanvas::Item*, Gdk::Cursor* cursor, uint32_t time);
1121 Gtk::Menu fade_context_menu;
1122 void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
1124 void start_fade_in_grab (ArdourCanvas::Item*, GdkEvent*);
1125 void start_fade_out_grab (ArdourCanvas::Item*, GdkEvent*);
1126 void fade_in_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1127 void fade_out_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1128 void fade_in_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1129 void fade_out_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1131 void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
1132 void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
1134 void set_fade_in_active (bool);
1135 void set_fade_out_active (bool);
1137 std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
1138 void region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1139 void region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1140 void create_region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1141 void create_region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1143 bool _dragging_playhead;
1145 void cursor_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1146 void cursor_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1147 void marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1148 void marker_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1149 void control_point_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1150 void control_point_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1151 void line_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1152 void line_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1154 void tempo_marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1155 void tempo_marker_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1156 void meter_marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1157 void meter_marker_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1159 gint mouse_rename_region (ArdourCanvas::Item*, GdkEvent*);
1161 void start_region_grab (ArdourCanvas::Item*, GdkEvent*);
1162 void start_create_region_grab (ArdourCanvas::Item*, GdkEvent*);
1163 void start_region_copy_grab (ArdourCanvas::Item*, GdkEvent*);
1164 void start_region_brush_grab (ArdourCanvas::Item*, GdkEvent*);
1165 void start_selection_grab (ArdourCanvas::Item*, GdkEvent*);
1166 void start_cursor_grab (ArdourCanvas::Item*, GdkEvent*);
1167 void start_marker_grab (ArdourCanvas::Item*, GdkEvent*);
1168 void start_control_point_grab (ArdourCanvas::Item*, GdkEvent*);
1169 void start_line_grab_from_regionview (ArdourCanvas::Item*, GdkEvent*);
1170 void start_line_grab_from_line (ArdourCanvas::Item*, GdkEvent*);
1171 void start_line_grab (AutomationLine *, GdkEvent*);
1172 void start_tempo_marker_grab (ArdourCanvas::Item*, GdkEvent*);
1173 void start_tempo_marker_copy_grab (ArdourCanvas::Item*, GdkEvent*);
1174 void start_meter_marker_grab (ArdourCanvas::Item*, GdkEvent*);
1175 void start_meter_marker_copy_grab (ArdourCanvas::Item*, GdkEvent*);
1177 void region_view_item_click (AudioRegionView&, GdkEventButton*);
1179 void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
1180 void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
1182 void mouse_brush_insert_region (RegionView*, nframes_t pos);
1183 void brush (nframes_t);
1185 void show_verbose_time_cursor (nframes_t frame, double offset = 0, double xpos=-1, double ypos=-1);
1186 void show_verbose_duration_cursor (nframes_t start, nframes_t end, double offset = 0, double xpos=-1, double ypos=-1);
1188 /* Canvas event handlers */
1190 bool canvas_control_point_event (GdkEvent* event,ArdourCanvas::Item*, ControlPoint*);
1191 bool canvas_line_event (GdkEvent* event,ArdourCanvas::Item*, AutomationLine*);
1192 bool canvas_selection_rect_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
1193 bool canvas_selection_start_trim_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
1194 bool canvas_selection_end_trim_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
1195 bool canvas_crossfade_view_event (GdkEvent* event,ArdourCanvas::Item*, CrossfadeView*);
1196 bool canvas_fade_in_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1197 bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1198 bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1199 bool canvas_fade_out_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1200 bool canvas_region_view_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1201 bool canvas_region_view_name_highlight_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1202 bool canvas_region_view_name_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1203 bool canvas_stream_view_event (GdkEvent* event,ArdourCanvas::Item*, RouteTimeAxisView*);
1204 bool canvas_marker_event (GdkEvent* event,ArdourCanvas::Item*, Marker*);
1205 bool canvas_zoom_rect_event (GdkEvent* event,ArdourCanvas::Item*);
1206 bool canvas_tempo_marker_event (GdkEvent* event,ArdourCanvas::Item*, TempoMarker*);
1207 bool canvas_meter_marker_event (GdkEvent* event,ArdourCanvas::Item*, MeterMarker*);
1208 bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*) ;
1210 bool canvas_tempo_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1211 bool canvas_meter_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1212 bool canvas_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1213 bool canvas_range_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1214 bool canvas_transport_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1216 bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
1217 bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameTimeAxis*);
1218 bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
1219 bool canvas_imageframe_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
1220 bool canvas_marker_time_axis_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerTimeAxis*);
1221 bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
1222 bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
1223 bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
1225 /* non-public event handlers */
1227 bool canvas_playhead_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
1228 bool canvas_edit_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
1229 bool track_canvas_scroll (GdkEventScroll* event);
1231 bool track_canvas_scroll_event (GdkEventScroll* event);
1232 bool track_canvas_button_press_event (GdkEventButton* event);
1233 bool track_canvas_button_release_event (GdkEventButton* event);
1234 bool track_canvas_motion_notify_event (GdkEventMotion* event);
1236 Gtk::Allocation canvas_allocation;
1237 bool canvas_idle_queued;
1238 void track_canvas_allocate (Gtk::Allocation alloc);
1239 bool track_canvas_size_allocated ();
1241 void set_edit_cursor (GdkEvent* event);
1242 void set_playhead_cursor (GdkEvent* event);
1244 void kbd_driver (sigc::slot<void,GdkEvent*>, bool use_track_canvas = true, bool use_time_canvas = true, bool can_select = true);
1245 void kbd_set_playhead_cursor ();
1246 void kbd_set_edit_cursor ();
1247 void kbd_mute_unmute_region ();
1249 void kbd_set_sync_position ();
1250 void kbd_align (ARDOUR::RegionPoint);
1251 void kbd_align_relative (ARDOUR::RegionPoint);
1253 void kbd_audition ();
1255 void kbd_do_split (GdkEvent*);
1256 void kbd_do_set_sync_position (GdkEvent* ev);
1257 void kbd_do_align (GdkEvent*, ARDOUR::RegionPoint);
1258 void kbd_do_align_relative (GdkEvent*, ARDOUR::RegionPoint);
1259 void kbd_do_brush (GdkEvent*);
1260 void kbd_do_audition (GdkEvent*);
1262 void handle_new_duration ();
1263 void initialize_canvas ();
1264 void reset_scrolling_region (Gtk::Allocation* alloc = 0);
1266 /* display control */
1268 bool _show_measures;
1269 /// true to show waveforms, otherwise false
1270 bool _show_waveforms;
1271 /// true if the editor should follow the playhead, otherwise false
1272 bool _follow_playhead;
1273 /// true if waveforms should be shown while recording audio tracks, otherwise false
1274 bool _show_waveforms_recording;
1276 ARDOUR::TempoMap::BBTPointList *current_bbt_points;
1278 ArdourCanvas::Group* time_line_group;
1279 ArdourCanvas::Group* marker_time_line_group;
1281 TempoLines* tempo_lines;
1282 TempoLines* marker_tempo_lines;
1284 void hide_measures ();
1285 void draw_measures ();
1286 bool redraw_measures ();
1288 void new_tempo_section ();
1290 void mouse_add_new_tempo_event (nframes_t where);
1291 void mouse_add_new_meter_event (nframes_t where);
1293 void remove_tempo_marker (ArdourCanvas::Item*);
1294 void remove_meter_marker (ArdourCanvas::Item*);
1295 gint real_remove_tempo_marker (ARDOUR::TempoSection*);
1296 gint real_remove_meter_marker (ARDOUR::MeterSection*);
1298 void edit_tempo_section (ARDOUR::TempoSection*);
1299 void edit_meter_section (ARDOUR::MeterSection*);
1300 void edit_tempo_marker (ArdourCanvas::Item*);
1301 void edit_meter_marker (ArdourCanvas::Item*);
1303 void marker_menu_edit ();
1304 void marker_menu_remove ();
1305 void marker_menu_rename ();
1306 void marker_menu_hide ();
1307 void marker_menu_loop_range ();
1308 void marker_menu_select_all_selectables_using_range ();
1309 void marker_menu_select_using_range ();
1310 void marker_menu_separate_regions_using_location ();
1311 void marker_menu_play_from ();
1312 void marker_menu_play_range ();
1313 void marker_menu_set_playhead ();
1314 void marker_menu_set_from_playhead ();
1315 void marker_menu_set_from_selection ();
1316 void new_transport_marker_menu_set_loop ();
1317 void new_transport_marker_menu_set_punch ();
1318 void update_loop_range_view (bool visibility=false);
1319 void update_punch_range_view (bool visibility=false);
1320 gint new_transport_marker_menu_popdown (GdkEventAny*);
1321 void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1322 void tm_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1323 void transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1324 void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1325 void build_range_marker_menu (bool loop_or_punch);
1326 void build_marker_menu (bool start_or_end);
1327 void build_tm_marker_menu ();
1328 void build_new_transport_marker_menu ();
1330 Gtk::Menu* tm_marker_menu;
1331 Gtk::Menu* marker_menu;
1332 Gtk::Menu* start_end_marker_menu;
1333 Gtk::Menu* range_marker_menu;
1334 Gtk::Menu* transport_marker_menu;
1335 Gtk::Menu* new_transport_marker_menu;
1336 ArdourCanvas::Item* marker_menu_item;
1338 typedef list<Marker*> Marks;
1341 void remove_metric_marks ();
1342 void draw_metric_marks (const ARDOUR::Metrics& metrics);
1344 void tempo_map_changed (ARDOUR::Change);
1345 void redisplay_tempo (bool immediate_redraw);
1347 void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
1348 void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false) {
1349 /* XXX remove this function when everything moves to 64 bit frame counts */
1350 nframes64_t first64 = first;
1351 snap_to (first64, direction, for_mark);
1352 first = (nframes_t) first64;
1355 double snap_length_beats (nframes_t start);
1357 uint32_t bbt_beat_subdivision;
1361 Gtk::ToggleButton editor_mixer_button;
1362 Gtk::ToggleButton editor_list_button;
1364 void editor_mixer_button_toggled ();
1365 void editor_list_button_toggled ();
1367 AudioClock edit_cursor_clock;
1368 AudioClock zoom_range_clock;
1369 Gtk::Button zoom_in_button;
1370 Gtk::Button zoom_out_button;
1371 Gtk::Button zoom_out_full_button;
1372 Gtk::Button zoom_onetoone_button;
1374 Gtk::VBox toolbar_clock_vbox;
1375 Gtk::VBox toolbar_selection_clock_vbox;
1376 Gtk::Table toolbar_selection_clock_table;
1377 Gtk::Label toolbar_selection_cursor_label;
1379 Gtk::HBox mouse_mode_button_box;
1380 Gtkmm2ext::TearOff* mouse_mode_tearoff;
1381 Gtk::ToggleButton mouse_select_button;
1382 Gtk::ToggleButton mouse_move_button;
1383 Gtk::ToggleButton mouse_gain_button;
1384 Gtk::ToggleButton mouse_zoom_button;
1385 Gtk::ToggleButton mouse_timefx_button;
1386 Gtk::ToggleButton mouse_audition_button;
1387 Gtk::ToggleButton mouse_note_button;
1388 GroupedButtons *mouse_mode_button_set;
1389 void mouse_mode_toggled (Editing::MouseMode m);
1390 bool ignore_mouse_mode_toggle;
1392 gint mouse_select_button_release (GdkEventButton*);
1394 Gtk::VBox automation_box;
1395 Gtk::Button automation_mode_button;
1396 Gtk::ToggleButton global_automation_button;
1398 Gtk::ComboBoxText edit_mode_selector;
1399 Gtk::VBox edit_mode_box;
1401 void edit_mode_selection_done ();
1403 Gtk::ComboBoxText snap_type_selector;
1404 Gtk::ComboBoxText snap_mode_selector;
1407 std::vector<std::string> snap_type_strings;
1408 std::vector<std::string> snap_mode_strings;
1410 void snap_type_selection_done ();
1411 void snap_mode_selection_done ();
1412 void snap_mode_chosen (Editing::SnapMode);
1413 void snap_type_chosen (Editing::SnapType);
1415 Glib::RefPtr<Gtk::RadioAction> snap_type_action (Editing::SnapType);
1416 Glib::RefPtr<Gtk::RadioAction> snap_mode_action (Editing::SnapMode);
1418 Gtk::ComboBoxText zoom_focus_selector;
1419 Gtk::VBox zoom_focus_box;
1421 std::vector<std::string> zoom_focus_strings;
1423 void zoom_focus_selection_done ();
1424 void zoom_focus_chosen (Editing::ZoomFocus);
1426 Glib::RefPtr<Gtk::RadioAction> zoom_focus_action (Editing::ZoomFocus);
1430 void zoom_adjustment_changed();
1432 void edit_cursor_clock_changed();
1434 void setup_toolbar ();
1436 Gtkmm2ext::TearOff* tools_tearoff;
1437 Gtk::HBox toolbar_hbox;
1438 Gtk::EventBox toolbar_base;
1439 Gtk::Frame toolbar_frame;
1443 Gtk::HBox midi_tool_button_box;
1444 Gtkmm2ext::TearOff* midi_tool_tearoff;
1445 Gtk::ToggleButton midi_tool_pencil_button;
1446 Gtk::ToggleButton midi_tool_select_button;
1447 Gtk::ToggleButton midi_tool_erase_button;
1448 GroupedButtons *midi_tool_button_set;
1449 void midi_edit_mode_toggled (Editing::MidiEditMode m);
1450 bool ignore_midi_edit_mode_toggle;
1452 Gtkmm2ext::TearOff* midi_tools_tearoff;
1453 Gtk::HBox midi_toolbar_hbox;
1454 Gtk::EventBox midi_toolbar_base;
1455 Gtk::Frame midi_toolbar_frame;
1457 void setup_midi_toolbar ();
1459 /* selection process */
1461 Selection* selection;
1462 Selection* cut_buffer;
1464 void time_selection_changed ();
1465 void track_selection_changed ();
1466 void region_selection_changed ();
1467 void point_selection_changed ();
1476 void start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, SelectionOp);
1477 void drag_selection (ArdourCanvas::Item* item, GdkEvent* event);
1478 void end_selection_op (ArdourCanvas::Item* item, GdkEvent* event);
1479 void cancel_selection ();
1481 void region_selection_op (void (ARDOUR::Region::*pmf)(void));
1482 void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
1483 void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
1485 bool audio_region_selection_covers (nframes_t where);
1487 /* transport range select process */
1488 enum RangeMarkerOp {
1490 CreateTransportMarker
1493 void start_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event, RangeMarkerOp);
1494 void drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event);
1495 void end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event);
1497 ArdourCanvas::SimpleRect* range_bar_drag_rect;
1498 ArdourCanvas::SimpleRect* transport_bar_drag_rect;
1499 ArdourCanvas::Line* marker_drag_line;
1500 ArdourCanvas::Points marker_drag_line_points;
1501 ArdourCanvas::SimpleRect* range_marker_drag_rect;
1503 void update_marker_drag_item (ARDOUR::Location *);
1505 ArdourCanvas::SimpleRect *transport_bar_range_rect;
1506 ArdourCanvas::SimpleRect *transport_bar_preroll_rect;
1507 ArdourCanvas::SimpleRect *transport_bar_postroll_rect;
1508 ArdourCanvas::SimpleRect *transport_loop_range_rect;
1509 ArdourCanvas::SimpleRect *transport_punch_range_rect;
1510 ArdourCanvas::SimpleLine *transport_punchin_line;
1511 ArdourCanvas::SimpleLine *transport_punchout_line;
1512 ArdourCanvas::SimpleRect *transport_preroll_rect;
1513 ArdourCanvas::SimpleRect *transport_postroll_rect;
1515 ARDOUR::Location* transport_loop_location();
1516 ARDOUR::Location* transport_punch_location();
1518 ARDOUR::Location *temp_location;
1520 /* object rubberband select process */
1522 void start_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
1523 void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
1524 void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
1526 bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
1528 ArdourCanvas::SimpleRect *rubberband_rect;
1530 /* mouse zoom process */
1532 void start_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
1533 void drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
1534 void end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event);
1536 ArdourCanvas::SimpleRect *zoom_rect;
1537 void reposition_zoom_rect (nframes_t start, nframes_t end);
1539 /* diskstream/route display management */
1541 struct RouteDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
1542 RouteDisplayModelColumns() {
1548 Gtk::TreeModelColumn<Glib::ustring> text;
1549 Gtk::TreeModelColumn<bool> visible;
1550 Gtk::TreeModelColumn<TimeAxisView*> tv;
1551 Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
1554 RouteDisplayModelColumns route_display_columns;
1555 Glib::RefPtr<Gtk::ListStore> route_display_model;
1556 Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
1558 Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Route> > route_list_display;
1559 Gtk::ScrolledWindow route_list_scroller;
1560 Gtk::Menu* route_list_menu;
1562 void sync_order_keys ();
1563 bool ignore_route_order_sync;
1565 bool route_list_display_button_press (GdkEventButton*);
1566 bool route_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
1568 void route_list_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
1569 void route_list_delete (const Gtk::TreeModel::Path&);
1570 void track_list_reorder (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* new_order);
1572 void initial_route_list_display ();
1573 void redisplay_route_list();
1574 void route_list_reordered (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* what);
1575 bool ignore_route_list_reorder;
1576 bool no_route_list_redisplay;
1578 void build_route_list_menu ();
1579 void show_route_list_menu ();
1581 void show_all_routes ();
1582 void hide_all_routes ();
1583 void show_all_audiotracks ();
1584 void hide_all_audiotracks ();
1585 void show_all_audiobus ();
1586 void hide_all_audiobus ();
1588 void set_all_tracks_visibility (bool yn);
1589 void set_all_audio_visibility (int type, bool yn);
1591 /* edit group management */
1593 struct GroupListModelColumns : public Gtk::TreeModel::ColumnRecord {
1594 GroupListModelColumns () {
1600 Gtk::TreeModelColumn<bool> is_active;
1601 Gtk::TreeModelColumn<bool> is_visible;
1602 Gtk::TreeModelColumn<std::string> text;
1603 Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
1606 GroupListModelColumns group_columns;
1607 Glib::RefPtr<Gtk::ListStore> group_model;
1608 Glib::RefPtr<Gtk::TreeSelection> group_selection;
1610 Gtk::TreeView edit_group_display;
1611 Gtk::ScrolledWindow edit_group_display_scroller;
1612 Gtk::Menu* edit_group_list_menu;
1614 void build_edit_group_list_menu ();
1615 void activate_all_edit_groups ();
1616 void disable_all_edit_groups ();
1618 bool in_edit_group_row_change;
1619 void edit_group_row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
1620 void edit_group_name_edit (const Glib::ustring&, const Glib::ustring&);
1621 void new_edit_group ();
1622 void edit_group_list_button_clicked ();
1623 gint edit_group_list_button_press_event (GdkEventButton* ev);
1624 void add_edit_group (ARDOUR::RouteGroup* group);
1625 void remove_selected_edit_group ();
1626 void edit_groups_changed ();
1627 void group_flags_changed (void*, ARDOUR::RouteGroup*);
1629 Gtk::VBox list_vpacker;
1633 bool autoscroll_active;
1634 int autoscroll_timeout_tag;
1635 int autoscroll_direction;
1636 uint32_t autoscroll_cnt;
1637 nframes_t autoscroll_distance;
1639 static gint _autoscroll_canvas (void *);
1640 bool autoscroll_canvas ();
1641 void start_canvas_autoscroll (int direction);
1642 void stop_canvas_autoscroll ();
1643 void maybe_autoscroll (GdkEvent*);
1652 void start_trim (ArdourCanvas::Item*, GdkEvent*);
1653 void point_trim (GdkEvent*);
1654 void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
1655 void single_contents_trim (RegionView&, nframes_t, bool, bool, bool);
1656 void single_start_trim (RegionView&, nframes_t, bool, bool);
1657 void single_end_trim (RegionView&, nframes_t, bool, bool);
1659 void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
1660 void thaw_region_after_trim (RegionView& rv);
1662 void trim_region_to_edit_cursor ();
1663 void trim_region_from_edit_cursor ();
1665 bool show_gain_after_trim;
1669 int convert_drop_to_paths (std::vector<Glib::ustring>& paths,
1670 const Glib::RefPtr<Gdk::DragContext>& context,
1673 const Gtk::SelectionData& data,
1677 void track_canvas_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
1680 const Gtk::SelectionData& data,
1684 void region_list_display_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
1687 const Gtk::SelectionData& data,
1692 void drop_paths (const Glib::RefPtr<Gdk::DragContext>& context,
1695 const Gtk::SelectionData& data,
1699 void drop_regions (const Glib::RefPtr<Gdk::DragContext>& context,
1702 const Gtk::SelectionData& data,
1708 ExportDialog *export_dialog;
1709 ExportDialog *export_range_markers_dialog;
1711 void export_range (nframes_t start, nframes_t end);
1712 void export_range_markers ();
1714 int write_region_selection(RegionSelection&);
1715 bool write_region (string path, boost::shared_ptr<ARDOUR::AudioRegion>);
1716 void export_region ();
1717 void bounce_region_selection ();
1718 void bounce_range_selection ();
1719 void external_edit_region ();
1721 int write_audio_selection (TimeSelection&);
1722 bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, list<ARDOUR::AudioRange>&);
1724 void write_selection ();
1728 UndoAction get_memento() const;
1730 XMLNode *before; /* used in *_reversible_command */
1732 void begin_reversible_command (string cmd_name);
1733 void commit_reversible_command ();
1735 /* visual history */
1737 UndoHistory visual_history;
1738 UndoTransaction current_visual_command;
1741 void update_title ();
1742 void update_title_s (const string & snapshot_name);
1745 Selection* selection;
1746 double frames_per_unit;
1748 State (PublicEditor const * e);
1752 void store_state (State&) const;
1753 void restore_state (State *);
1755 void instant_save ();
1757 boost::shared_ptr<ARDOUR::AudioRegion> last_audition_region;
1759 /* freeze operations */
1761 ARDOUR::InterThreadInfo freeze_status;
1762 gint freeze_progress_timeout (void *);
1763 static void* _freeze_thread (void*);
1764 void* freeze_thread ();
1766 void freeze_routes ();
1767 void unfreeze_routes ();
1769 /* edit-group solo + mute */
1771 void set_edit_group_solo (ARDOUR::Route&, bool);
1772 void set_edit_group_mute (ARDOUR::Route&, bool);
1776 void duplicate_dialog (bool for_region);
1778 nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
1780 void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
1781 void start_time_fx (ArdourCanvas::Item*, GdkEvent*);
1782 void end_time_fx (ArdourCanvas::Item*, GdkEvent*);
1784 struct TimeStretchDialog : public ArdourDialog {
1785 ARDOUR::Session::TimeStretchRequest request;
1787 RegionSelection regions;
1788 Gtk::ProgressBar progress_bar;
1789 Gtk::ToggleButton quick_button;
1790 Gtk::ToggleButton antialias_button;
1791 Gtk::Button* cancel_button;
1792 Gtk::Button* action_button;
1793 Gtk::HBox upper_button_box;
1797 TimeStretchDialog (Editor& e);
1799 gint update_progress ();
1800 sigc::connection first_cancel;
1801 sigc::connection first_delete;
1802 void cancel_timestretch_in_progress ();
1803 gint delete_timestretch_in_progress (GdkEventAny*);
1806 /* "whats mine is yours" */
1808 friend class TimeStretchDialog;
1810 TimeStretchDialog* current_timestretch;
1812 static void* timestretch_thread (void *arg);
1813 int run_timestretch (RegionSelection&, float fraction);
1814 void do_timestretch (TimeStretchDialog&);
1816 /* editor-mixer strip */
1818 MixerStrip *current_mixer_strip;
1819 bool show_editor_mixer_when_tracks_arrive;
1820 Gtk::VBox current_mixer_strip_vbox;
1821 void cms_deleted ();
1822 void current_mixer_strip_hidden ();
1823 void current_mixer_strip_removed ();
1825 void detach_tearoff (Gtk::Box* b, Gtk::Window* w);
1826 void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n);
1828 /* nudging tracks */
1830 void nudge_selected_tracks (bool use_edit_cursor, bool forwards);
1834 bool _xfade_visibility;
1837 void handle_new_imageframe_time_axis_view(const string & track_name, void* src) ;
1838 void handle_new_imageframe_marker_time_axis_view(const string & track_name, TimeAxisView* marked_track) ;
1840 void start_imageframe_grab(ArdourCanvas::Item*, GdkEvent*) ;
1841 void start_markerview_grab(ArdourCanvas::Item*, GdkEvent*) ;
1843 void imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
1844 void markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
1845 void timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent*) ;
1847 gint canvas_imageframe_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
1848 gint canvas_imageframe_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
1849 gint canvas_imageframe_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
1850 gint canvas_imageframe_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
1852 gint canvas_marker_time_axis_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerTimeAxis* mta);
1853 gint canvas_markerview_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
1854 gint canvas_markerview_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
1855 gint canvas_markerview_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
1857 void imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1858 void imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1859 void imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1860 void imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1861 void imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1862 void imageframe_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1864 void markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1865 void markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1866 void markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1867 void markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1868 void markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1869 void markerview_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1871 void popup_imageframe_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
1872 void popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
1874 ImageFrameSocketHandler* image_socket_listener ;
1877 void toggle_xfade_active (boost::weak_ptr<ARDOUR::Crossfade>);
1878 void toggle_xfade_length (boost::weak_ptr<ARDOUR::Crossfade>);
1879 void edit_xfade (boost::weak_ptr<ARDOUR::Crossfade>);
1880 void xfade_edit_left_region ();
1881 void xfade_edit_right_region ();
1883 static const int32_t default_width = 995;
1884 static const int32_t default_height = 765;
1888 Gtk::Button nudge_forward_button;
1889 Gtk::Button nudge_backward_button;
1890 Gtk::HBox nudge_hbox;
1891 Gtk::VBox nudge_vbox;
1892 AudioClock nudge_clock;
1894 nframes_t get_nudge_distance (nframes_t pos, nframes_t& next);
1898 void apply_filter (ARDOUR::Filter&, string cmd);
1900 /* handling cleanup */
1902 int playlist_deletion_dialog (boost::shared_ptr<ARDOUR::Playlist>);
1904 vector<sigc::connection> session_connections;
1906 /* tracking step changes of track height */
1908 TimeAxisView* current_stepping_trackview;
1909 struct timeval last_track_height_step_timestamp;
1910 gint track_height_step_timeout();
1911 sigc::connection step_timeout;
1913 TimeAxisView* entered_track;
1914 RegionView* entered_regionview;
1915 bool clear_entered_track;
1916 gint left_track_canvas (GdkEventCrossing*);
1917 void set_entered_track (TimeAxisView*);
1918 void set_entered_regionview (RegionView*);
1919 gint left_automation_track ();
1921 bool _new_regionviews_show_envelope;
1923 void toggle_gain_envelope_visibility ();
1924 void toggle_gain_envelope_active ();
1925 void reset_region_gain_envelopes ();
1927 Gtk::CheckMenuItem* region_envelope_visible_item;
1928 Gtk::CheckMenuItem* region_envelope_active_item;
1929 Gtk::CheckMenuItem* region_mute_item;
1930 Gtk::CheckMenuItem* region_lock_item;
1931 Gtk::CheckMenuItem* region_lock_position_item;
1932 Gtk::CheckMenuItem* region_opaque_item;
1934 bool on_key_press_event (GdkEventKey*);
1936 void session_state_saved (string);
1938 Glib::RefPtr<Gtk::Action> undo_action;
1939 Glib::RefPtr<Gtk::Action> redo_action;
1941 void history_changed ();
1943 Gtk::HBox status_bar_hpacker;
1946 #endif /* __ardour_editor_h__ */