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-14 13:46:35 +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-14 13:46:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BROWSER_DIALOG_H
|
|
|
|
#define BROWSER_DIALOG_H
|
|
|
|
|
2004-02-05 00:19:57 +00:00
|
|
|
#include "gui/dialog.h"
|
2006-06-24 08:07:48 +00:00
|
|
|
#include "common/fs.h"
|
2002-11-14 13:46:35 +00:00
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
class ListWidget;
|
|
|
|
class StaticTextWidget;
|
2013-01-27 18:11:20 +00:00
|
|
|
class CheckboxWidget;
|
2011-04-24 08:34:27 +00:00
|
|
|
class CommandSender;
|
2003-11-10 23:40:48 +00:00
|
|
|
|
2005-04-16 17:55:09 +00:00
|
|
|
class BrowserDialog : public Dialog {
|
2002-11-14 13:46:35 +00:00
|
|
|
public:
|
2005-04-16 17:55:09 +00:00
|
|
|
BrowserDialog(const char *title, bool dirBrowser);
|
2002-11-14 13:46:35 +00:00
|
|
|
|
2004-02-01 02:03:01 +00:00
|
|
|
#ifdef MACOSX
|
2005-04-16 17:55:09 +00:00
|
|
|
~BrowserDialog();
|
2004-02-01 02:03:01 +00:00
|
|
|
virtual int runModal();
|
|
|
|
#else
|
2002-11-15 17:54:49 +00:00
|
|
|
virtual void open();
|
2013-01-27 18:11:20 +00:00
|
|
|
|
2002-11-14 14:42:39 +00:00
|
|
|
virtual void handleCommand(CommandSender *sender, uint32 cmd, uint32 data);
|
2004-02-01 02:03:01 +00:00
|
|
|
#endif
|
2003-03-06 19:52:54 +00:00
|
|
|
|
2008-10-02 16:58:59 +00:00
|
|
|
const Common::FSNode &getResult() { return _choice; }
|
2002-11-14 14:42:39 +00:00
|
|
|
|
2002-11-14 13:46:35 +00:00
|
|
|
protected:
|
2004-02-01 02:03:01 +00:00
|
|
|
#ifdef MACOSX
|
2010-10-30 21:26:32 +00:00
|
|
|
const void *_titleRef;
|
2012-10-15 12:30:18 +00:00
|
|
|
const void *_chooseRef;
|
2013-03-17 18:14:21 +00:00
|
|
|
const void *_hiddenFilesRef;
|
2004-02-01 02:03:01 +00:00
|
|
|
#else
|
2002-11-14 13:46:35 +00:00
|
|
|
ListWidget *_fileList;
|
2005-04-10 14:33:44 +00:00
|
|
|
StaticTextWidget *_currentPath;
|
2008-10-02 16:58:59 +00:00
|
|
|
Common::FSNode _node;
|
2008-09-03 11:22:51 +00:00
|
|
|
Common::FSList _nodeContent;
|
2013-01-27 18:11:20 +00:00
|
|
|
bool _showHidden;
|
|
|
|
CheckboxWidget *_showHiddenWidget;
|
2004-02-01 02:03:01 +00:00
|
|
|
#endif
|
2008-10-02 16:58:59 +00:00
|
|
|
Common::FSNode _choice;
|
2005-04-16 17:55:09 +00:00
|
|
|
bool _isDirBrowser;
|
2003-03-06 19:52:54 +00:00
|
|
|
|
2004-02-01 02:03:01 +00:00
|
|
|
#ifndef MACOSX
|
2002-11-14 14:42:39 +00:00
|
|
|
void updateListing();
|
2004-02-01 02:03:01 +00:00
|
|
|
#endif
|
2002-11-14 13:46:35 +00:00
|
|
|
};
|
|
|
|
|
2003-11-10 23:40:48 +00:00
|
|
|
} // End of namespace GUI
|
|
|
|
|
2002-11-14 13:46:35 +00:00
|
|
|
#endif
|