diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-11 16:15:10 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-11 16:15:10 +0000 |
commit | caeba363798727f75972ce6b8625fd9754bee903 (patch) | |
tree | 619fbff5801278d5b4f98413e354ea73a87f34bc /src/gui/window.h | |
parent | 24bf86763cdba47e9a88124a3394882667169185 (diff) | |
download | mana-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/window.h')
-rw-r--r-- | src/gui/window.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index b80a14c1..39d04ddb 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -38,12 +38,14 @@ class Window : public gcn::Container, public gcn::MouseListener { protected: gcn::Container *chrome; /**< Contained container */ + Window *parent; /**< The parent window */ std::string caption; /**< Title bar caption */ int z; /**< Z position of the window */ int mousePX; /**< Mouse down location */ int mousePY; /**< Mouse down location */ int snapSize; /**< Snap distance to window edge */ bool mouseDown; /**< Mouse button state */ + bool modal; /**< Window is modal */ gcn::Color titlebarColor; /**< Title bar color */ int titlebarHeight; /**< Height of title bar */ @@ -62,7 +64,8 @@ class Window : public gcn::Container, public gcn::MouseListener * @param text The initial window title, "Window" by default. * @param modal Block input to other windows. */ - Window(const std::string& text = "Window", bool modal = false); + Window(const std::string& text = "Window", bool modal = false, + Window *parent = NULL); /** * Destructor. @@ -119,6 +122,19 @@ class Window : public gcn::Container, public gcn::MouseListener */ void setSize(int width, int height); + /** + * Returns the parent window. + * + * @return The parent window or <code>NULL</code> if there is none. + */ + Window *getParentWindow(); + + /** + * Returns wether this window is modal. This doesn't necessarily mean + * that is gets input as a child modal window could get it. + */ + bool isModal(); + // Mouse handling void mousePress(int mx, int my, int button); |