Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/automake/gui/orxonox_gui.c @ 1957

Last change on this file since 1957 was 1864, checked in by bensch, 21 years ago

orxonox/trunk: merged gui to trunk

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