Changeset 7779 in orxonox.OLD for trunk/src/lib/gui/gl_gui/glgui_frame.cc
- Timestamp:
- May 23, 2006, 10:04:17 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_frame.cc
r5393 r7779 19 19 20 20 #include "debug.h" 21 namespace OrxGui 22 { 21 23 22 using namespace std; 24 /** 25 * standard constructor 26 */ 27 GLGuiFrame::GLGuiFrame () 28 { 29 this->init(); 23 30 24 /** 25 * standard constructor 26 */ 27 GLGuiFrame::GLGuiFrame () 28 { 29 this->init(); 30 31 } 31 } 32 32 33 33 34 /** 35 * standard deconstructor 36 */ 37 GLGuiFrame::~GLGuiFrame() 38 { 34 /** 35 * standard deconstructor 36 */ 37 GLGuiFrame::~GLGuiFrame() 38 { 39 } 39 40 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 } 41 49 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; 50 54 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 } 55 62 56 if (this->child == NULL) 57 this->child = widget; 58 else 63 void GLGuiFrame::unpack(GLGuiWidget* widget) 59 64 { 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 { 61 99 } 62 100 } 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 else77 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 else89 this->child->hide();90 }91 this->hide();92 }93 94 95 /**96 * draws the GLGuiFrame97 */98 void GLGuiFrame::draw()99 {100 101 }
Note: See TracChangeset
for help on using the changeset viewer.