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