1 /*
2  * Copyright (C) 2002-2020 by the Widelands Development Team
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  *
18  */
19 
20 #ifndef WL_WUI_HELPWINDOW_H
21 #define WL_WUI_HELPWINDOW_H
22 
23 #include <memory>
24 
25 #include "logic/map_objects/tribes/tribe_descr.h"
26 #include "ui_basic/multilinetextarea.h"
27 #include "ui_basic/unique_window.h"
28 
29 class LuaInterface;
30 
31 namespace Widelands {
32 class BuildingDescr;
33 }
34 
35 namespace UI {
36 
37 /*
38  * This HelpWindow takes a Lua script, runs it and displays it's formatted content
39  * as a static text
40  */
41 class BuildingHelpWindow : public UI::UniqueWindow {
42 public:
43 	BuildingHelpWindow(Panel* parent,
44 	                   UI::UniqueWindow::Registry& reg,
45 	                   const Widelands::BuildingDescr& building_description,
46 	                   const Widelands::TribeDescr& tribe,
47 	                   LuaInterface* const lua,
48 	                   uint32_t width = 300,
49 	                   uint32_t height = 400);
50 
51 private:
52 	std::unique_ptr<MultilineTextarea> textarea_;
53 };
54 
55 }  // namespace UI
56 
57 #endif  // end of include guard: WL_WUI_HELPWINDOW_H
58