2014-03-16 22:38:51 +00:00
|
|
|
#ifndef OPENMW_GAME_MWGUI_ITEMSELECTION_H
|
|
|
|
#define OPENMW_GAME_MWGUI_ITEMSELECTION_H
|
|
|
|
|
2015-01-10 00:21:17 +00:00
|
|
|
#include <MyGUI_Delegate.h>
|
|
|
|
|
|
|
|
#include "windowbase.hpp"
|
|
|
|
|
|
|
|
namespace MWWorld
|
|
|
|
{
|
|
|
|
class Ptr;
|
|
|
|
}
|
2012-08-26 08:52:06 +00:00
|
|
|
|
|
|
|
namespace MWGui
|
|
|
|
{
|
2013-05-11 16:38:27 +00:00
|
|
|
class ItemView;
|
|
|
|
class SortFilterItemModel;
|
2012-08-26 08:52:06 +00:00
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
class ItemSelectionDialog : public WindowModal
|
2012-08-26 08:52:06 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-05-11 16:38:27 +00:00
|
|
|
ItemSelectionDialog(const std::string& label);
|
2012-08-26 08:52:06 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
bool exit() override;
|
2014-05-27 17:50:24 +00:00
|
|
|
|
2023-07-15 13:02:27 +00:00
|
|
|
typedef MyGUI::delegates::MultiDelegate<> EventHandle_Void;
|
|
|
|
typedef MyGUI::delegates::MultiDelegate<MWWorld::Ptr> EventHandle_Item;
|
2012-08-26 08:52:06 +00:00
|
|
|
|
|
|
|
EventHandle_Item eventItemSelected;
|
|
|
|
EventHandle_Void eventDialogCanceled;
|
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
void openContainer(const MWWorld::Ptr& container);
|
|
|
|
void setCategory(int category);
|
|
|
|
void setFilter(int filter);
|
2012-08-26 08:52:06 +00:00
|
|
|
|
2023-11-09 14:58:32 +00:00
|
|
|
SortFilterItemModel* getSortModel() { return mSortModel; }
|
|
|
|
|
2012-08-26 08:52:06 +00:00
|
|
|
private:
|
2013-05-11 16:38:27 +00:00
|
|
|
ItemView* mItemView;
|
|
|
|
SortFilterItemModel* mSortModel;
|
2012-08-26 08:52:06 +00:00
|
|
|
|
2013-05-11 16:38:27 +00:00
|
|
|
void onSelectedItem(int index);
|
2012-08-26 08:52:06 +00:00
|
|
|
|
|
|
|
void onCancelButtonClicked(MyGUI::Widget* sender);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
2014-03-16 22:38:51 +00:00
|
|
|
|
|
|
|
#endif
|