The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
help.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 #ifndef HELP_HPP_INCLUDED
15 #define HELP_HPP_INCLUDED
16 
17 class config;
18 class display;
19 class terrain_type;
20 class unit;
21 class unit_type;
22 class CVideo;
23 #include <string>
24 
25 namespace help {
26 
27 struct help_manager {
29  ~help_manager();
30 };
31 
32 struct section;
33 /// Open a help dialog using a toplevel other than the default. This
34 /// allows for complete customization of the contents, although not in a
35 /// very easy way.
36 void show_help(CVideo& video, const section &toplevel, const std::string& show_topic="",
37  int xloc=-1, int yloc=-1);
38 
39 /// Open the help browser. The help browser will have the topic with id
40 /// show_topic open if it is not the empty string. The default topic
41 /// will be shown if show_topic is the empty string.
42 void show_help(CVideo& video, const std::string& show_topic="", int xloc=-1, int yloc=-1);
43 
44 /// wrapper to add unit prefix and hiding symbol
45 void show_unit_help(CVideo& video, const std::string& unit_id, bool has_variations=false,
46  bool hidden = false, int xloc=-1, int yloc=-1);
47 
48 /// wrapper to add variation prefix and hiding symbol
49 void show_variation_help(CVideo& video, const std::string &unit_id, const std::string &variation,
50  bool hidden = false, int xloc=-1, int yloc=-1);
51 
52 /// wrapper to add terrain prefix and hiding symbol
53 void show_terrain_help(CVideo& video, const std::string& unit_id, bool hidden = false,
54  int xloc = -1, int yloc = -1);
55 
56 void show_unit_description(CVideo& video, const unit_type &t);
57 void show_unit_description(CVideo& video, const unit &u);
58 void show_terrain_description(CVideo& video, const terrain_type& t);
59 
60 } // End namespace help.
61 
62 #endif
void show_help(CVideo &video, const std::string &show_topic, int xloc, int yloc)
Open the help browser, show topic with id show_topic.
Definition: help.cpp:117
Definition: unit.hpp:95
A section contains topics and sections along with title and ID.
Definition: help_impl.hpp:143
Definition: video.hpp:58
help::section toplevel
Definition: help_impl.cpp:66
void show_unit_description(CVideo &video, const unit &u)
Definition: help.cpp:59
GLdouble GLdouble t
Definition: glew.h:1366
help_manager(const config *game_config)
Definition: help.cpp:94
void show_terrain_description(CVideo &video, const terrain_type &t)
Definition: help.cpp:64
Game configuration data as global variables.
Definition: build_info.cpp:38
void show_variation_help(CVideo &video, 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:148
void show_unit_help(CVideo &video, 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:127
Definition: help.cpp:57
void show_terrain_help(CVideo &video, const std::string &show_topic, bool hidden, int xloc, int yloc)
Open the help browser, show terrain with id terrain_id.
Definition: help.cpp:138
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