Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gtk/gui_banner.cc @ 8710

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

trunk: merged the gui back
merged with command:
svn merge -r8114:HEAD https://svn.orxonox.net/orxonox/branches/gui .
→ no conflicts

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