summaryrefslogtreecommitdiff
path: root/src/gui/itemshortcutcontainer.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-12 18:36:15 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-12 18:36:15 +0000
commit8c62978f845432f8cac046a0d6fd4587c087f22f (patch)
tree1f586624c7f3a5ea375777606c035622026d8c5b /src/gui/itemshortcutcontainer.h
parentb50649ee5e28511df72cc3a08023747727c5b6f0 (diff)
downloadmana-8c62978f845432f8cac046a0d6fd4587c087f22f.tar.gz
mana-8c62978f845432f8cac046a0d6fd4587c087f22f.tar.bz2
mana-8c62978f845432f8cac046a0d6fd4587c087f22f.tar.xz
mana-8c62978f845432f8cac046a0d6fd4587c087f22f.zip
Fixed display of item shortcut container. gcn::Widget::setWidth is no longer
virtual.
Diffstat (limited to 'src/gui/itemshortcutcontainer.h')
-rw-r--r--src/gui/itemshortcutcontainer.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/itemshortcutcontainer.h b/src/gui/itemshortcutcontainer.h
index c69525e0..58f0aea7 100644
--- a/src/gui/itemshortcutcontainer.h
+++ b/src/gui/itemshortcutcontainer.h
@@ -26,6 +26,7 @@
#include <guichan/mouselistener.hpp>
#include <guichan/widget.hpp>
+#include <guichan/widgetlistener.hpp>
class Image;
class Item;
@@ -35,7 +36,9 @@ class Item;
*
* \ingroup GUI
*/
-class ItemShortcutContainer : public gcn::Widget, public gcn::MouseListener
+class ItemShortcutContainer : public gcn::Widget,
+ public gcn::WidgetListener,
+ public gcn::MouseListener
{
public:
/**
@@ -59,10 +62,10 @@ class ItemShortcutContainer : public gcn::Widget, public gcn::MouseListener
void draw(gcn::Graphics *graphics);
/**
- * Sets the width of the container. This is used to determine the new
- * height of the container.
+ * Invoked when a widget changes its size. This is used to determine
+ * the new height of the container.
*/
- void setWidth(int width);
+ void widgetResized(const gcn::Event &event);
/**
* Handles mouse when dragged.
@@ -79,7 +82,6 @@ class ItemShortcutContainer : public gcn::Widget, public gcn::MouseListener
*/
void mouseReleased(gcn::MouseEvent &event);
-
int getMaxItems()
{ return mMaxItems; }