Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/guiMerge/src/lib/gui/gui/orxonox_gui_banner.cc @ 4046

Last change on this file since 4046 was 4046, checked in by bensch, 19 years ago

orxonox/branches/guiMerge: heavy clean-up of the gui

File size: 3.1 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#include "banner.xpm"
28#include "logo.xpm"
29
30/**
31   \brief Creates a new BannerEventBox and its content.
32*/
33OrxonoxGuiBanner::OrxonoxGuiBanner(void)
34{
35  // the banner Frame
36  Frame* bannerFrame;       //!< The frame that holds the Banner.
37  Box* bannerBox;           //!< The box that holds the Banner.
38  EventBox* bannerEventBox; //!< an Image needs an EventBox to catch klicks.
39  Label* bannerLabel;       //!< The Label of the Banner.
40
41  // the logo Window
42  Window* logoWindow;       //!< The Window that holds the Orxonox-CrewLogo.
43  EventBox* logoEventBox;   //!< The EventBox that holds the Orxonox-CrewLogo. it has to be an eventbox, because Images can not receive clicks.
44  Box* logoBox;             //!< The Box that holds the Orxonox-CrewLogo
45  Image* logoImage;         //!< The Orxonox-CrewLogo-Image
46  Label* logoLabel;         //!< The Label for the Orxonox-CrewLogo
47  Label* orxIsLabel;        //!< Some text about us.
48
49
50  // Banner Itself //
51  bannerEventBox = new EventBox("BannerEventBox");
52  {
53    Image* bannerImage;       //!< The Image for the Banner.
54
55    bannerImage = new Image(banner_xpm);
56    bannerEventBox->fill(bannerImage);
57  }
58  // Banner Window //
59  logoWindow = new Window("Logo");
60  {
61
62#ifdef HAVE_GTK2
63    bannerEventBox->connectSignal("button_press_event", logoWindow, Window::windowOpen);
64
65    logoWindow->connectSignal("destroy", logoWindow, Window::windowClose);
66    logoWindow->connectSignal("delete_event", logoWindow, Window::windowClose);
67#endif /* HAVE_GTK2 */
68    logoEventBox = new EventBox();
69    logoBox = new Box('v');
70    logoLabel = new Label("orxonox, version: " PACKAGE_VERSION);
71    logoBox->fill(logoLabel);
72    logoImage = new Image(logo_xpm);
73    logoBox->fill(logoImage);
74
75    //! \todo add the names of all the guys working on orxonox
76    orxIsLabel = new Label("orxonox is:\nPatrick Boenzli - main Developer\nBenjamin Grauer - right Hand\n....");
77    logoBox->fill(orxIsLabel);
78    logoEventBox->fill(logoBox);
79#ifdef HAVE_GTK2
80    logoEventBox->connectSignal("button_press_event", logoWindow, Window::windowClose);
81#endif /* HAVE_GTK2 */
82    logoWindow->fill(logoEventBox);
83  }
84  Window::addWindow(logoWindow);
85 
86  setMainWidget(bannerEventBox);
87}
88
89/**
90   \brief Destructs it.
91*/
92OrxonoxGuiBanner::~OrxonoxGuiBanner(void)
93{
94  // nothing to do here
95}
Note: See TracBrowser for help on using the repository browser.