The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
help_button.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2016 by David White <[email protected]>
3  Part of the Battle for Wesnoth Project http://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 #ifndef HELP_BUTTON_HPP
16 #define HELP_BUTTON_HPP
17 #include "global.hpp"
19 #include "construct_dialog.hpp"
20 
21 class config;
22 class CVideo;
23 
24 namespace help {
25 
27 public:
28  help_button(CVideo& video, const std::string &help_topic);
29  ~help_button();
31  std::string topic() const { return topic_; }
32  void join();
33  void leave();
34  CVideo& get_video() override { return video_; }
35 private:
36  void show_help();
37  bool can_execute_command(const hotkey::hotkey_command& command, int/*index*/ =-1) const;
38 
42 };
43 
44 } // end namespace help
45 
46 #endif
help_button(CVideo &video, const std::string &help_topic)
Definition: help_button.cpp:27
logger & info()
Definition: log.cpp:91
Definition: video.hpp:58
CVideo & video() const
Definition: widget.hpp:83
CVideo & get_video() override
Definition: help_button.hpp:34
Stores all information related to functions that can be bound to hotkeys.
hotkey::basic_handler * help_hand_
Definition: help_button.hpp:41
const std::string topic_
Definition: help_button.hpp:40
int action(gui::dialog_process_info &info)
Definition: help_button.cpp:35
bool can_execute_command(const hotkey::hotkey_command &command, int=-1) const
Definition: help_button.cpp:48
Definition: help.cpp:57
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:83
GLsizei const GLcharARB ** string
Definition: glew.h:4503
std::string topic() const
Definition: help_button.hpp:31