diff options
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); |