Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7779 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_frame.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_frame.cc

    r5393 r7779  
    1919
    2020#include "debug.h"
     21namespace OrxGui
     22{
    2123
    22 using namespace std;
     24  /**
     25   * standard constructor
     26  */
     27  GLGuiFrame::GLGuiFrame ()
     28  {
     29    this->init();
    2330
    24 /**
    25  * standard constructor
    26 */
    27 GLGuiFrame::GLGuiFrame ()
    28 {
    29   this->init();
    30 
    31 }
     31  }
    3232
    3333
    34 /**
    35  * standard deconstructor
    36 */
    37 GLGuiFrame::~GLGuiFrame()
    38 {
     34  /**
     35   * standard deconstructor
     36  */
     37  GLGuiFrame::~GLGuiFrame()
     38  {
     39  }
    3940
    40 }
     41  /**
     42   * initializes the GUI-element
     43   */
     44  void GLGuiFrame::init()
     45  {
     46    this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
     47    this->child = NULL;
     48  }
    4149
    42 /**
    43  * initializes the GUI-element
    44  */
    45 void GLGuiFrame::init()
    46 {
    47   this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
    48   this->child = NULL;
    49 }
     50  void GLGuiFrame::pack(GLGuiWidget* widget)
     51  {
     52    if (widget == NULL)
     53      return;
    5054
    51 void GLGuiFrame::pack(GLGuiWidget* widget)
    52 {
    53   if (widget == NULL)
    54     return;
     55    if (this->child == NULL)
     56      this->child = widget;
     57    else
     58    {
     59      PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->getName(), widget->getName());
     60    }
     61  }
    5562
    56   if (this->child == NULL)
    57     this->child = widget;
    58   else
     63  void GLGuiFrame::unpack(GLGuiWidget* widget)
    5964  {
    60     PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->getName(), widget->getName());
     65    if (widget == NULL || widget == this->child)
     66      this->child = NULL;
     67  }
     68
     69  void GLGuiFrame::showAll()
     70  {
     71    if (this->child != NULL)
     72    {
     73      if (this->child->isA(CL_GLGUI_CONTAINER))
     74        static_cast<GLGuiContainer*>(this->child)->showAll();
     75      else
     76        this->child->show();
     77    }
     78    this->show();
     79  }
     80
     81  void GLGuiFrame::hideAll()
     82  {
     83    if (this->child != NULL)
     84    {
     85      if (this->child->isA(CL_GLGUI_CONTAINER))
     86        static_cast<GLGuiContainer*>(this->child)->hideAll();
     87      else
     88        this->child->hide();
     89    }
     90    this->hide();
     91  }
     92
     93
     94  /**
     95   * draws the GLGuiFrame
     96   */
     97  void GLGuiFrame::draw()
     98  {
    6199  }
    62100}
    63 
    64 void GLGuiFrame::unpack(GLGuiWidget* widget)
    65 {
    66   if (widget == NULL || widget == this->child)
    67     this->child = NULL;
    68 }
    69 
    70 void GLGuiFrame::showAll()
    71 {
    72   if (this->child != NULL)
    73   {
    74     if (this->child->isA(CL_GLGUI_CONTAINER))
    75       static_cast<GLGuiContainer*>(this->child)->showAll();
    76     else
    77       this->child->show();
    78   }
    79   this->show();
    80 }
    81 
    82 void GLGuiFrame::hideAll()
    83 {
    84   if (this->child != NULL)
    85   {
    86     if (this->child->isA(CL_GLGUI_CONTAINER))
    87       static_cast<GLGuiContainer*>(this->child)->hideAll();
    88     else
    89       this->child->hide();
    90   }
    91   this->hide();
    92 }
    93 
    94 
    95 /**
    96  * draws the GLGuiFrame
    97  */
    98 void GLGuiFrame::draw()
    99 {
    100 
    101 }
Note: See TracChangeset for help on using the changeset viewer.