Re: How to create an MDI'sh program




Landshark writes:
>Is there an extra member in the widget structure that allows for this,
>similar to the SetWindowLong() function of Win32's?

See gtkobject.h:
--------8<--------
/* Set the "user_data" object data field of "object". It should
 *  be noted that this is no different than calling 'gtk_object_data_add'
 *  with a key of "user_data". It is merely provided as a convenience.
 */
void gtk_object_set_user_data (GtkObject *object,
                               gpointer   data);

/* Get the "user_data" object data field of "object". It should
 *  be noted that this is no different than calling 'gtk_object_data_find'
 *  with a key of "user_data". It is merely provided as a convenience.
 */
gpointer gtk_object_get_user_data (GtkObject *object);
--------8<--------

This is very flexible; the pointer can be a pointer to anything you
want.

Have fun!

michaelkjohnson

"Magazines all too frequently lead to books and should be regarded by the
 prudent as the heavy petting of literature."            -- Fran Lebowitz



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