diff options
author | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-20 05:29:12 +0000 |
---|---|---|
committer | Joshua Langley <joshlangley[at]optusnet.com.au> | 2007-08-20 05:29:12 +0000 |
commit | c322e6eac2373358c04e7bd70c8e0fc1bcfb37db (patch) | |
tree | 3ad86b222fa2e2688807a47cf500ec36567f8b6b /src/gui/window.h | |
parent | 1d9b37e81b1c91986644d6e9580422e6f8b47e25 (diff) | |
download | mana-c322e6eac2373358c04e7bd70c8e0fc1bcfb37db.tar.gz mana-c322e6eac2373358c04e7bd70c8e0fc1bcfb37db.tar.bz2 mana-c322e6eac2373358c04e7bd70c8e0fc1bcfb37db.tar.xz mana-c322e6eac2373358c04e7bd70c8e0fc1bcfb37db.zip |
Added close button functionality, resize cursor cues.
Diffstat (limited to 'src/gui/window.h')
-rw-r--r-- | src/gui/window.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index 1180d91c..a44a56d8 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -33,6 +33,7 @@ class GCContainer; class ImageRect; class ResizeGrip; class WindowContainer; +class Image; /** * A window. This window can be dragged around and has a title bar. Windows are @@ -119,11 +120,16 @@ class Window : public gcn::Window void setLocationRelativeTo(gcn::Widget *widget); /** - * Sets whether of not the window can be resized. + * Sets whether or not the window can be resized. */ void setResizable(bool resize); /** + * Sets whether or not the window has a close button. + */ + void setCloseButton(bool flag); + + /** * Returns whether the window can be resized. */ bool isResizable(); @@ -193,6 +199,24 @@ class Window : public gcn::Window void mouseDragged(gcn::MouseEvent &event); /** + * Implements custom cursor image changing context, + * based on mouse relative position. + */ + void mouseMoved(gcn::MouseEvent &event); + + /** + * When the mouse button has been let go, this ensures that the mouse + * custom cursor is restored back to it's standard image. + */ + void mouseReleased(gcn::MouseEvent &event); + + /** + * When the mouse leaves the window this ensures that the custom cursor + * is restored back to it's standard image. + */ + void mouseExited(gcn::MouseEvent &event); + + /** * Sets the name of the window. This is not the window title. */ void @@ -243,7 +267,7 @@ class Window : public gcn::Window bool mShowTitle; /**< Window has a title bar */ bool mModal; /**< Window is modal */ bool mResizable; /**< Window can be resized */ - int mMouseResize; /**< Window is being resized */ + bool mCloseButton; /**< Window has a close button */ bool mSticky; /**< Window resists minimization */ int mMinWinWidth; /**< Minimum window width */ int mMinWinHeight; /**< Minimum window height */ @@ -263,6 +287,7 @@ class Window : public gcn::Window static ConfigListener *windowConfigListener; static int instances; /**< Number of Window instances */ + static int mouseResize; /**< Window is being resized */ static ImageRect border; /**< The window border and background */ /** @@ -271,6 +296,8 @@ class Window : public gcn::Window * where two borders are moved at the same time. */ static const int resizeBorderWidth = 10; + static Image *closeImage; /**< Close Button Image */ + }; #endif |