summaryrefslogtreecommitdiff
path: root/src/gui/windowcontainer.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-11 16:15:10 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-11 16:15:10 +0000
commitcaeba363798727f75972ce6b8625fd9754bee903 (patch)
tree619fbff5801278d5b4f98413e354ea73a87f34bc /src/gui/windowcontainer.h
parent24bf86763cdba47e9a88124a3394882667169185 (diff)
downloadmana-caeba363798727f75972ce6b8625fd9754bee903.tar.gz
mana-caeba363798727f75972ce6b8625fd9754bee903.tar.bz2
mana-caeba363798727f75972ce6b8625fd9754bee903.tar.xz
mana-caeba363798727f75972ce6b8625fd9754bee903.zip
Implemented parent relationship for Window class and converted more ok dialogs
to the OkDialog class.
Diffstat (limited to 'src/gui/windowcontainer.h')
-rw-r--r--src/gui/windowcontainer.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/windowcontainer.h b/src/gui/windowcontainer.h
index 8b5753a5..582faf7a 100644
--- a/src/gui/windowcontainer.h
+++ b/src/gui/windowcontainer.h
@@ -26,6 +26,8 @@
#include <guichan.hpp>
+class Window;
+
/**
* A window container. This container makes draggable windows possible.
*
@@ -54,7 +56,15 @@ class WindowContainer : public gcn::Container {
* Adds a widget. The widget can be set to be modal, which will ensure
* only that widget will receive input.
*/
- void add(gcn::Widget *widget, bool modal = false);
+ void add(gcn::Widget *widget);
+
+ /**
+ * Adds a window. The window can be set to be modal, which will ensure
+ * only that window will receive input. Note that when a modal widget
+ * has already been set, a new window can only be made model when the
+ * previously modal window is its parent.
+ */
+ void WindowContainer::add(Window *window, bool modal);
/**
* Removes a widget.
@@ -78,13 +88,13 @@ class WindowContainer : public gcn::Container {
*
* @see Window::Window
*/
- void setModalWidget(gcn::Widget *widget);
+ void setModalWindow(Window *window);
/**
* Returns the current modal widget, or <code>NULL</code> if there
* is none.
*/
- gcn::Widget *getModalWidget();
+ gcn::Widget *getModalWindow();
/**
* Schedule a widget for deletion. It will be deleted at the start of
@@ -94,7 +104,7 @@ class WindowContainer : public gcn::Container {
protected:
bool mouseDown;
- gcn::Widget *modalWidget;
+ Window *modalWindow;
std::list<gcn::Widget*> deathList;
};