[1809] | 1 | #include "orxonox_gui.h" |
---|
| 2 | #include "orxonox_gui_video.h" |
---|
[1813] | 3 | #include "orxonox_gui_audio.h" |
---|
[1817] | 4 | int verbose = 1; |
---|
[1809] | 5 | |
---|
| 6 | |
---|
| 7 | gint delete_event ( GtkWidget *widget, GdkEvent *event, gpointer data ) |
---|
| 8 | { |
---|
| 9 | return FALSE; |
---|
| 10 | } |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | int main( int argc, char *argv[] ) |
---|
| 14 | { |
---|
| 15 | GtkWidget *window; |
---|
| 16 | GtkWidget *vbox_main; |
---|
| 17 | GtkWidget *hbox_video_audio; |
---|
| 18 | GtkWidget *hbox_view_exec; |
---|
[1817] | 19 | struct settings *orxonox_settings; |
---|
| 20 | int option_count = 7; /* important: look that this is greater than options in 'struct settings' */ |
---|
[1809] | 21 | |
---|
[1817] | 22 | /* Initialize all settings */ |
---|
| 23 | |
---|
| 24 | orxonox_settings = malloc (option_count*sizeof (int)); |
---|
| 25 | |
---|
| 26 | orxonox_gui_file_default (orxonox_settings); |
---|
| 27 | |
---|
| 28 | |
---|
[1809] | 29 | gtk_init (&argc, &argv); |
---|
| 30 | /* Main Window */ |
---|
| 31 | window = gtk_window_new (GTK_WINDOW_TOPLEVEL); |
---|
| 32 | gtk_window_set_title ( GTK_WINDOW (window), "orxonox"); |
---|
| 33 | g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL); |
---|
| 34 | g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL); |
---|
| 35 | gtk_container_set_border_width (GTK_CONTAINER (window), 5); |
---|
| 36 | |
---|
| 37 | /* VBOX - MAIN */ |
---|
| 38 | vbox_main = gtk_vbox_new (FALSE, 0); |
---|
| 39 | { |
---|
| 40 | hbox_video_audio = gtk_hbox_new (FALSE, 0); |
---|
| 41 | |
---|
| 42 | { |
---|
[1817] | 43 | gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_video_frame(orxonox_settings), TRUE, TRUE, 0); |
---|
[1809] | 44 | |
---|
[1818] | 45 | gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_audio_frame(orxonox_settings), TRUE, TRUE, 0); |
---|
[1809] | 46 | } |
---|
| 47 | gtk_box_pack_start (GTK_BOX (vbox_main), hbox_video_audio, TRUE, TRUE, 0); |
---|
[1812] | 48 | |
---|
[1809] | 49 | { |
---|
| 50 | hbox_view_exec = gtk_hbox_new ( FALSE,0); |
---|
[1812] | 51 | /* |
---|
[1809] | 52 | { |
---|
| 53 | info ( hbox_view_exec ); |
---|
| 54 | } |
---|
[1812] | 55 | */ |
---|
[1809] | 56 | { |
---|
[1818] | 57 | gtk_box_pack_start(GTK_BOX(hbox_view_exec), orxonox_gui_exec_frame(orxonox_settings), TRUE, TRUE, 0); |
---|
[1809] | 58 | |
---|
| 59 | } |
---|
| 60 | gtk_box_pack_start (GTK_BOX (vbox_main), hbox_view_exec, TRUE, TRUE, 0); |
---|
[1812] | 61 | } |
---|
[1809] | 62 | } |
---|
| 63 | gtk_container_add (GTK_CONTAINER (window), vbox_main); |
---|
| 64 | |
---|
| 65 | gtk_widget_show_all (window); |
---|
[1820] | 66 | |
---|
[1809] | 67 | gtk_main (); |
---|
| 68 | |
---|
| 69 | return(0); |
---|
| 70 | } |
---|