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__
30 #include <glibmm/ustring.h>
32 #include <boost/optional.hpp>
34 #include <libgnomecanvasmm/canvas.h>
35 #include <libgnomecanvasmm/group.h>
36 #include <libgnomecanvasmm/line.h>
37 #include <libgnomecanvasmm/pixbuf.h>
41 #include <gtkmm/comboboxtext.h>
42 #include <gtkmm/layout.h>
44 #include <gtkmm2ext/selector.h>
45 #include <gtkmm2ext/click_box.h>
46 #include <gtkmm2ext/dndtreeview.h>
48 #include "pbd/stateful.h"
49 #include "pbd/signals.h"
51 #include "ardour/import_status.h"
52 #include "ardour/tempo.h"
53 #include "ardour/location.h"
54 #include "ardour/audioregion.h"
55 #include "ardour/track.h"
56 #include "ardour/types.h"
57 #include "ardour/route_group.h"
59 #include "audio_clock.h"
60 #include "gtk-custom-ruler.h"
61 #include "ardour_dialog.h"
62 #include "public_editor.h"
65 #include "editor_items.h"
66 #include "region_selection.h"
68 #include "editor_summary.h"
70 namespace Gnome { namespace Canvas {
79 class AudioDiskstream;
100 class AnalysisWindow;
101 class AudioRegionView;
102 class AudioStreamView;
103 class AudioTimeAxisView;
104 class AutomationLine;
105 class AutomationSelection;
106 class AutomationTimeAxisView;
111 class GlobalPortMatrixWindow;
112 class GroupedButtons;
114 class MidiRegionView;
116 class PlaylistSelector;
117 class PluginSelector;
120 class SoundFileOmega;
126 class EditorGroupTabs;
128 class EditorRouteGroups;
130 class EditorLocations;
131 class EditorSnapshots;
133 /* <CMT Additions> */
134 class ImageFrameView;
135 class ImageFrameTimeAxisView;
136 class ImageFrameTimeAxis;
137 class MarkerTimeAxis ;
139 class ImageFrameSocketHandler ;
140 class TimeAxisViewItem ;
141 /* </CMT Additions> */
143 struct EditorCursor {
145 ArdourCanvas::Points points;
146 ArdourCanvas::Line canvas_item;
147 nframes64_t current_frame;
150 EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
153 void set_position (nframes64_t);
154 void set_length (double units);
155 void set_y_axis (double position);
157 PBD::Signal1<void, nframes64_t> PositionChanged;
160 class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
166 void set_session (ARDOUR::Session *);
167 ARDOUR::Session* session() const { return _session; }
170 virtual bool have_idled () const { return _have_idled; }
172 nframes64_t leftmost_position() const { return leftmost_frame; }
174 nframes64_t current_page_frames() const {
175 return (nframes64_t) floor (_canvas_width * frames_per_unit);
178 double canvas_height () const {
179 return _canvas_height;
182 void cycle_snap_mode ();
183 void cycle_snap_choice ();
184 void set_snap_to (Editing::SnapType);
185 void set_snap_mode (Editing::SnapMode);
186 void set_snap_threshold (double pixel_distance) {snap_threshold = pixel_distance;}
188 Editing::SnapMode snap_mode () const;
189 Editing::SnapType snap_type () const;
191 void undo (uint32_t n = 1);
192 void redo (uint32_t n = 1);
194 XMLNode& get_state ();
195 int set_state (const XMLNode&, int version);
197 void set_mouse_mode (Editing::MouseMode, bool force=true);
198 void step_mouse_mode (bool next);
199 Editing::MouseMode current_mouse_mode () const { return mouse_mode; }
200 Editing::MidiEditMode current_midi_edit_mode () const;
202 bool internal_editing() const { return _internal_editing ; }
203 void set_internal_edit (bool yn);
206 void add_imageframe_time_axis(const std::string & track_name, void*) ;
207 void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) ;
208 void connect_to_image_compositor() ;
209 void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
210 TimeAxisView* get_named_time_axis(const std::string & name) ;
211 #endif /* WITH_CMT */
213 void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
214 void add_to_idle_resize (TimeAxisView*, int32_t);
216 RouteTimeAxisView* get_route_view_by_id (PBD::ID& id);
218 void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
219 void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
220 void remove_a_region (boost::shared_ptr<ARDOUR::Region>);
222 #ifdef USE_RUBBERBAND
223 std::vector<std::string> rb_opt_strings;
226 /* option editor-access */
228 void set_show_waveforms_recording (bool yn);
229 bool show_waveforms_recording() const { return _show_waveforms_recording; }
231 /* things that need to be public to be used in the main menubar */
233 void new_region_from_selection ();
234 void separate_regions_between (const TimeSelection&);
235 void separate_region_from_selection ();
236 void separate_region_from_punch ();
237 void separate_region_from_loop ();
238 void separate_regions_using_location (ARDOUR::Location&);
239 void transition_to_rolling (bool forward);
243 nframes64_t unit_to_frame (double unit) const {
244 return (nframes64_t) rint (unit * frames_per_unit);
247 double frame_to_unit (nframes64_t frame) const {
248 return rint ((double) frame / (double) frames_per_unit);
251 double frame_to_unit (double frame) const {
252 return rint (frame / frames_per_unit);
255 /* NOTE: these functions assume that the "pixel" coordinate is
256 the result of using the world->canvas affine transform on a
257 world coordinate. These coordinates already take into
258 account any scrolling carried out by adjusting the
262 nframes64_t pixel_to_frame (double pixel) const {
264 /* pixel can be less than zero when motion events
265 are processed. since we've already run the world->canvas
266 affine, that means that the location *really* is "off
267 to the right" and thus really is "before the start".
271 return (nframes64_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
277 gulong frame_to_pixel (nframes64_t frame) const {
278 return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit)));
281 void flush_canvas ();
285 Selection& get_selection() const { return *selection; }
286 Selection& get_cut_buffer() const { return *cut_buffer; }
288 bool extend_selection_to_track (TimeAxisView&);
290 void play_selection ();
291 void select_all_in_track (Selection::Operation op);
292 void select_all (Selection::Operation op);
293 void invert_selection_in_track ();
294 void invert_selection ();
295 void deselect_all ();
297 void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
301 void set_show_measures (bool yn);
302 bool show_measures () const { return _show_measures; }
304 /* analysis window */
306 void analyze_region_selection();
307 void analyze_range_selection();
311 void export_audio ();
312 void export_selection ();
313 void export_range ();
314 void export_region ();
316 void add_toplevel_controls (Gtk::Container&);
317 Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; }
319 void set_zoom_focus (Editing::ZoomFocus);
320 Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
321 double get_current_zoom () const { return frames_per_unit; }
323 void temporal_zoom_step (bool coarser);
324 void tav_zoom_step (bool coarser);
326 /* stuff that AudioTimeAxisView and related classes use */
328 PlaylistSelector& playlist_selector() const;
329 void clear_playlist (boost::shared_ptr<ARDOUR::Playlist>);
331 void new_playlists (TimeAxisView* v);
332 void copy_playlists (TimeAxisView* v);
333 void clear_playlists (TimeAxisView* v);
335 void get_onscreen_tracks (TrackViewList&);
337 Width editor_mixer_strip_width;
338 void maybe_add_mixer_strip_width (XMLNode&);
339 void show_editor_mixer (bool yn);
340 void create_editor_mixer ();
341 void show_editor_list (bool yn);
342 void set_selected_mixer_strip (TimeAxisView&);
343 void hide_track_in_display (TimeAxisView& tv, bool temporary = false);
345 /* nudge is initiated by transport controls owned by ARDOUR_UI */
347 nframes64_t get_nudge_distance (nframes64_t pos, nframes64_t& next);
348 Evoral::MusicalTime get_grid_type_as_beats (bool& success, nframes64_t position);
350 void nudge_forward (bool next, bool force_playhead);
351 void nudge_backward (bool next, bool force_playhead);
353 /* nudge initiated from context menu */
355 void nudge_forward_capture_offset ();
356 void nudge_backward_capture_offset ();
358 /* playhead/screen stuff */
360 void set_follow_playhead (bool yn);
361 void toggle_follow_playhead ();
362 bool follow_playhead() const { return _follow_playhead; }
363 bool dragging_playhead () const { return _dragging_playhead; }
365 void toggle_zero_line_visibility ();
366 void toggle_waveforms_while_recording ();
368 void set_group_tabs ();
369 void toggle_measure_visibility ();
370 void toggle_logo_visibility ();
372 double get_physical_screen_width () const { return physical_screen_width; };
373 double physical_screen_width;
374 double physical_screen_height;
378 void toggle_selected_region_fades (int dir);
379 void update_region_fade_visibility ();
380 bool xfade_visibility() const { return _xfade_visibility; }
381 void update_xfade_visibility ();
383 /* redirect shared ops menu. caller must free returned menu */
385 Gtk::Menu* redirect_menu ();
387 /* floating windows/transient */
389 void ensure_float (Gtk::Window&);
393 void scroll_tracks_down_line ();
394 void scroll_tracks_up_line ();
396 bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
397 void prepare_for_cleanup ();
398 void finish_cleanup ();
400 void maximise_editing_space();
401 void restore_editing_space();
403 void reset_x_origin (nframes64_t);
404 void reset_y_origin (double);
405 void reset_zoom (double);
406 void reposition_and_zoom (nframes64_t, double);
408 nframes64_t get_preferred_edit_position (bool ignore_playhead = false);
410 bool update_mouse_speed ();
411 bool decelerate_mouse_speed ();
413 void toggle_meter_updating();
415 void show_rhythm_ferret();
416 void show_global_port_matrix (ARDOUR::DataType);
418 void goto_visual_state (uint32_t);
419 void save_visual_state (uint32_t);
421 TrackViewList const & get_track_views () {
425 int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region>);
427 void do_import (std::vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&);
428 void do_embed (std::vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
430 void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
432 void show_verbose_canvas_cursor_with (const std::string& txt);
433 void hide_verbose_canvas_cursor();
435 void center_screen (nframes64_t);
437 TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
440 void map_transport_state ();
441 void map_position_change (nframes64_t);
447 void color_handler ();
451 // to keep track of the playhead position for control_scroll
452 boost::optional<nframes64_t> _control_scroll_target;
454 PlaylistSelector* _playlist_selector;
456 typedef std::pair<TimeAxisView*,XMLNode*> TAVState;
460 double frames_per_unit;
461 nframes64_t leftmost_frame;
462 Editing::ZoomFocus zoom_focus;
463 std::list<TAVState> track_states;
466 std::list<VisualState*> undo_visual_stack;
467 std::list<VisualState*> redo_visual_stack;
468 VisualState* current_visual_state (bool with_tracks = true);
469 void undo_visual_state ();
470 void redo_visual_state ();
471 void use_visual_state (VisualState&);
473 void swap_visual_state ();
475 std::vector<VisualState*> visual_states;
476 sigc::connection visual_state_op_connection;
477 void start_visual_state_op (uint32_t n);
478 void cancel_visual_state_op (uint32_t n);
479 bool end_visual_state_op (uint32_t n);
481 nframes64_t leftmost_frame;
482 double frames_per_unit;
483 Editing::ZoomFocus zoom_focus;
485 void set_frames_per_unit (double);
488 Editing::MouseMode mouse_mode;
489 bool _internal_editing;
490 Editing::MouseMode effective_mouse_mode () const;
492 enum JoinObjectRangeState {
493 JOIN_OBJECT_RANGE_NONE,
494 /** `join object/range' mode is active and the mouse is over a place where object mode should happen */
495 JOIN_OBJECT_RANGE_OBJECT,
496 /** `join object/range' mode is active and the mouse is over a place where range mode should happen */
497 JOIN_OBJECT_RANGE_RANGE
500 JoinObjectRangeState _join_object_range_state;
502 void update_join_object_range_location (double, double);
504 int post_maximal_editor_width;
505 int post_maximal_pane_position;
506 int pre_maximal_pane_position;
507 int pre_maximal_editor_width;
508 void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
510 Gtk::Notebook the_notebook;
511 Gtk::HPaned edit_pane;
513 Gtk::EventBox meter_base;
515 Gtk::EventBox marker_base;
516 Gtk::HBox marker_box;
517 Gtk::VBox scrollers_rulers_markers_box;
519 void location_changed (ARDOUR::Location *);
520 void location_flags_changed (ARDOUR::Location *, void *);
521 void refresh_location_display ();
522 void refresh_location_display_s (ARDOUR::Change);
523 void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
524 void add_new_location (ARDOUR::Location *);
525 void location_gone (ARDOUR::Location *);
526 void remove_marker (ArdourCanvas::Item&, GdkEvent*);
527 gint really_remove_marker (ARDOUR::Location* loc);
528 void goto_nth_marker (int nth);
530 uint32_t location_marker_color;
531 uint32_t location_range_color;
532 uint32_t location_loop_color;
533 uint32_t location_punch_color;
534 uint32_t location_cd_marker_color;
536 struct LocationMarkers {
541 LocationMarkers () : start(0), end(0), valid (true) {}
547 void set_name (const std::string&);
548 void set_position (nframes64_t start, nframes64_t end = 0);
549 void set_color_rgba (uint32_t);
552 LocationMarkers *find_location_markers (ARDOUR::Location *) const;
553 ARDOUR::Location* find_location_from_marker (Marker *, bool& is_start) const;
554 Marker* entered_marker;
556 typedef std::map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
557 LocationMarkerMap location_markers;
559 void hide_marker (ArdourCanvas::Item*, GdkEvent*);
560 void clear_marker_display ();
561 void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false);
562 bool choose_new_marker_name(std::string &name);
563 void update_cd_marker_display ();
564 void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
566 TimeAxisView* clicked_axisview;
567 RouteTimeAxisView* clicked_routeview;
568 /** The last RegionView that was clicked on, or 0 if the last click was not
569 * on a RegionView. This is set up by the canvas event handlers in
570 * editor_canvas_events.cc
572 RegionView* clicked_regionview;
573 RegionSelection latest_regionviews;
574 uint32_t clicked_selection;
575 CrossfadeView* clicked_crossfadeview;
576 ControlPoint* clicked_control_point;
578 void sort_track_selection (TrackViewList* sel = 0);
580 void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, ARDOUR::RouteGroup::Property) const;
581 RegionSelection get_equivalent_regions (RegionSelection &, ARDOUR::RouteGroup::Property) const;
582 void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, ARDOUR::RouteGroup::Property) const;
584 /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
586 void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView *, std::vector<RegionView*>*) const;
587 void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
588 void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
589 void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
593 void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
594 bool button_release_can_deselect;
596 void catch_vanishing_regionview (RegionView *);
598 void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
599 void select_all_tracks ();
601 bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
602 void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
603 void set_selected_track_as_side_effect (bool force = false);
604 bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false);
606 bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::weak_ptr<ARDOUR::Region>);
607 void collect_new_region_view (RegionView *);
608 void collect_and_select_new_region_view (RegionView *);
610 void select_range_around_region (RegionView *);
612 Gtk::Menu track_context_menu;
613 Gtk::Menu track_region_context_menu;
614 Gtk::Menu track_selection_context_menu;
615 Gtk::Menu track_crossfade_context_menu;
617 Gtk::MenuItem* region_edit_menu_split_item;
618 Gtk::MenuItem* region_edit_menu_split_multichannel_item;
619 Gtk::Menu * track_region_edit_playlist_menu;
620 Gtk::Menu * track_edit_playlist_submenu;
621 Gtk::Menu * track_selection_edit_playlist_submenu;
623 void popup_track_context_menu (int, int, ItemType, bool, nframes64_t);
624 Gtk::Menu* build_track_context_menu (nframes64_t);
625 Gtk::Menu* build_track_bus_context_menu (nframes64_t);
626 Gtk::Menu* build_track_region_context_menu (nframes64_t frame);
627 Gtk::Menu* build_track_crossfade_context_menu (nframes64_t);
628 Gtk::Menu* build_track_selection_context_menu (nframes64_t);
629 void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
630 void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
631 void add_region_context_items (StreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
632 void add_crossfade_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Crossfade>, Gtk::Menu_Helpers::MenuList&, bool many);
633 void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
635 void handle_new_route (ARDOUR::RouteList&);
636 void timeaxisview_deleted (TimeAxisView *);
638 Gtk::HBox global_hpacker;
639 Gtk::VBox global_vpacker;
642 Gdk::Cursor* current_canvas_cursor;
643 void set_canvas_cursor ();
644 Gdk::Cursor* which_grabber_cursor ();
646 ArdourCanvas::Canvas* track_canvas;
648 ArdourCanvas::NoEventText* verbose_canvas_cursor;
649 bool verbose_cursor_visible;
651 void parameter_changed (std::string);
653 bool track_canvas_motion (GdkEvent*);
655 void set_verbose_canvas_cursor (const std::string &, double x, double y);
656 void set_verbose_canvas_cursor_text (const std::string &);
657 void show_verbose_canvas_cursor();
659 bool verbose_cursor_on; // so far unused
661 Gtk::EventBox time_canvas_event_box;
662 Gtk::EventBox track_canvas_event_box;
663 Gtk::EventBox time_button_event_box;
664 Gtk::EventBox ruler_label_event_box;
666 ArdourCanvas::Group *minsec_group;
667 ArdourCanvas::Pixbuf *logo_item;
668 ArdourCanvas::Group *bbt_group;
669 ArdourCanvas::Group *timecode_group;
670 ArdourCanvas::Group *frame_group;
671 ArdourCanvas::Group *tempo_group;
672 ArdourCanvas::Group *meter_group;
673 ArdourCanvas::Group *marker_group;
674 ArdourCanvas::Group *range_marker_group;
675 ArdourCanvas::Group *transport_marker_group;
676 ArdourCanvas::Group* cd_marker_group;
678 ArdourCanvas::Group* timebar_group;
680 /* These bars never need to be scrolled */
681 ArdourCanvas::Group* meter_bar_group;
682 ArdourCanvas::Group* tempo_bar_group;
683 ArdourCanvas::Group* marker_bar_group;
684 ArdourCanvas::Group* range_marker_bar_group;
685 ArdourCanvas::Group* transport_marker_bar_group;
686 ArdourCanvas::Group* cd_marker_bar_group;
688 /** The group containing all items that require horizontal scrolling. */
689 ArdourCanvas::Group* _background_group;
691 The _master_group is the group containing all items
692 that require horizontal scrolling..
693 It is primarily used to separate canvas items
694 that require horizontal scrolling from those that do not.
696 ArdourCanvas::Group* _master_group;
698 /* The group containing all trackviews. Only scrolled vertically. */
699 ArdourCanvas::Group* _trackview_group;
701 /* The group used for region motion. Sits on top of _trackview_group */
702 ArdourCanvas::Group* _region_motion_group;
705 ruler_metric_timecode = 0,
706 ruler_metric_bbt = 1,
707 ruler_metric_frames = 2,
708 ruler_metric_minsec = 3,
710 ruler_time_tempo = 4,
711 ruler_time_meter = 5,
712 ruler_time_marker = 6,
713 ruler_time_range_marker = 7,
714 ruler_time_transport_marker = 8,
715 ruler_time_cd_marker = 9,
718 static GtkCustomMetric ruler_metrics[4];
719 Glib::RefPtr<Gtk::ToggleAction> ruler_timecode_action;
720 Glib::RefPtr<Gtk::ToggleAction> ruler_bbt_action;
721 Glib::RefPtr<Gtk::ToggleAction> ruler_samples_action;
722 Glib::RefPtr<Gtk::ToggleAction> ruler_minsec_action;
723 Glib::RefPtr<Gtk::ToggleAction> ruler_tempo_action;
724 Glib::RefPtr<Gtk::ToggleAction> ruler_meter_action;
725 Glib::RefPtr<Gtk::ToggleAction> ruler_marker_action;
726 Glib::RefPtr<Gtk::ToggleAction> ruler_range_action;
727 Glib::RefPtr<Gtk::ToggleAction> ruler_loop_punch_action;
728 Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
729 bool no_ruler_shown_update;
731 gint ruler_button_press (GdkEventButton*);
732 gint ruler_button_release (GdkEventButton*);
733 gint ruler_mouse_motion (GdkEventMotion*);
734 bool ruler_scroll (GdkEventScroll* event);
736 Gtk::Widget * ruler_grabbed_widget;
738 void initialize_rulers ();
739 void update_just_timecode ();
740 void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
741 void update_fixed_rulers ();
742 void update_tempo_based_rulers ();
743 void popup_ruler_menu (nframes64_t where = 0, ItemType type = RegionItem);
744 void update_ruler_visibility ();
745 void set_ruler_visible (RulerType, bool);
746 void toggle_ruler_visibility (RulerType rt);
747 void ruler_toggled (int);
748 gint ruler_label_button_release (GdkEventButton*);
749 void store_ruler_visibility ();
750 void restore_ruler_visibility ();
752 static gint _metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
753 static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
754 static gint _metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
755 static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
757 enum MinsecRulerScale {
764 MinsecRulerScale minsec_ruler_scale;
766 nframes_t minsec_mark_interval;
767 gint minsec_mark_modulo;
769 void set_minsec_ruler_scale (gdouble lower, gdouble upper);
771 enum TimecodeRulerScale {
773 timecode_show_frames,
774 timecode_show_seconds,
775 timecode_show_minutes,
779 TimecodeRulerScale timecode_ruler_scale;
781 nframes_t timecode_mark_interval;
782 gint timecode_mark_modulo;
783 gint timecode_nmarks;
784 void set_timecode_ruler_scale (gdouble lower, gdouble upper);
794 bbt_show_ticks_detail,
795 bbt_show_ticks_super_detail
798 BBTRulerScale bbt_ruler_scale;
802 uint32_t bbt_bar_helper_on;
803 uint32_t bbt_accent_modulo;
804 void compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper);
806 gint metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
807 gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
808 gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
809 gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
811 Gtk::Widget *_ruler_separator;
812 GtkWidget *_timecode_ruler;
813 GtkWidget *_bbt_ruler;
814 GtkWidget *_frames_ruler;
815 GtkWidget *_minsec_ruler;
816 Gtk::Widget *timecode_ruler;
817 Gtk::Widget *bbt_ruler;
818 Gtk::Widget *frames_ruler;
819 Gtk::Widget *minsec_ruler;
820 static Editor *ruler_editor;
822 static const double timebar_height;
823 guint32 visible_timebars;
824 gdouble canvas_timebars_vsize;
825 gdouble get_canvas_timebars_vsize () const { return canvas_timebars_vsize; }
826 Gtk::Menu *editor_ruler_menu;
828 ArdourCanvas::SimpleRect* tempo_bar;
829 ArdourCanvas::SimpleRect* meter_bar;
830 ArdourCanvas::SimpleRect* marker_bar;
831 ArdourCanvas::SimpleRect* range_marker_bar;
832 ArdourCanvas::SimpleRect* transport_marker_bar;
833 ArdourCanvas::SimpleRect* cd_marker_bar;
835 Gtk::Label minsec_label;
836 Gtk::Label bbt_label;
837 Gtk::Label timecode_label;
838 Gtk::Label frame_label;
839 Gtk::Label tempo_label;
840 Gtk::Label meter_label;
841 Gtk::Label mark_label;
842 Gtk::Label range_mark_label;
843 Gtk::Label transport_mark_label;
844 Gtk::Label cd_mark_label;
846 Gtk::VBox time_button_vbox;
847 Gtk::HBox time_button_hbox;
849 friend class EditorCursor;
851 EditorCursor* playhead_cursor;
852 ArdourCanvas::Group* cursor_group;
854 nframes64_t get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection, bool only_onscreen);
856 void cursor_to_region_boundary (bool with_selection, int32_t dir);
857 void cursor_to_next_region_boundary (bool with_selection);
858 void cursor_to_previous_region_boundary (bool with_selection);
859 void cursor_to_next_region_point (EditorCursor*, ARDOUR::RegionPoint);
860 void cursor_to_previous_region_point (EditorCursor*, ARDOUR::RegionPoint);
861 void cursor_to_region_point (EditorCursor*, ARDOUR::RegionPoint, int32_t dir);
862 void cursor_to_selection_start (EditorCursor *);
863 void cursor_to_selection_end (EditorCursor *);
865 void selected_marker_to_region_boundary (bool with_selection, int32_t dir);
866 void selected_marker_to_next_region_boundary (bool with_selection);
867 void selected_marker_to_previous_region_boundary (bool with_selection);
868 void selected_marker_to_next_region_point (ARDOUR::RegionPoint);
869 void selected_marker_to_previous_region_point (ARDOUR::RegionPoint);
870 void selected_marker_to_region_point (ARDOUR::RegionPoint, int32_t dir);
871 void selected_marker_to_selection_start ();
872 void selected_marker_to_selection_end ();
874 void select_all_selectables_using_cursor (EditorCursor *, bool);
875 void select_all_selectables_using_edit (bool);
876 void select_all_selectables_between (bool within);
877 void select_range_between ();
879 boost::shared_ptr<ARDOUR::Region> find_next_region (nframes64_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
880 nframes64_t find_next_region_boundary (nframes64_t, int32_t dir, const TrackViewList&);
882 std::vector<nframes64_t> region_boundary_cache;
883 void build_region_boundary_cache ();
886 Gtk::HBox bottom_hbox;
888 Gtk::Table edit_packer;
890 Gtk::Adjustment vertical_adjustment;
891 Gtk::Adjustment horizontal_adjustment;
893 Gtk::Layout controls_layout;
894 bool control_layout_scroll (GdkEventScroll* ev);
895 void controls_layout_size_request (Gtk::Requisition*);
896 sigc::connection controls_layout_size_request_connection;
898 void horizontal_scroll_left ();
899 void horizontal_scroll_right ();
901 double _canvas_width;
902 double _canvas_height;
903 double full_canvas_height;
905 bool track_canvas_map_handler (GdkEventAny*);
907 gint edit_controls_button_release (GdkEventButton*);
908 Gtk::Menu *edit_controls_left_menu;
909 Gtk::Menu *edit_controls_right_menu;
911 Gtk::VBox ruler_label_vbox;
912 Gtk::VBox track_canvas_vbox;
913 Gtk::VBox time_canvas_vbox;
914 Gtk::VBox edit_controls_vbox;
915 Gtk::HBox edit_controls_hbox;
917 void control_scroll (float);
918 void access_action (std::string,std::string);
919 bool deferred_control_scroll (nframes64_t);
920 sigc::connection control_scroll_connection;
922 gdouble get_trackview_group_vertical_offset () const { return vertical_adjustment.get_value () - canvas_timebars_vsize;}
924 ArdourCanvas::Group* get_background_group () const { return _background_group; }
925 ArdourCanvas::Group* get_trackview_group () const { return _trackview_group; }
926 double last_trackview_group_vertical_offset;
927 void tie_vertical_scrolling ();
928 void scroll_canvas_horizontally ();
929 void scroll_canvas_vertically ();
931 struct VisualChange {
939 nframes64_t time_origin;
940 double frames_per_unit;
945 VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {}
947 pending = Type (pending | t);
952 VisualChange pending_visual_change;
954 static int _idle_visual_changer (void *arg);
955 int idle_visual_changer ();
957 void queue_visual_change (nframes64_t);
958 void queue_visual_change (double);
959 void queue_visual_change_y (double);
960 void ensure_visual_change_idle_handler ();
962 void end_location_changed (ARDOUR::Location*);
965 TrackViewList track_views;
966 std::pair<TimeAxisView*, ARDOUR::layer_t> trackview_by_y_position (double);
967 TimeAxisView* axis_view_from_route (boost::shared_ptr<ARDOUR::Route>) const;
969 TrackViewList get_tracks_for_range_action () const;
971 static Gdk::Cursor* cross_hair_cursor;
972 static Gdk::Cursor* trimmer_cursor;
973 static Gdk::Cursor* selector_cursor;
974 static Gdk::Cursor* grabber_cursor;
975 static Gdk::Cursor* grabber_edit_point_cursor;
976 static Gdk::Cursor* zoom_cursor;
977 static Gdk::Cursor* time_fx_cursor;
978 static Gdk::Cursor* fader_cursor;
979 static Gdk::Cursor* speaker_cursor;
980 static Gdk::Cursor* midi_pencil_cursor;
981 static Gdk::Cursor* midi_select_cursor;
982 static Gdk::Cursor* midi_resize_cursor;
983 static Gdk::Cursor* midi_erase_cursor;
984 static Gdk::Cursor* wait_cursor;
985 static Gdk::Cursor* timebar_cursor;
986 static Gdk::Cursor* transparent_cursor;
988 static void build_cursors ();
990 sigc::connection scroll_connection;
991 nframes64_t last_update_frame;
992 void center_screen_internal (nframes64_t, float);
994 void update_current_screen ();
996 void session_going_away ();
998 nframes64_t cut_buffer_start;
999 nframes64_t cut_buffer_length;
1001 bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
1002 bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
1003 bool button_press_handler_1 (ArdourCanvas::Item *, GdkEvent *, ItemType);
1004 bool button_press_handler_2 (ArdourCanvas::Item *, GdkEvent *, ItemType);
1005 bool button_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
1006 bool motion_handler (ArdourCanvas::Item*, GdkEvent*, bool from_autoscroll = false);
1007 bool enter_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
1008 bool leave_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
1010 /* KEYMAP HANDLING */
1012 void register_actions ();
1014 int ensure_cursor (nframes64_t* pos);
1016 void cut_copy (Editing::CutCopyOp);
1017 bool can_cut_copy () const;
1018 void cut_copy_points (Editing::CutCopyOp);
1019 void cut_copy_regions (Editing::CutCopyOp, RegionSelection&);
1020 void cut_copy_ranges (Editing::CutCopyOp);
1021 void cut_copy_midi (Editing::CutCopyOp);
1023 void mouse_paste ();
1024 void paste_internal (nframes64_t position, float times);
1026 /* EDITING OPERATIONS */
1028 void reset_point_selection ();
1029 void toggle_region_mute ();
1030 void toggle_region_lock ();
1031 void toggle_region_opaque ();
1032 void toggle_record_enable ();
1033 void set_region_lock_style (ARDOUR::Region::PositionLockStyle);
1034 void raise_region ();
1035 void raise_region_to_top ();
1036 void lower_region ();
1037 void lower_region_to_bottom ();
1038 void split_regions_at (nframes64_t, RegionSelection&);
1039 void split_region_at_transients ();
1040 void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret);
1041 void crop_region_to_selection ();
1042 void crop_region_to (nframes64_t start, nframes64_t end);
1043 void set_sync_point (nframes64_t, const RegionSelection&);
1044 void set_region_sync_from_edit_point ();
1045 void remove_region_sync();
1046 void align_selection (ARDOUR::RegionPoint, nframes64_t position, const RegionSelection&);
1047 void align_selection_relative (ARDOUR::RegionPoint point, nframes64_t position, const RegionSelection&);
1048 void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
1049 void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
1050 void remove_selected_regions ();
1051 void remove_clicked_region ();
1052 void edit_region ();
1053 void show_midi_list_editor ();
1054 void rename_region ();
1055 void duplicate_some_regions (RegionSelection&, float times);
1056 void duplicate_selection (float times);
1057 void region_fill_selection ();
1059 void region_fill_track ();
1060 void audition_playlist_region_standalone (boost::shared_ptr<ARDOUR::Region>);
1061 void audition_playlist_region_via_route (boost::shared_ptr<ARDOUR::Region>, ARDOUR::Route&);
1062 void split_multichannel_region();
1063 void reverse_region ();
1064 void strip_region_silence ();
1065 void normalize_region ();
1066 double _last_normalization_value;
1067 void reset_region_scale_amplitude ();
1068 void adjust_region_scale_amplitude (bool up);
1069 void quantize_region ();
1071 void do_insert_time ();
1072 void insert_time (nframes64_t, nframes64_t, Editing::InsertTimeOption, bool, bool, bool);
1074 void tab_to_transient (bool forward);
1076 void use_region_as_bar ();
1077 void use_range_as_bar ();
1079 void define_one_bar (nframes64_t start, nframes64_t end);
1081 void audition_region_from_region_list ();
1082 void hide_region_from_region_list ();
1084 void align (ARDOUR::RegionPoint);
1085 void align_relative (ARDOUR::RegionPoint);
1088 void reset_focus ();
1094 void paste (float times);
1096 int get_prefix (float&, bool&);
1098 void keyboard_paste ();
1099 void keyboard_insert_region_list_selection ();
1101 void region_from_selection ();
1102 void create_region_from_selection (std::vector<boost::shared_ptr<ARDOUR::Region> >&);
1104 void play_from_start ();
1105 void play_from_edit_point ();
1106 void play_from_edit_point_and_return ();
1107 void play_selected_region ();
1108 void play_edit_range ();
1109 void loop_selected_region ();
1110 void play_location (ARDOUR::Location&);
1111 void loop_location (ARDOUR::Location&);
1113 void temporal_zoom_selection ();
1114 void temporal_zoom_region (bool both_axes);
1115 void zoom_to_region (bool both_axes);
1116 void temporal_zoom_session ();
1117 void temporal_zoom (gdouble scale);
1118 void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const std::string & op);
1119 void temporal_zoom_to_frame (bool coarser, nframes64_t frame);
1121 void amplitude_zoom (gdouble scale);
1122 void amplitude_zoom_step (bool in);
1124 void insert_region_list_drag (boost::shared_ptr<ARDOUR::Region>, int x, int y);
1125 void insert_region_list_selection (float times);
1127 void insert_route_list_drag (boost::shared_ptr<ARDOUR::Route>, int x, int y);
1129 /* import & embed */
1131 void add_external_audio_action (Editing::ImportMode);
1132 void external_audio_dialog ();
1133 void session_import_dialog ();
1135 int check_whether_and_how_to_import(std::string, bool all_or_nothing = true);
1136 bool check_multichannel_status (const std::vector<Glib::ustring>& paths);
1138 SoundFileOmega* sfbrowser;
1140 void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos);
1142 bool idle_drop_paths (std::vector<Glib::ustring> paths, nframes64_t frame, double ypos);
1143 void drop_paths_part_two (const std::vector<Glib::ustring>& paths, nframes64_t frame, double ypos);
1145 int import_sndfiles (std::vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos,
1146 int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>, bool, uint32_t total);
1147 int embed_sndfiles (std::vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
1148 nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
1150 int add_sources (std::vector<Glib::ustring> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode,
1151 int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool add_channel_suffix);
1152 int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region> region, uint32_t, uint32_t, nframes64_t& pos, Editing::ImportMode mode,
1153 boost::shared_ptr<ARDOUR::Track>& existing_track);
1155 boost::shared_ptr<ARDOUR::AudioTrack> get_nth_selected_audio_track (int nth) const;
1156 boost::shared_ptr<ARDOUR::MidiTrack> get_nth_selected_midi_track (int nth) const;
1158 /* generic interthread progress window */
1160 ArdourDialog* interthread_progress_window;
1161 Gtk::Label interthread_progress_label;
1162 Gtk::VBox interthread_progress_vbox;
1163 Gtk::ProgressBar interthread_progress_bar;
1164 Gtk::Button interthread_cancel_button;
1165 Gtk::Label interthread_cancel_label;
1166 sigc::connection interthread_progress_connection;
1167 void interthread_cancel_clicked ();
1168 void build_interthread_progress_window ();
1169 ARDOUR::InterThreadInfo* current_interthread_info;
1171 AnalysisWindow* analysis_window;
1173 /* import specific info */
1175 struct EditorImportStatus : public ARDOUR::ImportStatus {
1176 Editing::ImportMode mode;
1180 boost::shared_ptr<ARDOUR::Track> track;
1184 EditorImportStatus import_status;
1185 gint import_progress_timeout (void *);
1186 static void *_import_thread (void *);
1187 void* import_thread ();
1188 void finish_import ();
1190 /* to support this ... */
1192 void import_audio (bool as_tracks);
1193 void do_import (std::vector<Glib::ustring> paths, bool split, bool as_tracks);
1195 void move_to_start ();
1196 void move_to_end ();
1198 void center_playhead ();
1199 void center_edit_point ();
1200 void edit_cursor_backward ();
1201 void edit_cursor_forward ();
1202 void playhead_forward_to_grid ();
1203 void playhead_backward_to_grid ();
1204 void playhead_backward ();
1205 void playhead_forward ();
1206 void scroll_playhead (bool forward);
1207 void scroll_backward (float pages=0.8f);
1208 void scroll_forward (float pages=0.8f);
1209 void scroll_tracks_down ();
1210 void scroll_tracks_up ();
1211 void delete_sample_forward ();
1212 void delete_sample_backward ();
1213 void delete_screen ();
1214 void search_backwards ();
1215 void search_forwards ();
1217 void clear_markers ();
1218 void clear_ranges ();
1219 void clear_locations ();
1220 void unhide_markers ();
1221 void unhide_ranges ();
1222 void jump_forward_to_mark ();
1223 void jump_backward_to_mark ();
1224 void cursor_align (bool playhead_to_edit);
1226 void remove_last_capture ();
1227 void select_all_selectables_using_time_selection ();
1228 void select_all_selectables_using_loop();
1229 void select_all_selectables_using_punch();
1230 void set_selection_from_range (ARDOUR::Location&);
1231 void set_selection_from_punch ();
1232 void set_selection_from_loop ();
1233 void set_selection_from_region ();
1235 void add_location_mark (nframes64_t where);
1236 void add_location_from_audio_region ();
1237 void add_locations_from_audio_region ();
1238 void add_location_from_selection ();
1239 void set_loop_from_selection (bool play);
1240 void set_punch_from_selection ();
1241 void set_punch_from_region ();
1243 void set_loop_from_edit_range (bool play);
1244 void set_loop_from_region (bool play);
1245 void set_punch_from_edit_range ();
1247 void set_loop_range (nframes64_t start, nframes64_t end, std::string cmd);
1248 void set_punch_range (nframes64_t start, nframes64_t end, std::string cmd);
1250 void add_location_from_playhead_cursor ();
1251 bool select_new_marker;
1253 void reverse_selection ();
1254 void edit_envelope ();
1256 void start_scrolling ();
1257 void stop_scrolling ();
1259 double last_scrub_x;
1260 int scrubbing_direction;
1261 int scrub_reversals;
1262 int scrub_reverse_distance;
1265 void keyboard_selection_begin ();
1266 void keyboard_selection_finish (bool add);
1267 bool have_pending_keyboard_selection;
1268 nframes64_t pending_keyboard_selection_start;
1270 boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
1271 void extend_selection_to_end_of_region (bool next);
1272 void extend_selection_to_start_of_region (bool previous);
1274 Editing::SnapType _snap_type;
1275 Editing::SnapMode _snap_mode;
1277 /// Snap threshold in pixels
1278 double snap_threshold;
1280 bool ignore_gui_changes;
1286 Gtk::Menu fade_context_menu;
1287 void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
1289 void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
1290 void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
1292 void set_fade_length (bool in);
1293 void toggle_fade_active (bool in);
1294 void set_fade_in_active (bool);
1295 void set_fade_out_active (bool);
1297 std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
1299 bool _dragging_playhead;
1300 bool _dragging_edit_point;
1302 void marker_drag_motion_callback (GdkEvent*);
1303 void marker_drag_finished_callback (GdkEvent*);
1305 gint mouse_rename_region (ArdourCanvas::Item*, GdkEvent*);
1307 void start_region_grab (ArdourCanvas::Item*, GdkEvent*, RegionView*);
1308 void start_create_region_grab (ArdourCanvas::Item*, GdkEvent*);
1309 void start_region_copy_grab (ArdourCanvas::Item*, GdkEvent*, RegionView*);
1310 void start_region_brush_grab (ArdourCanvas::Item*, GdkEvent*, RegionView*);
1311 void start_selection_grab (ArdourCanvas::Item*, GdkEvent*);
1313 void region_view_item_click (AudioRegionView&, GdkEventButton*);
1315 void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
1316 void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
1318 void mouse_brush_insert_region (RegionView*, nframes64_t pos);
1319 void brush (nframes64_t);
1321 void show_verbose_time_cursor (nframes64_t frame, double offset = 0, double xpos=-1, double ypos=-1);
1322 void show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset = 0, double xpos=-1, double ypos=-1);
1323 double clamp_verbose_cursor_x (double);
1324 double clamp_verbose_cursor_y (double);
1326 /* Canvas event handlers */
1328 bool canvas_control_point_event (GdkEvent* event,ArdourCanvas::Item*, ControlPoint*);
1329 bool canvas_line_event (GdkEvent* event,ArdourCanvas::Item*, AutomationLine*);
1330 bool canvas_selection_rect_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
1331 bool canvas_selection_start_trim_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
1332 bool canvas_selection_end_trim_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
1333 bool canvas_crossfade_view_event (GdkEvent* event,ArdourCanvas::Item*, CrossfadeView*);
1334 bool canvas_fade_in_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1335 bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1336 bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1337 bool canvas_fade_out_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
1340 // These variables are used to detect a feedback loop and break it to avoid a gui hang
1342 ArdourCanvas::Item *last_item_entered;
1343 int last_item_entered_n;
1346 bool canvas_region_view_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1347 bool canvas_frame_handle_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1348 bool canvas_region_view_name_highlight_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1349 bool canvas_region_view_name_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
1350 bool canvas_stream_view_event (GdkEvent* event,ArdourCanvas::Item*, RouteTimeAxisView*);
1351 bool canvas_marker_event (GdkEvent* event,ArdourCanvas::Item*, Marker*);
1352 bool canvas_zoom_rect_event (GdkEvent* event,ArdourCanvas::Item*);
1353 bool canvas_tempo_marker_event (GdkEvent* event,ArdourCanvas::Item*, TempoMarker*);
1354 bool canvas_meter_marker_event (GdkEvent* event,ArdourCanvas::Item*, MeterMarker*);
1355 bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*) ;
1356 bool canvas_note_event (GdkEvent* event, ArdourCanvas::Item*);
1358 bool canvas_tempo_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1359 bool canvas_meter_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1360 bool canvas_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1361 bool canvas_range_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1362 bool canvas_transport_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1363 bool canvas_cd_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
1365 bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
1366 bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameTimeAxis*);
1367 bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
1368 bool canvas_imageframe_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
1369 bool canvas_marker_time_axis_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerTimeAxis*);
1370 bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
1371 bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
1372 bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
1374 /* non-public event handlers */
1376 bool canvas_playhead_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
1377 bool track_canvas_scroll (GdkEventScroll* event);
1379 bool track_canvas_scroll_event (GdkEventScroll* event);
1380 bool track_canvas_button_press_event (GdkEventButton* event);
1381 bool track_canvas_button_release_event (GdkEventButton* event);
1382 bool track_canvas_motion_notify_event (GdkEventMotion* event);
1384 Gtk::Allocation canvas_allocation;
1385 void track_canvas_allocate (Gtk::Allocation alloc);
1386 bool track_canvas_size_allocated ();
1387 bool track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const &, int, int, guint);
1389 void set_playhead_cursor ();
1391 void kbd_driver (sigc::slot<void,GdkEvent*>, bool use_track_canvas = true, bool use_time_canvas = true, bool can_select = true);
1392 void kbd_mute_unmute_region ();
1395 void kbd_do_brush (GdkEvent*);
1396 void kbd_do_audition (GdkEvent*);
1398 void handle_new_duration ();
1399 void initialize_canvas ();
1401 /* display control */
1403 bool _show_measures;
1404 /// true if the editor should follow the playhead, otherwise false
1405 bool _follow_playhead;
1406 /// true if waveforms should be shown while recording audio tracks, otherwise false
1407 bool _show_waveforms_recording;
1409 ARDOUR::TempoMap::BBTPointList *current_bbt_points;
1411 TempoLines* tempo_lines;
1413 ArdourCanvas::Group* time_line_group;
1415 void hide_measures ();
1416 void draw_measures ();
1417 bool redraw_measures ();
1419 void new_tempo_section ();
1421 void mouse_add_new_tempo_event (nframes64_t where);
1422 void mouse_add_new_meter_event (nframes64_t where);
1424 void remove_tempo_marker (ArdourCanvas::Item*);
1425 void remove_meter_marker (ArdourCanvas::Item*);
1426 gint real_remove_tempo_marker (ARDOUR::TempoSection*);
1427 gint real_remove_meter_marker (ARDOUR::MeterSection*);
1429 void edit_tempo_section (ARDOUR::TempoSection*);
1430 void edit_meter_section (ARDOUR::MeterSection*);
1431 void edit_tempo_marker (ArdourCanvas::Item*);
1432 void edit_meter_marker (ArdourCanvas::Item*);
1433 void edit_control_point (ArdourCanvas::Item*);
1435 void marker_menu_edit ();
1436 void marker_menu_remove ();
1437 void marker_menu_rename ();
1438 void marker_menu_lock (bool yn);
1439 void marker_menu_hide ();
1440 void marker_menu_loop_range ();
1441 void marker_menu_select_all_selectables_using_range ();
1442 void marker_menu_select_using_range ();
1443 void marker_menu_separate_regions_using_location ();
1444 void marker_menu_play_from ();
1445 void marker_menu_play_range ();
1446 void marker_menu_set_playhead ();
1447 void marker_menu_set_from_playhead ();
1448 void marker_menu_set_from_selection ();
1449 void marker_menu_range_to_next ();
1450 void new_transport_marker_menu_set_loop ();
1451 void new_transport_marker_menu_set_punch ();
1452 void update_loop_range_view (bool visibility=false);
1453 void update_punch_range_view (bool visibility=false);
1454 void new_transport_marker_menu_popdown ();
1455 void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1456 void tm_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1457 void transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1458 void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
1459 void build_range_marker_menu (bool loop_or_punch);
1460 void build_marker_menu (bool start_or_end);
1461 void build_tm_marker_menu ();
1462 void build_new_transport_marker_menu ();
1464 Gtk::Menu* tm_marker_menu;
1465 Gtk::Menu* marker_menu;
1466 Gtk::Menu* start_end_marker_menu;
1467 Gtk::Menu* range_marker_menu;
1468 Gtk::Menu* transport_marker_menu;
1469 Gtk::Menu* new_transport_marker_menu;
1470 Gtk::Menu* cd_marker_menu;
1471 ArdourCanvas::Item* marker_menu_item;
1473 typedef std::list<Marker*> Marks;
1476 void remove_metric_marks ();
1477 void draw_metric_marks (const ARDOUR::Metrics& metrics);
1479 void compute_current_bbt_points (nframes_t left, nframes_t right);
1480 void tempo_map_changed (ARDOUR::Change);
1481 void redisplay_tempo (bool immediate_redraw);
1483 void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
1484 void snap_to_with_modifier (nframes64_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
1485 void snap_to (nframes64_t& first, nframes64_t& last, int32_t direction = 0, bool for_mark = false);
1487 uint32_t bbt_beat_subdivision;
1491 Gtk::ToggleButton editor_mixer_button;
1492 Gtk::ToggleButton editor_list_button;
1493 void editor_mixer_button_toggled ();
1494 void editor_list_button_toggled ();
1496 AudioClock zoom_range_clock;
1497 Gtk::Button zoom_in_button;
1498 Gtk::Button zoom_out_button;
1499 Gtk::Button zoom_out_full_button;
1500 Gtk::Button zoom_onetoone_button;
1502 Gtk::Button tav_expand_button;
1503 Gtk::Button tav_shrink_button;
1505 Gtk::VBox toolbar_clock_vbox;
1506 Gtk::VBox toolbar_selection_clock_vbox;
1507 Gtk::Table toolbar_selection_clock_table;
1508 Gtk::Label toolbar_selection_cursor_label;
1510 Gtkmm2ext::TearOff* mouse_mode_tearoff;
1511 Gtk::ToggleButton mouse_select_button;
1512 Gtk::ToggleButton mouse_move_button;
1513 Gtk::ToggleButton mouse_gain_button;
1514 Gtk::ToggleButton mouse_zoom_button;
1515 Gtk::ToggleButton mouse_timefx_button;
1516 Gtk::ToggleButton mouse_audition_button;
1517 Gtk::ToggleButton join_object_range_button;
1519 void mouse_mode_toggled (Editing::MouseMode m);
1520 bool ignore_mouse_mode_toggle;
1522 Gtk::ToggleButton internal_edit_button;
1523 void toggle_internal_editing ();
1525 gint mouse_select_button_release (GdkEventButton*);
1527 Gtk::VBox automation_box;
1528 Gtk::Button automation_mode_button;
1529 Gtk::ToggleButton global_automation_button;
1531 Gtk::ComboBoxText edit_mode_selector;
1532 Gtk::VBox edit_mode_box;
1534 void set_edit_mode (ARDOUR::EditMode);
1535 void cycle_edit_mode ();
1536 void edit_mode_selection_done ();
1538 Gtk::ComboBoxText snap_type_selector;
1539 Gtk::ComboBoxText snap_mode_selector;
1542 std::vector<std::string> snap_type_strings;
1543 std::vector<std::string> snap_mode_strings;
1545 void snap_type_selection_done ();
1546 void snap_mode_selection_done ();
1547 void snap_mode_chosen (Editing::SnapMode);
1548 void snap_type_chosen (Editing::SnapType);
1550 Glib::RefPtr<Gtk::RadioAction> snap_type_action (Editing::SnapType);
1551 Glib::RefPtr<Gtk::RadioAction> snap_mode_action (Editing::SnapMode);
1553 Gtk::ComboBoxText zoom_focus_selector;
1554 Gtk::VBox zoom_focus_box;
1556 std::vector<std::string> zoom_focus_strings;
1558 void zoom_focus_selection_done ();
1559 void zoom_focus_chosen (Editing::ZoomFocus);
1561 Glib::RefPtr<Gtk::RadioAction> zoom_focus_action (Editing::ZoomFocus);
1564 Gtk::HBox track_zoom_box;
1565 Gtk::VBox zoom_vbox;
1567 void zoom_adjustment_changed();
1569 void setup_toolbar ();
1571 Gtkmm2ext::TearOff* tools_tearoff;
1572 Gtk::HBox toolbar_hbox;
1573 Gtk::EventBox toolbar_base;
1574 Gtk::Frame toolbar_frame;
1578 Gtk::HBox panic_box;
1579 Gtk::Button midi_panic_button;
1580 Gtk::ToggleButton midi_sound_notes;
1582 bool sound_notes () const { return midi_sound_notes.get_active(); }
1584 void setup_midi_toolbar ();
1586 /* selection process */
1588 Selection* selection;
1589 Selection* cut_buffer;
1591 void time_selection_changed ();
1592 void track_selection_changed ();
1593 void region_selection_changed ();
1594 sigc::connection editor_regions_selection_changed_connection;
1595 void sensitize_the_right_region_actions (bool have_selected_regions);
1596 void point_selection_changed ();
1597 void marker_selection_changed ();
1599 void cancel_selection ();
1601 void region_selection_op (void (ARDOUR::Region::*pmf)(void));
1602 void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
1603 void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
1605 bool audio_region_selection_covers (nframes64_t where);
1607 /* transport range select process */
1609 ArdourCanvas::SimpleRect* cd_marker_bar_drag_rect;
1610 ArdourCanvas::SimpleRect* range_bar_drag_rect;
1611 ArdourCanvas::SimpleRect* transport_bar_drag_rect;
1614 ArdourCanvas::SimpleRect *bogus_background_rect;
1616 ArdourCanvas::SimpleRect *transport_bar_range_rect;
1617 ArdourCanvas::SimpleRect *transport_bar_preroll_rect;
1618 ArdourCanvas::SimpleRect *transport_bar_postroll_rect;
1619 ArdourCanvas::SimpleRect *transport_loop_range_rect;
1620 ArdourCanvas::SimpleRect *transport_punch_range_rect;
1621 ArdourCanvas::SimpleLine *transport_punchin_line;
1622 ArdourCanvas::SimpleLine *transport_punchout_line;
1623 ArdourCanvas::SimpleRect *transport_preroll_rect;
1624 ArdourCanvas::SimpleRect *transport_postroll_rect;
1626 ARDOUR::Location* transport_loop_location();
1627 ARDOUR::Location* transport_punch_location();
1629 ARDOUR::Location *temp_location;
1631 /* object rubberband select process */
1633 bool select_all_within (nframes64_t, nframes64_t, double, double, TrackViewList const &, Selection::Operation op);
1635 ArdourCanvas::SimpleRect *rubberband_rect;
1637 /* mouse zoom process */
1639 ArdourCanvas::SimpleRect *zoom_rect;
1640 void reposition_zoom_rect (nframes64_t start, nframes64_t end);
1642 EditorRouteGroups* _route_groups;
1643 EditorRoutes* _routes;
1644 EditorRegions* _regions;
1645 EditorSnapshots* _snapshots;
1646 EditorLocations* _locations;
1648 /* diskstream/route display management */
1649 Glib::RefPtr<Gdk::Pixbuf> rec_enabled_icon;
1650 Glib::RefPtr<Gdk::Pixbuf> rec_disabled_icon;
1652 Glib::RefPtr<Gtk::TreeSelection> route_display_selection;
1654 bool sync_track_view_list_and_routes ();
1656 Gtk::VBox list_vpacker;
1660 bool autoscroll_active;
1661 int autoscroll_timeout_tag;
1664 int last_autoscroll_x;
1665 int last_autoscroll_y;
1666 uint32_t autoscroll_cnt;
1667 nframes64_t autoscroll_x_distance;
1668 double autoscroll_y_distance;
1670 static gint _autoscroll_canvas (void *);
1671 bool autoscroll_canvas ();
1672 void start_canvas_autoscroll (int x, int y);
1673 void stop_canvas_autoscroll ();
1674 void maybe_autoscroll (GdkEventMotion*, bool);
1675 bool allow_vertical_scroll;
1678 void point_trim (GdkEvent*);
1679 void single_contents_trim (RegionView&, nframes64_t, bool, bool, bool);
1680 void single_start_trim (RegionView&, nframes64_t, bool, bool, bool);
1681 void single_end_trim (RegionView&, nframes64_t, bool, bool, bool);
1683 void thaw_region_after_trim (RegionView& rv);
1685 void trim_region_front();
1686 void trim_region_back();
1687 void trim_region (bool front);
1689 void trim_region_to_edit_point ();
1690 void trim_region_from_edit_point ();
1691 void trim_region_to_loop ();
1692 void trim_region_to_punch ();
1693 void trim_region_to_location (const ARDOUR::Location&, const char* cmd);
1695 void trim_to_region(bool forward);
1696 void trim_region_to_previous_region_end();
1697 void trim_region_to_next_region_start();
1699 bool show_gain_after_trim;
1703 int convert_drop_to_paths (
1704 std::vector<Glib::ustring>& paths,
1705 const Glib::RefPtr<Gdk::DragContext>& context,
1708 const Gtk::SelectionData& data,
1712 void track_canvas_drag_data_received (
1713 const Glib::RefPtr<Gdk::DragContext>& context,
1716 const Gtk::SelectionData& data,
1721 const Glib::RefPtr<Gdk::DragContext>& context,
1724 const Gtk::SelectionData& data,
1729 const Glib::RefPtr<Gdk::DragContext>& context,
1732 const Gtk::SelectionData& data,
1737 const Glib::RefPtr<Gdk::DragContext>& context,
1740 const Gtk::SelectionData& data,
1746 int write_region_selection(RegionSelection&);
1747 bool write_region (std::string path, boost::shared_ptr<ARDOUR::AudioRegion>);
1748 void bounce_region_selection ();
1749 void bounce_range_selection (bool replace, bool enable_processing);
1750 void external_edit_region ();
1752 int write_audio_selection (TimeSelection&);
1753 bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, std::list<ARDOUR::AudioRange>&);
1755 void write_selection ();
1757 XMLNode *before; /* used in *_reversible_command */
1759 void begin_reversible_command (std::string cmd_name);
1760 void commit_reversible_command ();
1762 void update_title ();
1763 void update_title_s (const std::string & snapshot_name);
1766 Selection* selection;
1767 double frames_per_unit;
1769 State (PublicEditor const * e);
1773 void instant_save ();
1775 boost::shared_ptr<ARDOUR::AudioRegion> last_audition_region;
1777 /* freeze operations */
1779 ARDOUR::InterThreadInfo freeze_status;
1780 gint freeze_progress_timeout (void *);
1781 static void* _freeze_thread (void*);
1782 void* freeze_thread ();
1784 void freeze_route ();
1785 void unfreeze_route ();
1787 /* route-group solo + mute */
1789 void set_route_group_solo (ARDOUR::Route&, bool);
1790 void set_route_group_mute (ARDOUR::Route&, bool);
1794 void duplicate_dialog (bool with_dialog);
1796 nframes64_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
1798 /* returns false if mouse pointer is not in track or marker canvas
1800 bool mouse_frame (nframes64_t&, bool& in_track_canvas) const;
1802 /* "whats mine is yours" */
1804 TimeFXDialog* current_timefx;
1806 static void* timefx_thread (void *arg);
1807 void do_timefx (TimeFXDialog&);
1809 int time_stretch (RegionSelection&, float fraction);
1810 int pitch_shift (RegionSelection&, float cents);
1811 void pitch_shift_regions ();
1812 int time_fx (RegionSelection&, float val, bool pitching);
1814 /* editor-mixer strip */
1816 MixerStrip *current_mixer_strip;
1817 bool show_editor_mixer_when_tracks_arrive;
1818 Gtk::VBox current_mixer_strip_vbox;
1819 void cms_new (boost::shared_ptr<ARDOUR::Route>);
1820 void current_mixer_strip_hidden ();
1822 void detach_tearoff (Gtk::Box* b, Gtk::Window* w);
1823 void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n);
1825 void ensure_all_elements_drawn ();
1827 /* nudging tracks */
1829 void nudge_track (bool use_edit_point, bool forwards);
1833 bool _xfade_visibility;
1836 void handle_new_imageframe_time_axis_view(const std::string & track_name, void* src) ;
1837 void handle_new_imageframe_marker_time_axis_view(const std::string & track_name, TimeAxisView* marked_track) ;
1839 void start_imageframe_grab(ArdourCanvas::Item*, GdkEvent*) ;
1840 void start_markerview_grab(ArdourCanvas::Item*, GdkEvent*) ;
1842 void imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
1843 void markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
1844 void timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent*) ;
1846 gint canvas_imageframe_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
1847 gint canvas_imageframe_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
1848 gint canvas_imageframe_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
1849 gint canvas_imageframe_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
1851 gint canvas_marker_time_axis_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerTimeAxis* mta);
1852 gint canvas_markerview_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
1853 gint canvas_markerview_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
1854 gint canvas_markerview_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
1856 void imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1857 void imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1858 void imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1859 void imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1860 void imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1861 void imageframe_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1863 void markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1864 void markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
1865 void markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1866 void markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1867 void markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
1868 void markerview_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
1870 void popup_imageframe_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
1871 void popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
1873 ImageFrameSocketHandler* image_socket_listener ;
1876 void toggle_xfade_active (boost::weak_ptr<ARDOUR::Crossfade>);
1877 void toggle_xfade_length (boost::weak_ptr<ARDOUR::Crossfade>);
1878 void edit_xfade (boost::weak_ptr<ARDOUR::Crossfade>);
1879 void xfade_edit_left_region ();
1880 void xfade_edit_right_region ();
1882 static const int32_t default_width = 995;
1883 static const int32_t default_height = 765;
1887 Gtk::Button nudge_forward_button;
1888 Gtk::Button nudge_backward_button;
1889 Gtk::HBox nudge_hbox;
1890 Gtk::VBox nudge_vbox;
1891 AudioClock nudge_clock;
1893 bool nudge_forward_release (GdkEventButton*);
1894 bool nudge_backward_release (GdkEventButton*);
1898 void apply_filter (ARDOUR::Filter&, std::string cmd);
1900 Command* apply_midi_note_edit_op_to_region (ARDOUR::MidiOperator& op, MidiRegionView& mrv);
1901 void apply_midi_note_edit_op (ARDOUR::MidiOperator& op);
1903 /* handling cleanup */
1905 int playlist_deletion_dialog (boost::shared_ptr<ARDOUR::Playlist>);
1907 PBD::ScopedConnectionList session_connections;
1909 /* tracking step changes of track height */
1911 TimeAxisView* current_stepping_trackview;
1912 ARDOUR::microseconds_t last_track_height_step_timestamp;
1913 gint track_height_step_timeout();
1914 sigc::connection step_timeout;
1916 TimeAxisView* entered_track;
1917 RegionView* entered_regionview;
1920 void ensure_entered_track_selected (bool op_acts_on_objects = false);
1921 bool clear_entered_track;
1922 bool left_track_canvas (GdkEventCrossing*);
1923 bool entered_track_canvas (GdkEventCrossing*);
1924 void set_entered_track (TimeAxisView*);
1925 void set_entered_regionview (RegionView*);
1926 void ensure_track_visible (TimeAxisView*);
1927 gint left_automation_track ();
1929 bool _new_regionviews_show_envelope;
1931 void reset_canvas_action_sensitivity (bool);
1932 void toggle_gain_envelope_visibility ();
1933 void toggle_gain_envelope_active ();
1934 void reset_region_gain_envelopes ();
1936 bool on_key_press_event (GdkEventKey*);
1937 bool on_key_release_event (GdkEventKey*);
1939 void session_state_saved (std::string);
1941 Glib::RefPtr<Gtk::Action> undo_action;
1942 Glib::RefPtr<Gtk::Action> redo_action;
1944 void history_changed ();
1946 Gtk::HBox status_bar_hpacker;
1948 Editing::EditPoint _edit_point;
1950 Gtk::ComboBoxText edit_point_selector;
1952 void set_edit_point_preference (Editing::EditPoint ep, bool force = false);
1953 void cycle_edit_point (bool with_marker);
1954 void set_edit_point ();
1955 void edit_point_selection_done ();
1956 void edit_point_chosen (Editing::EditPoint);
1957 Glib::RefPtr<Gtk::RadioAction> edit_point_action (Editing::EditPoint);
1958 std::vector<std::string> edit_point_strings;
1960 void selected_marker_moved (ARDOUR::Location*);
1962 bool get_edit_op_range (nframes64_t& start, nframes64_t& end) const;
1964 void get_regions_at (RegionSelection&, nframes64_t where, const TrackViewList& ts) const;
1965 void get_regions_after (RegionSelection&, nframes64_t where, const TrackViewList& ts) const;
1967 void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
1969 sigc::connection fast_screen_update_connection;
1970 gint start_updating ();
1971 gint stop_updating ();
1972 void fast_update_strips ();
1973 bool meters_running;
1975 void select_next_route ();
1976 void select_prev_route ();
1978 void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
1979 void timecode_snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
1981 RhythmFerret* rhythm_ferret;
1982 BundleManager* _bundle_manager;
1983 GlobalPortMatrixWindow* _global_port_matrix[ARDOUR::DataType::num_types];
1985 void fit_tracks (TrackViewList &);
1986 void fit_selected_tracks ();
1987 void set_track_height (uint32_t h);
1989 void remove_tracks ();
1990 void toggle_tracks_active ();
1995 friend gboolean _idle_resize (gpointer);
1996 int32_t _pending_resize_amount;
1997 TimeAxisView* _pending_resize_view;
1999 void visible_order_range (int*, int*) const;
2002 bool _pending_locate_request;
2004 Gtk::HBox _summary_hbox;
2005 EditorSummary* _summary;
2006 void region_view_added (RegionView *);
2008 void update_canvas_now ();
2009 void streamview_height_changed ();
2011 EditorGroupTabs* _group_tabs;
2012 void fit_route_group (ARDOUR::RouteGroup *);
2014 void start_step_editing ();
2015 void stop_step_editing ();
2016 bool check_step_edit ();
2017 sigc::connection step_edit_connection;
2020 friend class RegionDrag;
2021 friend class RegionMoveDrag;
2022 friend class RegionSpliceDrag;
2023 friend class TrimDrag;
2024 friend class MeterMarkerDrag;
2025 friend class TempoMarkerDrag;
2026 friend class CursorDrag;
2027 friend class FadeInDrag;
2028 friend class FadeOutDrag;
2029 friend class MarkerDrag;
2030 friend class RegionGainDrag;
2031 friend class ControlPointDrag;
2032 friend class LineDrag;
2033 friend class RubberbandSelectDrag;
2034 friend class TimeFXDrag;
2035 friend class ScrubDrag;
2036 friend class SelectionDrag;
2037 friend class RangeMarkerBarDrag;
2038 friend class MouseZoomDrag;
2039 friend class RegionCreateDrag;
2040 friend class RegionMotionDrag;
2041 friend class RegionInsertDrag;
2043 friend class EditorSummary;
2044 friend class EditorGroupTabs;
2046 friend class EditorRoutes;
2049 #endif /* __ardour_editor_h__ */