2008-10-01 08:28:35 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2007-2008, François Revol, <revol@free.fr>. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2008-01-11 22:04:19 +03:00
|
|
|
#ifndef TEXT_INPUT_ALERT_H
|
|
|
|
#define TEXT_INPUT_ALERT_H
|
|
|
|
|
|
|
|
#include <Alert.h>
|
2008-01-14 05:00:42 +03:00
|
|
|
#include <TextControl.h>
|
2008-01-11 22:04:19 +03:00
|
|
|
|
|
|
|
class TextInputAlert : public BAlert {
|
2008-10-01 07:37:33 +04:00
|
|
|
public:
|
2008-01-11 22:04:19 +03:00
|
|
|
TextInputAlert(const char *title,
|
|
|
|
const char *text,
|
|
|
|
const char *initial, /* initial input value */
|
|
|
|
const char *button0Label,
|
|
|
|
const char *button1Label = NULL,
|
|
|
|
const char *button2Label = NULL,
|
|
|
|
button_width widthStyle = B_WIDTH_AS_USUAL,
|
|
|
|
alert_type type = B_INFO_ALERT);
|
|
|
|
virtual ~TextInputAlert();
|
2008-01-14 05:00:42 +03:00
|
|
|
virtual void Show();
|
|
|
|
|
|
|
|
const char *Text() const { return fText->Text(); };
|
|
|
|
BTextControl *TextControl() const { return fText; };
|
|
|
|
|
2008-01-11 22:04:19 +03:00
|
|
|
|
2008-10-01 07:37:33 +04:00
|
|
|
private:
|
2008-01-14 05:00:42 +03:00
|
|
|
BTextControl *fText;
|
2008-01-11 22:04:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* TEXT_INPUT_ALERT_H */
|
|
|
|
|