diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-08-24 09:33:33 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-08-24 09:33:33 +0000 |
commit | dd79b36895a17b3da131197be66827e6809615f0 (patch) | |
tree | be41cac640f44cf45ce2f58142cf32eff78dc5d8 /src/gui/window.cpp | |
parent | 9581f6556ac1646b4d30c676403aba544e4edaec (diff) | |
download | mana-client-dd79b36895a17b3da131197be66827e6809615f0.tar.gz mana-client-dd79b36895a17b3da131197be66827e6809615f0.tar.bz2 mana-client-dd79b36895a17b3da131197be66827e6809615f0.tar.xz mana-client-dd79b36895a17b3da131197be66827e6809615f0.zip |
Added support for sticky windows as discussed with doener. Patch by AHarrison
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r-- | src/gui/window.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 9edecfca..fe23c775 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -63,6 +63,7 @@ Window::Window(const std::string& caption, bool modal, Window *parent): mModal(modal), mResizable(false), mMouseResize(false), + mSticky(false), mMinWinWidth(100), mMinWinHeight(28), mMaxWinWidth(INT_MAX), @@ -243,6 +244,26 @@ bool Window::isResizable() return mResizable; } +void Window::setSticky(bool sticky) +{ + mSticky = sticky; +} + +bool Window::isSticky() { + return mSticky; +} + +void Window::setVisible(bool visible) { + if(isSticky()) + { + gcn::Window::setVisible(true); + } + else + { + gcn::Window::setVisible(visible); + } +} + void Window::scheduleDelete() { windowContainer->scheduleDelete(this); |