gtk break the code into files programming question



In attempting to break up my code I ran into a problem I don't know how to
solve. In a separate file I create a menu bar and then I want to return
it. Where the menu bar is created the return value is GtkWidget* but this
attempt in the parent file fails.

        menu_bar = GTK_MENU_BAR( make_menu() );
        gtk_container_add(GTK_CONTAINER(window), menu_bar);
        gtk_widget_show(window);

If I declare menu_bar in the parent file as GtkMenuBar the assignment
works but then the gtk_container_add fails.

How can I do this?

Travis Loyd
[email: lelandg@usa.net							]
[  pgp: send email with subject: sendmepgp				]




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