openmw-tes3coop/apps/openmw/mwgui/container.hpp
2012-04-30 13:01:18 +02:00

74 lines
1.7 KiB
C++

#ifndef MGUI_CONTAINER_H
#define MGUI_CONTAINER_H
#include <components/esm_store/store.hpp>
#include "../mwclass/container.hpp"
#include <sstream>
#include <set>
#include <string>
#include <utility>
#include "window_base.hpp"
#include "../mwworld/ptr.hpp"
#include "../mwworld/containerstore.hpp"
namespace MWWorld
{
class Environment;
}
namespace MyGUI
{
class Gui;
class Widget;
}
namespace MWGui
{
class WindowManager;
class ContainerWindow;
}
namespace MWGui
{
class DragAndDrop
{
public:
bool mIsOnDragAndDrop;
ContainerWindow* mContainerWindow;
MyGUI::Widget* mDraggedWidget;
MyGUI::Widget* mDragAndDropWidget;
};
class ContainerWindow : public WindowBase
{
public:
ContainerWindow(WindowManager& parWindowManager,MWWorld::Environment& environment,DragAndDrop* dragAndDrop);
ContainerWindow(WindowManager& parWindowManager,MWWorld::Environment& environment,DragAndDrop* dragAndDrop,
std::string guiFile);
void open(MWWorld::Ptr& container);
void setName(std::string contName);
void Update();
virtual ~ContainerWindow();
protected:
MWWorld::Environment& mEnvironment;
std::vector<MyGUI::WidgetPtr> mContainerWidgets;
MyGUI::ItemBoxPtr mContainerWidget;
MyGUI::ButtonPtr takeButton;
MyGUI::ButtonPtr closeButton;
DragAndDrop* mDragAndDrop;
void onByeClicked(MyGUI::Widget* _sender);
void onSelectedItem(MyGUI::Widget* _sender);
void onContainerClicked(MyGUI::Widget* _sender);
void onMouseMove(MyGUI::Widget* _sender, int _left, int _top);
//MWWorld::Ptr& mContainer;
};
}
#endif // CONTAINER_H