Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4024 in orxonox.OLD


Ignore:
Timestamp:
May 3, 2005, 2:20:27 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: gui: more addaptive structure

Location:
orxonox/trunk/src/lib/gui/gui
Files:
16 edited
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/gui/gui/Makefile.am

    r3624 r4024  
    2626gui_SOURCES=orxonox_gui.cc \
    2727            orxonox_gui_gtk.cc \
     28            orxonox_gui_element.cc \
    2829            orxonox_gui_video.cc \
    2930            orxonox_gui_audio.cc \
     
    3637noinst_HEADERS=orxonox_gui.h \
    3738            orxonox_gui_gtk.h \
     39            orxonox_gui_element.h \
    3840            orxonox_gui_video.h \
    3941            orxonox_gui_audio.h \
  • orxonox/trunk/src/lib/gui/gui/Makefile.in

    r3789 r4024  
    5454PROGRAMS = $(bin_PROGRAMS)
    5555am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_gtk.$(OBJEXT) \
    56         orxonox_gui_video.$(OBJEXT) orxonox_gui_audio.$(OBJEXT) \
    57         orxonox_gui_exec.$(OBJEXT) orxonox_gui_flags.$(OBJEXT) \
    58         orxonox_gui_banner.$(OBJEXT) orxonox_gui_keys.$(OBJEXT) \
    59         orxonox_gui_update.$(OBJEXT)
     56        orxonox_gui_element.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
     57        orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
     58        orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT) \
     59        orxonox_gui_keys.$(OBJEXT) orxonox_gui_update.$(OBJEXT)
    6060gui_OBJECTS = $(am_gui_OBJECTS)
    6161gui_LDADD = $(LDADD)
     
    6666@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
    6767@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_banner.Po \
     68@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_element.Po \
    6869@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
    6970@AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
     
    199200gui_SOURCES = orxonox_gui.cc \
    200201            orxonox_gui_gtk.cc \
     202            orxonox_gui_element.cc \
    201203            orxonox_gui_video.cc \
    202204            orxonox_gui_audio.cc \
     
    209211noinst_HEADERS = orxonox_gui.h \
    210212            orxonox_gui_gtk.h \
     213            orxonox_gui_element.h \
    211214            orxonox_gui_video.h \
    212215            orxonox_gui_audio.h \
     
    296299@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@
    297300@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_banner.Po@am__quote@
     301@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_element.Po@am__quote@
    298302@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
    299303@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_audio.cc

    r3423 r4024  
    5252  this->audioBox->fill (this->effectsVolume);
    5353
    54   this->audioFrame->fill (this->audioBox);
     54  this->audioFrame->fill(this->audioBox);
     55  this->setMainWidget(this->audioFrame);
    5556}
    5657
     
    6263  // nothing to do here.
    6364}
    64 
    65 /**
    66    \brief Return the Frame
    67    \return Returns the Audio-frame
    68 */
    69 Widget* OrxonoxGuiAudio::getWidget(void)
    70 {
    71   return this->audioFrame;
    72 }
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_audio.h

    r3423 r4024  
    88
    99#include "orxonox_gui.h"
     10#include "orxonox_gui_element.h"
    1011
    1112//! Class that creates the Audio-Options.
    12 class OrxonoxGuiAudio
     13class OrxonoxGuiAudio : public OrxonoxGuiElement
    1314{
    1415 private:
     
    2122  OrxonoxGuiAudio(void);
    2223  ~OrxonoxGuiAudio(void);
    23  
    24   Widget* getWidget(void);
    2524};
    2625#endif /* _ORXONOX_GUI_AUDIO_H */
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_banner.cc

    r3423 r4024  
    6060 
    6161  Window::addWindow(this->logoWindow);
     62
     63  this->setMainWidget(bannerEventBox);
    6264}
    6365
     
    6971  // nothing to do here
    7072}
    71 
    72 /**
    73    \brief Returns an EventBox
    74    \return The EventBox, that holds the Banner.
    75 */
    76 Widget* OrxonoxGuiBanner::getWidget(void)
    77 {
    78   return this->bannerEventBox;
    79 }
    80 
    81 
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_banner.h

    r3423 r4024  
    99
    1010#include "orxonox_gui.h"
     11#include "orxonox_gui_element.h"
    1112
    1213//! Class that creates the Banner-Image
    13 class OrxonoxGuiBanner
     14class OrxonoxGuiBanner : public OrxonoxGuiElement
    1415{
    1516 private:
     
    3132  OrxonoxGuiBanner(void);
    3233  ~OrxonoxGuiBanner(void);
    33 
    34   Widget* getWidget(void);
    35 
    3634};
    3735
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_element.cc

    r4014 r4024  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "proto_class.h"
     18#include "orxonox_gui_element.h"
    1919
    2020using namespace std;
     
    2525   \todo this constructor is not jet implemented - do it
    2626*/
    27 ProtoClass::ProtoClass ()
     27OrxonoxGuiElement::OrxonoxGuiElement ()
    2828{
    29    this->setClassName ("ProtoClass");
     29  this->mainWidget = NULL;
    3030}
    3131
     
    3535
    3636*/
    37 ProtoClass::~ProtoClass ()
     37OrxonoxGuiElement::~OrxonoxGuiElement ()
    3838{
    3939  // delete what has to be deleted here
    4040}
     41
     42void OrxonoxGuiElement::setMainWidget(Widget* widget)
     43{
     44  this->mainWidget = widget;
     45}
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_element.h

    r4014 r4024  
    11/*!
    2     \file proto_class.h
     2    \file orxonox_gui_element.h
    33    \brief Definition of ...
    44
    55*/
    66
    7 #ifndef _PROTO_CLASS_H
    8 #define _PROTO_CLASS_H
     7#ifndef _ORXONOX_GUI_ELEMENT_H
     8#define _ORXONOX_GUI_ELEMENT_H
    99
    10 #include "base_object.h"
     10#include "orxonox_gui_gtk.h"
    1111
    1212// FORWARD DEFINITION
     
    1515
    1616//! A class for ...
    17 class ProtoClass : public BaseObject {
     17class OrxonoxGuiElement {
    1818
    1919 public:
    20   ProtoClass();
    21   virtual ~ProtoClass();
    22 
    23 
     20  OrxonoxGuiElement();
     21  virtual ~OrxonoxGuiElement();
     22 
     23  Widget* getWidget(void) {return this->mainWidget;}
     24 protected:
     25  void setMainWidget(Widget* widget);
     26 
    2427 private:
    25 
     28  Widget* mainWidget;
    2629};
    2730
    28 #endif /* _PROTO_CLASS_H */
     31#endif /* _ORXONOX_GUI_ELEMENT_H */
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.cc

    r3625 r4024  
    7272
    7373  this->execFrame->fill(this->execBox);
     74
     75  this->setMainWidget(execFrame);
    7476}
    7577
     
    8183  if(this->configFile)
    8284    delete []this->configFile;
    83 }
    84 
    85 /**
    86    \brief Return the Frame
    87    \return Returns the Exec-frame
    88 */
    89 Widget* OrxonoxGuiExec::getWidget(void)
    90 {
    91   return execFrame;
    9285}
    9386
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_exec.h

    r3625 r4024  
    88
    99#include "orxonox_gui.h"
     10#include "orxonox_gui_element.h"
     11
    1012#include <stdio.h>
    1113using namespace std;
    1214
    1315//! Class that creates the execute-Options.
    14 class OrxonoxGuiExec
     16class OrxonoxGuiExec : public OrxonoxGuiElement
    1517{
    1618 private:
     
    3739  ~OrxonoxGuiExec(void);
    3840 
    39   Widget* getWidget(void);
    40 
    4141  void setConfFile(char* confFile);
    4242  void setConfDir(char* confDir);
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_flags.cc

    r3423 r4024  
    4141
    4242  this->flagsFrame->fill(flagsBox);
     43  this->setMainWidget(flagsFrame);
    4344}
    4445
     
    4950{
    5051  // nothing to do here
    51 }
    52 
    53 /**
    54    \brief Function to return the Frame that holds the Flagtext.
    55    \returns Frame that holds the Flagtext.
    56 */
    57 Widget* OrxonoxGuiFlags::getWidget(void)
    58 {
    59   return this->flagsFrame;
    6052}
    6153
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_flags.h

    r3452 r4024  
    88
    99#include "orxonox_gui.h"
     10#include "orxonox_gui_element.h"
    1011
    1112//! Class that creates the flags-Text.
    12 class OrxonoxGuiFlags
     13class OrxonoxGuiFlags : public OrxonoxGuiElement
    1314{
    1415 private:
     
    3132    Label* flagsLabel;           //!< Label for the flag.
    3233  };
    33   Widget* getWidget(void);
    3434};
    3535#endif /* _ORXONOX_GUI_FLAGS_H */
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_keys.cc

    r3423 r4024  
    4141
    4242  this->keysFrame->fill(this->keysBox);
     43  this->setMainWidget(keysFrame);
    4344}
    4445
     
    4950{
    5051  // nothing to do here.
    51 }
    52 
    53 /**
    54    \brief Return the Frame
    55    \return Returns the Audio-frame
    56 */
    57 Widget* OrxonoxGuiKeys::getWidget(void)
    58 {
    59   return this->keysFrame;
    6052}
    6153
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_keys.h

    r3423 r4024  
    88
    99#include "orxonox_gui.h"
     10#include "orxonox_gui_element.h"
     11
    1012#ifdef HAVE_GTK2
    1113#include <gdk/gdkkeysyms.h>
     
    1921class Player;
    2022//! Class that creates the Keys-Options.
    21 class OrxonoxGuiKeys
     23class OrxonoxGuiKeys : public OrxonoxGuiElement
    2224{
    2325 private:
     
    3133  OrxonoxGuiKeys(void);
    3234  ~OrxonoxGuiKeys(void);
    33  
    34   Widget* getWidget(void);
    3535};
    3636
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_update.cc

    r3423 r4024  
    6262#endif /* HAVE_CURL */
    6363  this->updateFrame->fill(this->updateBox);
     64  this->setMainWidget(this->updateFrame);
    6465}
    6566
     
    8182
    8283
    83 }
    84 
    85 /**
    86    \brief Return the Frame
    87    \return Returns the Audio-frame
    88 */
    89 Widget* OrxonoxGuiUpdate::getWidget(void)
    90 {
    91   return this->updateFrame;
    9284}
    9385
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_update.h

    r3423 r4024  
    88
    99#include "orxonox_gui.h"
     10#include "orxonox_gui_element.h"
     11
    1012#include <stdio.h>
    1113#ifdef HAVE_CURL
     
    2123
    2224//! Class that creates the execute-Options.
    23 class OrxonoxGuiUpdate
     25class OrxonoxGuiUpdate : public OrxonoxGuiElement
    2426{
    2527 private:
     
    9799  ~OrxonoxGuiUpdate(void);
    98100 
    99   Widget* getWidget(void);
    100101#ifdef HAVE_CURL   
    101102  void updateDataWindowCreate(void);
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.cc

    r3630 r4024  
    5555
    5656  this->videoFrame->fill(videoBox);
     57  this->setMainWidget(this->videoFrame);
    5758}
    5859
     
    6465  // nothing to do here.
    6566}
    66 
    67 /**
    68    \return Returns the Video-frame
    69 */
    70 Widget* OrxonoxGuiVideo::getWidget(void)
    71 {
    72   return this->videoFrame;
    73 }
    74 
    7567
    7668/**
  • orxonox/trunk/src/lib/gui/gui/orxonox_gui_video.h

    r3624 r4024  
    77
    88#include "orxonox_gui.h"
     9#include "orxonox_gui_element.h"
    910
    1011//! Class that creates the Video-Options.
    11 class OrxonoxGuiVideo
     12class OrxonoxGuiVideo : public OrxonoxGuiElement
    1213{
    1314 private:
     
    4647  ~OrxonoxGuiVideo(void);
    4748
    48   Widget* getWidget(void);
    49 
    5049  void getResolutions(Menu* menu);
    5150 
Note: See TracChangeset for help on using the changeset viewer.