From 4b9e2b6c41e740a3eac10078d5fa4fbc63788bbe Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 11 Apr 2008 13:31:52 +0000 Subject: Ported trunk over to Guichan 0.8.0. Based on merge from 0.0 branch, but because of quite a bit of GUI differences there were additional changes and probably additional issues. You have been warned. ;) Merged revisions 4045-4049,4051-4059 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4045 | b_lindeijer | 2008-04-07 17:23:07 +0200 (Mon, 07 Apr 2008) | 3 lines Upgraded to Guichan 0.8.0 (merge from guichan-0.8 branch, except for gcn::TabbedArea usage) ........ r4059 | b_lindeijer | 2008-04-09 16:25:42 +0200 (Wed, 09 Apr 2008) | 2 lines Fixed problem with row height in shop list box. ........ --- src/gui/itemcontainer.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/gui/itemcontainer.h') diff --git a/src/gui/itemcontainer.h b/src/gui/itemcontainer.h index 8be338dd..fad59171 100644 --- a/src/gui/itemcontainer.h +++ b/src/gui/itemcontainer.h @@ -34,7 +34,10 @@ class Image; class Inventory; class Item; -class SelectionListener; + +namespace gcn { + class SelectionListener; +} /** * An item container. Used to show items in inventory and trade dialog. @@ -104,18 +107,18 @@ class ItemContainer : public gcn::Widget, * Adds a listener to the list that's notified each time a change to * the selection occurs. */ - void addSelectionListener(SelectionListener *listener) + void addSelectionListener(gcn::SelectionListener *listener) { - mListeners.push_back(listener); + mSelectionListeners.push_back(listener); } /** * Removes a listener from the list that's notified each time a change * to the selection occurs. */ - void removeSelectionListener(SelectionListener *listener) + void removeSelectionListener(gcn::SelectionListener *listener) { - mListeners.remove(listener); + mSelectionListeners.remove(listener); } enum { @@ -145,7 +148,7 @@ class ItemContainer : public gcn::Widget, /** * Sends out selection events to the list of selection listeners. */ - void fireSelectionChangedEvent(); + void distributeValueChangedEvent(); /** * Gets the slot index based on the cursor position. @@ -164,7 +167,10 @@ class ItemContainer : public gcn::Widget, bool mSwapItems; int mDragPosX, mDragPosY; - std::list mListeners; + typedef std::list SelectionListenerList; + typedef SelectionListenerList::iterator SelectionListenerIterator; + + SelectionListenerList mSelectionListeners; }; #endif -- cgit v1.2.3-70-g09d2