Add basic helper class for user input prompting.

This commit is contained in:
Rene Gollent
2012-11-04 09:36:14 +01:00
parent 674bc40589
commit 6bfaef2ba6
3 changed files with 116 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
/*
* Copyright 2012, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef PROMPT_WINDOW_H_
#define PROMPT_WINDOW_H_
#include <Messenger.h>
#include <Window.h>
class BTextControl;
class PromptWindow : public BWindow
{
public:
// PromptWindow takes ownership of message
PromptWindow(const char* title, const char* label, BMessenger target,
BMessage* message = NULL);
~PromptWindow();
virtual void MessageReceived(BMessage* message);
status_t SetTarget(BMessenger messenger);
status_t SetMessage(BMessage* message);
private:
BTextControl* fTextControl;
BMessenger fTarget;
BMessage* fMessage;
};
#endif // PROMPT_WINDOW_H_