Re: How to identify a particular checkbutton ?
- From: Flavio Alberto Lopes Soares <flavio maqplas com br>
- To: Paul Davis <paul linuxaudiosystems com>
- Cc: gtk-list gnome org
- Subject: Re: How to identify a particular checkbutton ?
- Date: Wed, 11 Dec 2002 12:25:04 -0200
On Wed, 11 Dec 2002 08:46:09 -0500
Paul Davis <paul linuxaudiosystems com> wrote:
I thought with gtk_object_set_data_full I can put a gchar *key and latter I can "pull" this value again in callback function, manipulate this string and extract what checkbutton is, but isn't, the key works how as a "index" to data passed by gtk_object_set_data... but this is not what I want.
living & learning.
I go to continue searching some solution, if someone have some tip for me
I will be thankful.
--
Flavio Alberto Lopes Soares
flavio maqplas com br
Linux User n. 257636
MAQPLAS INDÚSTRIA E COMÉRCIO DE MÁQUINAS LTDA.
www.maqplas.com.br
maqplas maqplas com br
> >I create one GtkWindow using GTK 1.2 in C with a matrix formed by 20 rows x 32
> > columns = 640 checkbuttons to user to mark to create a "picture" to send to a
> > device attached by serial line,
> >to make the interface I used glade,
> >I attached the signal "toggled" to same function (I believe that if I put 640
> >functions for each check button I will overload my program), and I pass the st
>
> actually, no, but it would be a rather silly design.
>
> >ruct that keep these "bitmap" information, but I don't know how to identify ea
> >ch checkbutton to change the struct to send information to device, I attempt t
> >o use gtk_object_get_data but without success;
>
> gtk_signal_connect(GTK_CHECK_BUTTON(button), "toggled",
> (GtkSignalFunc) your_signal_handler,
> button);
>
> void
> your_handler (gpointer data)
> {
> GtkCheckButton *button = GTK_CHECK_BUTTON(data);
> ...
> }
>
>
> the key idea here is that the final argument to gtk_signal_connect is
> a pointer that is passed as the final argument to the signal handler.
>
> --p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]