Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/gl_gui/glgui_frame.cc @ 6297

Last change on this file since 6297 was 5393, checked in by bensch, 19 years ago

orxonox/trunk: container-packing

File size: 1.7 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_frame.h"
19
20#include "debug.h"
21
22using namespace std;
23
24/**
25 * standard constructor
26*/
27GLGuiFrame::GLGuiFrame ()
28{
29  this->init();
30
31}
32
33
34/**
35 * standard deconstructor
36*/
37GLGuiFrame::~GLGuiFrame()
38{
39
40}
41
42/**
43 * initializes the GUI-element
44 */
45void GLGuiFrame::init()
46{
47  this->setClassID(CL_GLGUI_FRAME, "GLGuiFrame");
48  this->child = NULL;
49}
50
51void 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  }
62}
63
64void GLGuiFrame::unpack(GLGuiWidget* widget)
65{
66  if (widget == NULL || widget == this->child)
67    this->child = NULL;
68}
69
70void 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
82void 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 */
98void GLGuiFrame::draw()
99{
100
101}
Note: See TracBrowser for help on using the repository browser.