BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / apps / terminal / SetTitleDialog.h
blob7a255758eac59954a0c637333c60bd3f06c19eca
1 /*
2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef SET_TITLE_DIALOG_H
6 #define SET_TITLE_DIALOG_H
9 #include <String.h>
10 #include <Window.h>
13 class BButton;
14 class BTextControl;
17 class SetTitleDialog : public BWindow {
18 public:
19 class Listener;
21 public:
22 SetTitleDialog(const char* dialogTitle,
23 const char* label, const char* toolTip);
24 virtual ~SetTitleDialog();
26 void Go(const BString& title, bool titleUserDefined,
27 Listener* listener);
28 void Finish();
29 // window must be locked
31 virtual void MessageReceived(BMessage* message);
33 private:
34 Listener* fListener;
35 BTextControl* fTitleTextControl;
36 BButton* fOKButton;
37 BButton* fCancelButton;
38 BButton* fDefaultButton;
39 BString fOldTitle;
40 BString fTitle;
41 bool fOldTitleUserDefined;
42 bool fTitleUserDefined;
46 class SetTitleDialog::Listener {
47 public:
48 virtual ~Listener();
50 // hooks called in the dialog thread with the window locked
51 virtual void TitleChanged(SetTitleDialog* dialog,
52 const BString& title,
53 bool titleUserDefined) = 0;
54 virtual void SetTitleDialogDone(SetTitleDialog* dialog) = 0;
58 #endif // SET_TITLE_DIALOG_H