latest work
git-svn-id: svn://localhost/trunk/ardour2@98 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
beb3ee2339
commit
adacfd9b24
|
@ -51,7 +51,7 @@
|
|||
#include "public_editor.h"
|
||||
#include "audio_time_axis.h"
|
||||
#include "streamview.h"
|
||||
#include "canvas-simplerect.h"
|
||||
#include "simplerect.h"
|
||||
#include "playlist_selector.h"
|
||||
#include "plugin_selector.h"
|
||||
#include "plugin_ui.h"
|
||||
|
@ -72,6 +72,7 @@
|
|||
#include "prompter.h"
|
||||
#include "crossfade_view.h"
|
||||
#include "gui_thread.h"
|
||||
#include "canvas_impl.h"
|
||||
|
||||
#include <ardour/audio_track.h>
|
||||
|
||||
|
@ -99,7 +100,7 @@ static const gchar * small_x_xpm[] = {
|
|||
" ",
|
||||
" "};
|
||||
|
||||
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt, Widget *canvas)
|
||||
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, Route& rt, CanvasAA& canvas)
|
||||
: AxisView(sess),
|
||||
RouteUI(rt, sess, _("m"), _("s"), _("r")), // mute, solo, and record
|
||||
TimeAxisView(sess,ed,(TimeAxisView*) 0, canvas),
|
||||
|
@ -484,20 +485,18 @@ AudioTimeAxisView::show_timestretch (jack_nframes_t start, jack_nframes_t end)
|
|||
#endif
|
||||
|
||||
if (timestretch_rect == 0) {
|
||||
timestretch_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display),
|
||||
gnome_canvas_simplerect_get_type(),
|
||||
"x1", 0.0,
|
||||
"y1", 0.0,
|
||||
"x2", 0.0,
|
||||
"y2", 0.0,
|
||||
"fill_color_rgba", color_map[cTimeStretchFill],
|
||||
"outline_color_rgba" , color_map[cTimeStretchOutline],
|
||||
NULL);
|
||||
timestretch_rect = new SimpleRect (*canvas_display);
|
||||
timestretch_rect->property_x1() = 0.0;
|
||||
timestretch_rect->property_y1() = 0.0;
|
||||
timestretch_rect->property_x2() = 0.0;
|
||||
timestretch_rect->property_y2() = 0.0;
|
||||
timestretch_rect->property_fill_color_rgba() = color_map[cTimeStretchFill];
|
||||
timestretch_rect->property_outline_color_rgba() = color_map[cTimeStretchOutline];
|
||||
}
|
||||
|
||||
gnome_canvas_item_show (timestretch_rect);
|
||||
gnome_canvas_item_raise_to_top (timestretch_rect);
|
||||
|
||||
timestretch_rect->show ();
|
||||
timestretch_rect->raise_to_top ();
|
||||
|
||||
x1 = start / editor.get_current_zoom();
|
||||
x2 = (end - 1) / editor.get_current_zoom();
|
||||
y2 = height - 2;
|
||||
|
@ -516,7 +515,7 @@ AudioTimeAxisView::hide_timestretch ()
|
|||
TimeAxisView::hide_timestretch ();
|
||||
|
||||
if (timestretch_rect) {
|
||||
gnome_canvas_item_hide (timestretch_rect);
|
||||
timestretch_rect->hide ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1203,19 +1202,20 @@ AudioTimeAxisView::add_gain_automation_child ()
|
|||
_route,
|
||||
editor,
|
||||
*this,
|
||||
parent_canvas,
|
||||
*(parent_canvas.root()),
|
||||
_("gain"),
|
||||
_route.gain_automation_curve());
|
||||
|
||||
|
||||
sigc::slot<bool,GdkEvent*,ControlPoint*> cslot = mem_fun (editor, &PublicEditor::canvas_control_point_event);
|
||||
sigc::slot<bool,GdkEvent*,AutomationLine*> lslot = mem_fun (editor, &PublicEditor::canvas_line_event);
|
||||
|
||||
#if 0
|
||||
line = new AutomationGainLine ("automation gain",
|
||||
_session,
|
||||
*gain_track,
|
||||
*gain_track->canvas_display,
|
||||
_route.gain_automation_curve(), cslot, lslot);
|
||||
_route.gain_automation_curve(),
|
||||
mem_fun (editor, &PublicEditor::canvas_control_point_event),
|
||||
mem_fun (editor, &PublicEditor::canvas_line_event));
|
||||
#endif
|
||||
|
||||
line->set_line_color (color_map[cAutomationLine]);
|
||||
|
||||
|
@ -1248,7 +1248,7 @@ AudioTimeAxisView::add_pan_automation_child ()
|
|||
{
|
||||
XMLProperty* prop;
|
||||
|
||||
pan_track = new PanAutomationTimeAxisView (_session, _route, editor, *this, parent_canvas, _("pan"));
|
||||
pan_track = new PanAutomationTimeAxisView (_session, _route, editor, *this, *(parent_canvas.root()), _("pan"));
|
||||
|
||||
update_pans ();
|
||||
|
||||
|
@ -1295,8 +1295,8 @@ AudioTimeAxisView::update_pans ()
|
|||
line = new AutomationPanLine ("automation pan", _session, *pan_track,
|
||||
*pan_track->canvas_display,
|
||||
(*p)->automation(),
|
||||
PublicEditor::canvas_control_point_event,
|
||||
PublicEditor::canvas_line_event);
|
||||
mem_fun (editor, &PublicEditor::canvas_control_point_event),
|
||||
mem_fun (editor, &PublicEditor::canvas_line_event));
|
||||
|
||||
if (p == _route.panner().begin()) {
|
||||
/* first line is a nice orange */
|
||||
|
@ -1472,13 +1472,13 @@ AudioTimeAxisView::add_redirect_automation_curve (Redirect *redirect, uint32_t w
|
|||
char state_name[256];
|
||||
snprintf (state_name, sizeof (state_name), "Redirect-%s-%" PRIu32, legalize_for_xml_node (redirect->name()).c_str(), what);
|
||||
|
||||
ran->view = new RedirectAutomationTimeAxisView (_session, _route, editor, *this, parent_canvas, name, what, *redirect, state_name);
|
||||
ran->view = new RedirectAutomationTimeAxisView (_session, _route, editor, *this, (*parent_canvas.root()), name, what, *redirect, state_name);
|
||||
|
||||
ral = new RedirectAutomationLine (name,
|
||||
*redirect, what, _session, *ran->view,
|
||||
*ran->view->canvas_display, redirect->automation_list (what),
|
||||
PublicEditor::canvas_control_point_event,
|
||||
PublicEditor::canvas_line_event);
|
||||
mem_fun (editor, &PublicEditor::canvas_control_point_event),
|
||||
mem_fun (editor, &PublicEditor::canvas_line_event));
|
||||
|
||||
ral->set_line_color (color_map[cRedirectAutomationLine]);
|
||||
ral->queue_reset ();
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#define __ardour_trackview_h__
|
||||
|
||||
#include <gtkmm.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm2ext/selector.h>
|
||||
#include <list>
|
||||
|
||||
|
@ -33,6 +32,7 @@
|
|||
#include "route_ui.h"
|
||||
#include "enums.h"
|
||||
#include "time_axis_view.h"
|
||||
#include "canvas.h"
|
||||
|
||||
namespace ALSA {
|
||||
class MultiChannelDevice;
|
||||
|
@ -69,7 +69,7 @@ class AutomationTimeAxisView;
|
|||
class AudioTimeAxisView : public RouteUI, public TimeAxisView
|
||||
{
|
||||
public:
|
||||
AudioTimeAxisView (PublicEditor&, ARDOUR::Session&, ARDOUR::Route&, Gtk::Widget *canvas);
|
||||
AudioTimeAxisView (PublicEditor&, ARDOUR::Session&, ARDOUR::Route&, ArdourCanvas::CanvasAA& canvas);
|
||||
virtual ~AudioTimeAxisView ();
|
||||
|
||||
void show_selection (TimeSelection&);
|
||||
|
@ -122,7 +122,7 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
|
|||
friend class StreamView;
|
||||
friend class AudioRegionView;
|
||||
|
||||
Gtk::Widget* parent_canvas;
|
||||
ArdourCanvas::Canvas& parent_canvas;
|
||||
|
||||
bool no_redraw;
|
||||
|
||||
|
@ -282,7 +282,7 @@ class AudioTimeAxisView : public RouteUI, public TimeAxisView
|
|||
void add_redirect_automation_curve (ARDOUR::Redirect*, uint32_t);
|
||||
void add_existing_redirect_automation_curves (ARDOUR::Redirect*);
|
||||
|
||||
GnomeCanvasItem *timestretch_rect;
|
||||
ArdourCanvas::SimpleRect *timestretch_rect;
|
||||
|
||||
void timestretch (jack_nframes_t start, jack_nframes_t end);
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class AutomationTimeAxisView : public TimeAxisView {
|
|||
void set_samples_per_unit (double);
|
||||
std::string name() const { return _name; }
|
||||
|
||||
virtual void add_automation_event (Gnome::Canvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
virtual void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double) = 0;
|
||||
|
||||
void clear_lines ();
|
||||
void add_line (AutomationLine&);
|
||||
|
|
|
@ -80,10 +80,7 @@ CrossfadeView::CrossfadeView (Gnome::Canvas::Group *parent,
|
|||
vestigial_frame->hide();
|
||||
show_vestigial = false;
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT(group), "crossfadeview", this);
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_crossfade_view_event,
|
||||
this);
|
||||
group->signal_event.connect (bind (mem_fun (editor, &Public::canvas_crossfade_view_event), group, this));
|
||||
|
||||
crossfade_changed (Change (~0));
|
||||
|
||||
|
|
|
@ -1173,17 +1173,14 @@ class Editor : public PublicEditor
|
|||
bool canvas_range_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_transport_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*);
|
||||
|
||||
// PENDING
|
||||
|
||||
|
||||
gint canvas_imageframe_item_view_event(GdkEvent* event) ;
|
||||
gint canvas_imageframe_view_event(GdkEvent* event) ;
|
||||
gint canvas_imageframe_start_handle_event(GdkEvent* event) ;
|
||||
gint canvas_imageframe_end_handle_event(GdkEvent* event) ;
|
||||
gint canvas_marker_time_axis_view_event(GdkEvent* event) ;
|
||||
gint canvas_markerview_item_view_event(GdkEvent* event) ;
|
||||
gint canvas_markerview_start_handle_event(GdkEvent* event) ;
|
||||
gint canvas_markerview_end_handle_event(GdkEvent* event) ;
|
||||
bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_imageframe_end_handle_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_marker_time_axis_view_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*);
|
||||
|
||||
/* non-public event handlers */
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef __ardour_gtk_gain_automation_time_axis_h__
|
||||
#define __ardour_gtk_gain_automation_time_axis_h__
|
||||
|
||||
#include "canvas.h"
|
||||
#include "automation_time_axis.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -15,13 +16,13 @@ class GainAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
ARDOUR::Route&,
|
||||
PublicEditor&,
|
||||
TimeAxisView& parent_axis,
|
||||
Gtk::Widget* parent,
|
||||
ArdourCanvas::Group& parent,
|
||||
std::string name,
|
||||
ARDOUR::Curve&);
|
||||
|
||||
~GainAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (Gnome::Canvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
private:
|
||||
ARDOUR::Curve& curve;
|
||||
|
|
|
@ -65,7 +65,7 @@ ImageFrameTimeAxisView::ImageFrameTimeAxisView (ImageFrameTimeAxis& tv)
|
|||
"fill_color_rgba", stream_base_color,
|
||||
0) ;
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(canvas_rect), "event", (GtkSignalFunc) PublicEditor::canvas_imageframe_view_event, &_trackview) ;
|
||||
canvas_rect->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_view_event), canvas_rect, &_trackview));
|
||||
|
||||
_samples_per_unit = _trackview.editor.get_current_zoom() ;
|
||||
|
||||
|
|
|
@ -93,28 +93,19 @@ ImageFrameView::ImageFrameView(std::string item_id,
|
|||
int im_width = (int)((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
|
||||
|
||||
imageframe = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
|
||||
gnome_canvas_imageframe_get_type(),
|
||||
"pixbuf", pbuf,
|
||||
"x", (gdouble) 1.0,
|
||||
"y", (gdouble) 1.0,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"width", (gdouble) im_width,
|
||||
"height", (gdouble) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE),
|
||||
NULL) ;
|
||||
gnome_canvas_imageframe_get_type(),
|
||||
"pixbuf", pbuf,
|
||||
"x", (gdouble) 1.0,
|
||||
"y", (gdouble) 1.0,
|
||||
"anchor", GTK_ANCHOR_NW,
|
||||
"width", (gdouble) im_width,
|
||||
"height", (gdouble) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE),
|
||||
NULL) ;
|
||||
|
||||
frame_handle_start->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start));
|
||||
frame_handle_end->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_end_handle_event), frame_handle_end));
|
||||
group->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_item_view_event, this);), group));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(frame_handle_start), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_imageframe_start_handle_event,
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(frame_handle_end), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_imageframe_end_handle_event,
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_imageframe_item_view_event, this);
|
||||
|
||||
/* handle any specific details required by the initial start end duration values */
|
||||
|
||||
frame_handle_start->raise_to_top();
|
||||
frame_handle_end->raise_to_top();
|
||||
|
|
|
@ -261,10 +261,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
|
|||
text->set_property ("anchor", Gtk::ANCHOR_NW);
|
||||
text->set_property ("fill_color", Gdk::Color ("black"));
|
||||
|
||||
group->set_data ("marker", this);
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event", (GtkSignalFunc) callback, &editor);
|
||||
|
||||
editor.ZoomChanged.connect (mem_fun(*this, &Marker::reposition));
|
||||
group->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::reposition), group, this));
|
||||
}
|
||||
|
||||
Marker::~Marker ()
|
||||
|
|
|
@ -64,7 +64,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
|
|||
canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]);
|
||||
canvas_rect->set_property ("fill_color_rgba", stream_base_color);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(canvas_rect), "event", (GtkSignalFunc)PublicEditor::canvas_marker_time_axis_view_event, &_trackview) ;
|
||||
canvas_rect->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
|
||||
|
||||
_samples_per_unit = _trackview.editor.get_current_zoom() ;
|
||||
|
||||
|
|
|
@ -64,21 +64,14 @@ MarkerView::MarkerView(Gnome::Canvas::Group *parent,
|
|||
// set the canvas item text to the marker type, not the id
|
||||
set_name_text(mark_type_text) ;
|
||||
|
||||
// hoo up our canvas events
|
||||
gtk_signal_connect (GTK_OBJECT(frame_handle_start), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_markerview_start_handle_event,
|
||||
this);
|
||||
// hook up our canvas events
|
||||
|
||||
frame_handle_start->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_markerview_start_handle_event), frame_handle_start, this));
|
||||
frame_handle_end->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_markerview_end_handle_event), frame_handle_end, this));;
|
||||
group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_markerview_item_view_event, this), group, this));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(frame_handle_end), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_markerview_end_handle_event,
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_markerview_item_view_event, this);
|
||||
|
||||
/* handle any specific details required by the initial start end duration values */
|
||||
set_position(start, this) ;
|
||||
set_duration(duration, this) ;
|
||||
set_position(start, this) ;
|
||||
set_duration(duration, this) ;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef __ardour_gtk_pan_automation_time_axis_h__
|
||||
#define __ardour_gtk_pan_automation_time_axis_h__
|
||||
|
||||
#include "canvas.h"
|
||||
#include "automation_time_axis.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -14,12 +15,12 @@ class PanAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
ARDOUR::Route&,
|
||||
PublicEditor&,
|
||||
TimeAxisView& parent_axis,
|
||||
Gtk::Widget* parent,
|
||||
ArdourCanvas::Group& parent,
|
||||
std::string name);
|
||||
|
||||
~PanAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
private:
|
||||
void automation_changed ();
|
||||
|
|
|
@ -152,16 +152,14 @@ class PublicEditor : public Gtk::Window, public Stateful, public KeyboardTarget
|
|||
virtual bool canvas_range_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_transport_marker_bar_event (GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
|
||||
// PENDING
|
||||
|
||||
virtual gint canvas_imageframe_item_view_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_imageframe_view_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_imageframe_start_handle_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_imageframe_end_handle_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_marker_time_axis_view_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_markerview_item_view_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_markerview_start_handle_event(GdkEvent* event) = 0;
|
||||
virtual gint canvas_markerview_end_handle_event(GdkEvent* event) = 0;
|
||||
virtual bool canvas_imageframe_item_view_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_imageframe_view_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_imageframe_start_handle_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_imageframe_end_handle_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_marker_time_axis_view_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_markerview_item_view_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_markerview_start_handle_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
virtual bool canvas_markerview_end_handle_event(GdkEvent* event, ArdourCanvas::Item*) = 0;
|
||||
|
||||
static PublicEditor* _instance;
|
||||
};
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
#define __ardour_gtk_redirect_automation_line_h__
|
||||
|
||||
#include <ardour/ardour.h>
|
||||
#include <libgnomecanvas/libgnomecanvas.h>
|
||||
#include <gtkmm.h>
|
||||
|
||||
#include "canvas.h"
|
||||
#include "automation_line.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -38,7 +38,7 @@ class RedirectAutomationLine : public AutomationLine
|
|||
{
|
||||
public:
|
||||
RedirectAutomationLine (string name, ARDOUR::Redirect&, uint32_t port, ARDOUR::Session&, TimeAxisView&,
|
||||
Gnome::Canvas::Group& parent,
|
||||
ArdourCanvas::Group& parent,
|
||||
ARDOUR::AutomationList&,
|
||||
sigc::slot<bool,GdkEvent*,ControlPoint*> point_handler,
|
||||
sigc::slot<bool,GdkEvent*,AutomationLine*> line_handler);
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
using namespace ARDOUR;
|
||||
using namespace Gtk;
|
||||
|
||||
RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Widget* p, std::string n,
|
||||
RedirectAutomationTimeAxisView::RedirectAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, ArdourCanvas::Group& gp, std::string n,
|
||||
uint32_t prt, Redirect& rd, string state_name)
|
||||
|
||||
: AxisView (s),
|
||||
AutomationTimeAxisView (s, r, e, parent, p, n, state_name, rd.name()),
|
||||
AutomationTimeAxisView (s, r, e, parent, gp, n, state_name, rd.name()),
|
||||
redirect (rd),
|
||||
port (prt)
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#define __ardour_gtk_redirect_automation_time_axis_h__
|
||||
|
||||
#include <pbd/xml++.h>
|
||||
|
||||
#include "canvas.h"
|
||||
#include "automation_time_axis.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
@ -15,15 +17,15 @@ class RedirectAutomationTimeAxisView : public AutomationTimeAxisView
|
|||
ARDOUR::Route&,
|
||||
PublicEditor&,
|
||||
TimeAxisView& parent,
|
||||
Gtk::Widget* parent,
|
||||
ArdourCanvas::Group& parent,
|
||||
std::string name,
|
||||
uint32_t port,
|
||||
ARDOUR::Redirect& rd,
|
||||
std::string state_name);
|
||||
|
||||
~RedirectAutomationTimeAxisView();
|
||||
|
||||
void add_automation_event (GnomeCanvasItem *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, jack_nframes_t, double);
|
||||
|
||||
guint32 show_at (double y, int& nth, Gtk::VBox *parent);
|
||||
void hide ();
|
||||
|
|
|
@ -178,32 +178,13 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
|
|||
|
||||
region.StateChanged.connect (mem_fun(*this, &AudioRegionView::region_changed));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(group), "event",
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_region_view_event),
|
||||
this);
|
||||
gtk_signal_connect (GTK_OBJECT(name_highlight), "event",
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_region_view_name_highlight_event),
|
||||
this);
|
||||
group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::UNC (PublicEditor::canvas_region_view_event)), group, this));
|
||||
region_view_name_highlight->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_region_view_name_highlight_event), region_view_name_highlight, this));
|
||||
fade_in_shape->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_in_event), fade_in_shape, this));
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(name_text), "event",
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_region_view_name_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_in_shape), "event",
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_fade_in_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_in_handle), "event",
|
||||
GTK_SIGNAL_FUNC (PublicEditor::canvas_fade_in_handle_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(fade_out_shape), "event",
|
||||
GTK_SIGNAL_FUNC ( PublicEditor::canvas_fade_out_event),
|
||||
this);
|
||||
|
||||
gtk_signal_connect_object (GTK_OBJECT(fade_out_handle), "event",
|
||||
GTK_SIGNAL_FUNC ( PublicEditor::canvas_fade_out_handle_event),
|
||||
this);
|
||||
fade_in_handle->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_in_handle_event), fade_in_handle, this));
|
||||
fade_out_shape->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_out_event)), fade_out_shape, this));
|
||||
fade_out_handle->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_out_handle_event), fade_out_handle, this));
|
||||
|
||||
set_colors ();
|
||||
|
||||
|
|
|
@ -72,8 +72,7 @@ StreamView::StreamView (AudioTimeAxisView& tv)
|
|||
canvas_rect->set_property ("outline_what", (guint32) (0x1|0x2|0x8));
|
||||
canvas_rect->set_property ("fill_color_rgba", stream_base_color);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT(canvas_rect), "event",
|
||||
(GtkSignalFunc) PublicEditor::canvas_stream_view_event, &_trackview);
|
||||
canvas_rect->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_stream_view_event), canvas_rect, this));
|
||||
|
||||
_samples_per_unit = _trackview.editor.get_current_zoom();
|
||||
_amplitude_above_axis = 1.0;
|
||||
|
|
Loading…
Reference in New Issue