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
|
|
|
*
|
|
|
|
* 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.
|
2002-11-21 12:48:50 +00:00
|
|
|
*
|
2006-02-11 10:08:56 +00:00
|
|
|
* $URL$
|
|
|
|
* $Id$
|
2002-11-21 12:48:50 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CHOOSER_DIALOG_H
|
|
|
|
#define CHOOSER_DIALOG_H
|
|
|
|
|
|
|
|
#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;
|
|
|
|
class ListWidget;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A dialog that allows the user to choose between a selection of items
|
|
|
|
*/
|
|
|
|
|
|
|
|
class ChooserDialog : public Dialog {
|
2003-10-02 17:43:02 +00:00
|
|
|
typedef Common::String String;
|
|
|
|
typedef Common::StringList StringList;
|
2002-11-21 12:48:50 +00:00
|
|
|
protected:
|
|
|
|
ListWidget *_list;
|
|
|
|
ButtonWidget *_chooseButton;
|
2003-11-03 20:16:23 +00:00
|
|
|
|
|
|
|
public:
|
2006-03-09 05:18:00 +00:00
|
|
|
ChooserDialog(const String &title, String prefix = "defaultChooser_", const String &buttonLabel = "Choose");
|
2003-11-28 21:56:14 +00:00
|
|
|
|
|
|
|
void setList(const StringList& list);
|
2003-11-03 20:16:23 +00:00
|
|
|
|
|
|
|
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
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
|