Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4030 in orxonox.OLD for orxonox


Ignore:
Timestamp:
May 4, 2005, 12:09:14 AM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/gui: pixmaps now part of the Code

Location:
orxonox/trunk/src/lib/gui/gui
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_banner.cc

    r4024 r4030  
    2525
    2626#include "orxonox_gui_banner.h"
     27#include "banner.xpm"
     28#include "logo.xpm"
    2729
    2830/**
     
    3335  // Banner Itself //
    3436  this->bannerEventBox = new EventBox("BannerEventBox");
    35   this->bannerImage = new Image("banner.xpm");
     37  this->bannerImage = new Image(banner_xpm);
    3638  this->bannerEventBox->fill(this->bannerImage);
    3739
     
    4749  this->logoEventBox = new EventBox();
    4850  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  
     51  this->logoLabel = new Label("orxonox, version: " PACKAGE_VERSION);
    5352  this->logoBox->fill(this->logoLabel);
    54   this->logoBox->fill(this->logoEventBox);
     53  this->logoImage = new Image(logo_xpm);
     54  this->logoBox->fill(this->logoImage);
     55
     56  //! \todo add the names of all the guys working on orxonox
     57  this->orxIsLabel = new Label("orxonox is:\nPatrick Boenzli - main Developer\nBenjamin Grauer - right Hand\n....");
     58  this->logoBox->fill(this->orxIsLabel);
     59  this->logoEventBox->fill(this->logoBox);
    5560#ifdef HAVE_GTK2
    5661  this->logoEventBox->connectSignal("button_press_event", this->logoWindow, Window::windowClose);
    5762#endif /* HAVE_GTK2 */
    5863
    59   this->logoWindow->fill(this->logoBox);
     64  this->logoWindow->fill(this->logoEventBox);
    6065 
    6166  Window::addWindow(this->logoWindow);
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_banner.h

    r4024 r4030  
    2828  Image* logoImage;         //!< The Orxonox-CrewLogo-Image
    2929  Label* logoLabel;         //!< The Label for the Orxonox-CrewLogo
     30  Label* orxIsLabel;        //!< Some text about us.
    3031
    3132 public:
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.cc

    r4029 r4030  
    17451745/**
    17461746   \brief Creates a new Image
    1747    \param imagename the location of the Image on the Hard Disc
    1748 */
    1749 Image::Image(char* imagename)
    1750 {
    1751   this->init();
     1747   \param imageName the location of the Image on the Hard Disc
     1748*/
     1749Image::Image(const char* imageName)
     1750{
     1751  this->init(imageName);
     1752
     1753#ifdef HAVE_GTK2
     1754  widget = gtk_image_new_from_file(imageName);
     1755#endif /* HAVE_GTK2 */
     1756}
     1757
     1758/**
     1759   \brief Creates a new Image
     1760   \param imageData data to the PixBuff
     1761*/
     1762Image::Image(char** imageData)
     1763{
     1764  this->init("pixBuffImage");
     1765
     1766#ifdef HAVE_GTK2
     1767  widget = gtk_image_new_from_pixbuf(gdk_pixbuf_new_from_xpm_data((const char**)imageData));
     1768#endif /* HAVE_GTK2 */
     1769}
     1770
     1771
     1772/**
     1773   \brief destructs an Image.
     1774*/
     1775Image::~Image(void)
     1776{
     1777  PRINTF(5)("deleting the Image: %s\n", this->title);
     1778}
     1779
     1780/**
     1781    \brief Initializes a new Image
     1782    \param name the name to set to the Image
     1783*/
     1784void Image::init(const char* name)
     1785{
     1786  isOption = 0;
     1787
    17521788  if (this->title)
    17531789    delete []this->title;
    1754   this->title = new char[strlen(imagename)+1];
    1755   strcpy(this->title, imagename);
    1756 
    1757 #ifdef HAVE_GTK2
    1758   widget = gtk_image_new_from_file(imagename);
    1759 #endif /* HAVE_GTK2 */
    1760 }
    1761 
    1762 /**
    1763    \brief destructs an Image.
    1764 */
    1765 Image::~Image(void)
    1766 {
    1767   PRINTF(5)("deleting the Image: %s\n", this->title);
    1768 }
    1769 
    1770 /**
    1771     \brief Initializes a new Image
    1772 */
    1773 void Image::init(void)
    1774 {
    1775   isOption = 0;
    1776 }
     1790  this->title = new char[strlen(name)+1];
     1791  strcpy(this->title, name);
     1792
     1793}
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_gtk.h

    r3625 r4030  
    384384{
    385385 public:
    386   Image(char* imgaename);
     386  Image(const char* imgaeName);
     387  Image(char** imageData);
    387388  virtual ~Image(void);
    388   void init(void);
     389  void init(const char* name);
    389390};
    390391
Note: See TracChangeset for help on using the changeset viewer.