Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7779 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_button.cc


Ignore:
Timestamp:
May 23, 2006, 10:04:17 PM (18 years ago)
Author:
bensch
Message:

3088 linews changed :): trunk: namespaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl_gui/glgui_button.cc

    r7221 r7779  
    2020#include "text.h"
    2121
    22 using namespace std;
    2322
    24 /**
    25  * standard constructor
    26 */
    27 GLGuiButton::GLGuiButton ()
     23namespace OrxGui
    2824{
    29   this->init();
     25  /**
     26   * standard constructor
     27  */
     28  GLGuiButton::GLGuiButton ()
     29  {
     30    this->init();
    3031
    31 }
     32  }
    3233
    3334
    34 /**
    35  * standard deconstructor
    36 */
    37 GLGuiButton::~GLGuiButton()
    38 {
    39   /* this does not have to be done, since the Label is a child,
    40    * and will be deleted by Element2D's deletion Process
    41    * delete this->label;
     35  /**
     36   * standard deconstructor
    4237  */
    43 }
     38  GLGuiButton::~GLGuiButton()
     39  {
     40    /* this does not have to be done, since the Label is a child,
     41     * and will be deleted by Element2D's deletion Process
     42     * delete this->label;
     43    */
     44  }
    4445
    45 /**
    46  * initializes the GUI-element
    47  */
    48 void GLGuiButton::init()
    49 {
    50   this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton");
     46  /**
     47   * initializes the GUI-element
     48   */
     49  void GLGuiButton::init()
     50  {
     51    this->setClassID(CL_GLGUI_BUTTON, "GLGuiButton");
    5152
    52   this->label = new Text();
    53   this->label->setParent2D(this);
    54 }
     53    this->label = new Text();
     54    this->label->setParent2D(this);
     55  }
    5556
    56 void GLGuiButton::setLabel(const std::string& label)
    57 {
    58   this->label->setText(label);
    59   this->label->setRelCoor2D(5, 5);
    60   this->setSize2D(this->label->getSizeX2D()+10, this->label->getSizeY2D()+10);
    61 }
     57  void GLGuiButton::setLabel(const std::string& label)
     58  {
     59    this->label->setText(label);
     60    this->label->setRelCoor2D(5, 5);
     61    this->setSize2D(this->label->getSizeX2D()+10, this->label->getSizeY2D()+10);
     62  }
    6263
    6364
    64 /**
    65  * draws the GLGuiButton
    66  */
    67 void GLGuiButton::draw() const
    68 {
    69   GLGuiWidget::draw();
     65  /**
     66   * draws the GLGuiButton
     67   */
     68  void GLGuiButton::draw() const
     69  {
     70    GLGuiWidget::draw();
     71  }
    7072}
Note: See TracChangeset for help on using the changeset viewer.