diff options
Diffstat (limited to 'src/gui/window.h')
-rw-r--r-- | src/gui/window.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index 984c6f06..9380fc88 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -22,17 +22,17 @@ #ifndef _TMW_WINDOW_H__ #define _TMW_WINDOW_H__ -#include <guichan/widgets/window.hpp> #include <guichan/widgetlistener.hpp> +#include <guichan/widgets/window.hpp> + +#include "../graphics.h" #include "../guichanfwd.h" class ConfigListener; 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 @@ -54,9 +54,10 @@ class Window : public gcn::Window, gcn::WidgetListener * @param parent The parent window. This is the window standing above * this one in the window hiearchy. When reordering, * a window will never go below its parent window. + * @param skin The location where the window's skin XML can be found. */ Window(const std::string &caption = "Window", bool modal = false, - Window *parent = NULL); + Window *parent = NULL, const std::string &skin = "graphics/gui/gui.xml"); /** * Destructor. @@ -235,6 +236,11 @@ class Window : public gcn::Window, gcn::WidgetListener */ virtual void resetToDefaultSize(); + /** + * Loads a window skin + */ + void loadSkin(const std::string filename); + enum ResizeHandles { TOP = 0x01, @@ -253,6 +259,8 @@ class Window : public gcn::Window, gcn::WidgetListener */ int getResizeHandles(gcn::MouseEvent &event); + void setGuiAlpha(); + GCContainer *mChrome; /**< Contained container */ ResizeGrip *mGrip; /**< Resize grip */ Window *mParent; /**< The parent window */ @@ -261,6 +269,7 @@ class Window : public gcn::Window, gcn::WidgetListener bool mModal; /**< Window is modal */ bool mCloseButton; /**< Window has a close button */ bool mSticky; /**< Window resists minimization */ + static bool mAlphaChanged; /**< Whether the alpha percent was changed */ int mMinWinWidth; /**< Minimum window width */ int mMinWinHeight; /**< Minimum window height */ int mMaxWinWidth; /**< Maximum window width */ @@ -269,6 +278,7 @@ class Window : public gcn::Window, gcn::WidgetListener int mDefaultY; /**< Default window Y position */ int mDefaultWidth; /**< Default window width */ int mDefaultHeight; /**< Default window height */ + std::string mSkin; /**< Name of the skin to use */ /** The window container windows add themselves to. */ static WindowContainer *windowContainer; @@ -280,7 +290,7 @@ class Window : public gcn::Window, gcn::WidgetListener static int mouseResize; /**< Active resize handles */ static int instances; /**< Number of Window instances */ - static ImageRect border; /**< The window border and background */ + ImageRect border; /**< The window border and background */ static Image *closeImage; /**< Close Button Image */ /** |