X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Feditor.h;h=b96f67ab6b5ca5014d7ce415857e096eab0c9c28;hb=69d043766f3e0f4715f6c9b32afa93069de7df61;hp=0e1661aca9e3034bc6b954c265ac6ca4603d8348;hpb=68a8330afc09f75305f927caf4814e3c80148367;p=ardour.git diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 0e1661aca9..b96f67ab6b 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -34,11 +34,12 @@ #include #include -#include "gtkmm2ext/selector.h" +#include "gtkmm2ext/bindings.h" #include "gtkmm2ext/click_box.h" #include "gtkmm2ext/dndtreeview.h" +#include "gtkmm2ext/pane.h" +#include "gtkmm2ext/selector.h" #include "gtkmm2ext/stateful_button.h" -#include "gtkmm2ext/bindings.h" #include "pbd/stateful.h" #include "pbd/signals.h" @@ -60,27 +61,32 @@ #include "editor_items.h" #include "region_selection.h" #include "selection_memento.h" +#include "tempo_curve.h" namespace Gtkmm2ext { - class TearOff; class Bindings; } +namespace Evoral { + class SMF; +} + namespace ARDOUR { - class RouteGroup; - class Playlist; class AudioPlaylist; class AudioRegion; - class Region; - class Location; - class TempoSection; - class Session; - class Filter; + class AudioTrack; class ChanCount; + class Filter; + class Location; class MidiOperator; - class Track; + class MidiRegion; class MidiTrack; - class AudioTrack; + class Playlist; + class Region; + class RouteGroup; + class Session; + class TempoSection; + class Track; } namespace LADSPA { @@ -111,14 +117,16 @@ class EditorSnapshots; class EditorSummary; class GroupedButtons; class GUIObjectState; -class Marker; +class ArdourMarker; class MidiRegionView; +class MidiExportDialog; class MixerStrip; class MouseCursors; class NoteBase; class PlaylistSelector; class PluginSelector; class ProgressReporter; +class QuantizeDialog; class RhythmFerret; class RulerDialog; class Selection; @@ -126,6 +134,7 @@ class SoundFileOmega; class StreamView; class TempoLines; class TimeAxisView; +class TimeInfoBox; class TimeFXDialog; class TimeSelection; class RegionLayeringOrderEditor; @@ -140,6 +149,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void set_session (ARDOUR::Session *); ARDOUR::Session* session() const { return _session; } + Gtk::Window* use_own_window (bool and_fill_it); + void first_idle (); virtual bool have_idled () const { return _have_idled; } @@ -162,13 +173,12 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void prev_snap_choice_music_only (); void prev_snap_choice_music_and_time (); void set_snap_to (Editing::SnapType); - void set_snap_delta (Editing::SnapDelta); void set_snap_mode (Editing::SnapMode); void set_snap_threshold (double pixel_distance) {snap_threshold = pixel_distance;} - Editing::SnapDelta snap_delta () const; Editing::SnapMode snap_mode () const; Editing::SnapType snap_type () const; + bool snap_musical () const; void undo (uint32_t n = 1); void redo (uint32_t n = 1); @@ -244,7 +254,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD /* selection */ Selection& get_selection() const { return *selection; } - bool get_selection_extents ( framepos_t &start, framepos_t &end ); // the time extents of the current selection, whether Range, Region(s), Control Points, or Notes + bool get_selection_extents (framepos_t &start, framepos_t &end) const; // the time extents of the current selection, whether Range, Region(s), Control Points, or Notes Selection& get_cut_buffer() const { return *cut_buffer; } void track_mixer_selection (); @@ -264,7 +274,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void set_selected_regionview_from_region_list (boost::shared_ptr region, Selection::Operation op = Selection::Set); void remove_tracks (); - + /* tempo */ void set_show_measures (bool yn); @@ -272,8 +282,11 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD /* analysis window */ - void analyze_region_selection(); - void analyze_range_selection(); + void loudness_analyze_region_selection(); + void loudness_analyze_range_selection(); + + void spectral_analyze_region_selection(); + void spectral_analyze_range_selection(); /* export */ @@ -283,15 +296,16 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void export_range (); void export_region (); - void add_transport_frame (Gtk::Container&); - void add_toplevel_menu (Gtk::Container&); - Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; } + bool process_midi_export_dialog (MidiExportDialog& dialog, boost::shared_ptr midi_region); void set_zoom_focus (Editing::ZoomFocus); Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; } framecnt_t get_current_zoom () const { return samples_per_pixel; } void cycle_zoom_focus (); - void temporal_zoom_step (bool coarser); + void temporal_zoom_step (bool zoom_out); + void temporal_zoom_step_scale (bool zoom_out, double scale); + void temporal_zoom_step_mouse_focus (bool zoom_out); + void temporal_zoom_step_mouse_focus_scale (bool zoom_out, double scale); void ensure_time_axis_view_is_visible (TimeAxisView const & tav, bool at_top); void tav_zoom_step (bool coarser); void tav_zoom_smooth (bool coarser, bool force_all); @@ -323,6 +337,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD unsigned get_grid_beat_divisions(framepos_t position); Evoral::Beats get_grid_type_as_beats (bool& success, framepos_t position); + int32_t get_grid_music_divisions (uint32_t event_state); + void nudge_forward (bool next, bool force_playhead); void nudge_backward (bool next, bool force_playhead); @@ -348,7 +364,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void set_summary (); void set_group_tabs (); void toggle_measure_visibility (); - void toggle_logo_visibility (); /* fades */ @@ -363,23 +378,24 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void ensure_float (Gtk::Window&); - void show_window (); - void scroll_tracks_down_line (); void scroll_tracks_up_line (); - + bool scroll_up_one_track (bool skip_child_views = false); bool scroll_down_one_track (bool skip_child_views = false); + void scroll_left_step (); + void scroll_right_step (); + + void scroll_left_half_page (); + void scroll_right_half_page (); + void prepare_for_cleanup (); void finish_cleanup (); void maximise_editing_space(); void restore_editing_space(); - void update_tearoff_visibility(); - void reattach_all_tearoffs (); - double get_y_origin () const; void reset_x_origin (framepos_t); void reset_x_origin_to_follow_playhead (); @@ -411,10 +427,14 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD int get_regionview_count_from_region_list (boost::shared_ptr); + void do_ptimport(std::string path, ARDOUR::SrcQuality quality); + void do_import (std::vector paths, Editing::ImportDisposition disposition, Editing::ImportMode mode, ARDOUR::SrcQuality quality, + ARDOUR::MidiTrackNameSource mts, + ARDOUR::MidiTempoMapDisposition mtd, framepos_t& pos, boost::shared_ptr instrument = boost::shared_ptr()); @@ -433,12 +453,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD TrackViewList axis_views_from_routes (boost::shared_ptr) const; - Gtkmm2ext::TearOff* mouse_mode_tearoff () const { return _mouse_mode_tearoff; } - Gtkmm2ext::TearOff* tools_tearoff () const { return _tools_tearoff; } - void snap_to (framepos_t& first, ARDOUR::RoundMode direction = ARDOUR::RoundNearest, - bool for_mark = false); + bool for_mark = false, + bool ensure_snap = false); void snap_to_with_modifier (framepos_t& first, GdkEvent const * ev, @@ -501,7 +519,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD TimeAxisView* stepping_axis_view () { return _stepping_axis_view; } - + void set_stepping_axis_view (TimeAxisView* v) { _stepping_axis_view = v; } @@ -525,10 +543,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD /* editing operations that need to be public */ void mouse_add_new_marker (framepos_t where, bool is_cd=false); - void split_regions_at (framepos_t, RegionSelection&); + void split_regions_at (framepos_t, RegionSelection&, const int32_t sub_num, bool snap = true); void split_region_at_points (boost::shared_ptr, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false); RegionSelection get_regions_from_selection_and_mouse (framepos_t); - + void mouse_add_new_tempo_event (framepos_t where); void mouse_add_new_meter_event (framepos_t where); void edit_tempo_section (ARDOUR::TempoSection*); @@ -554,6 +572,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD PlaylistSelector* _playlist_selector; + TimeInfoBox* _time_info_box; + typedef std::pair TAVState; struct VisualState { @@ -604,17 +624,16 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void update_join_object_range_location (double); - boost::optional pre_notebook_shrink_pane_width; - - void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*); + boost::optional pre_notebook_shrink_pane_width; + Gtk::VBox _editor_list_vbox; Gtk::Notebook _the_notebook; bool _notebook_shrunk; void add_notebook_page (std::string const &, Gtk::Widget &); bool notebook_tab_clicked (GdkEventButton *, Gtk::Widget *); - Gtk::HPaned edit_pane; - Gtk::VPaned editor_summary_pane; + Gtkmm2ext::HPane edit_pane; + Gtkmm2ext::VPane editor_summary_pane; Gtk::EventBox meter_base; Gtk::HBox meter_box; @@ -632,6 +651,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void remove_marker (ArdourCanvas::Item&, GdkEvent*); gint really_remove_marker (ARDOUR::Location* loc); void goto_nth_marker (int nth); + void trigger_script (int nth); void toggle_marker_lines (); void set_marker_line_visibility (bool); @@ -642,8 +662,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD uint32_t location_cd_marker_color; struct LocationMarkers { - Marker* start; - Marker* end; + ArdourMarker* start; + ArdourMarker* end; bool valid; LocationMarkers () : start(0), end(0), valid (true) {} @@ -664,9 +684,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD }; LocationMarkers *find_location_markers (ARDOUR::Location *) const; - ARDOUR::Location* find_location_from_marker (Marker *, bool& is_start) const; - Marker* find_marker_from_location_id (PBD::ID const &, bool) const; - Marker* entered_marker; + ARDOUR::Location* find_location_from_marker (ArdourMarker *, bool& is_start) const; + ArdourMarker* find_marker_from_location_id (PBD::ID const &, bool) const; + ArdourMarker* entered_marker; bool _show_marker_lines; typedef std::map LocationMarkerMap; @@ -674,7 +694,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void update_marker_labels (); void update_marker_labels (ArdourCanvas::Container *); - void check_marker_label (Marker *); + void check_marker_label (ArdourMarker *); /** A set of lists of Markers that are in each of the canvas groups * for the marker sections at the top of the editor. These lists @@ -682,8 +702,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD * a marker has moved we can decide whether we need to update the labels * for all markers or for just a few. */ - std::map > _sorted_marker_lists; - void remove_sorted_marker (Marker *); + std::map > _sorted_marker_lists; + void remove_sorted_marker (ArdourMarker *); void hide_marker (ArdourCanvas::Item*, GdkEvent*); void clear_marker_display (); @@ -717,7 +737,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector > const &); void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector > const &); void mapped_clear_playlist (RouteTimeAxisView&, uint32_t); - + void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type); bool button_release_can_deselect; bool _mouse_changed_selection; @@ -766,12 +786,13 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void popup_note_context_menu (ArdourCanvas::Item *, GdkEvent *); Gtk::Menu _note_context_menu; + void add_stripables (ARDOUR::StripableList&); void add_routes (ARDOUR::RouteList&); void timeaxisview_deleted (TimeAxisView *); + void add_vcas (ARDOUR::VCAList&); - Gtk::HBox global_hpacker; - Gtk::VBox global_vpacker; - Gtk::VBox vpacker; + Gtk::HBox global_hpacker; + Gtk::VBox global_vpacker; /* Cursor stuff. Do not use directly, use via CursorContext. */ friend class CursorContext; @@ -806,15 +827,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD Gtk::EventBox time_bars_event_box; Gtk::VBox time_bars_vbox; - ArdourCanvas::Pixbuf *logo_item; -#if 0 - /* these will be needed when we have canvas rulers */ - ArdourCanvas::Container *minsec_group; - ArdourCanvas::Container *bbt_group; - ArdourCanvas::Container *timecode_group; - ArdourCanvas::Container *frame_group; -#endif - ArdourCanvas::Container *tempo_group; ArdourCanvas::Container *meter_group; ArdourCanvas::Container *marker_group; @@ -890,8 +902,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void update_just_timecode (); void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers void update_fixed_rulers (); - void update_tempo_based_rulers (ARDOUR::TempoMap::BBTPointList::const_iterator& begin, - ARDOUR::TempoMap::BBTPointList::const_iterator& end); + void update_tempo_based_rulers (); void popup_ruler_menu (framepos_t where = 0, ItemType type = RegionItem); void update_ruler_visibility (); void set_ruler_visible (RulerType, bool); @@ -954,9 +965,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD gint bbt_nmarks; uint32_t bbt_bar_helper_on; uint32_t bbt_accent_modulo; - void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper, - ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin, - ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end); + void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper); ArdourCanvas::Ruler* timecode_ruler; ArdourCanvas::Ruler* bbt_ruler; @@ -1010,7 +1019,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD friend class EditorCursor; - EditorCursor* playhead_cursor; + EditorCursor* playhead_cursor; + framepos_t playhead_cursor_sample () const; framepos_t get_region_boundary (framepos_t pos, int32_t dir, bool with_selection, bool only_onscreen); @@ -1033,7 +1043,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void selected_marker_to_selection_end (); void select_all_selectables_using_cursor (EditorCursor *, bool); - void select_all_selectables_using_edit (bool); + void select_all_selectables_using_edit (bool, bool); void select_all_selectables_between (bool within); void select_range_between (); @@ -1045,7 +1055,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD Gtk::HBox toplevel_hpacker; - Gtk::HBox top_hbox; Gtk::HBox bottom_hbox; Gtk::Table edit_packer; @@ -1094,7 +1103,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void control_step_tracks_down (); void control_view (uint32_t); void control_scroll (float); - void control_select (uint32_t rid, Selection::Operation); + void control_select (boost::shared_ptr, Selection::Operation); void control_unselect (); void access_action (std::string,std::string); bool deferred_control_scroll (framepos_t); @@ -1136,7 +1145,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD /* track views */ TrackViewList track_views; std::pair trackview_by_y_position (double, bool trackview_relative_offset = true) const; - RouteTimeAxisView* axis_view_from_route (boost::shared_ptr) const; + TimeAxisView* axis_view_from_stripable (boost::shared_ptr) const; TrackViewList get_tracks_for_range_action () const; @@ -1179,8 +1188,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void register_region_actions (); void load_bindings (); - Gtkmm2ext::ActionMap editor_action_map; - Gtkmm2ext::Bindings key_bindings; /* CUT/COPY/PASTE */ @@ -1195,7 +1202,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void cut_copy_midi (Editing::CutCopyOp); void mouse_paste (); - void paste_internal (framepos_t position, float times); + void paste_internal (framepos_t position, float times, const int32_t sub_num); /* EDITING OPERATIONS */ @@ -1244,7 +1251,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void region_fill_track (); void audition_playlist_region_standalone (boost::shared_ptr); - void audition_playlist_region_via_route (boost::shared_ptr, ARDOUR::Route&); void split_multichannel_region(); void reverse_region (); void strip_region_silence (); @@ -1257,14 +1263,17 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void legatize_regions (const RegionSelection& rs, bool shrink_only); void transform_region (); void transform_regions (const RegionSelection& rs); + void transpose_region (); + void transpose_regions (const RegionSelection& rs); void insert_patch_change (bool from_context); void fork_region (); void do_insert_time (); void insert_time (framepos_t, framecnt_t, Editing::InsertTimeOption, bool, bool, bool, bool, bool, bool); - void do_cut_time (); - void cut_time (framepos_t pos, framecnt_t distance, Editing::InsertTimeOption opt, bool ignore_music_glue, bool markers_too, bool tempo_too); + void do_remove_time (); + void remove_time (framepos_t pos, framecnt_t distance, Editing::InsertTimeOption opt, bool ignore_music_glue, bool markers_too, + bool glued_markers_too, bool locked_markers_too, bool tempo_too); void tab_to_transient (bool forward); @@ -1279,14 +1288,12 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void naturalize_region (); - void reset_focus (); - void split_region (); void delete_ (); void cut (); void copy (); - void paste (float times, bool from_context_menu = false); + void paste (float times, bool from_context_menu); void place_transient (); void remove_transient (ArdourCanvas::Item* item); @@ -1307,8 +1314,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void loop_location (ARDOUR::Location&); void calc_extra_zoom_edges(framepos_t &start, framepos_t &end); - void temporal_zoom_selection (bool both_axes = false); - void temporal_zoom_region (bool both_axes); + void temporal_zoom_selection (Editing::ZoomAxis); void temporal_zoom_session (); void temporal_zoom (framecnt_t samples_per_pixel); void temporal_zoom_by_frame (framepos_t start, framepos_t end); @@ -1316,6 +1322,18 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void insert_region_list_selection (float times); + /* PT import */ + void external_pt_dialog (); + typedef struct ptflookup { + uint16_t index1; + uint16_t index2; + PBD::ID id; + + bool operator ==(const struct ptflookup& other) { + return (this->index1 == other.index1); + } + } ptflookup_t; + /* import & embed */ void add_external_audio_action (Editing::ImportMode); @@ -1403,7 +1421,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void import_audio (bool as_tracks); void do_import (std::vector paths, bool split, bool as_tracks); - + void import_smf_tempo_map (Evoral::SMF const &, framepos_t pos); void move_to_start (); void move_to_end (); void center_playhead (); @@ -1442,6 +1460,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void set_loop_from_selection (bool play); void set_punch_from_selection (); void set_punch_from_region (); + void set_auto_punch_range(); void set_session_start_from_playhead (); void set_session_end_from_playhead (); @@ -1452,7 +1471,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void set_loop_range (framepos_t start, framepos_t end, std::string cmd); void set_punch_range (framepos_t start, framepos_t end, std::string cmd); + void toggle_location_at_playhead_cursor (); void add_location_from_playhead_cursor (); + bool do_remove_location_at_playhead_cursor (); void remove_location_at_playhead_cursor (); bool select_new_marker; @@ -1465,15 +1486,19 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD int scrub_reverse_distance; void scrub (framepos_t, double); - void keyboard_selection_begin (); - void keyboard_selection_finish (bool add); + void set_punch_start_from_edit_point (); + void set_punch_end_from_edit_point (); + void set_loop_start_from_edit_point (); + void set_loop_end_from_edit_point (); + + void keyboard_selection_begin ( Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE ); + void keyboard_selection_finish (bool add, Editing::EditIgnoreOption = Editing::EDIT_IGNORE_NONE); bool have_pending_keyboard_selection; framepos_t pending_keyboard_selection_start; void move_range_selection_start_or_end_to_region_boundary (bool, bool); Editing::SnapType _snap_type; - Editing::SnapDelta _snap_delta; Editing::SnapMode _snap_mode; /// Snap threshold in pixels @@ -1554,8 +1579,9 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD bool canvas_region_view_name_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*); bool canvas_feature_line_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*); bool canvas_stream_view_event (GdkEvent* event,ArdourCanvas::Item*, RouteTimeAxisView*); - bool canvas_marker_event (GdkEvent* event,ArdourCanvas::Item*, Marker*); + bool canvas_marker_event (GdkEvent* event,ArdourCanvas::Item*, ArdourMarker*); bool canvas_tempo_marker_event (GdkEvent* event,ArdourCanvas::Item*, TempoMarker*); + bool canvas_tempo_curve_event (GdkEvent* event,ArdourCanvas::Item*, TempoCurve*); bool canvas_meter_marker_event (GdkEvent* event,ArdourCanvas::Item*, MeterMarker*); bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*); bool canvas_note_event (GdkEvent* event, ArdourCanvas::Item *); @@ -1607,6 +1633,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void initialize_canvas (); + void set_script_action_name (int i, const std::string&); + /* display control */ bool _show_measures; @@ -1623,8 +1651,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD ArdourCanvas::Container* time_line_group; void hide_measures (); - void draw_measures (ARDOUR::TempoMap::BBTPointList::const_iterator& begin, - ARDOUR::TempoMap::BBTPointList::const_iterator& end); + void draw_measures (std::vector&); void new_tempo_section (); @@ -1638,11 +1665,17 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void edit_meter_marker (MeterMarker&); void edit_control_point (ArdourCanvas::Item*); void edit_notes (MidiRegionView*); + void edit_region (RegionView*); + + void edit_current_meter (); + void edit_current_tempo (); void marker_menu_edit (); void marker_menu_remove (); void marker_menu_rename (); - void rename_marker (Marker *marker); + void rename_marker (ArdourMarker *marker); + void toggle_marker_lock_style (); + void toggle_tempo_type (); void toggle_marker_menu_lock (); void toggle_marker_menu_glue (); void marker_menu_hide (); @@ -1665,13 +1698,15 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*); void tempo_or_meter_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*); void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*); - void build_range_marker_menu (bool, bool); + void build_range_marker_menu (ARDOUR::Location *, bool, bool); void build_marker_menu (ARDOUR::Location *); - void build_tempo_or_meter_marker_menu (bool); + void build_tempo_marker_menu (TempoMarker *, bool); + void build_meter_marker_menu (MeterMarker *, bool); void build_new_transport_marker_menu (); void dynamic_cast_marker_object (void*, MeterMarker**, TempoMarker**) const; - Gtk::Menu* tempo_or_meter_marker_menu; + Gtk::Menu* tempo_marker_menu; + Gtk::Menu* meter_marker_menu; Gtk::Menu* marker_menu; Gtk::Menu* range_marker_menu; Gtk::Menu* transport_marker_menu; @@ -1679,17 +1714,19 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD Gtk::Menu* cd_marker_menu; ArdourCanvas::Item* marker_menu_item; - typedef std::list Marks; + typedef std::list Marks; Marks metric_marks; + typedef std::list Curves; + Curves tempo_curves; + void remove_metric_marks (); void draw_metric_marks (const ARDOUR::Metrics& metrics); - void compute_current_bbt_points (framepos_t left, framepos_t right, - ARDOUR::TempoMap::BBTPointList::const_iterator& begin, - ARDOUR::TempoMap::BBTPointList::const_iterator& end); + void compute_current_bbt_points (std::vector& grid, framepos_t left, framepos_t right); void tempo_map_changed (const PBD::PropertyChange&); + void marker_position_changed (); void redisplay_tempo (bool immediate_redraw); uint32_t bbt_beat_subdivision; @@ -1721,7 +1758,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD Gtk::Table toolbar_selection_clock_table; Gtk::Label toolbar_selection_cursor_label; - Gtkmm2ext::TearOff* _mouse_mode_tearoff; ArdourButton mouse_select_button; ArdourButton mouse_draw_button; ArdourButton mouse_move_button; @@ -1754,25 +1790,19 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD ArdourDropdown snap_type_selector; void build_snap_type_menu (); - ArdourDropdown snap_delta_selector; ArdourDropdown snap_mode_selector; - void build_snap_delta_menu (); void build_snap_mode_menu (); Gtk::HBox snap_box; std::vector snap_type_strings; - std::vector snap_delta_strings; std::vector snap_mode_strings; void snap_type_selection_done (Editing::SnapType); - void snap_delta_selection_done (Editing::SnapDelta); void snap_mode_selection_done (Editing::SnapMode); - void snap_delta_chosen (Editing::SnapDelta); void snap_mode_chosen (Editing::SnapMode); void snap_type_chosen (Editing::SnapType); Glib::RefPtr snap_type_action (Editing::SnapType); - Glib::RefPtr snap_delta_action (Editing::SnapDelta); Glib::RefPtr snap_mode_action (Editing::SnapMode); //zoom focus meu stuff @@ -1785,23 +1815,16 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD Glib::RefPtr zoom_focus_action (Editing::ZoomFocus); + Gtk::HBox _track_box; + Gtk::HBox _zoom_box; - Gtkmm2ext::TearOff* _zoom_tearoff; void zoom_adjustment_changed(); void setup_toolbar (); void setup_tooltips (); - Gtkmm2ext::TearOff* _tools_tearoff; Gtk::HBox toolbar_hbox; - Gtk::EventBox toolbar_base; - Gtk::Frame toolbar_frame; - Gtk::Viewport _toolbar_viewport; - - /* midi toolbar */ - - Gtk::HBox panic_box; void setup_midi_toolbar (); @@ -1828,8 +1851,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void point_selection_changed (); void marker_selection_changed (); - bool _ignore_follow_edits; - void cancel_selection (); void cancel_time_selection (); @@ -1842,10 +1863,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD ArdourCanvas::Rectangle* cd_marker_bar_drag_rect; ArdourCanvas::Rectangle* range_bar_drag_rect; ArdourCanvas::Rectangle* transport_bar_drag_rect; - -#ifdef GTKOSX - ArdourCanvas::Rectangle *bogus_background_rect; -#endif ArdourCanvas::Rectangle *transport_bar_range_rect; ArdourCanvas::Rectangle *transport_bar_preroll_rect; ArdourCanvas::Rectangle *transport_bar_postroll_rect; @@ -1979,6 +1996,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void update_title_s (const std::string & snapshot_name); void instant_save (); + bool no_save_instant; boost::shared_ptr last_audition_region; @@ -1994,6 +2012,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD /* duplication */ void duplicate_range (bool with_dialog); + void duplicate_regions (float times); /** computes the timeline frame (sample) of an event whose coordinates * are in canvas units (pixels, scroll offset included). @@ -2017,8 +2036,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD int pitch_shift (RegionSelection&, float cents); void pitch_shift_region (); - void transpose_region (); - /* editor-mixer strip */ MixerStrip *current_mixer_strip; @@ -2027,9 +2044,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void cms_new (boost::shared_ptr); void current_mixer_strip_hidden (); - void detach_tearoff (Gtk::Box* b, Gtk::Window* w); - void reattach_tearoff (Gtk::Box* b, Gtk::Window* w, int32_t n); -#ifdef GTKOSX +#ifdef __APPLE__ void ensure_all_elements_drawn (); #endif /* nudging tracks */ @@ -2091,9 +2106,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void toggle_gain_envelope_active (); void reset_region_gain_envelopes (); - bool on_key_press_event (GdkEventKey*); - bool on_key_release_event (GdkEventKey*); - void session_state_saved (std::string); Glib::RefPtr undo_action; @@ -2105,8 +2117,6 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void history_changed (); - Gtk::HBox status_bar_hpacker; - Editing::EditPoint _edit_point; ArdourDropdown edit_point_selector; @@ -2129,7 +2139,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const; RegionSelection get_regions_from_selection_and_edit_point (); - RegionSelection get_regions_from_selection_and_entered (); + RegionSelection get_regions_from_selection_and_entered () const; void start_updating_meters (); void stop_updating_meters (); @@ -2140,7 +2150,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void snap_to_internal (framepos_t& first, ARDOUR::RoundMode direction = ARDOUR::RoundNearest, - bool for_mark = false); + bool for_mark = false, + bool ensure_snap = false); void timecode_snap_to_internal (framepos_t& first, ARDOUR::RoundMode direction = ARDOUR::RoundNearest, @@ -2243,12 +2254,25 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD void update_bring_in_message (Gtk::Label* label, uint32_t n, uint32_t total, std::string name); void bring_all_sources_into_session (); + QuantizeDialog* quantize_dialog; + MainMenuDisabler* _main_menu_disabler; + + /* private helper functions to help with registering axis */ + + Glib::RefPtr reg_sens (Glib::RefPtr group, char const * name, char const * label, sigc::slot slot); + void toggle_reg_sens (Glib::RefPtr group, char const * name, char const * label, sigc::slot slot); + void radio_reg_sens (Glib::RefPtr action_group, Gtk::RadioAction::Group& radio_group, char const * name, char const * label, sigc::slot slot); + + Gtkmm2ext::ActionMap myactions; + friend class Drag; + friend class RegionCutDrag; friend class RegionDrag; friend class RegionMoveDrag; friend class RegionSpliceDrag; friend class RegionRippleDrag; friend class TrimDrag; + friend class BBTRulerDrag; friend class MeterMarkerDrag; friend class TempoMarkerDrag; friend class CursorDrag; @@ -2259,6 +2283,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD friend class ControlPointDrag; friend class LineDrag; friend class RubberbandSelectDrag; + friend class RulerZoomDrag; friend class EditorRubberbandSelectDrag; friend class TimeFXDrag; friend class ScrubDrag;