#include "pbd/statefuldestructible.h"
#include "canvas/fwd.h"
+
+#include "gtkmm2ext/actions.h"
#include "gtkmm2ext/visibility_tracker.h"
#include "editing.h"
class ControlPoint;
class DragManager;
class Editor;
-class Marker;
+class ArdourMarker;
class MeterMarker;
class MouseCursors;
class PlaylistSelector;
*/
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.
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 */
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;
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,
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<std::pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > >&) const = 0;
}
};
+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__