| 
                Last change
                  on this file since 5580 was
                  5364,
                  checked in by bensch, 20 years ago
           | 
        
        
          | 
               
orxonox/trunk: some more definition of the GUI 
 
           | 
        
        | 
            File size:
            1.3 KB
           | 
      
      
        
  | Line |   | 
|---|
| 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 |    ### File Specific: | 
|---|
| 12 |    main-programmer: Benjamin Grauer | 
|---|
| 13 |    co-programmer: ... | 
|---|
| 14 | */ | 
|---|
| 15 |  | 
|---|
| 16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI | 
|---|
| 17 |  | 
|---|
| 18 | #include "glgui_container.h" | 
|---|
| 19 |  | 
|---|
| 20 | #include "list.h" | 
|---|
| 21 |  | 
|---|
| 22 |  | 
|---|
| 23 | using namespace std; | 
|---|
| 24 |  | 
|---|
| 25 | /** | 
|---|
| 26 |  * standard constructor | 
|---|
| 27 | */ | 
|---|
| 28 | GLGuiContainer::GLGuiContainer () | 
|---|
| 29 | { | 
|---|
| 30 |   this->init(); | 
|---|
| 31 |   this->children = new tList<GLGuiWidget>; | 
|---|
| 32 | } | 
|---|
| 33 |  | 
|---|
| 34 |  | 
|---|
| 35 | /** | 
|---|
| 36 |  * standard deconstructor | 
|---|
| 37 | */ | 
|---|
| 38 | GLGuiContainer::~GLGuiContainer() | 
|---|
| 39 | { | 
|---|
| 40 |   delete this->children; | 
|---|
| 41 | } | 
|---|
| 42 |  | 
|---|
| 43 | /** | 
|---|
| 44 |  * initializes the GUI-element | 
|---|
| 45 |  */ | 
|---|
| 46 | void GLGuiContainer::init() | 
|---|
| 47 | { | 
|---|
| 48 |   this->setClassID(CL_GLGUI_CONTAINER, "GLGuiContainer"); | 
|---|
| 49 |  | 
|---|
| 50 | } | 
|---|
| 51 |  | 
|---|
| 52 | void GLGuiContainer::showAll() | 
|---|
| 53 | { | 
|---|
| 54 |  | 
|---|
| 55 |   tIterator<GLGuiWidget>* itC = this->children->getIterator(); | 
|---|
| 56 |   GLGuiWidget* enumC = itC->firstElement(); | 
|---|
| 57 |   while (enumC != NULL) | 
|---|
| 58 |   { | 
|---|
| 59 |     if (enumC->isA(CL_GLGUI_CONTAINER)) | 
|---|
| 60 |       static_cast<GLGuiContainer*>(enumC)->showAll(); | 
|---|
| 61 |     else | 
|---|
| 62 |      enumC->show(); | 
|---|
| 63 |     enumC = itC->nextElement(); | 
|---|
| 64 |   } | 
|---|
| 65 |   delete itC; | 
|---|
| 66 |  | 
|---|
| 67 |   this->show(); | 
|---|
| 68 |  | 
|---|
| 69 | } | 
|---|
| 70 |  | 
|---|
| 71 | void GLGuiContainer::hideAll() | 
|---|
| 72 | { | 
|---|
| 73 |  | 
|---|
| 74 | } | 
|---|
| 75 |  | 
|---|
| 76 |  | 
|---|
| 77 | /** | 
|---|
| 78 |  * draws the GLGuiContainer | 
|---|
| 79 |  */ | 
|---|
| 80 | void GLGuiContainer::draw() | 
|---|
| 81 | { | 
|---|
| 82 |  | 
|---|
| 83 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.