Re: Routing scroll events in a Gtk.Overlay
- From: Emmanuele Bassi <ebassi gmail com>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: richard boaz <ivor boaz gmail com>, ML-gtk <gtk-list gnome org>
- Subject: Re: Routing scroll events in a Gtk.Overlay
- Date: Thu, 5 Jun 2014 22:39:43 +0100
GtkWidget::scroll-event, though, is a RUN_LAST signal; it means that
the handlers connected using g_signal_connect() will run before the
class handler. on top of that, neither GtkWidget nor GtkEventBox have
a default class handler, so connecting to the signal is identical to
getting your callback called first.
as for how gtkmm implements a 'before' flag: that's pretty much
impossible if the signal is defined as RUN_FIRST when installed on the
type; RUN_FIRST means that the default class handler is always called
before any signal connected using g_signal_connect(). to avoid that
you'd have to subclass the original class, override the signal
handler, and from the override you would have to call your code before
chaining up.
ciao,
Emmanuele.
On 5 June 2014 21:14, Paul Davis <paul linuxaudiosystems com> wrote:
On Thu, Jun 5, 2014 at 4:12 PM, Robert Schroll <rschroll gmail com> wrote:
def eb_scroll(widget, event):
print "Event Box scroll event"
return True
eb.connect('scroll-event', eb_scroll)
this connects after the default handler, not before it.
i don't know pygtk all that well; in gtkmm (the C++ binding) there is an
optional "before" boolean argument to the connect call to get the handler
connected BEFORE the default handler.
_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]