24#include <guichan/keylistener.hpp>
25#include <guichan/mouselistener.hpp>
26#include <guichan/widget.hpp>
27#include <guichan/widgetlistener.hpp>
38 class SelectionListener;
47 public gcn::KeyListener,
48 public gcn::MouseListener,
49 public gcn::WidgetListener
66 void logic()
override;
77 void keyPressed(gcn::KeyEvent &event)
override;
84 void mouseMoved(gcn::MouseEvent &event)
override;
104 void setFilter(
const std::string &filter);
Defines a class for loading and storing images.
int getSlotIndex(int x, int y) const
Gets the slot index based on the cursor position.
void widgetResized(const gcn::Event &event) override
void setSelectedIndex(int index)
Sets the currently selected item.
SelectionState mSelectionStatus
void mouseExited(gcn::MouseEvent &event) override
void setFilter(const std::string &filter)
Sets item filter.
void drawFrame(gcn::Graphics *graphics) override
void removeSelectionListener(gcn::SelectionListener *listener)
Removes a listener from the list that's notified each time a change to the selection occurs.
void mouseMoved(gcn::MouseEvent &event) override
Item * getItemAt(int) const
void keyReleased(gcn::KeyEvent &event) override
void keyPressed(gcn::KeyEvent &event) override
~ItemContainer() override
void logic() override
Necessary for checking how full the inventory is.
std::list< gcn::SelectionListener * > mSelectionListeners
void mousePressed(gcn::MouseEvent &event) override
void addSelectionListener(gcn::SelectionListener *listener)
Adds a listener to the list that's notified each time a change to the selection occurs.
void mouseReleased(gcn::MouseEvent &event) override
Item * getSelectedItem() const
Returns the selected item.
void selectNone()
Sets selected item to NULL.
void moveHighlight(Direction direction)
Moves the highlight in the direction specified.
void distributeValueChangedEvent()
Sends out selection events to the list of selection listeners.
void draw(gcn::Graphics *graphics) override
Draws the items.
void adjustHeight()
Determine and set the height of the container.
void keyAction()
Execute all the functionality associated with the action key.
std::map< int, Item * > mFilteredMap
void mouseDragged(gcn::MouseEvent &event) override
Represents one or more instances of a certain item type.