OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itemview.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_ITEMVIEW_H
2 #define MWGUI_ITEMVIEW_H
3 
4 #include <MyGUI_Widget.h>
5 
6 #include "itemmodel.hpp"
7 
8 namespace MWGui
9 {
10 
11  class ItemView : public MyGUI::Widget
12  {
13  MYGUI_RTTI_DERIVED(ItemView)
14  public:
15  ItemView();
16  virtual ~ItemView();
17 
19  static void registerComponents ();
20 
22  void setModel (ItemModel* model);
23 
24  typedef MyGUI::delegates::CMultiDelegate1<ItemModel::ModelIndex> EventHandle_ModelIndex;
25  typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
30 
31  void update();
32 
33  void resetScrollBars();
34 
35  private:
36  virtual void initialiseOverride();
37 
38  void layoutWidgets();
39 
40  virtual void setSize(const MyGUI::IntSize& _value);
41  virtual void setCoord(const MyGUI::IntCoord& _value);
42 
43  void onSelectedItem (MyGUI::Widget* sender);
44  void onSelectedBackground (MyGUI::Widget* sender);
45  void onMouseWheelMoved(MyGUI::Widget* _sender, int _rel);
46 
48  MyGUI::ScrollView* mScrollView;
49 
50  };
51 
52 }
53 
54 #endif
ItemModel * mModel
Definition: itemview.hpp:47
void layoutWidgets()
Definition: itemview.cpp:53
void onSelectedItem(MyGUI::Widget *sender)
Definition: itemview.cpp:140
void update()
Definition: itemview.cpp:96
The base class that all item models should derive from.
Definition: itemmodel.hpp:43
Definition: itemview.hpp:11
void resetScrollBars()
Definition: itemview.cpp:135
MyGUI::ScrollView * mScrollView
Definition: itemview.hpp:48
MyGUI::delegates::CMultiDelegate1< ItemModel::ModelIndex > EventHandle_ModelIndex
Definition: itemview.hpp:24
void onSelectedBackground(MyGUI::Widget *sender)
Definition: itemview.cpp:146
virtual void initialiseOverride()
Definition: itemview.cpp:42
void onMouseWheelMoved(MyGUI::Widget *_sender, int _rel)
Definition: itemview.cpp:151
virtual void setSize(const MyGUI::IntSize &_value)
Definition: itemview.cpp:159
EventHandle_ModelIndex eventItemClicked
Fired when an item was clicked.
Definition: itemview.hpp:27
virtual ~ItemView()
Definition: itemview.cpp:26
virtual void setCoord(const MyGUI::IntCoord &_value)
Definition: itemview.cpp:167
void setModel(ItemModel *model)
Takes ownership of model.
Definition: itemview.cpp:31
ItemView()
Definition: itemview.cpp:20
static void registerComponents()
Register needed components with MyGUI's factory manager.
Definition: itemview.cpp:175
EventHandle_Void eventBackgroundClicked
Fired when the background was clicked (useful for drag and drop)
Definition: itemview.hpp:29
MyGUI::delegates::CMultiDelegate0 EventHandle_Void
Definition: itemview.hpp:25