Re: [gtk-list] Argument handling
- From: Federico Mena Quintero <federico nuclecu unam mx>
- To: Klem Prod net HCC nl
- CC: gtk-list redhat com
- Subject: Re: [gtk-list] Argument handling
- Date: Tue, 2 Feb 1999 17:02:12 -0500
> I've been coding for a while an ran up to a (minor) question. I'm
> creating some GnomeCanvas things that use the GTK Argument System. It
> allows me to set attributes on creation and set them after I have
> created them. The problem is that I can't figure out what function is
> used to retrieve information. gtk_object_get ()? I dunno...
You can use the gtk_object_getv() function. Here is a small example
from the Gnomecal sources:
GtkArg args[3];
double text_height;
double clip_height;
double y_offset;
args[0].name = "text_height";
args[1].name = "clip_height";
args[2].name = "y_offset";
gtk_object_getv (GTK_OBJECT (mv->text[day_index]), 3, args);
text_height = GTK_VALUE_DOUBLE (args[0]);
clip_height = GTK_VALUE_DOUBLE (args[1]);
y_offset = GTK_VALUE_DOUBLE (args[2]);
In this case, mv->text[day_index] is a GnomeCanvasText item.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]