2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2002-09-26 11:44:02 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2014-02-18 01:34:20 +00:00
|
|
|
*
|
2002-09-26 11:44:02 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MESSAGE_DIALOG_H
|
|
|
|
#define MESSAGE_DIALOG_H
|
|
|
|
|
2003-11-01 20:52:41 +00:00
|
|
|
#include "gui/dialog.h"
|
2004-02-05 00:19:57 +00:00
|
|
|
#include "common/str.h"
|
2002-09-26 11:44:02 +00:00
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
namespace GUI {
|
|
|
|
|
2011-04-24 08:34:27 +00:00
|
|
|
class CommandSender;
|
|
|
|
|
2004-08-11 21:49:58 +00:00
|
|
|
enum {
|
|
|
|
kMessageOK = 1,
|
|
|
|
kMessageCancel = 0
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2003-11-01 22:20:14 +00:00
|
|
|
/**
|
|
|
|
* Simple message dialog ("alert box"): presents a text message in a dialog with up to two buttons.
|
|
|
|
*/
|
2002-09-26 11:44:02 +00:00
|
|
|
class MessageDialog : public Dialog {
|
|
|
|
public:
|
2003-11-02 02:18:16 +00:00
|
|
|
MessageDialog(const Common::String &message, const char *defaultButton = "OK", const char *altButton = 0);
|
2003-11-01 20:52:41 +00:00
|
|
|
|
2003-01-02 10:36:17 +00:00
|
|
|
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
2003-11-01 20:52:41 +00:00
|
|
|
};
|
|
|
|
|
2003-11-01 22:20:14 +00:00
|
|
|
/**
|
|
|
|
* Timed message dialog: displays a message to the user for brief time period.
|
|
|
|
*/
|
2003-11-01 20:52:41 +00:00
|
|
|
class TimedMessageDialog : public MessageDialog {
|
|
|
|
public:
|
2003-11-02 02:18:16 +00:00
|
|
|
TimedMessageDialog(const Common::String &message, uint32 duration);
|
2003-11-01 20:52:41 +00:00
|
|
|
|
|
|
|
void handleTickle();
|
2002-12-21 11:57:24 +00:00
|
|
|
|
2003-11-01 20:52:41 +00:00
|
|
|
protected:
|
|
|
|
uint32 _timer;
|
2002-09-26 11:44:02 +00:00
|
|
|
};
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
} // End of namespace GUI
|
2003-11-01 20:52:41 +00:00
|
|
|
|
2002-09-26 11:44:02 +00:00
|
|
|
#endif
|