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-11-21 12:48:50 +00:00
|
|
|
*
|
2021-12-26 18:47:58 +01: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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2002-11-21 12:48:50 +00:00
|
|
|
*
|
|
|
|
* 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
|
2021-12-26 18:47:58 +01:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2014-02-18 02:34:20 +01:00
|
|
|
*
|
2002-11-21 12:48:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CHOOSER_DIALOG_H
|
|
|
|
#define CHOOSER_DIALOG_H
|
|
|
|
|
2011-04-24 11:34:27 +03:00
|
|
|
#include "common/array.h"
|
2002-11-21 12:48:50 +00:00
|
|
|
#include "common/str.h"
|
2003-11-03 20:16:23 +00:00
|
|
|
#include "gui/dialog.h"
|
2002-11-21 12:48:50 +00:00
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
namespace GUI {
|
|
|
|
|
2002-11-21 12:48:50 +00:00
|
|
|
class ButtonWidget;
|
2011-04-24 11:34:27 +03:00
|
|
|
class CommandSender;
|
2002-11-21 12:48:50 +00:00
|
|
|
class ListWidget;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A dialog that allows the user to choose between a selection of items
|
|
|
|
*/
|
|
|
|
|
|
|
|
class ChooserDialog : public Dialog {
|
|
|
|
protected:
|
|
|
|
ListWidget *_list;
|
|
|
|
ButtonWidget *_chooseButton;
|
2003-11-03 20:16:23 +00:00
|
|
|
|
|
|
|
public:
|
2021-11-10 15:56:44 +01:00
|
|
|
ChooserDialog(const Common::U32String &title, Common::String dialogId = "Browser");
|
2003-11-28 21:56:14 +00:00
|
|
|
|
2021-11-10 15:56:44 +01:00
|
|
|
void setList(const Common::U32StringArray &list);
|
2003-11-03 20:16:23 +00:00
|
|
|
|
2020-01-05 17:48:04 +01:00
|
|
|
void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
|
2002-11-21 12:48:50 +00:00
|
|
|
};
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
} // End of namespace GUI
|
|
|
|
|
2002-11-21 12:48:50 +00:00
|
|
|
#endif
|