summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2005-11-16 02:57:22 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2005-11-16 02:57:22 +0000
commitf16caf535c3e7a697c7464ecc153bce1b341d0ef (patch)
treede359f3e2ef8d30d070cff3476bcea7d185596cb /gtk2_ardour/automation_line.cc
parentadacfd9b24fb0ac7c4029cd659d21107eb7a2208 (diff)
get editor.cc to compile
git-svn-id: svn://localhost/trunk/ardour2@99 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc27
1 files changed, 17 insertions, 10 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index c21cf70582..da208489f4 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -51,7 +51,7 @@ using namespace ARDOUR;
using namespace Editing;
using namespace Gnome; // for Canvas
-ControlPoint::ControlPoint (AutomationLine& al, sigc::slot<bool,GdkEvent*,ControlPoint*> handler)
+ControlPoint::ControlPoint (AutomationLine& al)
: line (al)
{
model = al.the_list().end();
@@ -70,7 +70,7 @@ ControlPoint::ControlPoint (AutomationLine& al, sigc::slot<bool,GdkEvent*,Contro
item->property_outline_color_rgba() = color_map[cControlPointOutline];
item->property_outline_pixels() = 1;
item->set_data ("control_point", this);
- item->signal_event().connect (bind (handler, this));
+ item->signal_event().connect (mem_fun (this, &ControlPoint::event_handler));
hide ();
set_visible (false);
@@ -108,6 +108,12 @@ ControlPoint::~ControlPoint ()
gtk_object_destroy (GTK_OBJECT(item));
}
+bool
+ControlPoint::event_handler (GdkEvent* event)
+{
+ return PublicEditor::instance().canvas_control_point_event (event, item, this);
+}
+
void
ControlPoint::hide ()
{
@@ -211,10 +217,7 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
/*****/
-AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Group& parent, AutomationList& al,
- slot<bool,GdkEvent*,ControlPoint*> point_handler,
- slot<bool,GdkEvent*,AutomationLine*> line_handler)
-
+AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Group& parent, AutomationList& al)
: trackview (tv),
_name (name),
alist (al),
@@ -225,7 +228,6 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Gr
_vc_uses_gain_mapping = false;
no_draw = false;
_visible = true;
- point_slot = point_handler;
terminal_points_can_slide = true;
_height = 0;
@@ -236,8 +238,7 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Gr
line = new Gnome::Canvas::Line (*group);
line->set_property ("width_pixels", (guint)1);
- line->set_data ("line", this);
- line->signal_event().connect (bind (line_handler, this));
+ line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler));
alist.StateChanged.connect (mem_fun(*this, &AutomationLine::list_changed));
}
@@ -249,6 +250,12 @@ AutomationLine::~AutomationLine ()
gtk_object_destroy (GTK_OBJECT(group));
}
+bool
+AutomationLine::event_handler (GdkEvent* event)
+{
+ return PublicEditor::instance().canvas_line_event (event, line, this);
+}
+
void
AutomationLine::queue_reset ()
{
@@ -736,7 +743,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
if (view_index >= control_points.size()) {
/* make sure we have enough control points */
- ControlPoint* ncp = new ControlPoint (*this, point_slot);
+ ControlPoint* ncp = new ControlPoint (*this);
if (_height > (guint32) TimeAxisView::Larger) {
ncp->set_size (8.0);