OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
birth.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_BIRTH_H
2 #define MWGUI_BIRTH_H
3 
4 #include "windowbase.hpp"
5 
6 namespace MWGui
7 {
8  class BirthDialog : public WindowModal
9  {
10  public:
11  BirthDialog();
12 
13  enum Gender
14  {
17  };
18 
19  const std::string &getBirthId() const { return mCurrentBirthId; }
20  void setBirthId(const std::string &raceId);
21 
22  void setNextButtonShow(bool shown);
23  virtual void onOpen();
24 
25  bool exit() { return false; }
26 
27  // Events
28  typedef MyGUI::delegates::CMultiDelegate0 EventHandle_Void;
29 
34 
39 
40  protected:
41  void onSelectBirth(MyGUI::ListBox* _sender, size_t _index);
42 
43  void onAccept(MyGUI::ListBox* _sender, size_t index);
44  void onOkClicked(MyGUI::Widget* _sender);
45  void onBackClicked(MyGUI::Widget* _sender);
46 
47  private:
48  void updateBirths();
49  void updateSpells();
50 
51  MyGUI::ListBox* mBirthList;
52  MyGUI::ScrollView* mSpellArea;
53  MyGUI::ImageBox* mBirthImage;
54  std::vector<MyGUI::Widget*> mSpellItems;
55 
56  std::string mCurrentBirthId;
57  };
58 }
59 #endif
virtual void onOpen()
Notify that window has been made visible.
Definition: birth.cpp:69
void onSelectBirth(MyGUI::ListBox *_sender, size_t _index)
Definition: birth.cpp:123
Definition: birth.hpp:8
EventHandle_WindowBase eventDone
Definition: birth.hpp:38
BirthDialog()
Definition: birth.cpp:30
MyGUI::delegates::CMultiDelegate0 EventHandle_Void
Definition: birth.hpp:28
Definition: birth.hpp:15
const std::string & getBirthId() const
Definition: birth.hpp:19
void onBackClicked(MyGUI::Widget *_sender)
Definition: birth.cpp:118
void onAccept(MyGUI::ListBox *_sender, size_t index)
Definition: birth.cpp:110
Gender
Definition: birth.hpp:13
std::vector< MyGUI::Widget * > mSpellItems
Definition: birth.hpp:54
void setBirthId(const std::string &raceId)
Definition: birth.cpp:84
bool exit()
Gracefully exits the window.
Definition: birth.hpp:25
MyGUI::ListBox * mBirthList
Definition: birth.hpp:51
void updateSpells()
Definition: birth.cpp:172
void onOkClicked(MyGUI::Widget *_sender)
Definition: birth.cpp:103
std::string mCurrentBirthId
Definition: birth.hpp:56
void setNextButtonShow(bool shown)
Definition: birth.cpp:58
EventHandle_Void eventBack
Definition: birth.hpp:33
MyGUI::delegates::CMultiDelegate1< WindowBase * > EventHandle_WindowBase
Definition: windowbase.hpp:29
Definition: birth.hpp:16
void updateBirths()
Definition: birth.cpp:138
MyGUI::ImageBox * mBirthImage
Definition: birth.hpp:53
Definition: windowbase.hpp:61
MyGUI::ScrollView * mSpellArea
Definition: birth.hpp:52