OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
windowbase.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_WINDOW_BASE_H
2 #define MWGUI_WINDOW_BASE_H
3 
4 #include "layout.hpp"
5 
6 namespace MWBase
7 {
8  class WindowManager;
9 }
10 
11 namespace MWGui
12 {
13  class WindowManager;
14  class DragAndDrop;
15 
16  class WindowBase: public Layout
17  {
18  public:
19  WindowBase(const std::string& parLayout);
20 
21  // Events
22  typedef MyGUI::delegates::CMultiDelegate1<WindowBase*> EventHandle_WindowBase;
23 
25  virtual void open() {}
27  virtual void close () {}
29  virtual void exit() {}
31  virtual void setVisible(bool visible);
33  bool isVisible();
34  void center();
35  };
36 
37 
38  /*
39  * "Modal" windows cause the rest of the interface to be unaccessible while they are visible
40  */
41  class WindowModal : public WindowBase
42  {
43  public:
44  WindowModal(const std::string& parLayout);
45  virtual void open();
46  virtual void close();
47  virtual void exit() {}
48  };
49 
52  class NoDrop
53  {
54  public:
55  NoDrop(DragAndDrop* drag, MyGUI::Widget* widget);
56 
57  void onFrame(float dt);
58  virtual void setAlpha(float alpha);
59 
60  private:
61  MyGUI::Widget* mWidget;
64  };
65 }
66 
67 #endif
void onFrame(float dt)
Definition: windowbase.cpp:84
WindowBase(const std::string &parLayout)
Definition: windowbase.cpp:15
virtual void exit()
Gracefully exits the window.
Definition: windowbase.hpp:47
NoDrop(DragAndDrop *drag, MyGUI::Widget *widget)
Definition: windowbase.cpp:79
WindowModal(const std::string &parLayout)
Definition: windowbase.cpp:62
DragAndDrop * mDrag
Definition: windowbase.hpp:62
Definition: draganddrop.hpp:17
void center()
Definition: windowbase.cpp:48
Definition: windowbase.hpp:52
virtual void setVisible(bool visible)
Sets the visibility of the window.
Definition: windowbase.cpp:20
MyGUI::Widget * mWidget
Definition: windowbase.hpp:61
Definition: windowbase.hpp:16
Definition: layout.hpp:13
virtual void open()
Notify that window has been made visible.
Definition: windowbase.hpp:25
bool isVisible()
Returns the visibility state of the window.
Definition: windowbase.cpp:43
MyGUI::delegates::CMultiDelegate1< WindowBase * > EventHandle_WindowBase
Definition: windowbase.hpp:22
bool mTransparent
Definition: windowbase.hpp:63
virtual void exit()
Gracefully exits the window.
Definition: windowbase.hpp:29
virtual void setAlpha(float alpha)
Definition: windowbase.cpp:115
virtual void close()
Notify that window has been hidden.
Definition: windowbase.cpp:73
virtual void open()
Notify that window has been made visible.
Definition: windowbase.cpp:67
virtual void close()
Notify that window has been hidden.
Definition: windowbase.hpp:27
Definition: windowbase.hpp:41