Hi,

David Greaves wrote:
> Also, I've just written my first app in gtk/C.
> After sobbing quietly and trying to avoid getting tears on my N800 I'm looking
> forward to getting back to Qt!!
> 
> Apologies to any gtk fans out there - I just have a hard time with all the
> pointer casting and trying to bludgeon the OO api into C. Qt was so much more
> elegant.
> 
> check = (GtkCheckButton*) gtk_check_button_new_with_label("aargh");
> Since when does a constructor need type casting?

Actually, it (usually) doesn't.

     GtkWidget *frame = gtk_frame_new("Checkbox");
     GtkWidget *check = gtk_check_button_new_with_label("aargh");

     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE);
     gtk_container_add(GTK_CONTAINER(frame),check);

     gtk_widget_show(check);
     gtk_widget_show(frame);

Cheers,
Dave.

-- 
maemo.org docsmaster
Email: [EMAIL PROTECTED]
Jabber: [EMAIL PROTECTED]

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to