}
void
-Panner2d::on_size_allocate (GtkAllocation *alloc)
+Panner2d::on_size_allocate (Gtk::Allocation alloc)
{
- width = alloc->width;
- height = alloc->height;
+ width = alloc.get_width();
+ height = alloc.get_height();
DrawingArea::on_size_allocate (alloc);
}
return closest;
}
-gint
+bool
Panner2d::on_motion_notify_event (GdkEventMotion *ev)
{
gint x, y;
return TRUE;
}
-gint
+bool
Panner2d::on_expose_event (GdkEventExpose *event)
{
gint x, y;
/* redraw the background */
- get_window().draw_rectangle (get_style()->get_bg_gc(get_state()),
+ get_window()->draw_rectangle (get_style()->get_bg_gc(get_state()),
true,
event->area.x, event->area.y,
event->area.width, event->area.height);
fy = max (fy, -1.0f);
y = (gint) floor (height * fy - 4);
- get_window().draw_arc (get_style()->get_fg_gc(Gtk::STATE_NORMAL),
+ get_window()->draw_arc (get_style()->get_fg_gc(Gtk::STATE_NORMAL),
true,
x, y,
8, 8,
fy = max (fy, -1.0f);
y = (gint) floor ((height - 8) * fy);
- get_window().draw_rectangle (get_style()->get_fg_gc(GTK_STATE_ACTIVE),
+ get_window()->draw_rectangle (get_style()->get_fg_gc(Gtk::STATE_ACTIVE),
true,
x, y,
4, 4);
return TRUE;
}
-gint
+bool
Panner2d::on_button_press_event (GdkEventButton *ev)
{
switch (ev->button) {
return FALSE;
}
-gint
+bool
Panner2d::on_button_release_event (GdkEventButton *ev)
{
switch (ev->button) {
MenuList& items = context_menu->items();
items.push_back (CheckMenuElem (_("Bypass")));
- bypass_menu_item = static_cast<CheckMenuItem*> (items.back());
- bypass_menu_item->toggled.connect (mem_fun(*this, &Panner2d::toggle_bypass));
+ bypass_menu_item = static_cast<CheckMenuItem*> (&items.back());
+ bypass_menu_item->signal_toggled().connect (mem_fun(*this, &Panner2d::toggle_bypass));
}