1 /* 2 * Copyright 2014, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef EXPRESSION_PROMPT_WINDOW_H 6 #define EXPRESSION_PROMPT_WINDOW_H 7 8 9 #include <Window.h> 10 11 12 class BButton; 13 class BTextControl; 14 15 16 class ExpressionPromptWindow : public BWindow 17 { 18 public: 19 ExpressionPromptWindow(BHandler* addTarget, 20 BHandler* closeTarget, bool isPersistent); 21 22 ~ExpressionPromptWindow(); 23 24 static ExpressionPromptWindow* Create(BHandler* addTarget, 25 BHandler* closeTarget, 26 bool isPersistent); 27 // throws 28 29 30 virtual void MessageReceived(BMessage* message); 31 32 virtual void Show(); 33 virtual bool QuitRequested(); 34 35 private: 36 void _Init(); 37 38 private: 39 BTextControl* fExpressionInput; 40 BButton* fCancelButton; 41 BButton* fAddButton; 42 BHandler* fAddTarget; 43 BHandler* fCloseTarget; 44 bool fPersistentExpression; 45 }; 46 47 #endif // EXPRESSION_PROMPT_WINDOW_H 48