2012-11-04 12:31:26 +04:00
|
|
|
/*
|
2013-04-26 05:35:27 +04:00
|
|
|
* Copyright 2012-2013, Rene Gollent, rene@gollent.com.
|
2012-11-04 12:31:26 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef PROMPT_WINDOW_H_
|
|
|
|
#define PROMPT_WINDOW_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <Messenger.h>
|
|
|
|
#include <Window.h>
|
|
|
|
|
|
|
|
|
2013-04-26 05:35:27 +04:00
|
|
|
class BStringView;
|
2012-11-04 12:31:26 +04:00
|
|
|
class BTextControl;
|
|
|
|
|
|
|
|
|
|
|
|
class PromptWindow : public BWindow
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// PromptWindow takes ownership of message
|
2013-04-26 05:35:27 +04:00
|
|
|
PromptWindow(const char* title,
|
|
|
|
const char* label, const char* info,
|
|
|
|
BMessenger target, BMessage* message = NULL);
|
2012-11-04 12:31:26 +04:00
|
|
|
~PromptWindow();
|
|
|
|
|
|
|
|
virtual void MessageReceived(BMessage* message);
|
|
|
|
|
|
|
|
status_t SetTarget(BMessenger messenger);
|
|
|
|
status_t SetMessage(BMessage* message);
|
|
|
|
private:
|
|
|
|
BTextControl* fTextControl;
|
2013-04-26 05:35:27 +04:00
|
|
|
BStringView* fInfoView;
|
2012-11-04 12:31:26 +04:00
|
|
|
BMessenger fTarget;
|
|
|
|
BMessage* fMessage;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PROMPT_WINDOW_H_
|