GtkObject::get_arg
mixed get_arg(string arg_name);
In most cases where you are likely to need to know the content of
an argument, there will be a get method in
place which is basically a wrapper for
get_arg() . This is good,
because there is, unfortunately, no way to know for certain the
name of the argument to pass to this function without looking at
GTK+ source. A brief tutorial on making sense of what you see
there follows.
An individual widget's arguments are initialized as a set of
enumerated values at the beginning of the c file relating to that
object. For example, in gtklabel.c in GTK
1.2.10 you will see this directly after the includes:
Around a hundred lines later, these argument types are defined as
they are added to the widget, in the
class_init
function:
This gives you the name (in quotes) that you are looking for, the
type of data that the argument will consist of, the fact that it
is writeable (always), and the name of the original enumerated
value to bind this information to.
For get_arg() , all you
really need is the part that is in quotes, which can be surmised
by looking at the initial enums. The datatype may, however, be
useful information if you need to set an argument and have no
other means of doing so than
set_arg() .
The way you would access this is as follows: