Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/gui/orxonox_gui_banner.cc @ 3433

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

orxonox/trunk: merged branches/updater back into the trunk
merged with command: svn merge branches/updater trunk -r 3241:HEAD
resolved conflicts in debug.h in favor of the trunk.

File size: 2.3 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
24*/
25
26#include "orxonox_gui_banner.h"
27
28/**
29   \brief Creates a new BannerEventBox and its content.
30*/
31OrxonoxGuiBanner::OrxonoxGuiBanner(void)
32{
33  // Banner Itself //
34  this->bannerEventBox = new EventBox("BannerEventBox");
35  this->bannerImage = new Image("banner.xpm");
36  this->bannerEventBox->fill(this->bannerImage);
37
38  // Banner Window //
39  this->logoWindow = new Window("Logo");
40
41#ifdef HAVE_GTK2
42  this->bannerEventBox->connectSignal("button_press_event", this->logoWindow, Window::windowOpen);
43
44  this->logoWindow->connectSignal("destroy", this->logoWindow, Window::windowClose);
45  this->logoWindow->connectSignal("delete_event", this->logoWindow, Window::windowClose);
46#endif /* HAVE_GTK2 */
47  this->logoEventBox = new EventBox();
48  this->logoBox = new Box('v');
49  this->logoLabel = new Label("OrxOnoX, Version: " PACKAGE_VERSION);
50  this->logoImage = new Image("banner.xpm");
51  this->logoEventBox->fill(this->logoImage);
52 
53  this->logoBox->fill(this->logoLabel);
54  this->logoBox->fill(this->logoEventBox);
55#ifdef HAVE_GTK2
56  this->logoEventBox->connectSignal("button_press_event", this->logoWindow, Window::windowClose);
57#endif /* HAVE_GTK2 */
58
59  this->logoWindow->fill(this->logoBox);
60 
61  Window::addWindow(this->logoWindow);
62}
63
64/**
65   \brief Destructs it.
66*/
67OrxonoxGuiBanner::~OrxonoxGuiBanner(void)
68{
69  // nothing to do here
70}
71
72/**
73   \brief Returns an EventBox
74   \return The EventBox, that holds the Banner.
75*/
76Widget* OrxonoxGuiBanner::getWidget(void)
77{
78  return this->bannerEventBox;
79}
80
81
Note: See TracBrowser for help on using the repository browser.