Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/console/orxonox_console.cc @ 2644

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

orxonox/branches/gui/console: now appending from top, so that new lines are directly visible.

File size: 1.8 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 
34  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
35  gtk_window_set_policy(GTK_WINDOW(window), TRUE, TRUE, FALSE);
36  gtk_window_set_title ( GTK_WINDOW (window), "orxonox console");
37  g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (gtk_main_quit), NULL);
38  g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
39  gtk_container_set_border_width (GTK_CONTAINER (window), 5);
40
41  vbox_main = gtk_vbox_new(FALSE, 5);
42    {
43      gtk_box_pack_start(GTK_BOX(vbox_main), entry.createEntry(), FALSE, FALSE, 0);
44      gtk_box_pack_start(GTK_BOX(vbox_main), log.createLog(), TRUE, TRUE, 0);
45      entry.setLog(&log);
46    }
47  gtk_container_add(GTK_CONTAINER(window), vbox_main);
48 
49  gtk_widget_show_all(window);
50
51}
52
53
54
55
56int main( int argc, char *argv[] )
57{ 
58  verbose = 0;
59
60  OrxonoxConsole console;
61 
62  gtk_init (&argc, &argv);
63
64  console.createWindow();
65
66  gtk_main ();
67  return (0);
68}
Note: See TracBrowser for help on using the repository browser.