#include <ardour/tempo.h>
#include <ardour/location.h>
#include <ardour/region.h>
-#include <ardour/sndfile_helpers.h>
#include "audio_clock.h"
#include "gtk-custom-ruler.h"
#include "public_editor.h"
#include "editing.h"
#include "enums.h"
+#include "editor_items.h"
#include "region_selection.h"
#include "canvas.h"
#include "draginfo.h"
}
namespace ARDOUR {
- class DiskStream;
+ class AudioDiskstream;
class RouteGroup;
- class Source;
class Playlist;
class Region;
class Location;
class MixerStrip;
class StreamView;
class ControlPoint;
+#ifdef FFT_ANALYSIS
+class AnalysisWindow;
+#endif
/* <CMT Additions> */
class ImageFrameView;
void connect_to_image_compositor() ;
void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
TimeAxisView* get_named_time_axis(const string & name) ;
- /* </CMT Additions> */
void consider_auditioning (ARDOUR::Region&);
void hide_a_region (ARDOUR::Region&);
void new_region_from_selection ();
void separate_region_from_selection ();
+ void separate_regions_using_location (ARDOUR::Location&);
void toggle_playback (bool with_abort);
/* undo related */
void set_show_measures (bool yn);
bool show_measures () const { return _show_measures; }
+#ifdef FFT_ANALYSIS
+ /* analysis window */
+ void analyze_region_selection();
+ void analyze_range_selection();
+#endif
+
/* export */
/* these initiate export ... */
void toggle_waveforms_while_recording ();
void toggle_measure_visibility ();
- void set_meter_falloff (float);
+ void set_meter_falloff (int);
void set_meter_hold (int32_t);
/* xfades */
- void toggle_xfades_active();
+ void toggle_auto_xfade ();
+ void toggle_xfades_active ();
void toggle_xfade_visibility ();
- void set_xfade_visibility (bool yn);
bool xfade_visibility() const { return _xfade_visibility; }
+ void update_crossfade_model ();
+ void set_crossfade_model (ARDOUR::CrossfadeModel);
+
+ /* layers */
+
+ void set_layer_model (ARDOUR::Session::LayerModel);
+ void update_layering_model ();
/* redirect shared ops menu. caller must free returned menu */
void ensure_float (Gtk::Window&);
void show_window ();
-
+
void scroll_tracks_down_line ();
void scroll_tracks_up_line ();
PlaylistSelector* _playlist_selector;
- enum ItemType {
- RegionItem,
- StreamItem,
- PlayheadCursorItem,
- EditCursorItem,
- MarkerItem,
- MarkerBarItem,
- RangeMarkerBarItem,
- TransportMarkerBarItem,
- SelectionItem,
- GainControlPointItem,
- GainLineItem,
- GainAutomationControlPointItem,
- GainAutomationLineItem,
- PanAutomationControlPointItem,
- PanAutomationLineItem,
- RedirectAutomationControlPointItem,
- RedirectAutomationLineItem,
- MeterMarkerItem,
- TempoMarkerItem,
- MeterBarItem,
- TempoBarItem,
- AudioRegionViewNameHighlight,
- AudioRegionViewName,
- StartSelectionTrimItem,
- EndSelectionTrimItem,
- AutomationTrackItem,
- FadeInItem,
- FadeInHandleItem,
- FadeOutItem,
- FadeOutHandleItem,
-
- /* <CMT Additions> */
- MarkerViewItem,
- MarkerTimeAxisItem,
- MarkerViewHandleStartItem,
- MarkerViewHandleEndItem,
- ImageFrameItem,
- ImageFrameTimeAxisItem,
- ImageFrameHandleStartItem,
- ImageFrameHandleEndItem,
- /* </CMT Additions> */
-
- CrossfadeViewItem,
-
- /* don't remove this */
-
- NoItem
- };
-
void set_frames_per_unit (double);
void frames_per_unit_modified ();
CrossfadeView* clicked_crossfadeview;
ControlPoint* clicked_control_point;
+ void get_relevant_audio_tracks (AudioTimeAxisView& base, std::set<AudioTimeAxisView*>& relevant_tracks);
void mapover_audio_tracks (sigc::slot<void,AudioTimeAxisView&,uint32_t> sl);
/* functions to be passed to mapover_audio_tracks(), possibly with sigc::bind()-supplied arguments */
/* end */
+ void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
+ bool button_release_can_deselect;
+
void catch_vanishing_audio_regionview (AudioRegionView *);
- void set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
- void set_selected_track_from_click (Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
- void set_selected_regionview_from_click (Selection::Operation op = Selection::Set, bool no_track_remove=false);
+
+ bool set_selected_control_point_from_click (bool press, Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
+ bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool with_undo = true, bool no_remove=false);
+ bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false);
+
void set_selected_regionview_from_region_list (ARDOUR::Region& region, Selection::Operation op = Selection::Set);
bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, ARDOUR::Region*);
void collect_new_region_view (AudioRegionView *);
void cursor_to_selection_start (Cursor *);
void cursor_to_selection_end (Cursor *);
void select_all_selectables_using_cursor (Cursor *, bool);
+ void select_all_selectables_between_cursors (Cursor *, Cursor *);
ARDOUR::Region* find_next_region (jack_nframes_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
Gtk::HBox bottom_hbox;
Gtk::Table edit_packer;
- Gtk::Frame edit_frame;
Gtk::VScrollbar edit_vscrollbar;
Gtk::Adjustment vertical_adjustment;
Gtk::HScrollbar edit_hscrollbar;
bool edit_hscroll_dragging;
+
+ void reset_hscrollbar_stepping ();
bool hscrollbar_button_press (GdkEventButton*);
bool hscrollbar_button_release (GdkEventButton*);
double canvas_width;
double canvas_height;
+ jack_nframes_t last_canvas_frame;
bool track_canvas_map_handler (GdkEventAny*);
bool time_canvas_map_handler (GdkEventAny*);
Gtk::VBox edit_controls_vbox;
Gtk::HBox edit_controls_hbox;
+ void control_scroll (float);
+ bool deferred_control_scroll (jack_nframes_t);
+ sigc::connection control_scroll_connection;
+
void tie_vertical_scrolling ();
void canvas_horizontally_scrolled ();
void reposition_and_zoom (jack_nframes_t sample, double fpu);
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
- bool motion_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
+ bool motion_handler (ArdourCanvas::Item*, GdkEvent*, ItemType, bool from_autoscroll = false);
bool enter_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool leave_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
int ensure_cursor (jack_nframes_t* pos);
- void fake_handle_new_audio_region (ARDOUR::AudioRegion *);
void handle_new_audio_region (ARDOUR::AudioRegion *);
- void fake_handle_audio_region_removed (ARDOUR::AudioRegion *);
void handle_audio_region_removed (ARDOUR::AudioRegion *);
void add_audio_region_to_region_display (ARDOUR::AudioRegion *);
void region_hidden (ARDOUR::Region*);
/* EDITING OPERATIONS */
+ void reset_point_selection ();
void toggle_region_mute ();
void toggle_region_opaque ();
void raise_region ();
void insert_region_list_drag (ARDOUR::AudioRegion&, int x, int y);
void insert_region_list_selection (float times);
- void insert_sndfile (bool as_tracks);
- void embed_audio (); // inserts into region list
- int reject_because_rate_differs (const string & path, SoundFileInfo& finfo, const string & action, bool multiple_pending);
-
- void do_embed_sndfiles (vector<string> paths, bool split);
- void embed_sndfile (string path, bool split, bool multiple_files, bool& check_sr);
+ void add_external_audio_action (Editing::ImportMode);
- void do_insert_sndfile (vector<string> path, bool multi, jack_nframes_t frame);
- void insert_paths_as_new_tracks (std::vector<std::string> paths, bool multi); // inserts files as new tracks
- void insert_sndfile_into (const string & path, bool multi, AudioTimeAxisView* tv, jack_nframes_t& frame, bool prompt=true);
- static void* _insert_sndfile_thread (void*);
- void* insert_sndfile_thread (void*);
+ void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t& pos, bool prompt);
+ void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
+ void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, jack_nframes_t&, bool);
+ int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, jack_nframes_t& pos);
+ int embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
+ ARDOUR::AudioTrack* track, jack_nframes_t& pos, bool prompt);
+ int finish_bringing_in_audio (ARDOUR::AudioRegion& region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, jack_nframes_t& pos, Editing::ImportMode mode);
/* generic interthread progress window */
void build_interthread_progress_window ();
ARDOUR::InterThreadInfo* current_interthread_info;
+#ifdef FFT_ANALYSIS
+ AnalysisWindow* analysis_window;
+#endif
+
/* import specific info */
ARDOUR::Session::import_status import_status;
gint import_progress_timeout (void *);
static void *_import_thread (void *);
void* import_thread ();
- void catch_new_audio_region (ARDOUR::AudioRegion*);
- ARDOUR::AudioRegion* last_audio_region;
/* to support this ... */
void set_selection_from_range (ARDOUR::Location&);
void set_selection_from_punch ();
void set_selection_from_loop ();
+ void set_selection_from_audio_region ();
+ void add_location_from_audio_region ();
void add_location_from_selection ();
void set_route_loop_selection ();
void start_grab (GdkEvent*, Gdk::Cursor* cursor = 0);
bool end_grab (ArdourCanvas::Item*, GdkEvent*);
+ void swap_grab (ArdourCanvas::Item*, Gdk::Cursor* cursor, uint32_t time);
Gtk::Menu fade_context_menu;
void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
void kbd_do_brush (GdkEvent*);
void kbd_do_audition (GdkEvent*);
- void fake_handle_new_duration ();
void handle_new_duration ();
void initialize_canvas ();
void reset_scrolling_region (Gtk::Allocation* alloc = 0);
void marker_menu_hide ();
void marker_menu_loop_range ();
void marker_menu_select_all_selectables_using_range ();
+ void marker_menu_separate_regions_using_location ();
void marker_menu_play_from ();
void marker_menu_set_playhead ();
void marker_menu_set_from_playhead ();
Gtk::Menu* tm_marker_menu;
Gtk::Menu* marker_menu;
+ Gtk::Menu* range_marker_menu;
Gtk::Menu* transport_marker_menu;
Gtk::Menu* new_transport_marker_menu;
ArdourCanvas::Item* marker_menu_item;
bool in_edit_group_row_change;
void edit_group_row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
-
+ void edit_group_name_edit (const Glib::ustring&, const Glib::ustring&);
void new_edit_group ();
void edit_group_list_button_clicked ();
gint edit_group_list_button_press_event (GdkEventButton* ev);
/* Drag-n-Drop */
- int convert_drop_to_paths (std::vector<std::string>& paths,
+ int convert_drop_to_paths (std::vector<Glib::ustring>& paths,
const Glib::RefPtr<Gdk::DragContext>& context,
gint x,
gint y,
/* visual history */
UndoHistory visual_history;
- UndoCommand current_visual_command;
+ UndoTransaction current_visual_command;
void begin_reversible_visual_command (const string & cmd_name);
void commit_reversible_visual_command ();
Gtk::ProgressBar progress_bar;
Gtk::ToggleButton quick_button;
Gtk::ToggleButton antialias_button;
- Gtk::Button cancel_button;
- Gtk::Button action_button;
- Gtk::HBox lower_button_box;
+ Gtk::Button* cancel_button;
+ Gtk::Button* action_button;
Gtk::HBox upper_button_box;
Gtk::VBox packer;
int status;