/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ### File Specific: main-programmer: Benjamin Grauer */ #include "orxonox_gui_banner.h" /** \brief Creates a new BannerEventBox and its content. */ OrxonoxGuiBanner::OrxonoxGuiBanner () { // Banner Itself // bannerEventBox = new EventBox ("BannerEventBox"); bannerImage = new Image ("banner.xpm"); bannerEventBox->fill(bannerImage); bannerEventBox->connectSignal ("button_press_event", this, LogoWindowOpen); // Banner Window // logoWindow = new Window("Logo"); logoWindow->connectSignal("destroy", this, LogoWindowClose); logoWindow->connectSignal("delete_event", this, LogoWindowClose); logoEventBox = new EventBox(); logoBox = new Box('v'); logoLabel = new Label("OrxOnoX, " PACKAGE_VERSION); logoImage = new Image("banner.xpm"); logoEventBox->fill(logoImage); logoBox->fill(logoLabel); logoBox->fill(logoEventBox); logoEventBox->connectSignal("button_press_event",this,LogoWindowClose); logoWindow->fill (logoBox); Window::addWindow (logoWindow); } /** \brief Destructs it. */ OrxonoxGuiBanner::~OrxonoxGuiBanner () { } /** \brief Returns an EventBox \return The EventBox, that holds the Banner. */ Widget* OrxonoxGuiBanner::getWidget () { return bannerEventBox; } /** \brief opens up the banner-window.\n this is the Signal that does it. !!SIGNALS ARE STATIC!! \param widget the widget that did it! \param event the event that did it! \param banner the Object that holds the banner-logo-window */ gint OrxonoxGuiBanner::LogoWindowOpen (GtkWidget* widget, GdkEvent* event, void* banner) { static_cast(banner)->logoWindow->open(); } /** \brief closes the banner-window.\n this is the Signal that does it. !!SIGNALS ARE STATIC!! \param widget the widget that did it! \param event the event that did it! \param banner the Object that holds the banner-logo-window */ gint OrxonoxGuiBanner::LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner) { static_cast(banner)->logoWindow->close(); }