Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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

File size: 1.9 KB
RevLine 
[1809]1#include "orxonox_gui.h"
2#include "orxonox_gui_video.h"
[1813]3#include "orxonox_gui_audio.h"
[1817]4int verbose = 1;
[1809]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;
[1817]12    struct settings *orxonox_settings;
[1829]13
[1817]14    int option_count = 7; /* important: look that this is greater than options in 'struct settings' */
[1809]15
[1817]16    /* Initialize all settings */
17   
18    orxonox_settings = malloc (option_count*sizeof (int));
19
20    orxonox_gui_file_default (orxonox_settings);
[1829]21    orxonox_gui_file_load ("~/.orxonox.conf", orxonox_settings);
[1817]22
23
[1809]24    gtk_init (&argc, &argv);
25    /* Main Window */
26    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
[1961]27    gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, TRUE);
[1809]28    gtk_window_set_title ( GTK_WINDOW (window), "orxonox");
29    g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
[1829]30    g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (orxonox_gui_quit), orxonox_settings);
[1809]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      {
[1817]39        gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_video_frame(orxonox_settings), TRUE, TRUE, 0);       
[1809]40       
[1818]41        gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_audio_frame(orxonox_settings), TRUE, TRUE, 0);       
[1809]42      }
43      gtk_box_pack_start (GTK_BOX (vbox_main), hbox_video_audio, TRUE, TRUE, 0);
[1812]44     
[1809]45      {
46        hbox_view_exec = gtk_hbox_new ( FALSE,0);
[1812]47        /*
[1809]48        {
49          info ( hbox_view_exec );
50        }
[1812]51        */
[1809]52        {
[1818]53          gtk_box_pack_start(GTK_BOX(hbox_view_exec), orxonox_gui_exec_frame(orxonox_settings), TRUE, TRUE, 0); 
[1809]54
55        }
56        gtk_box_pack_start (GTK_BOX (vbox_main), hbox_view_exec, TRUE, TRUE, 0);
[1812]57      } 
[1809]58    }
59    gtk_container_add (GTK_CONTAINER (window), vbox_main);
60   
61    gtk_widget_show_all  (window);
[1820]62
[1809]63    gtk_main ();
64   
65    return(0);
66  }
Note: See TracBrowser for help on using the repository browser.