Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/bensch/orxonox_gui.c @ 1819

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

orxonox/branches/bensch: added flags-frame

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
6
7gint delete_event ( GtkWidget *widget, GdkEvent *event, gpointer data )
8{
9  return FALSE;
10}
11
12
13int main( int argc, char *argv[] )
14  {
15    GtkWidget *window;
16    GtkWidget *vbox_main;
17    GtkWidget *hbox_video_audio;
18    GtkWidget *hbox_view_exec;
19    struct settings *orxonox_settings;
20    int option_count = 7; /* important: look that this is greater than options in 'struct settings' */
21
22    /* Initialize all settings */
23   
24    orxonox_settings = malloc (option_count*sizeof (int));
25
26    orxonox_gui_file_default (orxonox_settings);
27
28
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      {
43        gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_video_frame(orxonox_settings), TRUE, TRUE, 0);       
44       
45        gtk_box_pack_start(GTK_BOX(hbox_video_audio), orxonox_gui_audio_frame(orxonox_settings), TRUE, TRUE, 0);       
46      }
47      gtk_box_pack_start (GTK_BOX (vbox_main), hbox_video_audio, TRUE, TRUE, 0);
48     
49      {
50        hbox_view_exec = gtk_hbox_new ( FALSE,0);
51        /*
52        {
53          info ( hbox_view_exec );
54        }
55        */
56        {
57          gtk_box_pack_start(GTK_BOX(hbox_view_exec), orxonox_gui_exec_frame(orxonox_settings), TRUE, TRUE, 0); 
58
59        }
60        gtk_box_pack_start (GTK_BOX (vbox_main), hbox_view_exec, TRUE, TRUE, 0);
61      } 
62    }
63    gtk_container_add (GTK_CONTAINER (window), vbox_main);
64   
65    gtk_widget_show_all  (window);
66   
67    gtk_main ();
68   
69    return(0);
70  }
Note: See TracBrowser for help on using the repository browser.