OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
container.hpp
Go to the documentation of this file.
1 #ifndef MGUI_CONTAINER_H
2 #define MGUI_CONTAINER_H
3 
4 #include "windowbase.hpp"
5 #include "referenceinterface.hpp"
6 
7 #include "itemmodel.hpp"
8 
9 namespace MWWorld
10 {
11  class Environment;
12 }
13 
14 namespace MyGUI
15 {
16  class Gui;
17  class Widget;
18 }
19 
20 namespace MWGui
21 {
22  class WindowManager;
23  class ContainerWindow;
24  class ItemView;
25  class SortFilterItemModel;
26 }
27 
28 
29 namespace MWGui
30 {
32  {
33  public:
34  ContainerWindow(DragAndDrop* dragAndDrop);
35 
36  void openContainer(const MWWorld::Ptr& container, bool loot=false);
37  virtual void close();
38 
39  virtual void resetReference();
40 
41  virtual void exit();
42 
43  private:
45 
47 
52 
53  MyGUI::Button* mDisposeCorpseButton;
54  MyGUI::Button* mTakeButton;
55  MyGUI::Button* mCloseButton;
56 
57  void onItemSelected(int index);
58  void onBackgroundSelected();
59  void dragItem(MyGUI::Widget* sender, int count);
60  void dropItem();
61  void onCloseButtonClicked(MyGUI::Widget* _sender);
62  void onTakeAllButtonClicked(MyGUI::Widget* _sender);
63  void onDisposeCorpseButtonClicked(MyGUI::Widget* sender);
64  void onKeyPressed(MyGUI::Widget* _sender, MyGUI::KeyCode _key, MyGUI::Char _char);
65 
67  bool onTakeItem(const ItemStack& item, int count);
68 
69  virtual void onReferenceUnavailable();
70  };
71 }
72 #endif // CONTAINER_H
MyGUI::Button * mDisposeCorpseButton
Definition: container.hpp:53
MyGUI::Button * mTakeButton
Definition: container.hpp:54
The base class that all item models should derive from.
Definition: itemmodel.hpp:43
void onItemSelected(int index)
Definition: container.cpp:56
int mSelectedItem
Definition: container.hpp:51
Definition: itemview.hpp:11
void onCloseButtonClicked(MyGUI::Widget *_sender)
Definition: container.cpp:208
void onBackgroundSelected()
Definition: container.cpp:127
virtual void exit()
Gracefully exits the window.
Definition: container.cpp:200
void onKeyPressed(MyGUI::Widget *_sender, MyGUI::KeyCode _key, MyGUI::Char _char)
Definition: container.cpp:160
MWGui::ItemView * mItemView
Definition: container.hpp:48
MyGUI::Button * mCloseButton
Definition: container.hpp:55
ItemModel * mModel
Definition: container.hpp:50
void dropItem()
Definition: container.cpp:101
A single item stack managed by an item model.
Definition: itemmodel.hpp:12
void openContainer(const MWWorld::Ptr &container, bool loot=false)
Definition: container.cpp:133
Definition: draganddrop.hpp:17
virtual void resetReference()
Definition: container.cpp:168
DragAndDrop * mDragAndDrop
Definition: container.hpp:44
SortFilterItemModel * mSortModel
Definition: container.hpp:49
bool mPickpocketDetected
Definition: container.hpp:46
void onTakeAllButtonClicked(MyGUI::Widget *_sender)
Definition: container.cpp:213
Definition: sortfilteritemmodel.hpp:9
void dragItem(MyGUI::Widget *sender, int count)
Definition: container.cpp:93
Definition: windowbase.hpp:16
ContainerWindow(DragAndDrop *dragAndDrop)
Definition: container.cpp:32
virtual void onReferenceUnavailable()
called when reference has become unavailable
Definition: container.cpp:257
this class is intended for GUI interfaces that access an MW-Reference for example dialogue window acc...
Definition: referenceinterface.hpp:12
bool onTakeItem(const ItemStack &item, int count)
Definition: container.cpp:262
virtual void close()
Notify that window has been hidden.
Definition: container.cpp:176
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
Environment
Definition: soundmanagerimp.hpp:35
KeyCode
Keyboard scan codes.
Definition: OISCompat.hpp:10
void onDisposeCorpseButtonClicked(MyGUI::Widget *sender)
Definition: container.cpp:242
Definition: container.hpp:31