Changeset 5393 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_frame.cc
- Timestamp:
- Oct 16, 2005, 2:28:55 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_frame.cc
r5364 r5393 17 17 18 18 #include "glgui_frame.h" 19 20 #include "debug.h" 19 21 20 22 using namespace std; … … 44 46 { 45 47 this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame"); 48 this->child = NULL; 49 } 46 50 51 void GLGuiFrame::pack(GLGuiWidget* widget) 52 { 53 if (widget == NULL) 54 return; 55 56 if (this->child == NULL) 57 this->child = widget; 58 else 59 { 60 PRINTF(2)("Frame %s is already filled, not filling with %s\n", this->getName(), widget->getName()); 61 } 47 62 } 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 48 94 49 95 /**
Note: See TracChangeset
for help on using the changeset viewer.