using namespace std;
using namespace sigc;
using namespace ARDOUR;
+using namespace PBD;
using namespace Editing;
using namespace Gnome; // for Canvas
ControlPoint::~ControlPoint ()
{
- gtk_object_destroy (GTK_OBJECT(item));
+ delete item;
}
bool
void
ControlPoint::set_visible (bool yn)
{
- item->set_property ("draw", (gboolean) yn);
+ item->property_draw() = (gboolean) yn;
}
void
{
if (entered) {
if (selected) {
- item->set_property ("outline_color_rgba", color_map[cEnteredControlPointSelected]);
+ item->property_outline_color_rgba() = color_map[cEnteredControlPointSelected];
set_visible(true);
} else {
- item->set_property ("outline_color_rgba", color_map[cEnteredControlPoint]);
+ item->property_outline_color_rgba() = color_map[cEnteredControlPoint];
if (hide_too) {
set_visible(false);
}
} else {
if (selected) {
- item->set_property ("outline_color_rgba", color_map[cControlPointSelected]);
+ item->property_outline_color_rgba() = color_map[cControlPointSelected];
set_visible(true);
} else {
- item->set_property ("outline_color_rgba", color_map[cControlPoint]);
+ item->property_outline_color_rgba() = color_map[cControlPoint];
if (hide_too) {
set_visible(false);
}
#if 0
if (_size > 6.0) {
- item->set_property ("fill", (gboolean) TRUE);
+ item->property_fill() = (gboolean) TRUE;
} else {
- item->set_property ("fill", (gboolean) FALSE);
+ item->property_fill() = (gboolean) FALSE;
}
#endif
break;
}
- item->set_property ("x1", x1);
- item->set_property ("x2", x2);
- item->set_property ("y1", y - half_size);
- item->set_property ("y2", y + half_size);
+ item->property_x1() = x1;
+ item->property_x2() = x2;
+ item->property_y1() = y - half_size;
+ item->property_y2() = y + half_size;
_x = x;
_y = y;
/*****/
-AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Group& parent, AutomationList& al)
+AutomationLine::AutomationLine (const string & name, TimeAxisView& tv, ArdourCanvas::Group& parent, AutomationList& al)
: trackview (tv),
_name (name),
alist (al),
terminal_points_can_slide = true;
_height = 0;
- group = new Gnome::Canvas::Group (parent);
- group->set_property ("x", 0.0);
- group->set_property ("y", 0.0);
+ group = new ArdourCanvas::Group (parent);
+ group->property_x() = 0.0;
+ group->property_y() = 0.0;
- line = new Gnome::Canvas::Line (*group);
- line->set_property ("width_pixels", (guint)1);
+ line = new ArdourCanvas::Line (*group);
+ line->property_width_pixels() = (guint)1;
+ line->set_data ("line", this);
line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler));
AutomationLine::~AutomationLine ()
{
vector_delete (&control_points);
-
- gtk_object_destroy (GTK_OBJECT(group));
+ delete group;
}
bool
AutomationLine::set_line_color (uint32_t color)
{
_line_color = color;
- line->set_property ("fill_color_rgba", color);
+ line->property_fill_color_rgba() = color;
}
void