The Battle for Wesnoth  1.15.3+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 #include <string>
24 namespace help {
26 struct help_manager {
28  ~help_manager();
29 };
31 struct section;
32 /// Open a help dialog using a toplevel other than the default. This
33 /// allows for complete customization of the contents, although not in a
34 /// very easy way.
35 void show_help(const section &toplevel, const std::string& show_topic="",
36  int xloc=-1, int yloc=-1);
38 /// Open the help browser. The help browser will have the topic with id
39 /// show_topic open if it is not the empty string. The default topic
40 /// will be shown if show_topic is the empty string.
41 void show_help(const std::string& show_topic="", int xloc=-1, int yloc=-1);
43 /// wrapper to add unit prefix and hiding symbol
44 void show_unit_help(const std::string& unit_id, bool has_variations=false,
45  bool hidden = false, int xloc=-1, int yloc=-1);
47 /// wrapper to add variation prefix and hiding symbol
48 void show_variation_help(const std::string &unit_id, const std::string &variation,
49  bool hidden = false, int xloc=-1, int yloc=-1);
51 /// wrapper to add terrain prefix and hiding symbol
52 void show_terrain_help(const std::string& unit_id, bool hidden = false,
53  int xloc = -1, int yloc = -1);
55 void show_unit_description(const unit_type &t);
56 void show_unit_description(const unit &u);
59 } // 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:115
This class represents a single unit of a specific type.
Definition: unit.hpp:106
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:141
Definition: video.hpp:31
A single unit type that the player may recruit.
Definition: types.hpp:42
help_manager(const config *game_config)
Definition: help.cpp:92
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:136
void show_unit_description(const unit &u)
Definition: help.cpp:57
Game configuration data as global variables.
Definition: build_info.cpp:51
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:125
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:68
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:144