diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-08-31 23:24:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-08-31 23:24:57 +0300 |
commit | adeb8e6091694e228f081ca8843e101ae598f26c (patch) | |
tree | a8a9caf4cbaf6b5d9a99f9b5e4e56f9b3203aa38 /src/gui/widgets/window.h | |
parent | 6d349121a70377723e53b92a8990e56ee3e4fd88 (diff) | |
download | manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.tar.gz manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.tar.bz2 manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.tar.xz manaplus-adeb8e6091694e228f081ca8843e101ae598f26c.zip |
Add ability to lock any window position and size. Using sticky image for this.
Diffstat (limited to 'src/gui/widgets/window.h')
-rw-r--r-- | src/gui/widgets/window.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index d36d6c5ad..b9f65dceb 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -189,6 +189,17 @@ class Window : public gcn::Window, gcn::WidgetListener { return mSticky; } /** + * Sets whether the window sticky mean window locked or not. + */ + void setStickyButtonLock(bool sticky); + + /** + * Returns whether the window sticky locking window. + */ + bool isStickyButtonLock() const + { return mStickyButtonLock; } + + /** * Overloads window setVisible by Guichan to allow sticky window * handling. */ @@ -387,6 +398,9 @@ class Window : public gcn::Window, gcn::WidgetListener void setCaptionFont(gcn::Font *font) { mCaptionFont = font; } + protected: + bool canMove(); + private: enum ResizeHandles { @@ -423,6 +437,7 @@ class Window : public gcn::Window, gcn::WidgetListener bool mSaveVisible; /**< Window will save visibility */ bool mStickyButton; /**< Window has a sticky button */ bool mSticky; /**< Window resists hiding*/ + bool mStickyButtonLock; /**< Window locked if sticky enabled*/ int mMinWinWidth; /**< Minimum window width */ int mMinWinHeight; /**< Minimum window height */ int mMaxWinWidth; /**< Maximum window width */ |