1 /* 2 * Copyright 2012, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef PROMPT_WINDOW_H_ 6 #define PROMPT_WINDOW_H_ 7 8 9 #include <Messenger.h> 10 #include <Window.h> 11 12 13 class BTextControl; 14 15 16 class PromptWindow : public BWindow 17 { 18 public: 19 // PromptWindow takes ownership of message 20 PromptWindow(const char* title, const char* label, BMessenger target, 21 BMessage* message = NULL); 22 ~PromptWindow(); 23 24 virtual void MessageReceived(BMessage* message); 25 26 status_t SetTarget(BMessenger messenger); 27 status_t SetMessage(BMessage* message); 28 private: 29 BTextControl* fTextControl; 30 BMessenger fTarget; 31 BMessage* fMessage; 32 }; 33 34 #endif // PROMPT_WINDOW_H_ 35