diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:44:09 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-11-17 19:44:09 (GMT) |
| commit | 058a2edd75debbd0297f92572316daa704bd379f (patch) | |
| tree | ad303f091f9a08b209b91eb34a9fcad996a3de69 /src/dialogues/TextPrompt.h | |
| parent | e3594aba9e05c6865d396418c028049cda92c2f3 (diff) | |
| parent | 7a21ae192fe19868539956f3fe28e62b2c7c4429 (diff) | |
| download | powder-058a2edd75debbd0297f92572316daa704bd379f.zip powder-058a2edd75debbd0297f92572316daa704bd379f.tar.gz | |
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/dialogues/TextPrompt.h')
| -rw-r--r-- | src/dialogues/TextPrompt.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/dialogues/TextPrompt.h b/src/dialogues/TextPrompt.h new file mode 100644 index 0000000..1c4a672 --- /dev/null +++ b/src/dialogues/TextPrompt.h @@ -0,0 +1,35 @@ +/* + * ConfirmPrompt.h + * + * Created on: Apr 6, 2012 + * Author: Simon + */ + +#ifndef TEXTPROMPT_H_ +#define TEXTPROMPT_H_ + +#include "interface/Window.h" +#include "interface/Textbox.h" + +class TextDialogueCallback; +class TextPrompt: public ui::Window { +protected: + ui::Textbox * textField; +public: + friend class CloseAction; + enum DialogueResult { ResultCancel, ResultOkay }; + TextPrompt(std::string title, std::string message, std::string text, std::string placeholder, bool multiline, TextDialogueCallback * callback_); + static std::string Blocking(std::string title, std::string message, std::string text, std::string placeholder, bool multiline); + virtual void OnDraw(); + virtual ~TextPrompt(); + TextDialogueCallback * callback; +}; + +class TextDialogueCallback +{ + public: + virtual void TextCallback(TextPrompt::DialogueResult result, std::string resultText) {} + virtual ~TextDialogueCallback() {} +}; + +#endif /* TEXTPROMPT_H_ */ |
