Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/gui/console/orxonox_console.cc @ 1884

Last change on this file since 1884 was 1884, checked in by patrick, 20 years ago

/orxonox/branch/gui/ log working now

File size: 1.9 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software Foundation,
18   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
19
20
21   ### File Specific:
22   main-programmer: Benjamin Grauer
23   co-programmer:
24*/
25
26
27#include "orxonox_console.h"
28
29using namespace std;
30
31void OrxonoxConsole::createWindow ()
32{
33  //entry = new OrxonoxConsoleEntry(*log, entry);
34 
35  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
36  gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
37  gtk_window_set_title ( GTK_WINDOW (window), "orxonox console");
38  g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
39  g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
40  gtk_container_set_border_width (GTK_CONTAINER (window), 5);
41
42  vbox_main = gtk_vbox_new(FALSE, 5);
43    {
44      gtk_box_pack_start(GTK_BOX(vbox_main), log.createLog(), TRUE, TRUE, 0);
45      gtk_box_pack_start(GTK_BOX(vbox_main), entry.createEntry(), FALSE, FALSE, 0);
46      entry.setLog(&log,&entry);
47    }
48  gtk_container_add(GTK_CONTAINER(window), vbox_main);
49 
50  gtk_widget_show_all(window);
51
52}
53
54
55
56
57int main( int argc, char *argv[] )
58{ 
59  OrxonoxConsole console;
60 
61  gtk_init (&argc, &argv);
62
63  console.createWindow();
64
65  gtk_main ();
66  return (0);
67}
Note: See TracBrowser for help on using the repository browser.