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