summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-28 00:01:38 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-08-28 00:01:38 +0000
commit55786731e0517efdc123d4e8245b2aa94fa55cbe (patch)
tree17d64454f3daeb9f55241e8c9a95b5671f2da023 /src/gui/inventorywindow.h
parent76291862ce0e26040f251bc4764539d8ff6634a0 (diff)
downloadmana-55786731e0517efdc123d4e8245b2aa94fa55cbe.tar.gz
mana-55786731e0517efdc123d4e8245b2aa94fa55cbe.tar.bz2
mana-55786731e0517efdc123d4e8245b2aa94fa55cbe.tar.xz
mana-55786731e0517efdc123d4e8245b2aa94fa55cbe.zip
Made buy dialog resizable and added a WindowListener class for listening for
window resize and move events.
Diffstat (limited to 'src/gui/inventorywindow.h')
-rw-r--r--src/gui/inventorywindow.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h
index 5ee89fef..14e1f25f 100644
--- a/src/gui/inventorywindow.h
+++ b/src/gui/inventorywindow.h
@@ -26,8 +26,9 @@
#include <guichan/actionlistener.hpp>
-#include "window.h"
#include "selectionlistener.h"
+#include "window.h"
+#include "windowlistener.h"
#include "../guichanfwd.h"
@@ -39,7 +40,8 @@ class ItemContainer;
*
* \ingroup Interface
*/
-class InventoryWindow : public Window, gcn::ActionListener, SelectionListener
+class InventoryWindow : public Window, gcn::ActionListener, SelectionListener,
+ WindowListener
{
public:
/**
@@ -59,14 +61,8 @@ class InventoryWindow : public Window, gcn::ActionListener, SelectionListener
void mouseClicked(gcn::MouseEvent &event);
- void mouseDragged(gcn::MouseEvent &event);
-
Item* getItem();
- void loadWindowState();
-
- void resetToDefaultSize();
-
/**
* Updates labels to currently selected item.
*
@@ -74,11 +70,14 @@ class InventoryWindow : public Window, gcn::ActionListener, SelectionListener
*/
void selectionChanged(const SelectionEvent &event);
+ /**
+ * Called whenever the window is resized.
+ */
+ void windowResized(const WindowEvent &event);
+
private:
void updateButtons(); /**< Updates button states. */
- void updateWidgets(); /**< Updates widgets size/position. */
-
ItemContainer *mItems;
gcn::Button *mUseButton, *mDropButton;