Re: [gtk-list] Resources?
- From: Havoc Pennington <hp Mcs Net>
- To: "'GTK-List'" <gtk-list redhat com>
- Subject: Re: [gtk-list] Resources?
- Date: Fri, 26 Feb 1999 14:42:45 -0600 (CST)
On Fri, 26 Feb 1999, Rostedt, Steven wrote:
> There's been a lot of talk on this list about accessing internal data items
> directly or with a specific function. Coming from an Motif background,
> what about adding Resources for a GTK+-1.4 version, with a
> get_resource and set_resource routine. The widgets then just have
> to define a table that maps the data in the structures to the resource.
> Once done, then you don't have to have a separate function for
> every resource you want to modify or read. Plus you still maintain
> the OO encapsulation.
>
There is already a thing like this, object arguments, but it's not
implemented for all the widgets yet.
For example you can say:
gtk_widget_new (gtk_vbox_get_type (),
"GtkBox::homogeneous", FALSE,
"GtkBox::spacing", 5,
"GtkContainer::border_width", 10,
"GtkWidget::parent", main_vbox,
"GtkWidget::visible", TRUE,
NULL);
(from testgtk.c)
And you can also get and set those things on the fly.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]