ScummVM API documentation
shaderbrowser-dialog.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef SHADERBROWSER_DIALOG_H
23#define SHADERBROWSER_DIALOG_H
24
25#include "gui/dialog.h"
26#include "gui/widgets/edittext.h"
27
28namespace GUI {
29
30class ListWidget;
31class EditTextWidget;
32class CommandSender;
33
34enum {
35 kFBModeLoad = 0,
36 kFBModeSave
37};
38
40public:
41 ShaderBrowserDialog(const Common::Path &initialSelection);
42
43 void open() override;
44 void reflowLayout() override;
45
46 void handleCommand(CommandSender *sender, uint32 cmd, uint32 data) override;
47
48 Common::Path getResult() { return Dialog::getResult() ? _fileName->getLabel() : Common::Path(); }
49
50protected:
51 PathWidget *_fileName;
52 ListWidget *_fileList;
53 Common::SearchSet _shaderSet;
54 Common::String _search;
55
56 EditTextWidget *_searchWidget;
57#ifndef DISABLE_FANCY_THEMES
58 GraphicsWidget *_searchPic;
59#endif
60 StaticTextWidget *_searchDesc;
61 ButtonWidget *_searchClearButton;
62
63 void updateListing();
64 void normalizeFileName();
65};
66
67} // End of namespace GUI
68
69#endif
Definition: path.h:52
Definition: archive.h:330
Definition: str.h:59
Definition: widget.h:241
Definition: object.h:40
Definition: dialog.h:49
Definition: edittext.h:32
Definition: widget.h:453
Definition: list.h:52
Definition: widget.h:473
Definition: shaderbrowser-dialog.h:39
Definition: widget.h:213