OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scrollwindow.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_SCROLLWINDOW_H
2 #define MWGUI_SCROLLWINDOW_H
3 
4 #include "windowbase.hpp"
5 
6 #include "../mwworld/ptr.hpp"
7 
8 namespace Gui
9 {
10  class ImageButton;
11 }
12 
13 namespace MWGui
14 {
15  class ScrollWindow : public WindowBase
16  {
17  public:
18  ScrollWindow ();
19 
20  void setPtr (const MWWorld::Ptr& scroll);
21  void setInventoryAllowed(bool allowed);
22 
23  void onResChange(int, int) { center(); }
24 
25  protected:
26  void onCloseButtonClicked (MyGUI::Widget* _sender);
27  void onTakeButtonClicked (MyGUI::Widget* _sender);
28  void setTakeButtonShow(bool show);
29  void onKeyButtonPressed(MyGUI::Widget* sender, MyGUI::KeyCode key, MyGUI::Char character);
30 
31  private:
34  MyGUI::ScrollView* mTextView;
35 
37 
40 
41  };
42 
43 }
44 
45 #endif
void onResChange(int, int)
Called when GUI viewport changes size.
Definition: scrollwindow.hpp:23
void onKeyButtonPressed(MyGUI::Widget *sender, MyGUI::KeyCode key, MyGUI::Char character)
Definition: scrollwindow.cpp:84
void setPtr(const MWWorld::Ptr &scroll)
Open this object in the GUI, for windows that support it.
Definition: scrollwindow.cpp:56
MyGUI::ScrollView * mTextView
Definition: scrollwindow.hpp:34
MWWorld::Ptr mScroll
Definition: scrollwindow.hpp:36
void center()
Definition: windowbase.cpp:49
void setTakeButtonShow(bool show)
Definition: scrollwindow.cpp:96
void setInventoryAllowed(bool allowed)
Definition: scrollwindow.cpp:102
bool mTakeButtonAllowed
Definition: scrollwindow.hpp:39
void onTakeButtonClicked(MyGUI::Widget *_sender)
Definition: scrollwindow.cpp:113
void onCloseButtonClicked(MyGUI::Widget *_sender)
Definition: scrollwindow.cpp:108
Definition: scrollwindow.hpp:15
Definition: windowbase.hpp:21
allows using different image textures depending on the button state
Definition: imagebutton.hpp:12
Gui::ImageButton * mCloseButton
Definition: scrollwindow.hpp:32
Gui::ImageButton * mTakeButton
Definition: scrollwindow.hpp:33
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
bool mTakeButtonShow
Definition: scrollwindow.hpp:38
ScrollWindow()
Definition: scrollwindow.cpp:34
KeyCode
Keyboard scan codes.
Definition: OISCompat.hpp:10