diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-08 01:33:53 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-08 01:33:53 +0000 |
commit | ee416a5f3de03a689247a290077e7fdf451e1a23 (patch) | |
tree | f456df99f954919ac7a425606df51f010aa4ef2d /src/gui/window.h | |
parent | 4070dda1560bc729c3e272f0a5c03d77391e2661 (diff) | |
download | mana-ee416a5f3de03a689247a290077e7fdf451e1a23.tar.gz mana-ee416a5f3de03a689247a290077e7fdf451e1a23.tar.bz2 mana-ee416a5f3de03a689247a290077e7fdf451e1a23.tar.xz mana-ee416a5f3de03a689247a290077e7fdf451e1a23.zip |
Well improved window container and window widgets a bit, and made a start
on support for modal dialogs. Still some issues to work out. Tell me if you
experience something unsettling.
Diffstat (limited to 'src/gui/window.h')
-rw-r--r-- | src/gui/window.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index 0a0170d8..b80a14c1 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -27,6 +27,7 @@ #include <iostream> #include <allegro.h> #include <guichan.hpp> +#include "windowcontainer.h" /** * A window. This window can be dragged around and has a title bar. @@ -35,7 +36,7 @@ */ class Window : public gcn::Container, public gcn::MouseListener { - private: + protected: gcn::Container *chrome; /**< Contained container */ std::string caption; /**< Title bar caption */ int z; /**< Z position of the window */ @@ -50,21 +51,28 @@ class Window : public gcn::Container, public gcn::MouseListener BITMAP *dMid; /**< Middle of title bar */ BITMAP *dRight; /**< Right side of title bar */ + /** The window container windows add themselves to. */ + static WindowContainer* windowContainer; + public: /** * Constructor. Initializes the title to the given text and hooks - * itself into the given parent. + * itself into the window container. * - * @param parent The parent container to which this window will add - * itself. * @param text The initial window title, "Window" by default. + * @param modal Block input to other windows. */ - Window(gcn::Container *parent, const std::string& text = "Window"); + Window(const std::string& text = "Window", bool modal = false); /** * Destructor. */ - ~Window(); + virtual ~Window(); + + /** + * Sets the window container to be used by new windows. + */ + static void setWindowContainer(WindowContainer *windowContainer); /** * Draws the window. |