#include "enums.h"
#include "editor_items.h"
#include "region_selection.h"
+#include "selection_memento.h"
namespace Gtkmm2ext {
class TearOff;
class PluginSelector;
class ProgressReporter;
class RhythmFerret;
+class RulerDialog;
class Selection;
class SoundFileOmega;
class StreamView;
double visible_canvas_height () const {
return _visible_canvas_height;
}
+ double trackviews_height () const;
void cycle_snap_mode ();
void next_snap_choice ();
Editing::MidiEditMode current_midi_edit_mode () const;
void remove_midi_note (ArdourCanvas::Item *, GdkEvent *);
- bool internal_editing() const { return _internal_editing ; }
- void set_internal_edit (bool yn);
- bool toggle_internal_editing_from_double_click (GdkEvent*);
+ bool internal_editing() const;
- void _ensure_time_axis_view_is_visible (const TimeAxisView& tav, bool at_top);
void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
void add_to_idle_resize (TimeAxisView*, int32_t);
void maybe_locate_with_edit_preroll (framepos_t);
void play_with_preroll ();
void select_all_in_track (Selection::Operation op);
- void select_all (Selection::Operation op);
+ void select_all_objects (Selection::Operation op);
void invert_selection_in_track ();
void invert_selection ();
void deselect_all ();
void export_range ();
void export_region ();
- void add_toplevel_controls (Gtk::Container&);
+ void add_transport_frame (Gtk::Container&);
+ void add_toplevel_menu (Gtk::Container&);
Gtk::HBox& get_status_bar_packer() { return status_bar_hpacker; }
void set_zoom_focus (Editing::ZoomFocus);
framecnt_t get_current_zoom () const { return samples_per_pixel; }
void cycle_zoom_focus ();
void temporal_zoom_step (bool coarser);
+ 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);
/* nudge is initiated by transport controls owned by ARDOUR_UI */
framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next);
+ framecnt_t get_paste_offset (framepos_t pos, unsigned paste_count, framecnt_t duration);
Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position);
void nudge_forward (bool next, bool force_playhead);
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 ();
void reset_y_origin (double);
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions, bool src_comparison);
+ void get_regionviews_by_id (PBD::ID const & id, RegionSelection & regions) const;
+
void center_screen (framepos_t);
TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) 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, int32_t direction = 0, bool for_mark = false);
- void snap_to_with_modifier (framepos_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
- void snap_to (framepos_t& first, framepos_t& last, int32_t direction = 0, bool for_mark = false);
+ void snap_to (framepos_t& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
+
+ void snap_to_with_modifier (framepos_t& first,
+ GdkEvent const * ev,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
+
+ void snap_to (framepos_t& first,
+ framepos_t& last,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
void begin_reversible_command (std::string cmd_name);
void begin_reversible_command (GQuark);
void metric_get_samples (std::vector<ArdourCanvas::Ruler::Mark>&, gdouble, gdouble, gint);
void metric_get_minsec (std::vector<ArdourCanvas::Ruler::Mark>&, gdouble, gdouble, gint);
+ /* editing operations that need to be public */
+ void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
+ void split_regions_at (framepos_t, RegionSelection&);
+ void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
+ RegionSelection get_regions_from_selection_and_mouse (framepos_t);
+
protected:
void map_transport_state ();
void map_position_change (framepos_t);
void on_realize();
+ void suspend_route_redisplay ();
+ void resume_route_redisplay ();
+
private:
void color_handler ();
Editing::ZoomFocus zoom_focus;
void set_samples_per_pixel (framecnt_t);
- bool clamp_samples_per_pixel (framecnt_t &) const;
Editing::MouseMode mouse_mode;
+ Editing::MouseMode previous_mouse_mode;
Editing::MouseMode pre_internal_mouse_mode;
Editing::SnapType pre_internal_snap_type;
Editing::SnapMode pre_internal_snap_mode;
Editing::SnapType internal_snap_type;
Editing::SnapMode internal_snap_mode;
- bool _internal_editing;
Editing::MouseMode effective_mouse_mode () const;
enum JoinObjectRangeState {
Gtk::VBox scrollers_rulers_markers_box;
void location_changed (ARDOUR::Location *);
- void location_flags_changed (ARDOUR::Location *, void *);
+ void location_flags_changed (ARDOUR::Location *);
void refresh_location_display ();
- void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
+ void refresh_location_display_internal (const ARDOUR::Locations::LocationList&);
void add_new_location (ARDOUR::Location *);
ArdourCanvas::Container* add_new_location_internal (ARDOUR::Location *);
void location_gone (ARDOUR::Location *);
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
void clear_marker_display ();
- void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
void mouse_add_new_range (framepos_t);
bool choose_new_marker_name(std::string &name);
void update_cd_marker_display ();
void parameter_changed (std::string);
void ui_parameter_changed (std::string);
- bool track_canvas_motion (GdkEvent*);
-
Gtk::EventBox time_bars_event_box;
Gtk::VBox time_bars_vbox;
Gtk::Widget * ruler_grabbed_widget;
+ RulerDialog* ruler_dialog;
+
void initialize_rulers ();
void update_just_timecode ();
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
void store_ruler_visibility ();
void restore_ruler_visibility ();
- enum MinsecRulerScale {
+
+
+ enum MinsecRulerScale {
+ minsec_show_msecs,
minsec_show_seconds,
minsec_show_minutes,
minsec_show_hours,
- minsec_show_frames
+ minsec_show_many_hours
};
MinsecRulerScale minsec_ruler_scale;
timecode_show_frames,
timecode_show_seconds,
timecode_show_minutes,
- timecode_show_hours
+ timecode_show_hours,
+ timecode_show_many_hours
};
TimecodeRulerScale timecode_ruler_scale;
void set_samples_ruler_scale (framepos_t, framepos_t);
enum BBTRulerScale {
- bbt_over,
+ bbt_show_many,
bbt_show_64,
bbt_show_16,
bbt_show_4,
std::vector<ARDOUR::framepos_t> region_boundary_cache;
void build_region_boundary_cache ();
+ Gtk::HBox toplevel_hpacker;
+
Gtk::HBox top_hbox;
Gtk::HBox bottom_hbox;
Gtkmm2ext::ActionMap editor_action_map;
Gtkmm2ext::Bindings key_bindings;
+ /* CUT/COPY/PASTE */
+
+ framepos_t last_paste_pos;
+ unsigned paste_count;
+
void cut_copy (Editing::CutCopyOp);
bool can_cut_copy () const;
- void cut_copy_points (Editing::CutCopyOp);
+ void cut_copy_points (Editing::CutCopyOp, Evoral::MusicalTime earliest=Evoral::MusicalTime(), bool midi=false);
void cut_copy_regions (Editing::CutCopyOp, RegionSelection&);
void cut_copy_ranges (Editing::CutCopyOp);
void cut_copy_midi (Editing::CutCopyOp);
void change_region_layering_order (bool from_context_menu);
void lower_region ();
void lower_region_to_bottom ();
- void split_regions_at (framepos_t, RegionSelection&);
void split_region_at_transients ();
- void split_region_at_points (boost::shared_ptr<ARDOUR::Region>, ARDOUR::AnalysisFeatureList&, bool can_ferret, bool select_new = false);
void crop_region_to_selection ();
void crop_region_to (framepos_t start, framepos_t end);
void set_sync_point (framepos_t, const RegionSelection&);
void reset_region_scale_amplitude ();
void adjust_region_gain (bool up);
void quantize_region ();
+ void legatize_region (bool shrink_only);
void insert_patch_change (bool from_context);
void fork_region ();
void play_location (ARDOUR::Location&);
void loop_location (ARDOUR::Location&);
- void temporal_zoom_selection ();
+ 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 zoom_to_region (bool both_axes);
void temporal_zoom_session ();
void temporal_zoom_by_frame (framepos_t start, framepos_t end);
void temporal_zoom_to_frame (bool coarser, framepos_t frame);
- void insert_region_list_drag (boost::shared_ptr<ARDOUR::Region>, int x, int y);
void insert_region_list_selection (float times);
- void insert_route_list_drag (boost::shared_ptr<ARDOUR::Route>, int x, int y);
-
/* import & embed */
void add_external_audio_action (Editing::ImportMode);
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool add_channel_suffix);
int finish_bringing_in_material (boost::shared_ptr<ARDOUR::Region> region, uint32_t, uint32_t, framepos_t& pos, Editing::ImportMode mode,
- boost::shared_ptr<ARDOUR::Track>& existing_track);
+ boost::shared_ptr<ARDOUR::Track>& existing_track, const std::string& new_track_name);
boost::shared_ptr<ARDOUR::AudioTrack> get_nth_selected_audio_track (int nth) const;
boost::shared_ptr<ARDOUR::MidiTrack> get_nth_selected_midi_track (int nth) const;
void jump_forward_to_mark ();
void jump_backward_to_mark ();
void cursor_align (bool playhead_to_edit);
+ void toggle_skip_playback ();
void remove_last_capture ();
void select_all_selectables_using_time_selection ();
void set_punch_from_selection ();
void set_punch_from_region ();
+ void set_session_extents_from_selection ();
+
void set_loop_from_edit_range (bool play);
void set_loop_from_region (bool play);
void set_punch_from_edit_range ();
void set_punch_range (framepos_t start, framepos_t end, std::string cmd);
void add_location_from_playhead_cursor ();
+ void remove_location_at_playhead_cursor ();
bool select_new_marker;
void reverse_selection ();
void escape ();
void lock ();
void unlock ();
+ Gtk::Dialog* lock_dialog;
+
+ struct timeval last_event_time;
+ bool generic_event_handler (GdkEvent*);
+ bool lock_timeout_callback ();
+ void start_lock_event_timing ();
Gtk::Menu fade_context_menu;
void set_fade_in_active (bool);
void set_fade_out_active (bool);
+ void fade_range ();
+
std::set<boost::shared_ptr<ARDOUR::Playlist> > motion_frozen_playlists;
bool _dragging_playhead;
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_zoom_rect_event (GdkEvent* event,ArdourCanvas::Item*);
bool canvas_tempo_marker_event (GdkEvent* event,ArdourCanvas::Item*, TempoMarker*);
bool canvas_meter_marker_event (GdkEvent* event,ArdourCanvas::Item*, MeterMarker*);
bool canvas_automation_track_event(GdkEvent* event, ArdourCanvas::Item*, AutomationTimeAxisView*);
void editor_mixer_button_toggled ();
void editor_list_button_toggled ();
- AudioClock* zoom_range_clock;
-
ArdourButton zoom_in_button;
ArdourButton zoom_out_button;
ArdourButton zoom_out_full_button;
ArdourButton tav_expand_button;
ArdourButton tav_shrink_button;
ArdourDropdown visible_tracks_selector;
+ ArdourDropdown zoom_preset_selector;
int32_t _visible_track_count;
void build_track_count_menu ();
void set_visible_track_count (int32_t);
+
+ void set_zoom_preset(int64_t);
Gtk::VBox toolbar_clock_vbox;
Gtk::VBox toolbar_selection_clock_vbox;
ArdourButton mouse_select_button;
ArdourButton mouse_draw_button;
ArdourButton mouse_move_button;
- ArdourButton mouse_gain_button;
- ArdourButton mouse_zoom_button;
ArdourButton mouse_timefx_button;
+ ArdourButton mouse_content_button;
ArdourButton mouse_audition_button;
+ ArdourButton mouse_cut_button;
ArdourButton smart_mode_button;
Glib::RefPtr<Gtk::ToggleAction> smart_mode_action;
void mouse_mode_object_range_toggled ();
bool ignore_mouse_mode_toggle;
- ArdourButton internal_edit_button;
- void toggle_internal_editing ();
-
bool mouse_select_button_release (GdkEventButton*);
Gtk::VBox automation_box;
void edit_mode_selection_done ( ARDOUR::EditMode m );
void build_edit_mode_menu ();
Gtk::VBox edit_mode_box;
- std::vector<std::string> edit_mode_strings;
void set_edit_mode (ARDOUR::EditMode);
void cycle_edit_mode ();
Selection* selection;
Selection* cut_buffer;
+ SelectionMemento* _selection_memento;
void time_selection_changed ();
void update_time_selection_display ();
void point_selection_changed ();
void marker_selection_changed ();
+ bool _ignore_follow_edits;
+
void cancel_selection ();
void cancel_time_selection ();
ArdourCanvas::Rectangle *rubberband_rect;
- /* mouse zoom process */
-
- ArdourCanvas::Rectangle *zoom_rect;
- void reposition_zoom_rect (framepos_t start, framepos_t end);
-
EditorRouteGroups* _route_groups;
EditorRoutes* _routes;
EditorRegions* _regions;
void write_selection ();
- XMLNode *before; /* used in *_reversible_command */
+ std::list<XMLNode *> before; /* used in *_reversible_command */
void update_title ();
void update_title_s (const std::string & snapshot_name);
bool entered_track_canvas (GdkEventCrossing*);
void set_entered_track (TimeAxisView*);
void set_entered_regionview (RegionView*);
- void ensure_track_visible (TimeAxisView*);
gint left_automation_track ();
void reset_canvas_action_sensitivity (bool);
void edit_point_chosen (Editing::EditPoint);
Glib::RefPtr<Gtk::RadioAction> edit_point_action (Editing::EditPoint);
std::vector<std::string> edit_point_strings;
+ std::vector<std::string> edit_mode_strings;
void selected_marker_moved (ARDOUR::Location*);
void select_next_route ();
void select_prev_route ();
- void snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
- void timecode_snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
+ void snap_to_internal (framepos_t& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
+
+ void timecode_snap_to_internal (framepos_t& first,
+ ARDOUR::RoundMode direction = ARDOUR::RoundNearest,
+ bool for_mark = false);
RhythmFerret* rhythm_ferret;
TimeAxisView* _stepping_axis_view;
void zoom_vertical_modifier_released();
+ void bring_in_callback (Gtk::Label*, uint32_t n, uint32_t total, std::string name);
+ void update_bring_in_message (Gtk::Label* label, uint32_t n, uint32_t total, std::string name);
+ void bring_all_sources_into_session ();
+
friend class Drag;
friend class RegionDrag;
friend class RegionMoveDrag;
friend class RegionSpliceDrag;
+ friend class RegionRippleDrag;
friend class TrimDrag;
friend class MeterMarkerDrag;
friend class TempoMarkerDrag;