OpenMW
apps/openmw/mwgui/textinput.hpp
Go to the documentation of this file.
00001 #ifndef MWGUI_TEXT_INPUT_H
00002 #define MWGUI_TEXT_INPUT_H
00003 
00004 #include "windowbase.hpp"
00005 
00006 namespace MWGui
00007 {
00008     class WindowManager;
00009 }
00010 
00011 namespace MWGui
00012 {
00013     class TextInputDialog : public WindowModal
00014     {
00015     public:
00016         TextInputDialog();
00017 
00018         std::string getTextInput() const { return mTextEdit->getCaption(); }
00019         void setTextInput(const std::string &text) { mTextEdit->setCaption(text); }
00020 
00021         void setNextButtonShow(bool shown);
00022         void setTextLabel(const std::string &label);
00023         virtual void open();
00024 
00025     protected:
00026         void onOkClicked(MyGUI::Widget* _sender);
00027         void onTextAccepted(MyGUI::Edit* _sender);
00028 
00029     private:
00030         MyGUI::EditBox* mTextEdit;
00031     };
00032 }
00033 #endif