Re: Themes and images in Gtk



On Sat, 10 Jan 1998, Shawn T. Amundson wrote:

> > - Sometimes the constructors (*_new) take object attributes sometimes
> > not and never all but only some of the object attributes.
> > - The functions to set object attributes take the keys sometimes in the
> > function name and sometimes as an argument.
> > - Embeddings works as described above.
> 
> Take a look at gtk_widget_new and gtk_widget_set.  These functions 
> act a a more basic level.  An example of gtk_widget_new form simple.c
> in the gtk dist:
> 
>   window = gtk_widget_new (gtk_window_get_type (),
>                            "GtkObject::user_data", NULL,
>                            "GtkWindow::type", GTK_WINDOW_TOPLEVEL,
>                            "GtkWindow::title", "hello world",
>                            "GtkWindow::allow_grow", FALSE,
>                            "GtkWindow::allow_shrink", FALSE,
>                            "GtkContainer::border_width", 10,
>                            NULL);
>   button = gtk_widget_new (gtk_button_get_type (),
>                            "GtkButton::label", "hello world",
>                            "GtkObject::signal::clicked", hello, NULL,
>                            "GtkWidget::parent", window,
>                            "GtkWidget::visible", TRUE,
>                            NULL);
> 
> I don't know if this is completely what is needed (or if it is finished), 
> but it is probably a better place to focus such efforts rather than writting 
> a ton of gtk_*_set functions.

A lot of widgets are missing GtkArg functions, I think - might be a good
place for someone to spend their time if they want to start with Gtk
hacking, since it is not a very hard task, just tedious.

-- Elliot					http://www.redhat.com/
"They don't let my code go into shipping products," Gates said. "They
 haven't done that for eight years." (at the 1997 PDC)



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