#include <set>
#include <string>
#include <sys/time.h>
-#include <bitset>
-
-#include <glibmm/ustring.h>
#include <boost/optional.hpp>
#include <gtkmm/comboboxtext.h>
#include <gtkmm/layout.h>
-#include <gtkmm2ext/selector.h>
-#include <gtkmm2ext/click_box.h>
-#include <gtkmm2ext/dndtreeview.h>
+#include "gtkmm2ext/selector.h"
+#include "gtkmm2ext/click_box.h"
+#include "gtkmm2ext/dndtreeview.h"
+#include "gtkmm2ext/stateful_button.h"
#include "pbd/stateful.h"
#include "pbd/signals.h"
#include "ardour/import_status.h"
#include "ardour/tempo.h"
#include "ardour/location.h"
-#include "ardour/audioregion.h"
-#include "ardour/track.h"
#include "ardour/types.h"
-#include "ardour/route_group.h"
-#include "audio_clock.h"
#include "gtk-custom-ruler.h"
#include "ardour_dialog.h"
#include "public_editor.h"
#include "editor_items.h"
#include "region_selection.h"
#include "canvas.h"
+#include "window_proxy.h"
namespace Gnome { namespace Canvas {
class NoEventText;
namespace Gtkmm2ext {
class TearOff;
+ class Bindings;
}
namespace ARDOUR {
class RouteGroup;
class Playlist;
class AudioPlaylist;
+ class AudioRegion;
class Region;
class Location;
class TempoSection;
class Crossfade;
class ChanCount;
class MidiOperator;
+ class Track;
class MidiTrack;
class AudioTrack;
}
}
class AnalysisWindow;
+class AudioClock;
class AudioRegionView;
class AudioStreamView;
class AudioTimeAxisView;
class ControlPoint;
class CrossfadeView;
class DragManager;
-class GlobalPortMatrixWindow;
class GroupedButtons;
+class GUIObjectState;
class Marker;
class MidiRegionView;
class MixerStrip;
class EditorLocations;
class EditorSnapshots;
class EditorSummary;
+class RegionLayeringOrderEditor;
+class ProgressReporter;
+class EditorCursor;
+class MouseCursors;
+class VerboseCursor;
/* <CMT Additions> */
class ImageFrameView;
class TimeAxisViewItem ;
/* </CMT Additions> */
-struct EditorCursor {
- Editor& editor;
- ArdourCanvas::Points points;
- ArdourCanvas::Line canvas_item;
- nframes64_t current_frame;
- double length;
-
- EditorCursor (Editor&, bool (Editor::*)(GdkEvent*,ArdourCanvas::Item*));
- ~EditorCursor ();
-
- void set_position (nframes64_t);
- void set_length (double units);
- void set_y_axis (double position);
-
- PBD::Signal1<void, nframes64_t> PositionChanged;
-};
-
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
{
public:
void first_idle ();
virtual bool have_idled () const { return _have_idled; }
- nframes64_t leftmost_position() const { return leftmost_frame; }
+ framepos_t leftmost_position() const { return leftmost_frame; }
- nframes64_t current_page_frames() const {
- return (nframes64_t) floor (_canvas_width * frames_per_unit);
+ framecnt_t current_page_frames() const {
+ return (framecnt_t) floor (_canvas_width * frames_per_unit);
}
double canvas_height () const {
void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
void add_to_idle_resize (TimeAxisView*, int32_t);
- RouteTimeAxisView* get_route_view_by_id (PBD::ID& id);
+ RouteTimeAxisView* get_route_view_by_route_id (PBD::ID& id) const;
void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
#ifdef USE_RUBBERBAND
std::vector<std::string> rb_opt_strings;
+ int rb_current_opt;
#endif
/* things that need to be public to be used in the main menubar */
/* undo related */
- nframes64_t unit_to_frame (double unit) const {
- return (nframes64_t) rint (unit * frames_per_unit);
+ framepos_t unit_to_frame (double unit) const {
+ return (framepos_t) rint (unit * frames_per_unit);
}
- double frame_to_unit (nframes64_t frame) const {
+ double frame_to_unit (framepos_t frame) const {
return rint ((double) frame / (double) frames_per_unit);
}
xscroll_adjustment.
*/
- nframes64_t pixel_to_frame (double pixel) const {
+ framepos_t pixel_to_frame (double pixel) const {
/* pixel can be less than zero when motion events
are processed. since we've already run the world->canvas
*/
if (pixel >= 0) {
- return (nframes64_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
+ return (framepos_t) rint (pixel * frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit);
} else {
return 0;
}
}
- gulong frame_to_pixel (nframes64_t frame) const {
+ gulong frame_to_pixel (framepos_t frame) const {
return (gulong) rint ((frame / (frames_per_unit * GNOME_CANVAS(track_canvas->gobj())->pixels_per_unit)));
}
/* export */
void export_audio ();
+ void stem_export ();
void export_selection ();
void export_range ();
void export_region ();
void create_editor_mixer ();
void show_editor_list (bool yn);
void set_selected_mixer_strip (TimeAxisView&);
- void hide_track_in_display (TimeAxisView* tv, bool temporary = false);
+ void mixer_strip_width_changed ();
+ void hide_track_in_display (TimeAxisView* tv, bool apply_to_selection = false);
/* nudge is initiated by transport controls owned by ARDOUR_UI */
- nframes64_t get_nudge_distance (nframes64_t pos, nframes64_t& next);
- Evoral::MusicalTime get_grid_type_as_beats (bool& success, nframes64_t position);
+ framecnt_t get_nudge_distance (framepos_t pos, framecnt_t& next);
+ Evoral::MusicalTime get_grid_type_as_beats (bool& success, framepos_t position);
void nudge_forward (bool next, bool force_playhead);
void nudge_backward (bool next, bool force_playhead);
/* playhead/screen stuff */
- void set_stationary_playhead (bool yn);
- void toggle_stationary_playhead ();
- bool stationary_playhead() const { return _stationary_playhead; }
-
- void set_follow_playhead (bool yn);
+ void set_stationary_playhead (bool yn);
+ void toggle_stationary_playhead ();
+ bool stationary_playhead() const { return _stationary_playhead; }
+
+ void set_follow_playhead (bool yn, bool catch_up = true);
void toggle_follow_playhead ();
bool follow_playhead() const { return _follow_playhead; }
bool dragging_playhead () const { return _dragging_playhead; }
void toggle_measure_visibility ();
void toggle_logo_visibility ();
- double get_physical_screen_width () const { return physical_screen_width; };
- double physical_screen_width;
- double physical_screen_height;
-
/* fades/xfades */
- void toggle_selected_region_fades (int dir);
+ void toggle_region_fades (int dir);
void update_region_fade_visibility ();
bool xfade_visibility() const { return _xfade_visibility; }
void update_xfade_visibility ();
void show_window ();
+ void ensure_time_axis_view_is_visible (const TimeAxisView& tav);
void scroll_tracks_down_line ();
void scroll_tracks_up_line ();
void maximise_editing_space();
void restore_editing_space();
- void reset_x_origin (nframes64_t);
+ void reset_x_origin (framepos_t);
void reset_x_origin_to_follow_playhead ();
void reset_y_origin (double);
void reset_zoom (double);
- void reposition_and_zoom (nframes64_t, double);
+ void reposition_and_zoom (framepos_t, double);
- nframes64_t get_preferred_edit_position (bool ignore_playhead = false);
+ framepos_t get_preferred_edit_position (bool ignore_playhead = false);
bool update_mouse_speed ();
bool decelerate_mouse_speed ();
void toggle_meter_updating();
void show_rhythm_ferret();
- void show_global_port_matrix (ARDOUR::DataType);
void goto_visual_state (uint32_t);
void save_visual_state (uint32_t);
int get_regionview_count_from_region_list (boost::shared_ptr<ARDOUR::Region>);
- void do_import (std::vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&);
- void do_embed (std::vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&);
+ void do_import (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, framepos_t&);
+ void do_embed (std::vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, framepos_t&);
void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions);
- void show_verbose_canvas_cursor_with (const std::string& txt);
- void hide_verbose_canvas_cursor();
-
- void center_screen (nframes64_t);
+ 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 (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
- void snap_to_with_modifier (nframes64_t& first, GdkEvent const *, int32_t direction = 0, bool for_mark = false);
- void snap_to (nframes64_t& first, nframes64_t& last, int32_t direction = 0, bool for_mark = false);
+ 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 begin_reversible_command (std::string cmd_name);
+ void begin_reversible_command (GQuark);
void commit_reversible_command ();
DragManager* drags () const {
}
void maybe_autoscroll (bool, bool);
-
- /* handy cursors for everyone to use */
-
- static Gdk::Cursor* cross_hair_cursor;
- static Gdk::Cursor* trimmer_cursor;
- static Gdk::Cursor* right_side_trim_cursor;
- static Gdk::Cursor* left_side_trim_cursor;
- static Gdk::Cursor* fade_in_cursor;
- static Gdk::Cursor* fade_out_cursor;
- static Gdk::Cursor* selector_cursor;
- static Gdk::Cursor* grabber_cursor;
- static Gdk::Cursor* grabber_note_cursor;
- static Gdk::Cursor* grabber_edit_point_cursor;
- static Gdk::Cursor* zoom_cursor;
- static Gdk::Cursor* time_fx_cursor;
- static Gdk::Cursor* fader_cursor;
- static Gdk::Cursor* speaker_cursor;
- static Gdk::Cursor* midi_pencil_cursor;
- static Gdk::Cursor* midi_select_cursor;
- static Gdk::Cursor* midi_resize_cursor;
- static Gdk::Cursor* midi_erase_cursor;
- static Gdk::Cursor* wait_cursor;
- static Gdk::Cursor* timebar_cursor;
- static Gdk::Cursor* transparent_cursor;
+
+ Gdk::Cursor* get_canvas_cursor () const { return current_canvas_cursor; }
+ void set_canvas_cursor (Gdk::Cursor*, bool save=false);
+ void set_current_trimmable (boost::shared_ptr<ARDOUR::Trimmable>);
+ void set_current_movable (boost::shared_ptr<ARDOUR::Movable>);
+
+ MouseCursors const * cursors () const {
+ return _cursors;
+ }
+
+ VerboseCursor* verbose_cursor () const {
+ return _verbose_cursor;
+ }
+
+ void get_pointer_position (double &, double &) const;
protected:
void map_transport_state ();
- void map_position_change (nframes64_t);
+ void map_position_change (framepos_t);
void on_realize();
bool constructed;
// to keep track of the playhead position for control_scroll
- boost::optional<nframes64_t> _control_scroll_target;
+ boost::optional<framepos_t> _control_scroll_target;
PlaylistSelector* _playlist_selector;
typedef std::pair<TimeAxisView*,XMLNode*> TAVState;
struct VisualState {
+ VisualState();
+ ~VisualState ();
double y_position;
double frames_per_unit;
- nframes64_t leftmost_frame;
+ framepos_t leftmost_frame;
Editing::ZoomFocus zoom_focus;
- std::list<TAVState> track_states;
+ GUIObjectState* gui_state;
};
std::list<VisualState*> undo_visual_stack;
void cancel_visual_state_op (uint32_t n);
bool end_visual_state_op (uint32_t n);
- nframes64_t leftmost_frame;
+ framepos_t leftmost_frame;
double frames_per_unit;
Editing::ZoomFocus zoom_focus;
void post_zoom ();
Editing::MouseMode mouse_mode;
+ Editing::MouseMode pre_internal_mouse_mode;
bool _internal_editing;
Editing::MouseMode effective_mouse_mode () const;
int pre_maximal_editor_height;
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
- Gtk::Notebook the_notebook;
+ 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;
+ bool idle_reset_vertical_pane_position (int);
+
Gtk::EventBox meter_base;
Gtk::HBox meter_box;
Gtk::EventBox marker_base;
void location_changed (ARDOUR::Location *);
void location_flags_changed (ARDOUR::Location *, void *);
void refresh_location_display ();
- void refresh_location_display_s (const PBD::PropertyChange&);
void refresh_location_display_internal (ARDOUR::Locations::LocationList&);
void add_new_location (ARDOUR::Location *);
+ ArdourCanvas::Group* add_new_location_internal (ARDOUR::Location *);
void location_gone (ARDOUR::Location *);
void remove_marker (ArdourCanvas::Item&, GdkEvent*);
gint really_remove_marker (ARDOUR::Location* loc);
void goto_nth_marker (int nth);
+ void toggle_marker_lines ();
+ void set_marker_line_visibility (bool);
uint32_t location_marker_color;
uint32_t location_range_color;
uint32_t location_cd_marker_color;
struct LocationMarkers {
- Marker* start;
- Marker* end;
- bool valid;
+ Marker* start;
+ Marker* end;
+ bool valid;
- LocationMarkers () : start(0), end(0), valid (true) {}
+ LocationMarkers () : start(0), end(0), valid (true) {}
- ~LocationMarkers ();
+ ~LocationMarkers ();
- void hide();
- void show ();
- void set_name (const std::string&);
- void set_position (nframes64_t start, nframes64_t end = 0);
- void set_color_rgba (uint32_t);
+ void hide ();
+ void show ();
+
+ void set_show_lines (bool);
+ void set_selected (bool);
+ void canvas_height_set (double);
+ void setup_lines ();
+
+ void set_name (const std::string&);
+ void set_position (framepos_t start, framepos_t end = 0);
+ void set_color_rgba (uint32_t);
};
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;
+ bool _show_marker_lines;
typedef std::map<ARDOUR::Location*,LocationMarkers *> LocationMarkerMap;
LocationMarkerMap location_markers;
+ void update_marker_labels ();
+ void update_marker_labels (ArdourCanvas::Group *);
+ void check_marker_label (Marker *);
+
+ /** 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
+ * are kept sorted in time order between marker movements, so that after
+ * a marker has moved we can decide whether we need to update the labels
+ * for all markers or for just a few.
+ */
+ std::map<ArdourCanvas::Group *, std::list<Marker *> > _sorted_marker_lists;
+ void remove_sorted_marker (Marker *);
+
void hide_marker (ArdourCanvas::Item*, GdkEvent*);
void clear_marker_display ();
- void mouse_add_new_marker (nframes64_t where, bool is_cd=false, bool is_xrun=false);
+ void mouse_add_new_marker (framepos_t where, bool is_cd=false, bool is_xrun=false);
bool choose_new_marker_name(std::string &name);
void update_cd_marker_display ();
void ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
void set_selected_track (TimeAxisView&, Selection::Operation op = Selection::Set, bool no_remove=false);
void select_all_tracks ();
+ void select_all_internal_edit (Selection::Operation);
bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=false);
- void set_selected_track_as_side_effect (bool force = false);
+ void set_selected_track_as_side_effect (Selection::Operation op, bool force = false);
bool set_selected_regionview_from_click (bool press, Selection::Operation op = Selection::Set, bool no_track_remove=false);
bool set_selected_regionview_from_map_event (GdkEventAny*, StreamView*, boost::weak_ptr<ARDOUR::Region>);
Gtk::Menu * track_edit_playlist_submenu;
Gtk::Menu * track_selection_edit_playlist_submenu;
- void popup_track_context_menu (int, int, ItemType, bool, nframes64_t);
- Gtk::Menu* build_track_context_menu (nframes64_t);
- Gtk::Menu* build_track_bus_context_menu (nframes64_t);
- Gtk::Menu* build_track_region_context_menu (nframes64_t frame);
- Gtk::Menu* build_track_crossfade_context_menu (nframes64_t);
- Gtk::Menu* build_track_selection_context_menu (nframes64_t);
+ void popup_track_context_menu (int, int, ItemType, bool);
+ Gtk::Menu* build_track_context_menu ();
+ Gtk::Menu* build_track_bus_context_menu ();
+ Gtk::Menu* build_track_region_context_menu ();
+ Gtk::Menu* build_track_crossfade_context_menu ();
+ Gtk::Menu* build_track_selection_context_menu ();
void add_dstream_context_items (Gtk::Menu_Helpers::MenuList&);
void add_bus_context_items (Gtk::Menu_Helpers::MenuList&);
- void add_region_context_items (StreamView*, std::list<boost::shared_ptr<ARDOUR::Region> >, Gtk::Menu_Helpers::MenuList&);
+ void add_region_context_items (Gtk::Menu_Helpers::MenuList&, boost::shared_ptr<ARDOUR::Track>);
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&);
+ Gtk::MenuItem* _popup_region_menu_item;
+
+ void popup_control_point_context_menu (ArdourCanvas::Item *, GdkEvent *);
+ Gtk::Menu _control_point_context_menu;
void handle_new_route (ARDOUR::RouteList&);
void timeaxisview_deleted (TimeAxisView *);
Gtk::VBox vpacker;
Gdk::Cursor* current_canvas_cursor;
- void set_canvas_cursor ();
Gdk::Cursor* which_grabber_cursor ();
+ void set_canvas_cursor ();
ArdourCanvas::Canvas* track_canvas;
- ArdourCanvas::NoEventText* verbose_canvas_cursor;
- bool verbose_cursor_visible;
+ friend class VerboseCursor;
+ VerboseCursor* _verbose_cursor;
void parameter_changed (std::string);
bool track_canvas_motion (GdkEvent*);
- void set_verbose_canvas_cursor (const std::string &, double x, double y);
- void set_verbose_canvas_cursor_text (const std::string &);
- void show_verbose_canvas_cursor();
-
- 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;
enum RulerType {
ruler_metric_timecode = 0,
ruler_metric_bbt = 1,
- ruler_metric_frames = 2,
+ ruler_metric_samples = 2,
ruler_metric_minsec = 3,
ruler_time_tempo = 4,
Glib::RefPtr<Gtk::ToggleAction> ruler_cd_marker_action;
bool no_ruler_shown_update;
- gint ruler_button_press (GdkEventButton*);
- gint ruler_button_release (GdkEventButton*);
- gint ruler_mouse_motion (GdkEventMotion*);
+ bool ruler_button_press (GdkEventButton*);
+ bool ruler_button_release (GdkEventButton*);
+ bool ruler_mouse_motion (GdkEventMotion*);
bool ruler_scroll (GdkEventScroll* event);
Gtk::Widget * ruler_grabbed_widget;
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
void update_fixed_rulers ();
void update_tempo_based_rulers ();
- void popup_ruler_menu (nframes64_t where = 0, ItemType type = RegionItem);
+ void popup_ruler_menu (framepos_t where = 0, ItemType type = RegionItem);
void update_ruler_visibility ();
void set_ruler_visible (RulerType, bool);
void toggle_ruler_visibility (RulerType rt);
void ruler_toggled (int);
- gint ruler_label_button_release (GdkEventButton*);
+ bool ruler_label_button_release (GdkEventButton*);
void store_ruler_visibility ();
void restore_ruler_visibility ();
static gint _metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
- static gint _metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
+ static gint _metric_get_samples (GtkCustomRulerMark **, gdouble, gdouble, gint);
static gint _metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
enum MinsecRulerScale {
MinsecRulerScale minsec_ruler_scale;
- nframes_t minsec_mark_interval;
+ framecnt_t minsec_mark_interval;
gint minsec_mark_modulo;
gint minsec_nmarks;
- void set_minsec_ruler_scale (gdouble lower, gdouble upper);
+ void set_minsec_ruler_scale (framepos_t, framepos_t);
enum TimecodeRulerScale {
timecode_show_bits,
TimecodeRulerScale timecode_ruler_scale;
- nframes_t timecode_mark_interval;
gint timecode_mark_modulo;
gint timecode_nmarks;
- void set_timecode_ruler_scale (gdouble lower, gdouble upper);
+ void set_timecode_ruler_scale (framepos_t, framepos_t);
+
+ framecnt_t _samples_ruler_interval;
+ void set_samples_ruler_scale (framepos_t, framepos_t);
enum BBTRulerScale {
bbt_over,
BBTRulerScale bbt_ruler_scale;
- uint32_t bbt_bars;
+ uint32_t bbt_bars;
gint bbt_nmarks;
uint32_t bbt_bar_helper_on;
uint32_t bbt_accent_modulo;
- void compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper);
+ void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper);
gint metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
- gint metric_get_frames (GtkCustomRulerMark **, gdouble, gdouble, gint);
+ gint metric_get_samples (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_minsec (GtkCustomRulerMark **, gdouble, gdouble, gint);
Gtk::Widget *_ruler_separator;
GtkWidget *_timecode_ruler;
GtkWidget *_bbt_ruler;
- GtkWidget *_frames_ruler;
+ GtkWidget *_samples_ruler;
GtkWidget *_minsec_ruler;
Gtk::Widget *timecode_ruler;
Gtk::Widget *bbt_ruler;
- Gtk::Widget *frames_ruler;
+ Gtk::Widget *samples_ruler;
Gtk::Widget *minsec_ruler;
static Editor *ruler_editor;
Gtk::Label minsec_label;
Gtk::Label bbt_label;
Gtk::Label timecode_label;
- Gtk::Label frame_label;
+ Gtk::Label samples_label;
Gtk::Label tempo_label;
Gtk::Label meter_label;
Gtk::Label mark_label;
EditorCursor* playhead_cursor;
ArdourCanvas::Group* cursor_group;
- nframes64_t get_region_boundary (nframes64_t pos, int32_t dir, bool with_selection, bool only_onscreen);
+ framepos_t get_region_boundary (framepos_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 select_range_between ();
boost::shared_ptr<ARDOUR::Region> find_next_region (ARDOUR::framepos_t, ARDOUR::RegionPoint, int32_t dir, TrackViewList&, TimeAxisView ** = 0);
- ARDOUR::framepos_t find_next_region_boundary (ARDOUR::framepos_t, int32_t dir, const TrackViewList&);
+ ARDOUR::framepos_t find_next_region_boundary (ARDOUR::framepos_t, int32_t dir, const TrackViewList&);
std::vector<ARDOUR::framepos_t> region_boundary_cache;
void build_region_boundary_cache ();
Gtk::Layout controls_layout;
bool control_layout_scroll (GdkEventScroll* ev);
- void controls_layout_size_request (Gtk::Requisition*);
- sigc::connection controls_layout_size_request_connection;
+ void reset_controls_layout_width ();
+ void reset_controls_layout_height (int32_t height);
+
+ enum Direction {
+ LEFT,
+ RIGHT,
+ UP,
+ DOWN
+ };
- bool horizontal_scroll_left_press ();
- void horizontal_scroll_left_release ();
- bool horizontal_scroll_right_press ();
- void horizontal_scroll_right_release ();
+ bool scroll_press (Direction);
+ void scroll_release ();
sigc::connection _scroll_connection;
int _scroll_callbacks;
bool track_canvas_map_handler (GdkEventAny*);
- gint edit_controls_button_release (GdkEventButton*);
+ bool edit_controls_button_release (GdkEventButton*);
Gtk::Menu *edit_controls_left_menu;
Gtk::Menu *edit_controls_right_menu;
Gtk::HBox edit_controls_hbox;
void control_scroll (float);
+ void control_select (uint32_t rid);
void access_action (std::string,std::string);
- bool deferred_control_scroll (nframes64_t);
+ bool deferred_control_scroll (framepos_t);
sigc::connection control_scroll_connection;
gdouble get_trackview_group_vertical_offset () const { return vertical_adjustment.get_value () - canvas_timebars_vsize;}
};
Type pending;
- nframes64_t time_origin;
+ framepos_t time_origin;
double frames_per_unit;
double y_origin;
static int _idle_visual_changer (void *arg);
int idle_visual_changer ();
- void queue_visual_change (nframes64_t);
+ void queue_visual_change (framepos_t);
void queue_visual_change (double);
void queue_visual_change_y (double);
void ensure_visual_change_idle_handler ();
TrackViewList get_tracks_for_range_action () const;
- static void build_cursors ();
-
sigc::connection super_rapid_screen_update_connection;
- nframes64_t last_update_frame;
- void center_screen_internal (nframes64_t, float);
+ framepos_t last_update_frame;
+ void center_screen_internal (framepos_t, float);
void super_rapid_screen_update ();
void session_going_away ();
- nframes64_t cut_buffer_start;
- nframes64_t cut_buffer_length;
+ framepos_t cut_buffer_start;
+ framecnt_t cut_buffer_length;
+
+ Gdk::Cursor* pre_press_cursor;
+ boost::weak_ptr<ARDOUR::Trimmable> _trimmable;
+ boost::weak_ptr<ARDOUR::Movable> _movable;
bool typed_event (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool button_press_handler_1 (ArdourCanvas::Item *, GdkEvent *, ItemType);
bool button_press_handler_2 (ArdourCanvas::Item *, GdkEvent *, ItemType);
bool button_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
+ bool button_press_dispatch (GdkEventButton*);
+ bool button_release_dispatch (GdkEventButton*);
bool motion_handler (ArdourCanvas::Item*, GdkEvent*, bool from_autoscroll = false);
bool enter_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
bool leave_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
+ bool key_press_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
+ bool key_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
+
+ Gtkmm2ext::Bindings* button_bindings;
+ XMLNode* button_settings () const;
/* KEYMAP HANDLING */
void register_actions ();
+ void register_region_actions ();
- int ensure_cursor (nframes64_t* pos);
+ int ensure_cursor (framepos_t* pos);
void cut_copy (Editing::CutCopyOp);
bool can_cut_copy () const;
void cut_copy_midi (Editing::CutCopyOp);
void mouse_paste ();
- void paste_internal (nframes64_t position, float times);
+ void paste_internal (framepos_t position, float times);
/* EDITING OPERATIONS */
void reset_point_selection ();
- void toggle_region_mute ();
void toggle_region_lock ();
- void toggle_region_opaque ();
+ void toggle_opaque_region ();
void toggle_record_enable ();
+ void toggle_solo ();
+ void toggle_solo_isolate ();
+ void toggle_mute ();
void toggle_region_lock_style ();
void raise_region ();
void raise_region_to_top ();
+ void change_region_layering_order ();
void lower_region ();
void lower_region_to_bottom ();
- void split_regions_at (nframes64_t, RegionSelection&);
+ 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);
+ 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 (nframes64_t start, nframes64_t end);
- void set_sync_point (nframes64_t, const RegionSelection&);
- void set_region_sync_from_edit_point ();
+ void crop_region_to (framepos_t start, framepos_t end);
+ void set_sync_point (framepos_t, const RegionSelection&);
+ void set_region_sync_position ();
void remove_region_sync();
- void align_selection (ARDOUR::RegionPoint, nframes64_t position, const RegionSelection&);
- void align_selection_relative (ARDOUR::RegionPoint point, nframes64_t position, const RegionSelection&);
- void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
- void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, nframes64_t position);
+ void align_regions (ARDOUR::RegionPoint);
+ void align_regions_relative (ARDOUR::RegionPoint point);
+ void align_region (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, framepos_t position);
+ void align_region_internal (boost::shared_ptr<ARDOUR::Region>, ARDOUR::RegionPoint point, framepos_t position);
void remove_selected_regions ();
void remove_clicked_region ();
- void edit_region ();
+ void show_region_properties ();
void show_midi_list_editor ();
void rename_region ();
void duplicate_some_regions (RegionSelection&, float times);
void duplicate_selection (float times);
void region_fill_selection ();
+ void combine_regions ();
+ void uncombine_regions ();
void region_fill_track ();
void audition_playlist_region_standalone (boost::shared_ptr<ARDOUR::Region>);
void reverse_region ();
void strip_region_silence ();
void normalize_region ();
- double _last_normalization_value;
void reset_region_scale_amplitude ();
- void adjust_region_scale_amplitude (bool up);
+ void adjust_region_gain (bool up);
void quantize_region ();
+ void insert_patch_change ();
void fork_region ();
void do_insert_time ();
- void insert_time (nframes64_t, nframes64_t, Editing::InsertTimeOption, bool, bool, bool, bool, bool);
+ void insert_time (framepos_t, framecnt_t, Editing::InsertTimeOption, bool, bool, bool, bool, bool, bool);
void tab_to_transient (bool forward);
- void use_region_as_bar ();
+ void set_tempo_from_region ();
void use_range_as_bar ();
- void define_one_bar (nframes64_t start, nframes64_t end);
+ void define_one_bar (framepos_t start, framepos_t end);
void audition_region_from_region_list ();
void hide_region_from_region_list ();
void show_region_in_region_list ();
- void align (ARDOUR::RegionPoint);
- void align_relative (ARDOUR::RegionPoint);
- void naturalize ();
+ void naturalize_region ();
void reset_focus ();
- void split ();
+ void split_region ();
+ void delete_ ();
void cut ();
void copy ();
void paste (float times);
-
+
void place_transient ();
void remove_transient (ArdourCanvas::Item* item);
void snap_regions_to_grid ();
void close_region_gaps ();
- int get_prefix (float&, bool&);
-
void keyboard_paste ();
- void keyboard_insert_region_list_selection ();
void region_from_selection ();
void create_region_from_selection (std::vector<boost::shared_ptr<ARDOUR::Region> >&);
void play_from_edit_point_and_return ();
void play_selected_region ();
void play_edit_range ();
- void loop_selected_region ();
void play_location (ARDOUR::Location&);
void loop_location (ARDOUR::Location&);
void zoom_to_region (bool both_axes);
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
- void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const std::string & op);
- void temporal_zoom_to_frame (bool coarser, nframes64_t frame);
-
- void amplitude_zoom (gdouble scale);
- void amplitude_zoom_step (bool in);
+ void temporal_zoom_by_frame (framepos_t start, framepos_t end, const std::string & op);
+ 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 session_import_dialog ();
int check_whether_and_how_to_import(std::string, bool all_or_nothing = true);
- bool check_multichannel_status (const std::vector<Glib::ustring>& paths);
+ bool check_multichannel_status (const std::vector<std::string>& paths);
SoundFileOmega* sfbrowser;
- void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos);
+ void bring_in_external_audio (Editing::ImportMode mode, framepos_t& pos);
- bool idle_drop_paths (std::vector<Glib::ustring> paths, nframes64_t frame, double ypos);
- void drop_paths_part_two (const std::vector<Glib::ustring>& paths, nframes64_t frame, double ypos);
+ bool idle_drop_paths (std::vector<std::string> paths, framepos_t frame, double ypos);
+ void drop_paths_part_two (const std::vector<std::string>& paths, framepos_t frame, double ypos);
- int import_sndfiles (std::vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos,
+ int import_sndfiles (std::vector<std::string> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, framepos_t& pos,
int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&, bool);
- int embed_sndfiles (std::vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
- nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
+ int embed_sndfiles (std::vector<std::string> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode,
+ framepos_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::Track>&);
- int add_sources (std::vector<Glib::ustring> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode,
+ int add_sources (std::vector<std::string> paths, ARDOUR::SourceList& sources, framepos_t& pos, 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, nframes64_t& pos, Editing::ImportMode mode,
+ 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::AudioTrack> get_nth_selected_audio_track (int nth) const;
struct EditorImportStatus : public ARDOUR::ImportStatus {
Editing::ImportMode mode;
- nframes64_t pos;
+ framepos_t pos;
int target_tracks;
int target_regions;
boost::shared_ptr<ARDOUR::Track> track;
/* to support this ... */
void import_audio (bool as_tracks);
- void do_import (std::vector<Glib::ustring> paths, bool split, bool as_tracks);
+ void do_import (std::vector<std::string> paths, bool split, bool as_tracks);
void move_to_start ();
void move_to_end ();
- void goto_frame ();
void center_playhead ();
void center_edit_point ();
- void edit_cursor_backward ();
- void edit_cursor_forward ();
void playhead_forward_to_grid ();
void playhead_backward_to_grid ();
- 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 scroll_tracks_up ();
- void delete_sample_forward ();
- void delete_sample_backward ();
- void delete_screen ();
- void search_backwards ();
- void search_forwards ();
void set_mark ();
void clear_markers ();
void clear_ranges ();
void set_selection_from_loop ();
void set_selection_from_region ();
- void add_location_mark (nframes64_t where);
- void add_location_from_audio_region ();
- void add_locations_from_audio_region ();
+ void add_location_mark (framepos_t where);
+ void add_location_from_region ();
+ void add_locations_from_region ();
void add_location_from_selection ();
void set_loop_from_selection (bool play);
void set_punch_from_selection ();
void set_loop_from_region (bool play);
void set_punch_from_edit_range ();
- void set_loop_range (nframes64_t start, nframes64_t end, std::string cmd);
- void set_punch_range (nframes64_t start, nframes64_t end, std::string cmd);
+ 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 add_location_from_playhead_cursor ();
bool select_new_marker;
int scrubbing_direction;
int scrub_reversals;
int scrub_reverse_distance;
- void scrub (nframes64_t, double);
+ void scrub (framepos_t, double);
void keyboard_selection_begin ();
void keyboard_selection_finish (bool add);
bool have_pending_keyboard_selection;
- nframes64_t pending_keyboard_selection_start;
+ framepos_t pending_keyboard_selection_start;
- boost::shared_ptr<ARDOUR::Region> select_region_for_operation (int dir, TimeAxisView **tv);
- void extend_selection_to_end_of_region (bool next);
- void extend_selection_to_start_of_region (bool previous);
+ void move_range_selection_start_or_end_to_region_boundary (bool, bool);
Editing::SnapType _snap_type;
Editing::SnapMode _snap_mode;
Gtk::Menu fade_context_menu;
void popup_fade_context_menu (int, int, ArdourCanvas::Item*, ItemType);
- void set_fade_in_shape (ARDOUR::AudioRegion::FadeShape);
- void set_fade_out_shape (ARDOUR::AudioRegion::FadeShape);
+ void set_fade_in_shape (ARDOUR::FadeShape);
+ void set_fade_out_shape (ARDOUR::FadeShape);
void set_fade_length (bool in);
- void toggle_fade_active (bool in);
void set_fade_in_active (bool);
void set_fade_out_active (bool);
void region_view_item_click (AudioRegionView&, GdkEventButton*);
- void remove_gain_control_point (ArdourCanvas::Item*, GdkEvent*);
- void remove_control_point (ArdourCanvas::Item*, GdkEvent*);
+ bool can_remove_control_point (ArdourCanvas::Item *);
+ void remove_control_point (ArdourCanvas::Item *);
- void mouse_brush_insert_region (RegionView*, nframes64_t pos);
- void brush (nframes64_t);
-
- void show_verbose_time_cursor (nframes64_t frame, double offset = 0, double xpos=-1, double ypos=-1);
- void show_verbose_duration_cursor (nframes64_t start, nframes64_t end, double offset = 0, double xpos=-1, double ypos=-1);
- double clamp_verbose_cursor_x (double);
- double clamp_verbose_cursor_y (double);
+ void mouse_brush_insert_region (RegionView*, framepos_t pos);
/* Canvas event handlers */
bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_out_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
-
-
- // These variables are used to detect a feedback loop and break it to avoid a gui hang
-private:
- ArdourCanvas::Item *last_item_entered;
- int last_item_entered_n;
-
-public:
bool canvas_region_view_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
bool canvas_frame_handle_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
bool canvas_region_view_name_highlight_event (GdkEvent* event,ArdourCanvas::Item*, RegionView*);
bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
+ PBD::Signal0<void> EditorFreeze;
+ PBD::Signal0<void> EditorThaw;
+
private:
- friend class DragManager;
- friend class EditorRouteGroups;
- friend class EditorRegions;
+ friend class DragManager;
+ friend class EditorRouteGroups;
+ friend class EditorRegions;
+
+ ArdourCanvas::Item *last_item_entered;
+ /** true if the mouse is over a place where region trim can happen */
+ bool _over_region_trim_target;
/* non-public event handlers */
void track_canvas_allocate (Gtk::Allocation alloc);
bool track_canvas_size_allocated ();
bool track_canvas_drag_motion (Glib::RefPtr<Gdk::DragContext> const &, int, int, guint);
+ bool track_canvas_key_press (GdkEventKey *);
+ bool track_canvas_key_release (GdkEventKey *);
void set_playhead_cursor ();
- void kbd_driver (sigc::slot<void,GdkEvent*>, bool use_track_canvas = true, bool use_time_canvas = true, bool can_select = true);
- void kbd_mute_unmute_region ();
- void kbd_brush ();
-
- void kbd_do_brush (GdkEvent*);
- void kbd_do_audition (GdkEvent*);
+ void toggle_region_mute ();
void initialize_canvas ();
bool _show_measures;
/// true if the editor should follow the playhead, otherwise false
bool _follow_playhead;
- /// true if we scroll the tracks rather than the playhead
- bool _stationary_playhead;
+ /// true if we scroll the tracks rather than the playhead
+ bool _stationary_playhead;
ARDOUR::TempoMap::BBTPointList *current_bbt_points;
void new_tempo_section ();
- void mouse_add_new_tempo_event (nframes64_t where);
- void mouse_add_new_meter_event (nframes64_t where);
+ void mouse_add_new_tempo_event (framepos_t where);
+ void mouse_add_new_meter_event (framepos_t where);
void remove_tempo_marker (ArdourCanvas::Item*);
void remove_meter_marker (ArdourCanvas::Item*);
void edit_tempo_marker (ArdourCanvas::Item*);
void edit_meter_marker (ArdourCanvas::Item*);
void edit_control_point (ArdourCanvas::Item*);
+ void edit_note (ArdourCanvas::Item *);
void marker_menu_edit ();
void marker_menu_remove ();
void new_transport_marker_menu_set_punch ();
void update_loop_range_view (bool visibility=false);
void update_punch_range_view (bool visibility=false);
- void new_transport_marker_menu_popdown ();
+ void new_transport_marker_menu_popdown ();
void marker_context_menu (GdkEventButton*, ArdourCanvas::Item*);
void tempo_or_meter_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 (bool loop_or_punch);
- void build_marker_menu (bool, ARDOUR::Location *);
+ void build_range_marker_menu (bool, bool);
+ void build_marker_menu (ARDOUR::Location *);
void build_tempo_or_meter_marker_menu (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* marker_menu;
- Gtk::Menu* session_range_marker_menu;
Gtk::Menu* range_marker_menu;
Gtk::Menu* transport_marker_menu;
Gtk::Menu* new_transport_marker_menu;
void remove_metric_marks ();
void draw_metric_marks (const ARDOUR::Metrics& metrics);
- void compute_current_bbt_points (nframes_t left, nframes_t right);
+ void compute_current_bbt_points (framepos_t left, framepos_t right);
void tempo_map_changed (const PBD::PropertyChange&);
void redisplay_tempo (bool immediate_redraw);
void editor_mixer_button_toggled ();
void editor_list_button_toggled ();
- AudioClock zoom_range_clock;
+ AudioClock* zoom_range_clock;
Gtk::Button zoom_in_button;
Gtk::Button zoom_out_button;
Gtk::Button zoom_out_full_button;
Gtk::Label toolbar_selection_cursor_label;
Gtkmm2ext::TearOff* _mouse_mode_tearoff;
- Gtk::ToggleButton mouse_select_button;
- Gtk::ToggleButton mouse_move_button;
- Gtk::ToggleButton mouse_gain_button;
- Gtk::ToggleButton mouse_zoom_button;
- Gtk::ToggleButton mouse_timefx_button;
- Gtk::ToggleButton mouse_audition_button;
- Gtk::ToggleButton join_object_range_button;
+ Gtkmm2ext::StatefulToggleButton mouse_select_button;
+ Gtkmm2ext::StatefulToggleButton mouse_move_button;
+ Gtkmm2ext::StatefulToggleButton mouse_gain_button;
+ Gtkmm2ext::StatefulToggleButton mouse_zoom_button;
+ Gtkmm2ext::StatefulToggleButton mouse_timefx_button;
+ Gtkmm2ext::StatefulToggleButton mouse_audition_button;
+ Gtkmm2ext::StatefulToggleButton join_object_range_button;
void mouse_mode_toggled (Editing::MouseMode m);
+ void mouse_mode_object_range_toggled () {}
bool ignore_mouse_mode_toggle;
- Gtk::ToggleButton internal_edit_button;
+ Gtkmm2ext::StatefulToggleButton internal_edit_button;
void toggle_internal_editing ();
- gint mouse_select_button_release (GdkEventButton*);
+ bool mouse_select_button_release (GdkEventButton*);
Gtk::VBox automation_box;
Gtk::Button automation_mode_button;
- Gtk::ToggleButton global_automation_button;
Gtk::ComboBoxText edit_mode_selector;
Gtk::VBox edit_mode_box;
+ std::vector<std::string> edit_mode_strings;
void set_edit_mode (ARDOUR::EditMode);
void cycle_edit_mode ();
Gtk::HBox toolbar_hbox;
Gtk::EventBox toolbar_base;
Gtk::Frame toolbar_frame;
+ Gtk::Viewport _toolbar_viewport;
/* midi toolbar */
Gtk::HBox panic_box;
Gtk::Button midi_panic_button;
- Gtk::ToggleButton midi_sound_notes;
+ Gtkmm2ext::StatefulToggleButton midi_sound_notes;
void midi_panic ();
bool sound_notes () const { return midi_sound_notes.get_active(); }
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 sensitize_all_region_actions (bool);
+ void sensitize_the_right_region_actions ();
+ bool _all_region_actions_sensitized;
+ /** Flag to block region action handlers from doing what they normally do;
+ * I tried Gtk::Action::block_activate() but this doesn't work (ie it doesn't
+ * block) when setting a ToggleAction's active state.
+ */
+ bool _ignore_region_action;
+ bool _last_region_menu_was_main;
void point_selection_changed ();
void marker_selection_changed ();
void cancel_selection ();
- void region_selection_op (void (ARDOUR::Region::*pmf)(void));
- void region_selection_op (void (ARDOUR::Region::*pmf)(void*), void*);
- void region_selection_op (void (ARDOUR::Region::*pmf)(bool), bool);
-
- bool audio_region_selection_covers (nframes64_t where);
+ bool audio_region_selection_covers (framepos_t where);
/* transport range select process */
/* object rubberband select process */
- bool select_all_within (nframes64_t, nframes64_t, double, double, TrackViewList const &, Selection::Operation, bool);
+ void select_all_within (framepos_t, framepos_t, double, double, TrackViewList const &, Selection::Operation, bool);
ArdourCanvas::SimpleRect *rubberband_rect;
/* mouse zoom process */
ArdourCanvas::SimpleRect *zoom_rect;
- void reposition_zoom_rect (nframes64_t start, nframes64_t end);
+ void reposition_zoom_rect (framepos_t start, framepos_t end);
EditorRouteGroups* _route_groups;
EditorRoutes* _routes;
int last_autoscroll_x;
int last_autoscroll_y;
uint32_t autoscroll_cnt;
- nframes64_t autoscroll_x_distance;
+ framecnt_t autoscroll_x_distance;
double autoscroll_y_distance;
static gint _autoscroll_canvas (void *);
void stop_canvas_autoscroll ();
/* trimming */
- void point_trim (GdkEvent *, nframes64_t);
- void single_contents_trim (RegionView&, nframes64_t, bool, bool);
- void single_start_trim (RegionView&, nframes64_t, bool);
- void single_end_trim (RegionView&, nframes64_t, bool);
-
- void thaw_region_after_trim (RegionView& rv);
+ void point_trim (GdkEvent *, framepos_t);
void trim_region_front();
void trim_region_back();
void trim_region (bool front);
- void trim_region_to_edit_point ();
- void trim_region_from_edit_point ();
void trim_region_to_loop ();
void trim_region_to_punch ();
void trim_region_to_location (const ARDOUR::Location&, const char* cmd);
/* 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);
+ std::vector<std::string>& 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);
+ 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);
+ 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);
+ 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);
+ 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 (std::string path, boost::shared_ptr<ARDOUR::AudioRegion>);
- void bounce_region_selection ();
+ void bounce_region_selection (bool with_processing);
void bounce_range_selection (bool replace, bool enable_processing);
void external_edit_region ();
void freeze_route ();
void unfreeze_route ();
- /* route-group solo + mute */
-
- void set_route_group_solo (ARDOUR::Route&, bool);
- void set_route_group_mute (ARDOUR::Route&, bool);
-
/* duplication */
void duplicate_dialog (bool with_dialog);
- nframes64_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
+ framepos_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
/* returns false if mouse pointer is not in track or marker canvas
*/
- bool mouse_frame (nframes64_t&, bool& in_track_canvas) const;
+ bool mouse_frame (framepos_t&, bool& in_track_canvas) const;
/* "whats mine is yours" */
int time_stretch (RegionSelection&, float fraction);
int pitch_shift (RegionSelection&, float cents);
- void pitch_shift_regions ();
+ void pitch_shift_region ();
int time_fx (RegionSelection&, float val, bool pitching);
+ void transpose_region ();
+
/* editor-mixer strip */
MixerStrip *current_mixer_strip;
Gtk::Button nudge_backward_button;
Gtk::HBox nudge_hbox;
Gtk::VBox nudge_vbox;
- AudioClock nudge_clock;
+ AudioClock* nudge_clock;
bool nudge_forward_release (GdkEventButton*);
bool nudge_backward_release (GdkEventButton*);
/* audio filters */
- void apply_filter (ARDOUR::Filter&, std::string cmd);
+ void apply_filter (ARDOUR::Filter&, std::string cmd, ProgressReporter* progress = 0);
Command* apply_midi_note_edit_op_to_region (ARDOUR::MidiOperator& op, MidiRegionView& mrv);
void apply_midi_note_edit_op (ARDOUR::MidiOperator& op);
void selected_marker_moved (ARDOUR::Location*);
- bool get_edit_op_range (nframes64_t& start, nframes64_t& end) const;
+ bool get_edit_op_range (framepos_t& start, framepos_t& end) const;
- void get_regions_at (RegionSelection&, nframes64_t where, const TrackViewList& ts) const;
- void get_regions_after (RegionSelection&, nframes64_t where, const TrackViewList& ts) const;
+ void get_regions_at (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
+ void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
- void get_regions_for_action (RegionSelection&, bool allow_entered = false, bool allow_edit_position = true);
+ RegionSelection get_regions_from_selection ();
+ RegionSelection get_regions_from_selection_and_edit_point ();
+ RegionSelection get_regions_from_selection_and_entered ();
void start_updating_meters ();
void stop_updating_meters ();
void select_next_route ();
void select_prev_route ();
- void snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
- void timecode_snap_to_internal (nframes64_t& first, int32_t direction = 0, bool for_mark = false);
+ 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);
RhythmFerret* rhythm_ferret;
- BundleManager* _bundle_manager;
- GlobalPortMatrixWindow* _global_port_matrix[ARDOUR::DataType::num_types];
void fit_tracks (TrackViewList &);
void fit_selected_tracks ();
void visible_order_range (int*, int*) const;
void located ();
-
+
/** true if we've made a locate request that hasn't yet been processed */
bool _pending_locate_request;
-
+
/** if true, there is a pending Session locate which is the initial one when loading a session;
we need to know this so that we don't (necessarily) set the viewport to show the playhead
initially.
Gtk::HBox _summary_hbox;
EditorSummary* _summary;
+
void region_view_added (RegionView *);
+ void region_view_removed ();
void update_canvas_now ();
EditorGroupTabs* _group_tabs;
void fit_route_group (ARDOUR::RouteGroup *);
- void step_edit_status_change (bool);
+ void step_edit_status_change (bool);
void start_step_editing ();
void stop_step_editing ();
bool check_step_edit ();
sigc::connection step_edit_connection;
+ double _last_motion_y;
+
+ RegionLayeringOrderEditor* layering_order_editor;
+ void update_region_layering_order_editor ();
+
+ /** Track that was the source for the last cut/copy operation. Used as a place
+ to paste things iff there is no selected track.
+ */
+ TimeAxisView* _last_cut_copy_source_track;
+
+ /** true if a change in Selection->regions should change the selection in the region list.
+ See EditorRegions::selection_changed.
+ */
+ bool _region_selection_change_updates_region_list;
+
+ void setup_fade_images ();
+ std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_in_images;
+ std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_out_images;
+
+ Gtk::MenuItem& action_menu_item (std::string const &);
+ void action_pre_activated (Glib::RefPtr<Gtk::Action> const &);
+
+ void set_canvas_cursor_for_region_view (double, RegionView *);
+
+ MouseCursors* _cursors;
+
+ void resize_text_widgets ();
+
friend class Drag;
friend class RegionDrag;
friend class RegionMoveDrag;
friend class ControlPointDrag;
friend class LineDrag;
friend class RubberbandSelectDrag;
- friend class TimeFXDrag;
- friend class ScrubDrag;
+ friend class TimeFXDrag;
+ friend class ScrubDrag;
friend class SelectionDrag;
friend class RangeMarkerBarDrag;
friend class MouseZoomDrag;