#include <set>
#include <string>
#include <sys/time.h>
+#include <bitset>
#include <glibmm/ustring.h>
#include <gtkmm2ext/click_box.h>
#include <gtkmm2ext/dndtreeview.h>
-#include <pbd/stateful.h>
-#include <ardour/session.h>
-#include <ardour/tempo.h>
-#include <ardour/stretch.h>
-#include <ardour/location.h>
-#include <ardour/audioregion.h>
-#include <ardour/track.h>
+#include "pbd/stateful.h"
+#include "ardour/session.h"
+#include "ardour/tempo.h"
+#include "ardour/stretch.h"
+#include "ardour/location.h"
+#include "ardour/audioregion.h"
+#include "ardour/track.h"
+#include "ardour/types.h"
#include "audio_clock.h"
#include "gtk-custom-ruler.h"
class Plugin;
}
-class TimeAxisView;
+class AnalysisWindow;
+class AudioRegionView;
+class AudioStreamView;
class AudioTimeAxisView;
+class AutomationLine;
+class AutomationSelection;
class AutomationTimeAxisView;
-class AudioRegionView;
+class BundleManager;
+class ControlPoint;
class CrossfadeView;
-class PluginSelector;
-class PlaylistSelector;
-class Marker;
+class GlobalPortMatrixWindow;
class GroupedButtons;
-class AutomationLine;
+class Marker;
+class MixerStrip;
+class PlaylistSelector;
+class PluginSelector;
+class RhythmFerret;
class Selection;
+class SoundFileOmega;
+class StreamView;
class TempoLines;
+class TimeAxisView;
+class TimeFXDialog;
class TimeSelection;
class TrackSelection;
-class AutomationSelection;
-class MixerStrip;
-class StreamView;
-class AudioStreamView;
-class ControlPoint;
-class SoundFileOmega;
-class RhythmFerret;
-class AnalysisWindow;
/* <CMT Additions> */
class ImageFrameView;
void connect_to_session (ARDOUR::Session *);
ARDOUR::Session* current_session() const { return session; }
void first_idle ();
- virtual bool have_idled() const { return _have_idled; }
+ virtual bool have_idled () const { return _have_idled; }
nframes64_t leftmost_position() const { return leftmost_frame; }
nframes64_t current_page_frames() const {
bool show_measures () const { return _show_measures; }
/* analysis window */
+
void analyze_region_selection();
void analyze_range_selection();
void add_toplevel_controls (Gtk::Container&);
Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; }
- void set_zoom_focus (Editing::ZoomFocus);
+ void set_zoom_focus (Editing::ZoomFocus);
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
- double get_current_zoom () const { return frames_per_unit; }
+ double get_current_zoom () const { return frames_per_unit; }
void temporal_zoom_step (bool coarser);
void clear_playlists (TimeAxisView* v);
TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0);
+ void get_onscreen_tracks (TrackViewList&);
Width editor_mixer_strip_width;
void maybe_add_mixer_strip_width (XMLNode&);
void video_pullup_chosen (ARDOUR::Session::PullupFormat pullup);
void subframes_per_frame_chosen (uint32_t);
- void update_smpte_mode();
- void update_video_pullup();
+ void update_smpte_mode ();
+ void update_video_pullup ();
void update_subframes_per_frame ();
/* fades/xfades */
void toggle_meter_updating();
void show_rhythm_ferret();
+ void show_bundle_manager ();
+ void show_global_port_matrix (ARDOUR::DataType);
void goto_visual_state (uint32_t);
void save_visual_state (uint32_t);
TimeAxisView* clicked_axisview;
RouteTimeAxisView* clicked_routeview;
- /** The last RegionView that was clicked on, or 0 if the last click was not
- * on a RegionView. This is set up by the canvas event handlers in
- * editor_canvas_events.cc
- */
+ /** The last RegionView that was clicked on, or 0 if the last click was not
+ * on a RegionView. This is set up by the canvas event handlers in
+ * editor_canvas_events.cc
+ */
RegionView* clicked_regionview;
RegionSelection latest_regionviews;
uint32_t clicked_selection;
void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList&, Gtk::Menu_Helpers::MenuElem, bool) const;
- void handle_new_route (ARDOUR::Session::RouteList&);
+ void handle_new_route (ARDOUR::RouteList&);
void remove_route (TimeAxisView *);
bool route_removal;
bool verbose_cursor_on; // so far unused
- Gtk::EventBox time_canvas_event_box;
- Gtk::EventBox track_canvas_event_box;
- Gtk::EventBox time_button_event_box;
- Gtk::EventBox ruler_label_event_box;
+ Gtk::EventBox time_canvas_event_box;
+ Gtk::EventBox track_canvas_event_box;
+ Gtk::EventBox time_button_event_box;
+ Gtk::EventBox ruler_label_event_box;
ArdourCanvas::Group *minsec_group;
ArdourCanvas::Pixbuf *logo_item;
Glib::RefPtr<Gtk::ToggleAction> ruler_range_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_loop_punch_action;
Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
- bool no_ruler_shown_update;
+ bool no_ruler_shown_update;
gint ruler_button_press (GdkEventButton*);
gint ruler_button_release (GdkEventButton*);
gint ruler_mouse_motion (GdkEventMotion*);
bool ruler_scroll (GdkEventScroll* event);
- gint ruler_pressed_button;
+ gint ruler_pressed_button;
Gtk::Widget * ruler_grabbed_widget;
void initialize_rulers ();
Gtk::Label range_mark_label;
Gtk::Label transport_mark_label;
Gtk::Label cd_mark_label;
-
Gtk::VBox time_button_vbox;
Gtk::HBox time_button_hbox;
void set_y_axis (double position);
};
- friend struct Cursor; /* it needs access to several private
- fields. XXX fix me.
- */
-
- Cursor* playhead_cursor;
+ Cursor* playhead_cursor;
ArdourCanvas::Group* cursor_group;
- void cursor_to_region_boundary (Cursor*, int32_t dir);
- void cursor_to_next_region_boundary (Cursor*);
- void cursor_to_previous_region_boundary (Cursor*);
+ nframes64_t get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection, bool only_onscreen);
+
+ void cursor_to_region_boundary (bool with_selection, int32_t dir);
+ void cursor_to_next_region_boundary (bool with_selection);
+ void cursor_to_previous_region_boundary (bool with_selection);
void cursor_to_next_region_point (Cursor*, ARDOUR::RegionPoint);
void cursor_to_previous_region_point (Cursor*, ARDOUR::RegionPoint);
void cursor_to_region_point (Cursor*, ARDOUR::RegionPoint, int32_t dir);
void cursor_to_selection_start (Cursor *);
void cursor_to_selection_end (Cursor *);
- void selected_marker_to_region_boundary (int32_t dir);
- void selected_marker_to_next_region_boundary ();
- void selected_marker_to_previous_region_boundary ();
+ void selected_marker_to_region_boundary (bool with_selection, int32_t dir);
+ void selected_marker_to_next_region_boundary (bool with_selection);
+ void selected_marker_to_previous_region_boundary (bool with_selection);
void selected_marker_to_next_region_point (ARDOUR::RegionPoint);
void selected_marker_to_previous_region_point (ARDOUR::RegionPoint);
void selected_marker_to_region_point (ARDOUR::RegionPoint, int32_t dir);
void region_list_region_changed (ARDOUR::Change, boost::weak_ptr<ARDOUR::Region>);
void region_list_selection_changed ();
+ sigc::connection region_list_change_connection;
+ void set_selected_in_region_list(RegionSelection&);
+ bool set_selected_in_region_list_subrow(boost::shared_ptr<ARDOUR::Region>, Gtk::TreeModel::Row const &, int);
bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn);
void region_name_edit (const Glib::ustring&, const Glib::ustring&);
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
/* track views */
TrackViewList track_views;
- TimeAxisView *trackview_by_y_position (double ypos);
+ std::pair<TimeAxisView*, ARDOUR::layer_t> trackview_by_y_position (double);
static Gdk::Cursor* cross_hair_cursor;
static Gdk::Cursor* trimmer_cursor;
void audition_playlist_region_via_route (boost::shared_ptr<ARDOUR::Region>, ARDOUR::Route&);
void split_multichannel_region();
void reverse_region ();
+ void strip_region_silence ();
void normalize_region ();
void denormalize_region ();
void adjust_region_scale_amplitude (bool up);
/* import specific info */
- struct EditorImportStatus : public ARDOUR::Session::import_status {
+ struct EditorImportStatus : public ARDOUR::Session::ImportStatus {
Editing::ImportMode mode;
nframes64_t pos;
int target_tracks;
void region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void create_region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void create_region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
- bool check_region_drag_possible (RouteTimeAxisView**);
+ bool check_region_drag_possible (RouteTimeAxisView**, ARDOUR::layer_t*);
void possibly_copy_regions_during_grab (GdkEvent*);
void region_drag_splice_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void region_drag_splice_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void edit_meter_section (ARDOUR::MeterSection*);
void edit_tempo_marker (ArdourCanvas::Item*);
void edit_meter_marker (ArdourCanvas::Item*);
+ void edit_control_point (ArdourCanvas::Item*);
void marker_menu_edit ();
void marker_menu_remove ();
Gtk::ToggleButton midi_tool_select_button;
Gtk::ToggleButton midi_tool_resize_button;
Gtk::ToggleButton midi_tool_erase_button;
- Gtk::ToggleButton midi_panic_button;
+ Gtk::Button midi_panic_button;
+ Gtk::ToggleButton midi_sound_notes;
GroupedButtons *midi_tool_button_set;
void midi_edit_mode_toggled (Editing::MidiEditMode m);
+ void midi_panic_button_pressed ();
+ bool sound_notes () const { return midi_sound_notes.get_active(); }
+
bool ignore_midi_edit_mode_toggle;
Gtkmm2ext::TearOff* midi_tools_tearoff;
Gtk::EventBox midi_toolbar_base;
Gtk::Frame midi_toolbar_frame;
- void midi_panic_toggle ();
void setup_midi_toolbar ();
/* selection process */
void time_selection_changed ();
void track_selection_changed ();
void region_selection_changed ();
+ sigc::connection editor_regions_selection_changed_connection;
void sensitize_the_right_region_actions (bool have_selected_regions);
void point_selection_changed ();
void marker_selection_changed ();
void route_list_reordered (const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter, int* what);
bool ignore_route_list_reorder;
bool no_route_list_redisplay;
+ bool sync_track_view_list_and_route_list ();
void build_route_list_menu ();
void show_route_list_menu ();
void point_trim (GdkEvent*);
void trim_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void single_contents_trim (RegionView&, nframes64_t, bool, bool, bool);
- void single_start_trim (RegionView&, nframes64_t, bool, bool);
- void single_end_trim (RegionView&, nframes64_t, bool, bool);
+ void single_start_trim (RegionView&, nframes64_t, bool, bool, bool);
+ void single_end_trim (RegionView&, nframes64_t, bool, bool, bool);
void trim_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void thaw_region_after_trim (RegionView& rv);
void trim_region_to_punch ();
void trim_region_to_location (const ARDOUR::Location&, const char* cmd);
+ void trim_to_region(bool forward);
+ void trim_region_to_previous_region_end();
+ void trim_region_to_next_region_start();
+
bool show_gain_after_trim;
/* Drag-n-Drop */
- int convert_drop_to_paths (std::vector<Glib::ustring>& paths,
- const Glib::RefPtr<Gdk::DragContext>& context,
- gint x,
- gint y,
- const Gtk::SelectionData& data,
- guint info,
- guint time);
-
- void track_canvas_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
- gint x,
- gint y,
- const Gtk::SelectionData& data,
- guint info,
- guint time);
+ int convert_drop_to_paths (
+ std::vector<Glib::ustring>& paths,
+ const Glib::RefPtr<Gdk::DragContext>& context,
+ gint x,
+ gint y,
+ const Gtk::SelectionData& data,
+ guint info,
+ guint time);
+
+ void track_canvas_drag_data_received (
+ const Glib::RefPtr<Gdk::DragContext>& context,
+ gint x,
+ gint y,
+ const Gtk::SelectionData& data,
+ guint info,
+ guint time);
- void region_list_display_drag_data_received (const Glib::RefPtr<Gdk::DragContext>& context,
- gint x,
- gint y,
- const Gtk::SelectionData& data,
- guint info,
- guint time);
-
- void drop_paths (const Glib::RefPtr<Gdk::DragContext>& context,
- gint x,
- gint y,
- const Gtk::SelectionData& data,
- guint info,
- guint time);
-
- void drop_regions (const Glib::RefPtr<Gdk::DragContext>& context,
- gint x,
- gint y,
- const Gtk::SelectionData& data,
- guint info,
- guint time);
-
- void drop_routes (const Glib::RefPtr<Gdk::DragContext>& context,
- gint x,
- gint y,
- const Gtk::SelectionData& data,
- guint info,
- guint time);
+ void region_list_display_drag_data_received (
+ const Glib::RefPtr<Gdk::DragContext>& context,
+ gint x,
+ gint y,
+ const Gtk::SelectionData& data,
+ guint info,
+ guint time);
+
+ void drop_paths (
+ const Glib::RefPtr<Gdk::DragContext>& context,
+ gint x,
+ gint y,
+ const Gtk::SelectionData& data,
+ guint info,
+ guint time);
+
+ void drop_regions (
+ const Glib::RefPtr<Gdk::DragContext>& context,
+ gint x,
+ gint y,
+ const Gtk::SelectionData& data,
+ guint info,
+ guint time);
+
+ void drop_routes (
+ const Glib::RefPtr<Gdk::DragContext>& context,
+ gint x,
+ gint y,
+ const Gtk::SelectionData& data,
+ guint info,
+ guint time);
/* audio export */
int write_region_selection(RegionSelection&);
bool write_region (string path, boost::shared_ptr<ARDOUR::AudioRegion>);
void bounce_region_selection ();
- void bounce_range_selection (bool replace);
+ void bounce_range_selection (bool replace, bool enable_processing);
void external_edit_region ();
int write_audio_selection (TimeSelection&);
void write_selection ();
- /* history */
-
- UndoAction get_memento() const;
-
XMLNode *before; /* used in *_reversible_command */
void begin_reversible_command (string cmd_name);
void start_time_fx (ArdourCanvas::Item*, GdkEvent*);
void end_time_fx (ArdourCanvas::Item*, GdkEvent*);
- struct TimeFXDialog : public ArdourDialog {
- ARDOUR::TimeFXRequest request;
- Editor& editor;
- bool pitching;
- Gtk::Adjustment pitch_octave_adjustment;
- Gtk::Adjustment pitch_semitone_adjustment;
- Gtk::Adjustment pitch_cent_adjustment;
- Gtk::SpinButton pitch_octave_spinner;
- Gtk::SpinButton pitch_semitone_spinner;
- Gtk::SpinButton pitch_cent_spinner;
- RegionSelection regions;
- Gtk::ProgressBar progress_bar;
-
- /* SoundTouch */
- Gtk::ToggleButton quick_button;
- Gtk::ToggleButton antialias_button;
- Gtk::HBox upper_button_box;
-
- /* RubberBand */
- Gtk::ComboBoxText stretch_opts_selector;
- Gtk::Label stretch_opts_label;
- Gtk::ToggleButton precise_button;
- Gtk::ToggleButton preserve_formants_button;
- Gtk::HBox opts_box;
-
- Gtk::Button* cancel_button;
- Gtk::Button* action_button;
- Gtk::VBox packer;
- int status;
-
- TimeFXDialog (Editor& e, bool for_pitch);
-
- gint update_progress ();
- sigc::connection first_cancel;
- sigc::connection first_delete;
- void cancel_in_progress ();
- gint delete_in_progress (GdkEventAny*);
- };
-
/* "whats mine is yours" */
- friend class TimeFXDialog;
-
TimeFXDialog* current_timefx;
static void* timefx_thread (void *arg);
void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
RhythmFerret* rhythm_ferret;
+ BundleManager* _bundle_manager;
+ GlobalPortMatrixWindow* _global_port_matrix[ARDOUR::DataType::num_types];
void fit_tracks ();
void set_track_height (uint32_t h);
- void set_track_height_largest ();
- void set_track_height_large ();
- void set_track_height_larger ();
- void set_track_height_normal ();
- void set_track_height_smaller ();
- void set_track_height_small ();
void remove_tracks ();
void toggle_tracks_active ();
bool idle_resize();
friend gboolean _idle_resize (gpointer);
std::vector<TimeAxisView*> pending_resizes;
+
+ void visible_order_range (int*, int*) const;
+ bool y_movement_disallowed (int, int, int, int, int, std::bitset<512> const &, std::vector<int32_t> const &) const;
+
+ void located ();
+ bool _pending_locate_request;
};
#endif /* __ardour_editor_h__ */