Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/gui/orxonox_gui.c @ 1961

Last change on this file since 1961 was 1961, checked in by bensch, 20 years ago

orxonox/trunk/gui: merged changes from branch gui/gui

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_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE);
28    gtk_window_set_title ( GTK_WINDOW (window), "orxonox");
29    g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
30    g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (orxonox_gui_quit), orxonox_settings);
31    gtk_container_set_border_width (GTK_CONTAINER (window), 5);
32   
33    /*  VBOX - MAIN */
34    vbox_main = gtk_vbox_new (FALSE, 0);
35    {
36      hbox_video_audio = gtk_hbox_new (FALSE, 0);
37     
38      {
39        gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_video_frame(orxonox_settings), TRUE, TRUE, 0);       
40       
41        gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_audio_frame(orxonox_settings), TRUE, TRUE, 0);       
42      }
43      gtk_box_pack_start (GTK_BOX (vbox_main), hbox_video_audio, TRUE, TRUE, 0);
44     
45      {
46        hbox_view_exec = gtk_hbox_new ( FALSE,0);
47        /*
48        {
49          info ( hbox_view_exec );
50        }
51        */
52        {
53          gtk_box_pack_start(GTK_BOX(hbox_view_exec), orxonox_gui_exec_frame(orxonox_settings), TRUE, TRUE, 0); 
54
55        }
56        gtk_box_pack_start (GTK_BOX (vbox_main), hbox_view_exec, TRUE, TRUE, 0);
57      } 
58    }
59    gtk_container_add (GTK_CONTAINER (window), vbox_main);
60   
61    gtk_widget_show_all  (window);
62
63    gtk_main ();
64   
65    return(0);
66  }
Note: See TracBrowser for help on using the repository browser.