OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
countdialog.hpp
Go to the documentation of this file.
1 #ifndef MWGUI_COUNTDIALOG_H
2 #define MWGUI_COUNTDIALOG_H
3 
4 #include "windowbase.hpp"
5 
6 namespace Gui
7 {
8  class NumericEditBox;
9 }
10 
11 namespace MWGui
12 {
13  class CountDialog : public WindowModal
14  {
15  public:
16  CountDialog();
17  void openCountDialog(const std::string& item, const std::string& message, const int maxCount);
18  void cancel();
19  virtual void exit();
20 
21  typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt;
22 
27 
28  private:
29  MyGUI::ScrollBar* mSlider;
31  MyGUI::TextBox* mItemText;
32  MyGUI::TextBox* mLabelText;
33  MyGUI::Button* mOkButton;
34  MyGUI::Button* mCancelButton;
35 
36  void onCancelButtonClicked(MyGUI::Widget* _sender);
37  void onOkButtonClicked(MyGUI::Widget* _sender);
38  void onEditValueChanged(int value);
39  void onSliderMoved(MyGUI::ScrollBar* _sender, size_t _position);
40  void onEnterKeyPressed(MyGUI::EditBox* _sender);
41  };
42 
43 }
44 
45 #endif
A variant of the EditBox that only allows integer inputs.
Definition: numericeditbox.hpp:12
MyGUI::ScrollBar * mSlider
Definition: countdialog.hpp:29
void message(CodeContainer &code, Literals &literals, const std::string &message, int buttons)
Definition: generator.cpp:537
void onEditValueChanged(int value)
Definition: countdialog.cpp:90
void openCountDialog(const std::string &item, const std::string &message, const int maxCount)
Definition: countdialog.cpp:32
Definition: countdialog.hpp:13
CountDialog()
Definition: countdialog.cpp:14
void cancel()
Definition: countdialog.cpp:59
EventHandle_WidgetInt eventOkClicked
Definition: countdialog.hpp:26
void onOkButtonClicked(MyGUI::Widget *_sender)
Definition: countdialog.cpp:74
MyGUI::delegates::CMultiDelegate2< MyGUI::Widget *, int > EventHandle_WidgetInt
Definition: countdialog.hpp:21
MyGUI::TextBox * mLabelText
Definition: countdialog.hpp:32
MyGUI::Button * mOkButton
Definition: countdialog.hpp:33
MyGUI::TextBox * mItemText
Definition: countdialog.hpp:31
Gui::NumericEditBox * mItemEdit
Definition: countdialog.hpp:30
MyGUI::Button * mCancelButton
Definition: countdialog.hpp:34
void onSliderMoved(MyGUI::ScrollBar *_sender, size_t _position)
Definition: countdialog.cpp:95
virtual void exit()
Gracefully exits the window.
Definition: countdialog.cpp:64
void onCancelButtonClicked(MyGUI::Widget *_sender)
Definition: countdialog.cpp:69
Definition: windowbase.hpp:41
void onEnterKeyPressed(MyGUI::EditBox *_sender)
Definition: countdialog.cpp:83