The Battle for Wesnoth  1.15.11+dev
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2018 by David White <>
3  Part of the Battle for Wesnoth Project
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,
12  See the COPYING file for more details.
13 */
15 #pragma once
17 class config;
18 class terrain_type;
19 class unit;
20 class unit_type;
21 class CVideo;
22 class game_config_view;
24 #include <string>
26 namespace help {
28 struct help_manager {
30  ~help_manager();
31 };
33 struct section;
34 /**
35  * Open a help dialog using a toplevel other than the default. This
36  * allows for complete customization of the contents, although not in a
37  * very easy way.
38  */
39 void show_help(const section &toplevel, const std::string& show_topic="",
40  int xloc=-1, int yloc=-1);
42 /**
43  * Open the help browser. The help browser will have the topic with id
44  * show_topic open if it is not the empty string. The default topic
45  * will be shown if show_topic is the empty string.
46  */
47 void show_help(const std::string& show_topic="", int xloc=-1, int yloc=-1);
49 /** wrapper to add unit prefix and hiding symbol */
50 void show_unit_help(const std::string& unit_id, bool has_variations=false,
51  bool hidden = false, int xloc=-1, int yloc=-1);
53 /** wrapper to add variation prefix and hiding symbol */
54 void show_variation_help(const std::string &unit_id, const std::string &variation,
55  bool hidden = false, int xloc=-1, int yloc=-1);
57 /** wrapper to add terrain prefix and hiding symbol */
58 void show_terrain_help(const std::string& unit_id, bool hidden = false,
59  int xloc = -1, int yloc = -1);
61 void show_unit_description(const unit_type &t);
62 void show_unit_description(const unit &u);
65 } // End namespace help.
void show_help(const std::string &show_topic, int xloc, int yloc)
Open the help browser, show topic with id show_topic.
Definition: help.cpp:114
This class represents a single unit of a specific type.
Definition: unit.hpp:120
void show_terrain_description(const terrain_type &t)
Definition: help.cpp:62
A section contains topics and sections along with title and ID.
Definition: help_impl.hpp:145
Definition: video.hpp:31
A single unit type that the player may recruit.
Definition: types.hpp:44
void show_terrain_help(const std::string &show_topic, bool hidden, int xloc, int yloc)
Open the help browser, show terrain with id terrain_id.
Definition: help.cpp:135
void show_unit_description(const unit &u)
Definition: help.cpp:57
Game configuration data as global variables.
Definition: build_info.cpp:58
void show_unit_help(const std::string &show_topic, bool has_variations, bool hidden, int xloc, int yloc)
Open the help browser, show unit with id unit_id.
Definition: help.cpp:124
help_manager(const game_config_view *game_config)
Definition: help.cpp:90
double t
Definition: astarsearch.cpp:64
Definition: help.cpp:55
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:59
void show_variation_help(const std::string &unit, const std::string &variation, bool hidden, int xloc, int yloc)
Open the help browser, show the variation of the unit matching.
Definition: help.cpp:143