Merge branch 'master' into ardour-merge

Conflicts:
	gtk2_ardour/ardour_ui.cc
	gtk2_ardour/ardour_ui2.cc
	gtk2_ardour/editor.cc
	gtk2_ardour/mixer_strip.cc
	gtk2_ardour/route_time_axis.cc
	gtk2_ardour/route_ui.h
	gtk2_ardour/ui/audio_time_axis.xml
	gtk2_ardour/ui/editor_mixer.xml
	gtk2_ardour/ui/meter_strip.xml
	gtk2_ardour/waves_button.cc
	gtk2_ardour/waves_button.h
	gtk2_ardour/waves_zoom_control.cc
	gtk2_ardour/waves_zoom_control.h
This commit is contained in:
Paul Davis 2014-08-27 12:38:27 -04:00
commit 31d500e3a9
71 changed files with 1015 additions and 116 deletions

View file

@ -56,6 +56,14 @@ class ArdourButton;
class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
{
public:
enum {
ROUTE_HEADER
// add more targets here
} DnDTargets;
static Gtk::TargetEntry header_target;
RouteUI(ARDOUR::Session*, const std::string& layout_script_file);
virtual ~RouteUI();
@ -65,6 +73,35 @@ class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
virtual void set_route (boost::shared_ptr<ARDOUR::Route>);
virtual void set_button_names () = 0;
// DnD
void enable_header_dnd ();
bool disable_header_dnd ();
bool dnd_operation_enabled () { return _dnd_operation_enabled; }
// DnD callback handlers:
// source callbacks
void on_route_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
void on_route_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, Gtk::SelectionData& selection_data, guint info, guint time);
void on_route_drag_end(const Glib::RefPtr<Gdk::DragContext>& context);
// destination callbacks
bool on_route_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time);
void on_route_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time);
bool on_route_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time);
void on_route_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
// HANDLERS WHICH MUST BE DEFINED in inheriting class for DnD support
// define in inheriting class if you want custom drag icon to be set
virtual void handle_route_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context) {};
// define in inheriting class if you want actions on dnd end
virtual void handle_route_drag_end(const Glib::RefPtr<Gdk::DragContext>& context) {};
// define this in inheriting class to provide the responce on a draging above the widget
virtual bool handle_route_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time) { context->drag_refuse(time); return false; };
// define this in inheriting class to provide the responce on a leaving the widget with drag
virtual void handle_route_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time) {};
// define this in inheriting class to provide the responce and actions on the destination side
virtual void handle_route_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time) {context->drop_finish(false, time); };
bool is_track() const;
bool is_audio_track() const;
bool is_master_track() const;
@ -93,7 +130,6 @@ class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
bool wait_for_release;
bool multiple_mute_change;
bool multiple_solo_change;
WavesButton& master_mute_button;
WavesButton& mute_button;
WavesButton& solo_button;
@ -225,6 +261,8 @@ class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
*/
static PBD::Signal1<void, boost::shared_ptr<ARDOUR::Route> > BusSendDisplayChanged;
bool dnd_in_progress() {return _dnd_operation_in_progress; }
protected:
PBD::ScopedConnectionList route_connections;
bool self_destruct;
@ -281,6 +319,9 @@ class RouteUI : public Gtk::EventBox, public WavesUI, public virtual AxisView
static boost::weak_ptr<ARDOUR::Route> _showing_sends_to;
static uint32_t _max_invert_buttons;
bool _dnd_operation_in_progress;
bool _dnd_operation_enabled;
};
#endif /* __ardour_route_ui__ */