1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 15:49:55 +00:00
openmw-tes3mp/apps/openmw/mwgui/container.hpp

73 lines
1.6 KiB
C++
Raw Normal View History

2012-04-15 15:52:39 +00:00
#ifndef MGUI_CONTAINER_H
#define MGUI_CONTAINER_H
#include "windowbase.hpp"
#include "referenceinterface.hpp"
2013-05-11 16:38:27 +00:00
#include "itemmodel.hpp"
2012-04-15 15:52:39 +00:00
namespace MWWorld
{
class Environment;
}
namespace MyGUI
{
2012-04-30 11:01:18 +00:00
class Gui;
class Widget;
2012-04-15 15:52:39 +00:00
}
namespace MWGui
{
class WindowManager;
2012-04-30 11:01:18 +00:00
class ContainerWindow;
2013-05-11 16:38:27 +00:00
class ItemView;
class SortFilterItemModel;
2012-04-15 15:52:39 +00:00
}
namespace MWGui
{
2013-05-11 16:38:27 +00:00
class ContainerWindow : public WindowBase, public ReferenceInterface
2012-05-12 11:12:37 +00:00
{
public:
ContainerWindow(DragAndDrop* dragAndDrop);
2012-05-12 11:12:37 +00:00
void openContainer(const MWWorld::Ptr& container, bool loot=false);
virtual void close();
2013-05-11 16:38:27 +00:00
virtual void resetReference();
virtual void exit();
2013-05-11 16:38:27 +00:00
private:
DragAndDrop* mDragAndDrop;
2012-04-15 15:52:39 +00:00
bool mPickpocketDetected;
2013-05-11 16:38:27 +00:00
MWGui::ItemView* mItemView;
SortFilterItemModel* mSortModel;
ItemModel* mModel;
int mSelectedItem;
2012-05-12 20:44:12 +00:00
MyGUI::Button* mDisposeCorpseButton;
2012-05-12 11:12:37 +00:00
MyGUI::Button* mTakeButton;
MyGUI::Button* mCloseButton;
2012-04-15 15:52:39 +00:00
2013-05-11 16:38:27 +00:00
void onItemSelected(int index);
void onBackgroundSelected();
void dragItem(MyGUI::Widget* sender, int count);
void dropItem();
2012-05-11 14:34:36 +00:00
void onCloseButtonClicked(MyGUI::Widget* _sender);
2012-05-11 14:58:07 +00:00
void onTakeAllButtonClicked(MyGUI::Widget* _sender);
void onDisposeCorpseButtonClicked(MyGUI::Widget* sender);
2014-01-10 23:24:21 +00:00
void onKeyPressed(MyGUI::Widget* _sender, MyGUI::KeyCode _key, MyGUI::Char _char);
/// @return is taking the item allowed?
bool onTakeItem(const ItemStack& item, int count);
virtual void onReferenceUnavailable();
2012-04-15 15:52:39 +00:00
};
}
#endif // CONTAINER_H