along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#ifndef __ardour_editor_h__
#include <ardour/session.h>
#include <ardour/tempo.h>
#include <ardour/location.h>
-#include <ardour/region.h>
+#include <ardour/audioregion.h>
#include "audio_clock.h"
#include "gtk-custom-ruler.h"
class TearOff;
}
-namespace LinuxAudioSystems {
- class AudioEngine;
-}
-
namespace ARDOUR {
class AudioDiskstream;
class RouteGroup;
class Session;
class AudioFilter;
class Crossfade;
+ class ChanCount;
}
namespace LADSPA {
}
class TimeAxisView;
-class RouteTimeAxisView;
class AudioTimeAxisView;
class AutomationTimeAxisView;
class AudioRegionView;
class Editor : public PublicEditor
{
public:
- Editor (ARDOUR::AudioEngine&);
+ Editor ();
~Editor ();
void connect_to_session (ARDOUR::Session *);
void set_mouse_mode (Editing::MouseMode, bool force=true);
void step_mouse_mode (bool next);
- Editing::MouseMode current_mouse_mode () { return mouse_mode; }
+ Editing::MouseMode current_mouse_mode () const { return mouse_mode; }
- void add_imageframe_time_axis(const string & track_name, void*) ;
- void add_imageframe_marker_time_axis(const string & track_name, TimeAxisView* marked_track, void*) ;
+#ifdef WITH_CMT
+ void add_imageframe_time_axis(const std::string & track_name, void*) ;
+ void add_imageframe_marker_time_axis(const std::string & track_name, TimeAxisView* marked_track, void*) ;
void connect_to_image_compositor() ;
void scroll_timeaxis_to_imageframe_item(const TimeAxisViewItem* item) ;
- TimeAxisView* get_named_time_axis(const string & name) ;
+ TimeAxisView* get_named_time_axis(const std::string & name) ;
+#endif
void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
void separate_region_from_selection ();
void separate_regions_using_location (ARDOUR::Location&);
void toggle_playback (bool with_abort);
+ void transition_to_rolling (bool forward);
/* undo related */
- void set_edit_menu (Gtk::Menu&);
-
nframes_t unit_to_frame (double unit) {
return (nframes_t) rint (unit * frames_per_unit);
}
Selection& get_selection() const { return *selection; }
Selection& get_cut_buffer() const { return *cut_buffer; }
+ bool extend_selection_to_track (TimeAxisView&);
+
void play_selection ();
- void select_all_in_track (Selection::Operation op);
+ void select_all_in_selected_tracks (Selection::Operation op);
void select_all (Selection::Operation op);
- void invert_selection_in_track ();
+ void invert_selection_in_selected_tracks ();
void invert_selection ();
/* tempo */
void route_name_changed (TimeAxisView *);
gdouble frames_per_unit;
nframes_t leftmost_frame;
- void clear_playlist (ARDOUR::Playlist&);
+ void clear_playlist (boost::shared_ptr<ARDOUR::Playlist>);
void new_playlists ();
void copy_playlists ();
TrackViewList* get_valid_views (TimeAxisView*, ARDOUR::RouteGroup* grp = 0);
Width editor_mixer_strip_width;
+ void maybe_add_mixer_strip_width (XMLNode&);
void show_editor_mixer (bool yn);
void set_selected_mixer_strip (TimeAxisView&);
void hide_track_in_display (TimeAxisView& tv);
void set_follow_playhead (bool yn);
void toggle_follow_playhead ();
bool follow_playhead() const { return _follow_playhead; }
+ bool dragging_playhead () const { return _dragging_playhead; }
void toggle_waveform_visibility ();
void toggle_waveforms_while_recording ();
/* SMPTE timecode & video sync */
- void smpte_fps_chosen (ARDOUR::Session::SmpteFormat format);
+ void smpte_fps_chosen (ARDOUR::SmpteFormat format);
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_subframes_per_frame ();
/* xfades */
void toggle_auto_xfade ();
void toggle_xfades_active ();
void toggle_xfade_visibility ();
bool xfade_visibility() const { return _xfade_visibility; }
+ void update_xfade_visibility ();
void update_crossfade_model ();
void set_crossfade_model (ARDOUR::CrossfadeModel);
bool new_regionviews_display_gain () { return _new_regionviews_show_envelope; }
void prepare_for_cleanup ();
- void reposition_x_origin (nframes_t sample);
-
void maximise_editing_space();
void restore_editing_space();
+ void reset_x_origin (nframes_t);
+ void reset_zoom (double);
+ void reposition_and_zoom (nframes_t, double);
+
+ nframes_t edit_cursor_position(bool);
+
protected:
void map_transport_state ();
void map_position_change (nframes_t);
void on_realize();
private:
-
+
+ /// The session that we are editing, or 0
ARDOUR::Session *session;
- ARDOUR::AudioEngine& engine;
bool constructed;
PlaylistSelector* _playlist_selector;
Editing::MouseMode mouse_mode;
+ int post_maximal_editor_width;
+ int post_maximal_pane_position;
int pre_maximal_pane_position;
+ int pre_maximal_editor_width;
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
Gtk::Notebook the_notebook;
void clear_marker_display ();
void mouse_add_new_marker (nframes_t where);
- TimeAxisView* clicked_trackview;
- AudioTimeAxisView* clicked_audio_trackview;
+ 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
+ */
RegionView* clicked_regionview;
+
RegionView* latest_regionview;
uint32_t clicked_selection;
CrossfadeView* clicked_crossfadeview;
ControlPoint* clicked_control_point;
- void get_relevant_audio_tracks (std::set<AudioTimeAxisView*>& relevant_tracks);
- void mapover_audio_tracks (sigc::slot<void,AudioTimeAxisView&,uint32_t> sl);
+ void sort_track_selection ();
+
+ void get_relevant_tracks (std::set<RouteTimeAxisView*>& relevant_tracks);
+ void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&);
+ void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl);
- /* functions to be passed to mapover_audio_tracks(), possibly with sigc::bind()-supplied arguments */
+ /* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
- void mapped_set_selected_regionview_from_click (RouteTimeAxisView&, uint32_t, RegionView*, vector<RegionView*>*);
- void mapped_use_new_playlist (AudioTimeAxisView&, uint32_t);
- void mapped_use_copy_playlist (AudioTimeAxisView&, uint32_t);
- void mapped_clear_playlist (AudioTimeAxisView&, uint32_t);
+ void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView*, vector<RegionView*>*);
+ void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t);
+ void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t);
+ void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
/* end */
void catch_vanishing_regionview (RegionView *);
bool set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
+ void select_all_tracks ();
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
- bool set_selected_track_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
+ bool set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, 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 (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
- bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::weak_ptr<ARDOUR::Region>);
void collect_new_region_view (RegionView *);
- Gtk::Menu track_context_menu;
- Gtk::Menu track_region_context_menu;
- Gtk::Menu track_selection_context_menu;
- Gtk::Menu track_crossfade_context_menu;
-
- Gtk::MenuItem* region_edit_menu_split_item;
- Gtk::MenuItem* region_edit_menu_split_multichannel_item;
- Gtk::Menu * track_region_edit_playlist_menu;
- Gtk::Menu * track_edit_playlist_submenu;
- Gtk::Menu * track_selection_edit_playlist_submenu;
-
- void popup_track_context_menu (int, int, ItemType, bool, nframes_t);
+ void popup_track_context_menu (int, int, nframes_t);
Gtk::Menu* build_track_context_menu (nframes_t);
- Gtk::Menu* build_track_bus_context_menu (nframes_t);
- Gtk::Menu* build_track_region_context_menu (nframes_t frame);
- Gtk::Menu* build_track_crossfade_context_menu (nframes_t);
- Gtk::Menu* build_track_selection_context_menu (nframes_t);
- void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
- void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
- void add_region_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Region>, Gtk::Menu_Helpers::MenuList&);
- void add_crossfade_context_items (AudioStreamView*, ARDOUR::Crossfade*, Gtk::Menu_Helpers::MenuList&, bool many);
+ void add_bus_or_audio_track_context_items (Gtk::Menu_Helpers::MenuList&);
+ void add_region_context_items (Gtk::Menu_Helpers::MenuList&);
+ void add_crossfade_context_items (AudioStreamView*, boost::shared_ptr<ARDOUR::Crossfade>, Gtk::Menu_Helpers::MenuList&, bool many);
void add_selection_context_items (Gtk::Menu_Helpers::MenuList&);
+ void add_item_with_sensitivity (Gtk::Menu_Helpers::MenuList&, Gtk::Menu_Helpers::MenuElem, bool) const;
+
void handle_new_route (ARDOUR::Session::RouteList&);
void remove_route (TimeAxisView *);
bool route_removal;
Gtk::EventBox time_canvas_event_box;
Gtk::EventBox track_canvas_event_box;
Gtk::EventBox time_button_event_box;
+ Gtk::Frame time_button_frame;
ArdourCanvas::Group *minsec_group;
ArdourCanvas::Group *bbt_group;
gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
+ Gtk::Widget *_ruler_separator;
GtkWidget *_smpte_ruler;
GtkWidget *_bbt_ruler;
GtkWidget *_frames_ruler;
ArdourCanvas::SimpleRect* range_marker_bar;
ArdourCanvas::SimpleRect* transport_marker_bar;
-
- ArdourCanvas::SimpleLine* tempo_line;
- ArdourCanvas::SimpleLine* meter_line;
- ArdourCanvas::SimpleLine* marker_line;
- ArdourCanvas::SimpleLine* range_marker_line;
- ArdourCanvas::SimpleLine* transport_marker_line;
-
Gtk::Label minsec_label;
Gtk::Label bbt_label;
Gtk::Label smpte_label;
nframes_t current_frame;
double length;
- Cursor (Editor&, const string& color, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
+ Cursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
~Cursor ();
void set_position (nframes_t);
void controls_layout_size_request (Gtk::Requisition*);
Gtk::HScrollbar edit_hscrollbar;
+ bool _dragging_hscrollbar;
void reset_hscrollbar_stepping ();
double canvas_width;
double canvas_height;
+ double full_canvas_height;
nframes_t last_canvas_frame;
bool track_canvas_map_handler (GdkEventAny*);
void tie_vertical_scrolling ();
void canvas_horizontally_scrolled ();
- void reposition_and_zoom (nframes_t sample, double fpu);
- gint deferred_reposition_and_zoom (nframes_t sample, double fpu);
+ struct VisualChange {
+ enum Type {
+ TimeOrigin = 0x1,
+ ZoomLevel = 0x2
+ };
+
+ Type pending;
+ nframes_t time_origin;
+ double frames_per_unit;
+
+ int idle_handler_id;
+
+ VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {}
+ };
+
+
+ VisualChange pending_visual_change;
+
+ static int _idle_visual_changer (void *arg);
+ int idle_visual_changer ();
+
+ void queue_visual_change (nframes_t);
+ void queue_visual_change (double);
+
void end_location_changed (ARDOUR::Location*);
- bool repos_zoom_queued;
struct RegionListDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
RegionListDisplayModelColumns() {
SnapshotDisplayModelColumns snapshot_display_columns;
Glib::RefPtr<Gtk::ListStore> snapshot_display_model;
Gtk::TreeView snapshot_display;
+ Gtk::Menu snapshot_context_menu;
bool snapshot_display_button_press (GdkEventButton*);
void snapshot_display_selection_changed ();
void redisplay_snapshots();
+ void popup_snapshot_context_menu (int, int32_t, Glib::ustring);
/* named selections */
Gtkmm2ext::DnDTreeView<ARDOUR::NamedSelection*> named_selection_display;
Gtk::ScrolledWindow named_selection_scroller;
- void name_selection();
- void named_selection_name_chosen ();
- void create_named_selection (const string &);
+ void create_named_selection ();
void paste_named_selection (float times);
+ void remove_selected_named_selections ();
+ void remove_snapshot (Glib::ustring);
+ void rename_snapshot (Glib::ustring);
void handle_new_named_selection ();
void add_named_selection_to_named_selection_display (ARDOUR::NamedSelection&);
void redisplay_named_selections ();
- gint named_selection_display_button_press (GdkEventButton *ev);
+ bool named_selection_display_button_release (GdkEventButton *ev);
+ bool named_selection_display_key_release (GdkEventKey *ev);
void named_selection_display_selection_changed ();
/* track views */
- int track_spacing;
TrackViewList track_views;
TimeAxisView *trackview_by_y_position (double ypos);
int ensure_cursor (nframes_t* pos);
- void handle_new_audio_region (boost::weak_ptr<ARDOUR::AudioRegion>);
- void handle_audio_region_removed (boost::weak_ptr<ARDOUR::AudioRegion>);
- void add_audio_region_to_region_display (boost::shared_ptr<ARDOUR::AudioRegion>);
+ void handle_new_region (boost::weak_ptr<ARDOUR::Region>);
+ void handle_region_removed (boost::weak_ptr<ARDOUR::Region>);
+ void add_region_to_region_display (boost::shared_ptr<ARDOUR::Region>);
void region_hidden (boost::shared_ptr<ARDOUR::Region>);
void redisplay_regions ();
- void insert_into_tmp_audio_regionlist(boost::shared_ptr<ARDOUR::AudioRegion>);
+ void insert_into_tmp_regionlist(boost::shared_ptr<ARDOUR::Region>);
- list<boost::shared_ptr<ARDOUR::AudioRegion> > tmp_audio_region_list;
+ list<boost::shared_ptr<ARDOUR::Region> > tmp_region_list;
void cut_copy (Editing::CutCopyOp);
+ bool can_cut_copy () const;
void cut_copy_points (Editing::CutCopyOp);
void cut_copy_regions (Editing::CutCopyOp);
void cut_copy_ranges (Editing::CutCopyOp);
/* EDITING OPERATIONS */
void reset_point_selection ();
- void toggle_region_mute ();
- void toggle_region_opaque ();
- void raise_region ();
+ void set_region_mute (bool);
+ void set_region_lock (bool);
+ void set_region_position_lock (bool);
+ void set_region_opaque (bool);
void raise_region_to_top ();
- void lower_region ();
void lower_region_to_bottom ();
void split_region ();
void split_region_at (nframes_t);
void align_selection_relative (ARDOUR::RegionPoint point, nframes_t position);
void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes_t position);
+ void remove_selected_regions ();
void remove_clicked_region ();
- void destroy_clicked_region ();
void edit_region ();
void duplicate_some_regions (RegionSelection&, float times);
void duplicate_selection (float times);
void audition_playlist_region_standalone (boost::shared_ptr<ARDOUR::Region>);
void audition_playlist_region_via_route (boost::shared_ptr<ARDOUR::Region>, ARDOUR::Route&);
void split_multichannel_region();
- void reverse_region ();
- void normalize_region ();
- void denormalize_region ();
+ void reverse_regions ();
+ void normalize_regions ();
+ void denormalize_regions ();
void audition_region_from_region_list ();
void hide_region_from_region_list ();
void align_relative (ARDOUR::RegionPoint);
void naturalize ();
+ void reset_focus ();
+
void cut ();
void copy ();
void paste (float times);
void amplitude_zoom (gdouble scale);
void amplitude_zoom_step (bool in);
- void insert_region_list_drag (boost::shared_ptr<ARDOUR::AudioRegion>, int x, int y);
+ void insert_region_list_drag (boost::shared_ptr<ARDOUR::Region>, int x, int y);
void insert_region_list_selection (float times);
void add_external_audio_action (Editing::ImportMode);
void bring_in_external_audio (Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t& pos, bool prompt);
void do_import (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
void do_embed (vector<Glib::ustring> paths, bool split, Editing::ImportMode mode, ARDOUR::AudioTrack*, nframes_t&, bool);
- int import_sndfile (Glib::ustring path, Editing::ImportMode mode, ARDOUR::AudioTrack* track, nframes_t& pos);
- int embed_sndfile (Glib::ustring path, bool split, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
+ int import_sndfile (vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::AudioTrack* track, nframes_t& pos);
+ int embed_sndfile (vector<Glib::ustring> paths, bool split, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
ARDOUR::AudioTrack* track, nframes_t& pos, bool prompt);
int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, ARDOUR::AudioTrack* track, nframes_t& pos, Editing::ImportMode mode);
/* to support this ... */
void import_audio (bool as_tracks);
- void do_import (vector<string> paths, bool split, bool as_tracks);
+ void do_import (vector<Glib::ustring> paths, bool split, bool as_tracks);
void move_to_start ();
void move_to_end ();
void edit_cursor_forward ();
void playhead_backward ();
void playhead_forward ();
+ void scroll_playhead (bool forward);
void scroll_backward (float pages=0.8f);
void scroll_forward (float pages=0.8f);
void scroll_tracks_down ();
void clear_markers ();
void clear_ranges ();
void clear_locations ();
+ void unhide_markers ();
+ void unhide_ranges ();
void jump_forward_to_mark ();
void jump_backward_to_mark ();
void cursor_align (bool playhead_to_edit);
Editing::SnapType snap_type;
Editing::SnapMode snap_mode;
+
+ /// Snap threshold in pixels
double snap_threshold;
void handle_gui_changes (const string &, void *);
void fade_out_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void fade_in_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void fade_out_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
+
+ void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
+ void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
+
+ void set_fade_in_active (bool);
+ void set_fade_out_active (bool);
- std::set<ARDOUR::Playlist*> motion_frozen_playlists;
+ std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
void region_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void region_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
+ bool _dragging_playhead;
+
void cursor_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
void cursor_drag_finished_callback (ArdourCanvas::Item*, GdkEvent*);
void marker_drag_motion_callback (ArdourCanvas::Item*, GdkEvent*);
bool canvas_playhead_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
bool canvas_edit_cursor_event (GdkEvent* event, ArdourCanvas::Item*);
- bool track_canvas_event (GdkEvent* event, ArdourCanvas::Item*);
bool track_canvas_scroll (GdkEventScroll* event);
+ bool track_canvas_scroll_event (GdkEventScroll* event);
+ bool track_canvas_button_press_event (GdkEventButton* event);
+ bool track_canvas_button_release_event (GdkEventButton* event);
+ bool track_canvas_motion_notify_event (GdkEventMotion* event);
+
+ Gtk::Allocation canvas_allocation;
+ bool canvas_idle_queued;
void track_canvas_allocate (Gtk::Allocation alloc);
+ bool track_canvas_size_allocated ();
void set_edit_cursor (GdkEvent* event);
void set_playhead_cursor (GdkEvent* event);
/* display control */
bool _show_measures;
+ /// true to show waveforms, otherwise false
bool _show_waveforms;
+ /// true if the editor should follow the playhead, otherwise false
bool _follow_playhead;
+ /// true if waveforms should be shown while recording audio tracks, otherwise false
bool _show_waveforms_recording;
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
void marker_menu_hide ();
void marker_menu_loop_range ();
void marker_menu_select_all_selectables_using_range ();
+ void marker_menu_select_using_range ();
void marker_menu_separate_regions_using_location ();
void marker_menu_play_from ();
+ void marker_menu_play_range ();
void marker_menu_set_playhead ();
void marker_menu_set_from_playhead ();
void marker_menu_set_from_selection ();
void tm_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
void transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
void new_transport_marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
- void build_range_marker_menu ();
- void build_marker_menu ();
+ void build_range_marker_menu (bool loop_or_punch);
+ void build_marker_menu (bool start_or_end);
void build_tm_marker_menu ();
- void build_transport_marker_menu ();
void build_new_transport_marker_menu ();
Gtk::Menu* tm_marker_menu;
Gtk::Menu* marker_menu;
+ Gtk::Menu* start_end_marker_menu;
Gtk::Menu* range_marker_menu;
Gtk::Menu* transport_marker_menu;
Gtk::Menu* new_transport_marker_menu;
void draw_metric_marks (const ARDOUR::Metrics& metrics);
void tempo_map_changed (ARDOUR::Change);
- void redisplay_tempo ();
+ void redisplay_tempo (bool immediate_redraw);
- void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to (nframes_t& first, int32_t direction = 0, bool for_mark = false) {
+ /* XXX remove this function when everything moves to 64 bit frame counts */
+ nframes64_t first64 = first;
+ snap_to (first64, direction, for_mark);
+ first = (nframes_t) first64;
+ }
+
uint32_t bbt_beat_subdivision;
/* toolbar */
void drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
void end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event);
- bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, Selection::Operation op);
+ bool select_all_within (nframes_t start, nframes_t end, gdouble topy, gdouble boty, const TrackViewList&, Selection::Operation op);
ArdourCanvas::SimpleRect *rubberband_rect;
void external_edit_region ();
int write_audio_selection (TimeSelection&);
- bool write_audio_range (ARDOUR::AudioPlaylist&, uint32_t channels, list<ARDOUR::AudioRange>&);
+ bool write_audio_range (ARDOUR::AudioPlaylist&, const ARDOUR::ChanCount& channels, list<ARDOUR::AudioRange>&);
void write_selection ();
UndoAction get_memento() const;
- XMLNode *before; /* used in *_reversible_command */
+ XMLNode *before; /* used in *_reversible_command */
+
void begin_reversible_command (string cmd_name);
void commit_reversible_command ();
static void* _freeze_thread (void*);
void* freeze_thread ();
- void freeze_route ();
- void unfreeze_route ();
+ void freeze_routes ();
+ void unfreeze_routes ();
/* edit-group solo + mute */
void duplicate_dialog (bool for_region);
- /* edit menu */
-
- Gtk::Menu* edit_menu;
- bool edit_menu_map_handler (GdkEventAny*);
-
nframes_t event_frame (GdkEvent*, double* px = 0, double* py = 0);
void time_fx_motion (ArdourCanvas::Item*, GdkEvent*);
/* nudging tracks */
- void nudge_track (bool use_edit_cursor, bool forwards);
+ void nudge_selected_tracks (bool use_edit_cursor, bool forwards);
/* xfades */
bool _xfade_visibility;
- /* <CMT Additions> */
+#ifdef WITH_CMT
void handle_new_imageframe_time_axis_view(const string & track_name, void* src) ;
void handle_new_imageframe_marker_time_axis_view(const string & track_name, TimeAxisView* marked_track) ;
void popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
ImageFrameSocketHandler* image_socket_listener ;
- /* </CMT Additions> */
+#endif
- void toggle_xfade_active (ARDOUR::Crossfade*);
- void toggle_xfade_length (ARDOUR::Crossfade*);
- void edit_xfade (ARDOUR::Crossfade*);
+ void toggle_xfade_active (boost::weak_ptr<ARDOUR::Crossfade>);
+ void toggle_xfade_length (boost::weak_ptr<ARDOUR::Crossfade>);
+ void edit_xfade (boost::weak_ptr<ARDOUR::Crossfade>);
void xfade_edit_left_region ();
void xfade_edit_right_region ();
/* handling cleanup */
- int playlist_deletion_dialog (ARDOUR::Playlist*);
+ int playlist_deletion_dialog (boost::shared_ptr<ARDOUR::Playlist>);
vector<sigc::connection> session_connections;
bool _new_regionviews_show_envelope;
- void toggle_gain_envelope_visibility ();
- void toggle_gain_envelope_active ();
+ void set_gain_envelope_visibility (bool);
+ void set_gain_envelope_active (bool);
+ void reset_region_gain_envelopes ();
+
+ Gtk::CheckMenuItem* region_envelope_visible_item;
+ Gtk::CheckMenuItem* region_envelope_active_item;
+ Gtk::CheckMenuItem* region_mute_item;
+ Gtk::CheckMenuItem* region_lock_item;
+ Gtk::CheckMenuItem* region_opaque_item;
bool on_key_press_event (GdkEventKey*);
void session_state_saved (string);
+
+ Glib::RefPtr<Gtk::Action> undo_action;
+ Glib::RefPtr<Gtk::Action> redo_action;
+
+ void history_changed ();
};
#endif /* __ardour_editor_h__ */