Re: Toolbar/Toolbox or something other...



void g_object_set_data(GObject *obj, gchar *name, gpointer data);
gpointer g_object_get_data(GObject *obj, gchar *name);


Andreas Volz wrote:

Am Thu, 21 Nov 2002 16:40:50 +0100
Emmanuel Saracco <esaracco noos fr> schrieb:

On Thu, 21 Nov 2002 16:20:36 +0000
Andreas Volz <andreas brachttal net> wrote:

This is normal:
  g_signal_connect (G_OBJECT (button), "clicked",
                    G_CALLBACK (run), (gpointer) entry);

But I search something like this:
  g_signal_connect (G_OBJECT (button), "clicked",
                    G_CALLBACK (run), (gpointer) entry, (gpointer)
checkbox);

I hope you understand what I want do do ;-)

you must catch an event on the entry widget, and then check the state
of your checkbox *from inside* the callback function.

to do that, you have two methods:

1/ register your checkbox widget with gtk_object_set_data() after
creating it, so it will be possible to retrieve a pointer reference on
it later with gtk_object_get_data() -- the cleanest way;

2/ declare a global pointer that reference your checkbox widget - the
fastest way.

bye


The first method fits for me. But where is the description of
gtk_object_set/get_data()? I've the gtk+ 2.0 Reference Manual an the
gtk+ 2.0 Tutorial. I couldn't find it there. Please help me ;-)

Thanks
Andreas
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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