X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fpublic_editor.h;h=bcf98dbac48fe95955b0b0070d2b5f776e68d83f;hb=bdfddec6fc45b9570d1f3fc03182f4166187c52c;hp=a89993a4795c1593fb78c30ce9599534e468c01e;hpb=c359f881a1fbcbcbeeed3fadfe3b9df19418998a;p=ardour.git diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index a89993a479..bcf98dbac4 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -40,6 +40,8 @@ #include "pbd/statefuldestructible.h" #include "canvas/fwd.h" + +#include "gtkmm2ext/actions.h" #include "gtkmm2ext/visibility_tracker.h" #include "editing.h" @@ -69,7 +71,7 @@ class AutomationTimeAxisView; class ControlPoint; class DragManager; class Editor; -class Marker; +class ArdourMarker; class MeterMarker; class MouseCursors; class PlaylistSelector; @@ -141,14 +143,14 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi */ virtual void set_snap_threshold (double t) = 0; - /** Snap a value according to the current snap setting. */ + /** + * Snap a value according to the current snap setting. + * ensure_snap overrides SnapOff and magnetic snap + */ virtual void snap_to (framepos_t& first, ARDOUR::RoundMode direction = ARDOUR::RoundNearest, - bool for_mark = false) = 0; - /** Snap a value according to the current snap setting. */ - virtual void snap_to_no_magnets (framepos_t& first, - ARDOUR::RoundMode direction = ARDOUR::RoundNearest, - bool for_mark = false) = 0; + bool for_mark = false, + bool ensure_snap = false) = 0; /** Undo some transactions. * @param n Number of transactions to undo. @@ -209,7 +211,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual void set_show_measures (bool yn) = 0; virtual bool show_measures () const = 0; virtual void remove_tracks () = 0; - + virtual Editing::MouseMode effective_mouse_mode () const = 0; /** Import existing media */ @@ -344,7 +346,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual bool canvas_region_view_name_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0; virtual bool canvas_feature_line_event (GdkEvent* event, ArdourCanvas::Item*, RegionView*) = 0; virtual bool canvas_stream_view_event (GdkEvent* event, ArdourCanvas::Item*, RouteTimeAxisView*) = 0; - virtual bool canvas_marker_event (GdkEvent* event, ArdourCanvas::Item*, Marker*) = 0; + virtual bool canvas_marker_event (GdkEvent* event, ArdourCanvas::Item*, ArdourMarker*) = 0; virtual bool canvas_videotl_bar_event (GdkEvent* event, ArdourCanvas::Item*) = 0; virtual bool canvas_tempo_marker_event (GdkEvent* event, ArdourCanvas::Item*, TempoMarker*) = 0; virtual bool canvas_meter_marker_event (GdkEvent* event, ArdourCanvas::Item*, MeterMarker*) = 0; @@ -410,8 +412,8 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi virtual void get_pointer_position (double &, double &) const = 0; - virtual ARDOUR::Location* find_location_from_marker (Marker *, bool &) const = 0; - virtual Marker* find_marker_from_location_id (PBD::ID const &, bool) const = 0; + virtual ARDOUR::Location* find_location_from_marker (ArdourMarker *, bool &) const = 0; + virtual ArdourMarker* find_marker_from_location_id (PBD::ID const &, bool) const = 0; virtual void snap_to_with_modifier (framepos_t & first, GdkEvent const * ev, @@ -419,6 +421,7 @@ class PublicEditor : public Gtk::Window, public PBD::StatefulDestructible, publi bool for_mark = false) = 0; virtual void get_regions_at (RegionSelection &, framepos_t where, TrackViewList const &) const = 0; + virtual void get_regions_after (RegionSelection&, framepos_t where, const TrackViewList& ts) const = 0; virtual RegionSelection get_regions_from_selection_and_mouse (framepos_t) = 0; virtual void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const = 0; virtual void get_per_region_note_selection (std::list > > > >&) const = 0; @@ -459,4 +462,19 @@ class DisplaySuspender { } }; +class MainMenuDisabler { +public: + MainMenuDisabler () { + /* The global menu bar continues to be accessible to applications + with modal dialogs on mac, which means that we need to desensitize + all items in the menu bar. + */ + ActionManager::disable_active_actions (); + } + + ~MainMenuDisabler () { + ActionManager::enable_active_actions (); + } +}; + #endif // __gtk_ardour_public_editor_h__