Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2581 in orxonox.OLD


Ignore:
Timestamp:
Oct 15, 2004, 10:05:13 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: gui now ready for including Orxonox-Crew-Logo

Location:
orxonox/trunk/gui
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/gui/orxonox_gui.cc

    r2580 r2581  
     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
    126#include <iostream.h>
    227
     
    88113   * Connect a signal with additionally passing the whole Object
    89114   */
    90   g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);
    91 }
    92 
     115g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), this);
     116}
     117
     118void Widget::connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *))
     119{
     120  /**
     121   * Connect a signal with additionally passing a whole external Object
     122   */
     123  g_signal_connect (G_OBJECT (this->widget), event, G_CALLBACK (signal), extObj);
     124}
    93125void Widget::show()
    94126{
     
    187219  gtk_window_set_policy (GTK_WINDOW (widget), TRUE, TRUE, TRUE);
    188220  gtk_container_set_border_width (GTK_CONTAINER (widget), 3);
    189   //  gtk_window_set_decorated (GTK_WINDOW (widget), FALSE);
     221  gtk_window_set_decorated (GTK_WINDOW (widget), FALSE);
    190222  this->setTitle (windowName);
    191223}
     
    194226{
    195227  /**
    196    * Destoying a Window (not implemented)
    197    */
     228   * Destoying a Window (very BAD implemented)
     229   */
     230  gtk_widget_hide (widget);
     231 
    198232}
    199233
  • orxonox/trunk/gui/orxonox_gui.h

    r2580 r2581  
    3838  void connectSignal (char* event, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    3939  void connectSignal (char* event, gint (*signal)(GtkWidget*, Widget *));
     40  void connectSignal (char* event, void* extObj, gint (*signal)(GtkWidget*, GdkEvent*, void *));
    4041  void show ();
    4142  void listOptions ();
  • orxonox/trunk/gui/orxonox_gui_audio.cc

    r2018 r2581  
     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
    126#include "orxonox_gui_audio.h"
    227
  • orxonox/trunk/gui/orxonox_gui_banner.cc

    r2580 r2581  
     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
    126#include "orxonox_gui_banner.h"
    227#include <iostream.h>
     
    429OrxonoxGuiBanner::OrxonoxGuiBanner ()
    530{
    6   bannerEventBox = new EventBox ();
     31  bannerEventBox = new EventBox ("BannerEventBox");
    732  bannerImage = new Image ("banner.xpm");
    833  bannerEventBox->fill(bannerImage);
    9   bannerEventBox->connectSignal ("button_press_event", LogoWindowOpen);
     34  bannerEventBox->connectSignal ("button_press_event", this, LogoWindowOpen);
     35  logoWindowIsOpen = -1;
     36}
    1037
    11   // bannerFrame->fill(bannerEventBox);
    12 
    13 }
    1438OrxonoxGuiBanner::~OrxonoxGuiBanner ()
    1539{
    1640}
     41
     42void OrxonoxGuiBanner::logoWindowNew()
     43{
     44  if (logoWindowIsOpen <= 0)
     45    {
     46      if (logoWindowIsOpen < 0)
     47        {
     48          // creating new Logo Window //
     49          logoWindow = new Window("Logo");
     50          logoWindow->connectSignal("destroy", this, LogoWindowClose);
     51          logoWindow->connectSignal("delete_event", this, LogoWindowClose);
     52          logoEventBox = new EventBox();
     53          logoImage = new Image("banner.xpm");
     54          logoEventBox->fill(logoImage);
     55          logoEventBox->connectSignal("button_press_event",this,LogoWindowClose);
     56
     57          logoWindow->fill (logoEventBox);
     58         
     59        }
     60      //  showing Window //
     61      logoWindowIsOpen = 1;
     62     
     63     
     64      logoWindow->showall();
     65    }
     66}
     67void OrxonoxGuiBanner::logoWindowClose()
     68{
     69  logoWindowIsOpen = 0;
     70  logoWindow->~Window();
     71}
     72
    1773
    1874
     
    2278}
    2379
    24 gint LogoWindowOpen (GtkWidget* widget, Widget* data)
     80gint LogoWindowOpen (GtkWidget* widget, GdkEvent* event, void* banner)
    2581{
    26   cout << "This Is OrxOnoX\n";
     82  //cout << data->is_option<<"\n";
     83  static_cast<OrxonoxGuiBanner*>(banner)->logoWindowNew();
    2784}
    2885
     86gint LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner)
     87{
     88  static_cast<OrxonoxGuiBanner*>(banner)->logoWindowClose();
     89 
     90}
  • orxonox/trunk/gui/orxonox_gui_banner.h

    r2580 r2581  
    1212  Image* bannerImage;
    1313  Label* bannerLabel;
    14   Window* logo;
     14  Window* logoWindow;
     15  int logoWindowIsOpen;
     16  EventBox* logoEventBox;
     17  Image* logoImage;
    1518
    1619 public:
     
    1821  ~OrxonoxGuiBanner ();
    1922
     23  void logoWindowNew();
     24  void logoWindowClose();
    2025  EventBox* getEventBox ();
    2126};
    22 gint LogoWindowOpen (GtkWidget *widget, Widget* data);
     27gint LogoWindowOpen (GtkWidget *widget, GdkEvent* event, void* banner);
     28gint LogoWindowClose (GtkWidget *widget, GdkEvent* event, void* banner);
    2329
    2430#endif /* _ORXONOX_GUI_BANNER_H */
  • orxonox/trunk/gui/orxonox_gui_exec.cc

    r2053 r2581  
     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
    126#include "orxonox_gui_exec.h"
    227#include <iostream>
  • orxonox/trunk/gui/orxonox_gui_flags.cc

    r2018 r2581  
     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
    126#include "orxonox_gui_flags.h"
    227#include <iostream.h>
  • orxonox/trunk/gui/orxonox_gui_video.cc

    r2018 r2581  
     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
    127#include "orxonox_gui_video.h"
    228
Note: See TracChangeset for help on using the changeset viewer.