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.cpp | |
parent | 24bf86763cdba47e9a88124a3394882667169185 (diff) | |
download | mana-client-caeba363798727f75972ce6b8625fd9754bee903.tar.gz mana-client-caeba363798727f75972ce6b8625fd9754bee903.tar.bz2 mana-client-caeba363798727f75972ce6b8625fd9754bee903.tar.xz mana-client-caeba363798727f75972ce6b8625fd9754bee903.zip |
Implemented parent relationship for Window class and converted more ok dialogs
to the OkDialog class.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 19621c07..9ab17799 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -27,14 +27,20 @@ WindowContainer *Window::windowContainer = NULL; -Window::Window(const std::string& text, bool modal): +Window::Window(const std::string& text, bool modal, Window *parent): + parent(parent), caption(text), mousePX(0), mousePY(0), snapSize(8), mouseDown(false), + modal(modal), titlebarHeight(20) { +#ifdef __DEBUG + std::cout << "Window::Window(\"" << caption << "\")\n"; +#endif + titlebarColor.r = 203; titlebarColor.g = 203; titlebarColor.b = 203; @@ -66,6 +72,10 @@ Window::Window(const std::string& text, bool modal): Window::~Window() { +#ifdef __DEBUG + std::cout << "Window::~Window(\"" << caption << "\")\n"; +#endif + // Free dialog bitmaps release_bitmap(dLeft); release_bitmap(dMid); @@ -172,6 +182,16 @@ void Window::setSize(int width, int height) setHeight(height); } +Window *Window::getParentWindow() +{ + return parent; +} + +bool Window::isModal() +{ + return modal; +} + void Window::add(gcn::Widget *w) { chrome->add(w); |