From aa6a0b7b75bc05e51805b6f377ca6278f1f58436 Mon Sep 17 00:00:00 2001 From: Björn Steinbrink Date: Tue, 18 Oct 2005 21:40:25 +0000 Subject: Added automatic widget cleanup to the window class. --- src/gui/window.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gui/window.h') diff --git a/src/gui/window.h b/src/gui/window.h index c7eba732..4f20f721 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -29,6 +29,7 @@ #include "../guichanfwd.h" class ConfigListener; +class GCContainer; class Image; class ImageRect; class WindowContainer; @@ -75,12 +76,12 @@ class Window : public gcn::Window /** * Adds a widget to the window. */ - void add(gcn::Widget *w); + void add(gcn::Widget *wi, bool delChild=true); /** * Adds a widget to the window and also specifices its position. */ - void add(gcn::Widget *w, int x, int y); + void add(gcn::Widget *w, int x, int y, bool delChild=true); /** * Sets the width of the window contents. @@ -195,7 +196,7 @@ class Window : public gcn::Window virtual void resetToDefaultSize(); protected: - gcn::Container *mChrome; /**< Contained container */ + GCContainer *mChrome; /**< Contained container */ Window *mParent; /**< The parent window */ std::string mWindowName; /**< Name of the window */ int snapSize; /**< Snap distance to window edge */ -- cgit v1.2.3-70-g09d2