2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
5 #ifndef SET_TITLE_DIALOG_H
6 #define SET_TITLE_DIALOG_H
17 class SetTitleDialog
: public BWindow
{
22 SetTitleDialog(const char* dialogTitle
,
23 const char* label
, const char* toolTip
);
24 virtual ~SetTitleDialog();
26 void Go(const BString
& title
, bool titleUserDefined
,
29 // window must be locked
31 virtual void MessageReceived(BMessage
* message
);
35 BTextControl
* fTitleTextControl
;
37 BButton
* fCancelButton
;
38 BButton
* fDefaultButton
;
41 bool fOldTitleUserDefined
;
42 bool fTitleUserDefined
;
46 class SetTitleDialog::Listener
{
50 // hooks called in the dialog thread with the window locked
51 virtual void TitleChanged(SetTitleDialog
* dialog
,
53 bool titleUserDefined
) = 0;
54 virtual void SetTitleDialogDone(SetTitleDialog
* dialog
) = 0;
58 #endif // SET_TITLE_DIALOG_H