#include "editor_items.h"
#include "region_selection.h"
#include "canvas.h"
-#include "window_proxy.h"
-namespace Gnome { namespace Canvas {
- class NoEventText;
-} }
+namespace Gnome {
+ namespace Canvas {
+ class NoEventText;
+ class CanvasNoteEvent;
+ }
+}
namespace Gtkmm2ext {
class TearOff;
class Region;
class Location;
class TempoSection;
- class NamedSelection;
class Session;
class Filter;
class ChanCount;
class ButtonJoiner;
class ControlPoint;
class DragManager;
+class EditNoteDialog;
+class EditorCursor;
+class EditorGroupTabs;
+class EditorLocations;
+class EditorRegions;
+class EditorRoutes;
+class EditorRouteGroups;
+class EditorSnapshots;
+class EditorSummary;
class GroupedButtons;
class GUIObjectState;
class Marker;
class MidiRegionView;
class MixerStrip;
+class MouseCursors;
class PlaylistSelector;
class PluginSelector;
+class ProgressReporter;
class RhythmFerret;
class Selection;
class SoundFileOmega;
class TimeAxisView;
class TimeFXDialog;
class TimeSelection;
-class EditorGroupTabs;
-class EditorRoutes;
-class EditorRouteGroups;
-class EditorRegions;
-class EditorLocations;
-class EditorSnapshots;
-class EditorSummary;
class RegionLayeringOrderEditor;
-class ProgressReporter;
-class EditorCursor;
-class MouseCursors;
class VerboseCursor;
-/* <CMT Additions> */
-class ImageFrameView;
-class ImageFrameTimeAxisView;
-class ImageFrameTimeAxis;
-class MarkerTimeAxis ;
-class MarkerView ;
-class ImageFrameSocketHandler ;
-class TimeAxisViewItem ;
-/* </CMT Additions> */
-
class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
{
public:
void set_internal_edit (bool yn);
bool toggle_internal_editing_from_double_click (GdkEvent*);
-#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 std::string & name) ;
-#endif /* WITH_CMT */
-
void foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
void add_to_idle_resize (TimeAxisView*, int32_t);
return rint ((double) frame / (double) frames_per_unit);
}
+ double frame_to_unit_unrounded (framepos_t frame) const {
+ return frame / frames_per_unit;
+ }
+
double frame_to_unit (double frame) const {
return rint (frame / frames_per_unit);
}
bool extend_selection_to_track (TimeAxisView&);
void play_selection ();
+ framepos_t get_preroll ();
+ 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 invert_selection_in_track ();
void set_zoom_focus (Editing::ZoomFocus);
Editing::ZoomFocus get_zoom_focus () const { return zoom_focus; }
double get_current_zoom () const { return frames_per_unit; }
-
+ void cycle_zoom_focus ();
void temporal_zoom_step (bool coarser);
void tav_zoom_step (bool coarser);
void tav_zoom_smooth (bool coarser, bool force_all);
void maximise_editing_space();
void restore_editing_space();
+ void update_tearoff_visibility();
+
void reset_x_origin (framepos_t);
void reset_x_origin_to_follow_playhead ();
void reset_y_origin (double);
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 get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions, bool src_comparison);
void center_screen (framepos_t);
void get_pointer_position (double &, double &) const;
+ TimeAxisView* stepping_axis_view () {
+ return _stepping_axis_view;
+ }
+
+ void set_stepping_axis_view (TimeAxisView* v) {
+ _stepping_axis_view = v;
+ }
+
protected:
void map_transport_state ();
void map_position_change (framepos_t);
Editing::ZoomFocus zoom_focus;
void set_frames_per_unit (double);
- void post_zoom ();
+ bool clamp_frames_per_unit (double &) const;
Editing::MouseMode mouse_mode;
Editing::MouseMode pre_internal_mouse_mode;
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 ensure_cd_marker_updated (LocationMarkers * lam, ARDOUR::Location * location);
void popup_control_point_context_menu (ArdourCanvas::Item *, GdkEvent *);
Gtk::Menu _control_point_context_menu;
- void handle_new_route (ARDOUR::RouteList&);
+ void add_routes (ARDOUR::RouteList&);
void timeaxisview_deleted (TimeAxisView *);
Gtk::HBox global_hpacker;
ruler_time_range_marker = 7,
ruler_time_transport_marker = 8,
ruler_time_cd_marker = 9,
+ ruler_video_timeline = 10,
};
static GtkCustomMetric ruler_metrics[4];
void update_just_timecode ();
void compute_fixed_ruler_scale (); //calculates the RulerScale of the fixed rulers
void update_fixed_rulers ();
- void update_tempo_based_rulers ();
+ void update_tempo_based_rulers (ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
+ ARDOUR::TempoMap::BBTPointList::const_iterator& end);
void popup_ruler_menu (framepos_t where = 0, ItemType type = RegionItem);
void update_ruler_visibility ();
void set_ruler_visible (RulerType, bool);
gint bbt_nmarks;
uint32_t bbt_bar_helper_on;
uint32_t bbt_accent_modulo;
- void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper);
+ void compute_bbt_ruler_scale (framepos_t lower, framepos_t upper,
+ ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin,
+ ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end);
gint metric_get_timecode (GtkCustomRulerMark **, gdouble, gdouble, gint);
gint metric_get_bbt (GtkCustomRulerMark **, gdouble, gdouble, gint);
Gtk::Label transport_mark_label;
Gtk::Label cd_mark_label;
+ /* videtimline related actions */
+ ArdourCanvas::SimpleRect* videotl_bar;
+ Gtk::Label videotl_label;
+ ArdourCanvas::Group* videotl_bar_group;
+ ArdourCanvas::Group* videotl_group;
+ Glib::RefPtr<Gtk::ToggleAction> ruler_video_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_proc_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_ontop_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_timecode_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_frame_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_osdbg_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_fullscreen_action;
+ Glib::RefPtr<Gtk::ToggleAction> xjadeo_letterbox_action;
+ Glib::RefPtr<Gtk::Action> xjadeo_zoom_100;
+ void set_xjadeo_proc ();
+ void toggle_xjadeo_proc (int state=-1);
+ void set_close_video_sensitive (bool onoff);
+ void set_xjadeo_sensitive (bool onoff);
+ void set_xjadeo_viewoption (int);
+ void toggle_xjadeo_viewoption (int what, int state=-1);
+ void toggle_ruler_video (bool onoff) {ruler_video_action->set_active(onoff);}
+ int videotl_bar_height; /* in units of timebar_height; default: 4 */
+ int get_videotl_bar_height () const { return videotl_bar_height; }
+ void export_video ();
+ void toggle_region_video_lock ();
+
Gtk::VBox time_button_vbox;
Gtk::HBox time_button_hbox;
double y_origin;
int idle_handler_id;
+ /** true if we are currently in the idle handler */
+ bool being_handled;
- VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1) {}
+ VisualChange() : pending ((VisualChange::Type) 0), time_origin (0), frames_per_unit (0), idle_handler_id (-1), being_handled (false) {}
void add (Type t) {
pending = Type (pending | t);
}
};
-
VisualChange pending_visual_change;
static int _idle_visual_changer (void *arg);
int idle_visual_changer ();
-
- void queue_visual_change (framepos_t);
- void queue_visual_change (double);
- void queue_visual_change_y (double);
void ensure_visual_change_idle_handler ();
/* track views */
void temporal_zoom_region (bool both_axes);
void zoom_to_region (bool both_axes);
void temporal_zoom_session ();
- void temporal_zoom (gdouble scale);
+ void temporal_zoom (double scale);
void temporal_zoom_by_frame (framepos_t start, framepos_t end);
void temporal_zoom_to_frame (bool coarser, framepos_t frame);
void bring_in_external_audio (Editing::ImportMode mode, framepos_t& pos);
- 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);
+ bool idle_drop_paths (std::vector<std::string> paths, framepos_t frame, double ypos, bool copy);
+ void drop_paths_part_two (const std::vector<std::string>& paths, framepos_t frame, double ypos, bool copy);
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);
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 toggle_midi_input_active (bool flip_others);
+
ARDOUR::InterThreadInfo* current_interthread_info;
AnalysisWindow* analysis_window;
bool canvas_transport_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
bool canvas_cd_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
- bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
- bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameTimeAxis*);
- bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
- bool canvas_imageframe_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,ImageFrameView*);
- bool canvas_marker_time_axis_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerTimeAxis*);
- bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
- bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
- bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*,MarkerView*);
+ bool canvas_videotl_bar_event (GdkEvent* event, ArdourCanvas::Item*);
+ void update_video_timeline (bool flush = false);
+ void set_video_timeline_height (const int);
+ bool is_video_timeline_locked ();
+ void toggle_video_timeline_locked ();
+ void set_video_timeline_locked (const bool);
+ void queue_visual_videotimeline_update ();
+ void embed_audio_from_video (std::string, framepos_t n = 0);
PBD::Signal0<void> EditorFreeze;
PBD::Signal0<void> EditorThaw;
/// true if we are in fullscreen mode
bool _maximised;
- ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
- ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
-
TempoLines* tempo_lines;
ArdourCanvas::Group* time_line_group;
void hide_measures ();
- void draw_measures ();
+ void draw_measures (ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
+ ARDOUR::TempoMap::BBTPointList::const_iterator& end);
bool redraw_measures ();
void new_tempo_section ();
void edit_tempo_marker (ArdourCanvas::Item*);
void edit_meter_marker (ArdourCanvas::Item*);
void edit_control_point (ArdourCanvas::Item*);
- void edit_note (ArdourCanvas::Item *);
+ void edit_notes (TimeAxisViewItem&);
void marker_menu_edit ();
void marker_menu_remove ();
void marker_menu_play_range ();
void marker_menu_set_playhead ();
void marker_menu_set_from_playhead ();
- void marker_menu_set_from_selection ();
+ void marker_menu_set_from_selection (bool force_regions);
void marker_menu_range_to_next ();
void marker_menu_zoom_to_range ();
void new_transport_marker_menu_set_loop ();
void remove_metric_marks ();
void draw_metric_marks (const ARDOUR::Metrics& metrics);
- void compute_current_bbt_points (framepos_t left, framepos_t right);
+ void compute_current_bbt_points (framepos_t left, framepos_t right,
+ ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
+ ARDOUR::TempoMap::BBTPointList::const_iterator& end);
+
void tempo_map_changed (const PBD::PropertyChange&);
void redisplay_tempo (bool immediate_redraw);
void editor_list_button_toggled ();
AudioClock* zoom_range_clock;
+
ArdourButton zoom_in_button;
ArdourButton zoom_out_button;
ArdourButton zoom_out_full_button;
- Gtk::Button tav_expand_button;
- Gtk::Button tav_shrink_button;
+ ArdourButton tav_expand_button;
+ ArdourButton tav_shrink_button;
Gtk::VBox toolbar_clock_vbox;
Gtk::VBox toolbar_selection_clock_vbox;
ArdourButton mouse_timefx_button;
ArdourButton mouse_audition_button;
- ButtonJoiner* smart_mode_joiner;
+ ArdourButton smart_mode_button;
Glib::RefPtr<Gtk::ToggleAction> smart_mode_action;
void mouse_mode_toggled (Editing::MouseMode m);
- void mouse_mode_object_range_toggled () {}
+ void mouse_mode_object_range_toggled ();
bool ignore_mouse_mode_toggle;
ArdourButton internal_edit_button;
void marker_selection_changed ();
void cancel_selection ();
+ void cancel_time_selection ();
+
+ bool get_smart_mode() const;
bool audio_region_selection_covers (framepos_t where);
/* duplication */
- void duplicate_dialog (bool with_dialog);
+ void duplicate_range (bool with_dialog);
framepos_t event_frame (GdkEvent const *, double* px = 0, double* py = 0) const;
void nudge_track (bool use_edit_point, bool forwards);
-#ifdef WITH_CMT
- void handle_new_imageframe_time_axis_view(const std::string & track_name, void* src) ;
- void handle_new_imageframe_marker_time_axis_view(const std::string & track_name, TimeAxisView* marked_track) ;
-
- void start_imageframe_grab(ArdourCanvas::Item*, GdkEvent*) ;
- void start_markerview_grab(ArdourCanvas::Item*, GdkEvent*) ;
-
- void imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
- void markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent*) ;
- void timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent*) ;
-
- gint canvas_imageframe_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
- gint canvas_imageframe_view_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameTimeAxis* ifta);
- gint canvas_imageframe_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
- gint canvas_imageframe_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, ImageFrameView* ifv);
-
- gint canvas_marker_time_axis_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerTimeAxis* mta);
- gint canvas_markerview_item_view_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
- gint canvas_markerview_start_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
- gint canvas_markerview_end_handle_event(ArdourCanvas::Item* item, GdkEvent* event, MarkerView* mv);
-
- void imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
- void imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
- void imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
- void imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
- void imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
- void imageframe_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
-
- void markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
- void markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event) ;
- void markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
- void markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
- void markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event) ;
- void markerview_end_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event) ;
-
- void popup_imageframe_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
- void popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_frame) ;
-
- ImageFrameSocketHandler* image_socket_listener ;
-#endif
-
static const int32_t default_width = 995;
static const int32_t default_height = 765;
/* nudge */
- Gtk::Button nudge_forward_button;
- Gtk::Button nudge_backward_button;
+ ArdourButton nudge_forward_button;
+ ArdourButton nudge_backward_button;
Gtk::HBox nudge_hbox;
Gtk::VBox nudge_vbox;
AudioClock* nudge_clock;
*/
RegionView* entered_regionview;
-
- void ensure_entered_track_selected (bool op_acts_on_objects = false);
bool clear_entered_track;
bool left_track_canvas (GdkEventCrossing*);
bool entered_track_canvas (GdkEventCrossing*);
void get_regions_at (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const;
- RegionSelection get_regions_from_selection ();
RegionSelection get_regions_from_selection_and_edit_point ();
RegionSelection get_regions_from_selection_and_entered ();
bool _following_mixer_selection;
int time_fx (ARDOUR::RegionList&, float val, bool pitching);
+ void note_edit_done (int, EditNoteDialog*);
+ void toggle_sound_midi_notes ();
- bool doing_range_stuff() const {
- return (mouse_mode == Editing::MouseRange && (_join_object_range_state == JOIN_OBJECT_RANGE_NONE)) ||
- _join_object_range_state == JOIN_OBJECT_RANGE_RANGE;
- }
-
- bool doing_object_stuff() const {
- return (mouse_mode == Editing::MouseObject && (_join_object_range_state == JOIN_OBJECT_RANGE_NONE)) ||
- _join_object_range_state == JOIN_OBJECT_RANGE_OBJECT;
- }
+ /** Flag for a bit of a hack wrt control point selection; see set_selected_control_point_from_click */
+ bool _control_point_toggled_on_press;
- void toggle_sound_midi_notes ();
+ /** This is used by TimeAxisView to keep a track of the TimeAxisView that is currently being
+ stepped in height using Shift-Scrollwheel. When a scroll event occurs, we do the step on
+ this _stepping_axis_view if it is non-0 (and we set up this _stepping_axis_view with the
+ TimeAxisView underneath the mouse if it is 0). Then Editor resets _stepping_axis_view when
+ the shift key is released. In this (hacky) way, pushing shift and moving the scroll wheel
+ will operate on the same track until shift is released (rather than skipping about to whatever
+ happens to be underneath the mouse at the time).
+ */
+ TimeAxisView* _stepping_axis_view;
+ void shift_key_released ();
friend class Drag;
friend class RegionDrag;
friend class RegionCreateDrag;
friend class RegionMotionDrag;
friend class RegionInsertDrag;
+ friend class VideoTimeLineDrag;
friend class EditorSummary;
friend class EditorGroupTabs;