1 /* 2 Copyright (C) 2017-2018 by Charles Dang <exodia339@gmail.com> 3 Part of the Battle for Wesnoth Project https://www.wesnoth.org/ 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY. 11 12 See the COPYING file for more details. 13 */ 14 15 #pragma once 16 17 #include "gui/dialogs/modal_dialog.hpp" 18 19 class config; 20 21 namespace gui2 22 { 23 namespace dialogs 24 { 25 26 /** Help browser dialog. */ 27 class help_browser : public modal_dialog 28 { 29 public: 30 help_browser(); 31 32 DEFINE_SIMPLE_DISPLAY_WRAPPER(help_browser) 33 34 private: 35 std::string initial_topic_; 36 37 const config& help_cfg_; 38 39 /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */ 40 virtual const std::string& window_id() const override; 41 42 /** Inherited from modal_dialog. */ 43 virtual void pre_show(window& window) override; 44 45 void on_topic_select(window& window); 46 }; 47 48 } // namespace dialogs 49 } // namespace gui2 50