diff options
Diffstat (limited to 'src/gui/window.h')
-rw-r--r-- | src/gui/window.h | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/src/gui/window.h b/src/gui/window.h index 8907ead4..c41a4221 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -1,9 +1,8 @@ /* - * Aethyra + * The Mana World * Copyright (C) 2004 The Mana World Development Team * - * This file is part of Aethyra based on original code - * from The Mana World. + * This file is part of The Mana World. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +29,6 @@ #include "../graphics.h" #include "../guichanfwd.h" -class GCContainer; class ContainerPlacer; class Layout; class LayoutCell; @@ -111,46 +109,34 @@ class Window : public gcn::Window, gcn::WidgetListener /** * Returns whether the window can be resized. */ - bool isResizable(); + bool isResizable() const; /** * Sets the minimum width of the window. */ void setMinWidth(int width); + int getMinWidth() const { return mMinWinWidth; } + /** * Sets the minimum height of the window. */ void setMinHeight(int height); + int getMinHeight() const { return mMinWinHeight; } + /** * Sets the maximum width of the window. */ void setMaxWidth(int width); + int getMaxWidth() const { return mMaxWinWidth; } + /** * Sets the minimum height of the window. */ void setMaxHeight(int height); - /** - * Gets the minimum width of the window. - */ - int getMinWidth() const { return mMinWinWidth; } - - /** - * Gets the minimum height of the window. - */ - int getMinHeight() const { return mMinWinHeight; } - - /** - * Gets the maximum width of the window. - */ - int getMaxWidth() const { return mMaxWinWidth; } - - /** - * Gets the minimum height of the window. - */ int getMaxHeight() const { return mMaxWinHeight; } /** @@ -226,7 +212,7 @@ class Window : public gcn::Window, gcn::WidgetListener /** * Returns the name of the window. This is not the window title. */ - const std::string& getWindowName() { return mWindowName; } + const std::string &getWindowName() const { return mWindowName; } /** * Reads the position (and the size for resizable windows) in the @@ -251,6 +237,11 @@ class Window : public gcn::Window, gcn::WidgetListener int defaultWidth, int defaultHeight); /** + * Set the default win pos and size tot he current ones. + */ + void setDefaultSize(); + + /** * Set the default win pos and size. * (which can be different of the actual ones.) * This version of setDefaultSize sets the window's position based @@ -292,6 +283,11 @@ class Window : public gcn::Window, gcn::WidgetListener ContainerPlacer getPlacer(int x, int y); /** + * Positions the window in the center of it's parent. + */ + void center(); + + /** * Overrideable functionality for when the window is to close. This * allows for class implementations to clean up or do certain actions * on window close they couldn't do otherwise. @@ -321,7 +317,6 @@ class Window : public gcn::Window, gcn::WidgetListener */ int getResizeHandles(gcn::MouseEvent &event); - GCContainer *mChrome; /**< Contained container */ ResizeGrip *mGrip; /**< Resize grip */ Window *mParent; /**< The parent window */ Layout *mLayout; /**< Layout handler */ |