diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-04 00:32:52 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-04-04 00:32:52 -0400 |
commit | aaea166135ace01709f7e0be64f40be80f4107ec (patch) | |
tree | 0e794ef7a723e4aaf909b841a6816e405b4ceca1 /gtk2_ardour/control_point.cc | |
parent | 1d8bac08c0c00d44e22c581768a275e1b21a99a7 (diff) |
initial commit of hand merging, plus getting "ancient" waf script to work correctly
Diffstat (limited to 'gtk2_ardour/control_point.cc')
-rw-r--r-- | gtk2_ardour/control_point.cc | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/gtk2_ardour/control_point.cc b/gtk2_ardour/control_point.cc index d869e094aa..8e05ad0a0b 100644 --- a/gtk2_ardour/control_point.cc +++ b/gtk2_ardour/control_point.cc @@ -18,17 +18,17 @@ */ #include "control_point.h" -#include "diamond.h" #include "automation_line.h" #include "ardour_ui.h" #include "public_editor.h" +#include "canvas/rectangle.h" + #include "i18n.h" using namespace std; using namespace ARDOUR; using namespace PBD; -using namespace Gnome; // for Canvas PBD::Signal1<void, ControlPoint *> ControlPoint::CatchDeletion; @@ -43,14 +43,14 @@ ControlPoint::ControlPoint (AutomationLine& al) _shape = Full; _size = 4.0; - _item = new Canvas::SimpleRect (_line.canvas_group()); + _item = new ArdourCanvas::Rectangle (&_line.canvas_group()); _item->property_draw() = true; - _item->property_fill() = false; - _item->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointFill.get(); - _item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get(); - _item->property_outline_pixels() = 1; + _item->set_fill (false); + _item->set_fill_color (ARDOUR_UI::config()->canvasvar_ControlPointFill.get()); + _item->set_outline_color (ARDOUR_UI::config()->canvasvar_ControlPointOutline.get()); + _item->set_outline_width (1); _item->set_data ("control_point", this); - _item->signal_event().connect (sigc::mem_fun (this, &ControlPoint::event_handler)); + _item->Event.connect (sigc::mem_fun (this, &ControlPoint::event_handler)); hide (); set_visible (false); @@ -71,10 +71,10 @@ ControlPoint::ControlPoint (const ControlPoint& other, bool /*dummy_arg_to_force _shape = other._shape; _size = other._size; - _item = new Canvas::SimpleRect (_line.canvas_group()); - _item->property_fill() = false; - _item->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get(); - _item->property_outline_pixels() = 1; + _item = new ArdourCanvas::Rectangle (&_line.canvas_group()); + _item->set_fill (false); + _item->set_outline_color (ARDOUR_UI::config()->canvasvar_ControlPointOutline.get()); + _item->set_outline_width (1); /* NOTE: no event handling in copied ControlPoints */ @@ -146,8 +146,8 @@ ControlPoint::set_color () color = ARDOUR_UI::config()->canvasvar_ControlPointOutline.get(); } - _item->property_outline_color_rgba() = color; - _item->property_fill_color_rgba() = ARDOUR_UI::config()->canvasvar_ControlPointFill.get(); + _item->set_outline_color (color); + _item->set_fill_color (ARDOUR_UI::config()->canvasvar_ControlPointFill.get()); } void @@ -179,10 +179,7 @@ ControlPoint::move_to (double x, double y, ShapeType shape) break; } - _item->property_x1() = x1; - _item->property_x2() = x2; - _item->property_y1() = y - half_size; - _item->property_y2() = y + half_size; + _item->set (ArdourCanvas::Rect (x1, y - half_size, x2, y + half_size)); _x = x; _y = y; @@ -192,5 +189,5 @@ ControlPoint::move_to (double x, double y, ShapeType shape) void ControlPoint::i2w (double& x, double& y) const { - _item->i2w (x, y); + _item->item_to_canvas (x, y); } |