#include "gtkmm2ext/click_box.h"
#include "gtkmm2ext/dndtreeview.h"
#include "gtkmm2ext/stateful_button.h"
+#include "gtkmm2ext/bindings.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_button.h"
#include "ardour_dialog.h"
#include "public_editor.h"
#include "editing.h"
namespace Gtkmm2ext {
class TearOff;
- class Bindings;
+ class Bindings;
}
namespace ARDOUR {
class RouteGroup;
class Playlist;
class AudioPlaylist;
+ class AudioRegion;
class Region;
class Location;
class TempoSection;
class NamedSelection;
class Session;
class Filter;
- class Crossfade;
class ChanCount;
class MidiOperator;
+ class Track;
class MidiTrack;
class AudioTrack;
}
}
class AnalysisWindow;
+class AudioClock;
class AudioRegionView;
class AudioStreamView;
class AudioTimeAxisView;
class AutomationSelection;
class AutomationTimeAxisView;
class BundleManager;
+class ButtonJoiner;
class ControlPoint;
-class CrossfadeView;
class DragManager;
class GroupedButtons;
+class GUIObjectState;
class Marker;
class MidiRegionView;
class MixerStrip;
class ProgressReporter;
class EditorCursor;
class MouseCursors;
+class VerboseCursor;
/* <CMT Additions> */
class ImageFrameView;
}
void cycle_snap_mode ();
- void cycle_snap_choice ();
+ void next_snap_choice ();
+ void next_snap_choice_music_only ();
+ void next_snap_choice_music_and_time ();
+ void prev_snap_choice ();
+ void prev_snap_choice_music_only ();
+ void prev_snap_choice_music_and_time ();
void set_snap_to (Editing::SnapType);
void set_snap_mode (Editing::SnapMode);
void set_snap_threshold (double pixel_distance) {snap_threshold = pixel_distance;}
bool internal_editing() const { return _internal_editing ; }
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 foreach_time_axis_view (sigc::slot<void,TimeAxisView&>);
void add_to_idle_resize (TimeAxisView*, int32_t);
- RouteTimeAxisView* get_route_view_by_route_id (PBD::ID& id) const;
+ RouteTimeAxisView* get_route_view_by_route_id (const PBD::ID& id) const;
void consider_auditioning (boost::shared_ptr<ARDOUR::Region>);
void hide_a_region (boost::shared_ptr<ARDOUR::Region>);
Selection& get_selection() const { return *selection; }
Selection& get_cut_buffer() const { return *cut_buffer; }
+ void track_mixer_selection ();
bool extend_selection_to_track (TimeAxisView&);
void invert_selection_in_track ();
void invert_selection ();
void deselect_all ();
+ long select_range (framepos_t, framepos_t);
void set_selected_regionview_from_region_list (boost::shared_ptr<ARDOUR::Region> region, Selection::Operation op = Selection::Set);
void temporal_zoom_step (bool coarser);
void tav_zoom_step (bool coarser);
+ void tav_zoom_smooth (bool coarser, bool force_all);
/* stuff that AudioTimeAxisView and related classes use */
/* playhead/screen stuff */
- void set_stationary_playhead (bool yn);
- void toggle_stationary_playhead ();
- bool stationary_playhead() const { return _stationary_playhead; }
-
+ 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; }
void toggle_measure_visibility ();
void toggle_logo_visibility ();
- /* fades/xfades */
+ /* fades */
void toggle_region_fades (int dir);
void update_region_fade_visibility ();
- bool xfade_visibility() const { return _xfade_visibility; }
- void update_xfade_visibility ();
/* redirect shared ops menu. caller must free returned menu */
void show_window ();
+ void ensure_time_axis_view_is_visible (const TimeAxisView& tav);
void scroll_tracks_down_line ();
void scroll_tracks_up_line ();
void reset_zoom (double);
void reposition_and_zoom (framepos_t, double);
- framepos_t get_preferred_edit_position (bool ignore_playhead = false);
+ framepos_t get_preferred_edit_position (bool ignore_playhead = false, bool use_context_click = false);
bool update_mouse_speed ();
bool decelerate_mouse_speed ();
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, int32_t xoffset = 0, int32_t yoffset = 0);
- void hide_verbose_canvas_cursor();
-
void center_screen (framepos_t);
TrackViewList axis_views_from_routes (boost::shared_ptr<ARDOUR::RouteList>) const;
return _drags;
}
- void maybe_autoscroll (bool, bool);
-
- 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>);
+ void maybe_autoscroll (bool, bool, bool, bool);
+
+ 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 (framepos_t);
typedef std::pair<TimeAxisView*,XMLNode*> TAVState;
struct VisualState {
+ VisualState (bool with_tracks);
+ ~VisualState ();
double y_position;
double frames_per_unit;
- framepos_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 swap_visual_state ();
std::vector<VisualState*> visual_states;
- sigc::connection visual_state_op_connection;
void start_visual_state_op (uint32_t n);
void cancel_visual_state_op (uint32_t n);
- bool end_visual_state_op (uint32_t n);
framepos_t leftmost_frame;
double frames_per_unit;
Editing::MouseMode 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;
void update_join_object_range_location (double, double);
- int post_maximal_editor_width;
- int post_maximal_editor_height;
- int post_maximal_horizontal_pane_position;
- int post_maximal_vertical_pane_position;
- int pre_maximal_horizontal_pane_position;
- int pre_maximal_vertical_pane_position;
- int pre_maximal_editor_width;
- int pre_maximal_editor_height;
+ boost::optional<int> pre_notebook_shrink_pane_width;
+
void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
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;
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);
Marker* start;
Marker* end;
bool valid;
-
+
LocationMarkers () : start(0), end(0), valid (true) {}
-
+
~LocationMarkers ();
-
+
void hide ();
void show ();
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;
RegionView* clicked_regionview;
RegionSelection latest_regionviews;
uint32_t clicked_selection;
- CrossfadeView* clicked_crossfadeview;
ControlPoint* clicked_control_point;
- void sort_track_selection (TrackViewList* sel = 0);
+ void sort_track_selection (TrackViewList&);
void get_equivalent_regions (RegionView* rv, std::vector<RegionView*> &, PBD::PropertyID) const;
RegionSelection get_equivalent_regions (RegionSelection &, PBD::PropertyID) const;
void mapover_tracks (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
+ void mapover_tracks_with_unique_playlists (sigc::slot<void,RouteTimeAxisView&,uint32_t> sl, TimeAxisView*, PBD::PropertyID) const;
/* functions to be passed to mapover_tracks(), possibly with sigc::bind()-supplied arguments */
-
void mapped_get_equivalent_regions (RouteTimeAxisView&, uint32_t, RegionView *, std::vector<RegionView*>*) const;
void mapped_use_new_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
void mapped_use_copy_playlist (RouteTimeAxisView&, uint32_t, std::vector<boost::shared_ptr<ARDOUR::Playlist> > const &);
void mapped_clear_playlist (RouteTimeAxisView&, uint32_t);
-
- /* end */
-
+
void button_selection (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type);
bool button_release_can_deselect;
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);
+ void select_all_internal_edit (Selection::Operation);
- bool set_selected_control_point_from_click (Selection::Operation op = Selection::Set, bool no_remove=false);
+ bool set_selected_control_point_from_click (bool press, Selection::Operation op = Selection::Set);
void set_selected_track_from_click (bool press, Selection::Operation op = Selection::Set, bool no_remove=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);
+ void set_selected_track_as_side_effect (Selection::Operation op);
+ bool set_selected_regionview_from_click (bool press, 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 *);
void collect_and_select_new_region_view (RegionView *);
- long select_range_around_region (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_edit_playlist_submenu;
Gtk::Menu * track_selection_edit_playlist_submenu;
+ GdkEvent context_click_event;
+
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 (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 *);
void set_canvas_cursor ();
ArdourCanvas::Canvas* track_canvas;
+ bool within_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;
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 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 ();
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 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::Table edit_packer;
Gtk::Adjustment vertical_adjustment;
-
+
Gtk::Layout controls_layout;
bool control_layout_scroll (GdkEventScroll* ev);
- void reset_controls_layout_width ();
- void reset_controls_layout_height (int32_t height);
+ void reset_controls_layout_width ();
+ void reset_controls_layout_height (int32_t height);
enum Direction {
LEFT,
UP,
DOWN
};
-
+
bool scroll_press (Direction);
void scroll_release ();
sigc::connection _scroll_connection;
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::VBox edit_controls_vbox;
Gtk::HBox edit_controls_hbox;
+ void control_vertical_zoom_in_all ();
+ void control_vertical_zoom_out_all ();
+ void control_vertical_zoom_in_selected ();
+ void control_vertical_zoom_out_selected ();
+ void control_step_tracks_up ();
+ void control_step_tracks_down ();
+ void control_view (uint32_t);
void control_scroll (float);
+ void control_select (uint32_t rid, Selection::Operation);
+ void control_unselect ();
void access_action (std::string,std::string);
bool deferred_control_scroll (framepos_t);
sigc::connection control_scroll_connection;
/* track views */
TrackViewList track_views;
- std::pair<TimeAxisView*, ARDOUR::layer_t> trackview_by_y_position (double);
+ std::pair<TimeAxisView*, double> trackview_by_y_position (double);
TimeAxisView* axis_view_from_route (boost::shared_ptr<ARDOUR::Route>) const;
TrackViewList get_tracks_for_range_action () const;
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;
+ 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 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;
+ Gtkmm2ext::Bindings* button_bindings;
+ XMLNode* button_settings () const;
/* KEYMAP HANDLING */
void register_actions ();
void register_region_actions ();
+ void load_bindings ();
+ Gtkmm2ext::ActionMap editor_action_map;
+ Gtkmm2ext::Bindings key_bindings;
+
int ensure_cursor (framepos_t* pos);
void cut_copy (Editing::CutCopyOp);
void toggle_region_lock ();
void toggle_opaque_region ();
void toggle_record_enable ();
+ void toggle_solo ();
+ void toggle_solo_isolate ();
+ void toggle_mute ();
void toggle_region_lock_style ();
+
+ enum LayerOperation {
+ Raise,
+ RaiseToTop,
+ Lower,
+ LowerToBottom
+ };
+
+ void do_layer_operation (LayerOperation);
void raise_region ();
void raise_region_to_top ();
- void change_region_layering_order ();
+ 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 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 reset_region_scale_amplitude ();
void adjust_region_gain (bool up);
void quantize_region ();
- void insert_patch_change ();
+ void insert_patch_change (bool from_context);
void fork_region ();
void do_insert_time ();
- void insert_time (framepos_t, framecnt_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 split_region ();
+ void delete_ ();
void cut ();
void copy ();
- void paste (float times);
-
+ void paste (float times, bool from_context_menu = false);
+
void place_transient ();
void remove_transient (ArdourCanvas::Item* item);
void snap_regions_to_grid ();
void zoom_to_region (bool both_axes);
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
- void temporal_zoom_by_frame (framepos_t start, framepos_t end, const std::string & op);
+ 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);
bool have_pending_keyboard_selection;
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);
+ Gtk::Menu xfade_in_context_menu;
+ Gtk::Menu xfade_out_context_menu;
+ void popup_xfade_in_context_menu (int, int, ArdourCanvas::Item*, ItemType);
+ void popup_xfade_out_context_menu (int, int, ArdourCanvas::Item*, ItemType);
+ void fill_xfade_menu (Gtk::Menu_Helpers::MenuList& items, bool start);
+
void set_fade_in_shape (ARDOUR::FadeShape);
void set_fade_out_shape (ARDOUR::FadeShape);
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*, framepos_t pos);
- void show_verbose_time_cursor (framepos_t frame, double offset = 0, double xpos=-1, double ypos=-1);
- void show_verbose_duration_cursor (framepos_t start, framepos_t end, double offset = 0, double xpos=-1, double ypos=-1);
- double clamp_verbose_cursor_x (double);
- double clamp_verbose_cursor_y (double);
-
/* Canvas event handlers */
bool canvas_control_point_event (GdkEvent* event,ArdourCanvas::Item*, ControlPoint*);
bool canvas_selection_rect_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
bool canvas_selection_start_trim_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
bool canvas_selection_end_trim_event (GdkEvent* event,ArdourCanvas::Item*, SelectionRect*);
- bool canvas_crossfade_view_event (GdkEvent* event,ArdourCanvas::Item*, CrossfadeView*);
+ bool canvas_start_xfade_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
+ bool canvas_end_xfade_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_in_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_in_handle_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
bool canvas_fade_out_event (GdkEvent* event,ArdourCanvas::Item*, AudioRegionView*);
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*);
-
+
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;
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;
+ /// true if we are in fullscreen mode
+ bool _maximised;
- ARDOUR::TempoMap::BBTPointList *current_bbt_points;
+ ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_begin;
+ ARDOUR::TempoMap::BBTPointList::const_iterator current_bbt_points_end;
TempoLines* tempo_lines;
void marker_menu_set_from_playhead ();
void marker_menu_set_from_selection ();
void marker_menu_range_to_next ();
+ void marker_menu_zoom_to_range ();
void new_transport_marker_menu_set_loop ();
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);
+ 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 editor_mixer_button_toggled ();
void editor_list_button_toggled ();
- AudioClock zoom_range_clock;
- Gtk::Button zoom_in_button;
- Gtk::Button zoom_out_button;
- Gtk::Button zoom_out_full_button;
- Gtk::Button zoom_onetoone_button;
+ 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;
Gtk::Label toolbar_selection_cursor_label;
Gtkmm2ext::TearOff* _mouse_mode_tearoff;
- 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;
+ 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_audition_button;
+
+ ButtonJoiner* smart_mode_joiner;
+ Glib::RefPtr<Gtk::ToggleAction> smart_mode_action;
void mouse_mode_toggled (Editing::MouseMode m);
void mouse_mode_object_range_toggled () {}
bool ignore_mouse_mode_toggle;
- Gtkmm2ext::StatefulToggleButton internal_edit_button;
- void toggle_internal_editing ();
+ ArdourButton 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;
+ std::vector<std::string> edit_mode_strings;
void set_edit_mode (ARDOUR::EditMode);
void cycle_edit_mode ();
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;
- void midi_panic ();
- bool sound_notes () const { return midi_sound_notes.get_active(); }
void setup_midi_toolbar ();
framecnt_t autoscroll_x_distance;
double autoscroll_y_distance;
+ bool _autoscroll_fudging;
+ int autoscroll_fudge_threshold () const;
+
static gint _autoscroll_canvas (void *);
bool autoscroll_canvas ();
void start_canvas_autoscroll (int x, int y);
const Gtk::SelectionData& data,
guint info,
guint time);
-
+
void track_canvas_drag_data_received (
const Glib::RefPtr<Gdk::DragContext>& context,
gint x,
const Gtk::SelectionData& data,
guint info,
guint time);
-
+
void drop_paths (
const Glib::RefPtr<Gdk::DragContext>& context,
gint x,
const Gtk::SelectionData& data,
guint info,
guint time);
-
+
void drop_regions (
const Glib::RefPtr<Gdk::DragContext>& context,
gint x,
const Gtk::SelectionData& data,
guint info,
guint time);
-
+
void drop_routes (
const Glib::RefPtr<Gdk::DragContext>& context,
gint x,
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 update_title ();
void update_title_s (const std::string & snapshot_name);
- struct State {
- Selection* selection;
- double frames_per_unit;
-
- State (PublicEditor const * e);
- ~State ();
- };
-
void instant_save ();
boost::shared_ptr<ARDOUR::AudioRegion> last_audition_region;
*/
bool mouse_frame (framepos_t&, bool& in_track_canvas) const;
- /* "whats mine is yours" */
-
TimeFXDialog* current_timefx;
-
static void* timefx_thread (void *arg);
- void do_timefx (TimeFXDialog&);
+ void do_timefx ();
int time_stretch (RegionSelection&, float fraction);
int pitch_shift (RegionSelection&, float cents);
void pitch_shift_region ();
- int time_fx (RegionSelection&, float val, bool pitching);
void transpose_region ();
void nudge_track (bool use_edit_point, bool forwards);
- /* xfades */
-
- bool _xfade_visibility;
-
#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) ;
ImageFrameSocketHandler* image_socket_listener ;
#endif
- 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 ();
-
static const int32_t default_width = 995;
static const int32_t default_height = 765;
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*);
gint left_automation_track ();
void reset_canvas_action_sensitivity (bool);
- void toggle_gain_envelope_visibility ();
+ void set_gain_envelope_visibility ();
+ void set_region_gain_visibility (RegionView*);
void toggle_gain_envelope_active ();
void reset_region_gain_envelopes ();
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 ();
bool meters_running;
void timecode_snap_to_internal (framepos_t& first, int32_t direction = 0, bool for_mark = false);
RhythmFerret* rhythm_ferret;
- BundleManager* _bundle_manager;
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.
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 ();
double _last_motion_y;
- RegionLayeringOrderEditor* layering_order_editor;
- void update_region_layering_order_editor ();
+ 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.
void setup_fade_images ();
std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_in_images;
std::map<ARDOUR::FadeShape, Gtk::Image*> _fade_out_images;
+ std::map<ARDOUR::FadeShape, Gtk::Image*> _xfade_in_images;
+ std::map<ARDOUR::FadeShape, Gtk::Image*> _xfade_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 *);
+ void set_canvas_cursor_for_region_view (double, RegionView *);
MouseCursors* _cursors;
- void resize_text_widgets ();
+ void follow_mixer_selection ();
+ bool _following_mixer_selection;
+
+ int time_fx (ARDOUR::RegionList&, float val, bool pitching);
+
+ 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;
+ }
+
+ void toggle_sound_midi_notes ();
+
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 EditorRubberbandSelectDrag;
+ friend class TimeFXDrag;
+ friend class ScrubDrag;
friend class SelectionDrag;
friend class RangeMarkerBarDrag;
friend class MouseZoomDrag;