Re: Overlapping GtkWidgets - any advice?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-08-16 at 17:18 -0600, Jeff Smith wrote:
> Spectacular concision. Thank you.
> 
> Now, if I understand GnomeCanvas properly, it will allow me to embed
> drawable objects into the canvas, instead of putting widgets into a
> GtkFixed. And this will all draw very nicely, without background
> obliteration etc. But doing so will sacrifice the GUI events that I
> get for free on an object-by-object basis from the GtkWidget class,
> yes? 

no, every object has its own event handler. the one distinction is that
is a single event handler, not one per event type. so you end up a
generic handler of the form:

	int handler (GdkEventAny *event) {

	    switch (event->type) {
	    case GDK_BUTTON_PRESS:
	      ... do button press stuff ...
	      break;

	    // etc
	    }
	
	    return one_for_handled_zero_for_not_handled;
        }


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux