Re: [gtk-list] Re: [motif vs gtk]
- From: Owen Taylor <otaylor redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: [motif vs gtk]
- Date: 04 Jan 2000 01:43:58 -0500
"Iain" <nodatadj@strayduck.com> writes:
> > (each widget in gtk has its own create function, e.g.,
> gtk_menu_item_new(),
> > gtk_button_new(), gtk_entry_new(), blah blah, while in Xt you just call
> > XtCreate*Widget() and pass a constant identifying which class you want to
> > create.
>
> there is a gtk_widget_new () which you pass in the class type.
> gtk_*_new is better, cos it's easier to remember the names,
> and it allows things like gtk_button_new_with_label (IMO).
Well,
gtk_widget_new (GTK_TYPE_BUTTON,
"label", "My Button",
NULL);
works, though I also prefer the non-varargs usage. (Type safety
is nice)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]