summaryrefslogtreecommitdiff
path: root/src/gui/window.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-07 15:23:07 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-07 15:23:07 +0000
commit92950d2f309550e21b33d851ef9bbf7906ce5e50 (patch)
tree18a6d2539c6e004e52cbebb1e61d8f8f0344f9a0 /src/gui/window.h
parent3f3ba5f3e18b0a5093e7275aee574ecd6f293ec6 (diff)
downloadMana-92950d2f309550e21b33d851ef9bbf7906ce5e50.tar.gz
Mana-92950d2f309550e21b33d851ef9bbf7906ce5e50.tar.bz2
Mana-92950d2f309550e21b33d851ef9bbf7906ce5e50.tar.xz
Mana-92950d2f309550e21b33d851ef9bbf7906ce5e50.zip
Upgraded to Guichan 0.8.0 (merge from guichan-0.8 branch, except for
gcn::TabbedArea usage)
Diffstat (limited to 'src/gui/window.h')
-rw-r--r--src/gui/window.h77
1 files changed, 7 insertions, 70 deletions
diff --git a/src/gui/window.h b/src/gui/window.h
index 18f97cec..9ca435a9 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -25,11 +25,10 @@
#define _TMW_WINDOW_H__
#include <guichan/widgets/window.hpp>
+#include <guichan/widgetlistener.hpp>
#include "../guichanfwd.h"
-#include "windowlistener.h"
-
class ConfigListener;
class GCContainer;
class ImageRect;
@@ -43,7 +42,7 @@ class Image;
*
* \ingroup GUI
*/
-class Window : public gcn::Window
+class Window : public gcn::Window, gcn::WidgetListener
{
public:
friend class WindowConfigListener;
@@ -87,56 +86,11 @@ class Window : public gcn::Window
void add(gcn::Widget *w, int x, int y, bool delChild = true);
/**
- * Sets the width of the window contents.
- */
- void setContentWidth(int width);
-
- /**
- * Sets the height of the window contents.
- */
- void setContentHeight(int height);
-
- /**
* Sets the size of this window.
*/
void setContentSize(int width, int height);
/**
- * Sets the size of this window.
- */
- void setSize(int width, int height);
-
- /**
- * Sets the width of this window.
- */
- void setWidth(int width);
-
- /**
- * Sets the height of this window.
- */
- void setHeight(int height);
-
- /**
- * Sets the position and size of this window.
- */
- void setDimension(const gcn::Rectangle &dimension);
-
- /**
- * Sets the position of this window.
- */
- void setPosition(int x, int y);
-
- /**
- * Sets the window x coordinate.
- */
- void setX(int x);
-
- /**
- * Sets the window y coordinate.
- */
- void setY(int y);
-
- /**
* Sets the location relative to the given widget.
*/
void setLocationRelativeTo(gcn::Widget *widget);
@@ -147,6 +101,11 @@ class Window : public gcn::Window
void setResizable(bool resize);
/**
+ * Called whenever the widget changes size.
+ */
+ void widgetResized(const gcn::Event &event);
+
+ /**
* Sets whether or not the window has a close button.
*/
void setCloseButton(bool flag);
@@ -276,20 +235,6 @@ class Window : public gcn::Window
*/
virtual void resetToDefaultSize();
- /**
- * Adds a listener to the list that's notified when the window is
- * moved or resized.
- */
- void addWindowListener(WindowListener *listener)
- { mListeners.push_back(listener); }
-
- /**
- * Removes a listener from the list that's notified when the window is
- * moved or resized.
- */
- void removeWindowListener(WindowListener *listener)
- { mListeners.remove(listener); }
-
enum ResizeHandles
{
TOP = 0x01,
@@ -344,14 +289,6 @@ class Window : public gcn::Window
* where two borders are moved at the same time.
*/
static const int resizeBorderWidth = 10;
-
- private:
- /**
- * Sends out a window event to the list of selection listeners.
- */
- void fireWindowEvent(const WindowEvent &event);
-
- WindowListeners mListeners;
};
#endif