diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-18 21:40:25 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-10-18 21:40:25 +0000 |
commit | aa6a0b7b75bc05e51805b6f377ca6278f1f58436 (patch) | |
tree | 718c211089348a3b67641d16821a98ae88de0285 /src/gui/window.cpp | |
parent | d0333c99e0ff4c5510875bf8993056875d6c93af (diff) | |
download | mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.tar.gz mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.tar.bz2 mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.tar.xz mana-aa6a0b7b75bc05e51805b6f377ca6278f1f58436.zip |
Added automatic widget cleanup to the window class.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 54fc0103..a6f82b45 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -21,9 +21,11 @@ * $Id$ */ +#include "window.h" + #include <guichan/exception.hpp> -#include "window.h" +#include "gccontainer.h" #include "windowcontainer.h" #include "../configlistener.h" @@ -114,7 +116,7 @@ Window::Window(const std::string& caption, bool modal, Window *parent): setTitleBarHeight(20); // Add chrome - mChrome = new gcn::Container(); + mChrome = new GCContainer(); mChrome->setOpaque(false); setContent(mChrome); @@ -259,14 +261,14 @@ void Window::scheduleDelete() windowContainer->scheduleDelete(this); } -void Window::add(gcn::Widget *w) +void Window::add(gcn::Widget *w, bool delChild) { - mChrome->add(w); + mChrome->add(w, delChild); } -void Window::add(gcn::Widget *w, int x, int y) +void Window::add(gcn::Widget *w, int x, int y, bool delChild) { - mChrome->add(w, x, y); + mChrome->add(w, x, y, delChild); } void Window::mousePress(int x, int y, int button) |