The Battle for Wesnoth  1.15.12+dev
help_impl.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2018 by David White <dave@whitevine.net>
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 /**
16  * Note:
17  * Prior to the creation of this file, all the code associated to the help
18  * browser existed in a single file src/help.cpp, including all of the
19  * widgets, topic generators, and implementation details. This totaled
20  * ~4000 lines of code.
21  *
22  * I have split it all up now, so that the gui aspects are separated from
23  * the content, the "front facing" part which the rest of the code base
24  * interacts with is in src/help/help.?pp, and the topic generators are
25  * separated. The remaining "guts" are here. It is implemented in a static
26  * singleton pattern, using "extern"'d variables, simply for ease of translation
27  * from the previous state. It would probably be a good idea to rewrite this
28  * guy as a proper C++ object. Feel free to do so, or to adopt some other
29  * design pattern.
30  */
31 
32 #pragma once
33 
34 #include "color.hpp"
35 #include "exceptions.hpp" // for error
36 #include "font/constants.hpp"
37 #include "gettext.hpp"
38 #include <optional>
39 #include <cstring>
40 #include <list> // for list
41 #include <memory>
42 #include <ostream> // for operator<<, stringstream, etc
43 #include <sstream>
44 #include <string> // for string, allocator, etc
45 #include <utility> // for pair, make_pair
46 #include <vector> // for vector, etc
47 #include <boost/logic/tribool.hpp>
48 
49 class game_config_view;
50 class config;
51 class unit_type;
52 class terrain_type_data;
53 
54 namespace help {
55 
56 /**
57  * Generate the help contents from the configurations given to the manager.
58  */
59 void generate_contents();
60 
61 
62 /** Generate a topic text on the fly. */
64 {
65 public:
66  topic_generator() = default;
67  virtual std::string operator()() const = 0;
68  virtual ~topic_generator() {}
69 };
70 
72  std::string text_;
73 public:
74  text_topic_generator(const std::string& t): text_(t) {}
75  virtual std::string operator()() const { return text_; }
76 };
77 
78 /**
79  * The text displayed in a topic. It is generated on the fly with the information contained in generator_
80  */
82 {
83  mutable std::vector< std::string > parsed_text_;
84  mutable std::shared_ptr<topic_generator> generator_;
85 public:
86  topic_text() = default;
87  ~topic_text() = default;
88 
89  topic_text(const std::string& t):
90  parsed_text_(),
91  generator_(std::make_shared<text_topic_generator>(t))
92  {
93  }
94 
95  explicit topic_text(std::shared_ptr<topic_generator> g):
96  parsed_text_(),
97  generator_(g)
98  {
99  }
100 
101  topic_text(const topic_text& t) = default;
102  topic_text(topic_text&& t) = default;
103  topic_text& operator=(topic_text&& t) = default;
104  topic_text& operator=(const topic_text& t) = default;
105  topic_text& operator=(std::shared_ptr<topic_generator> g);
106 
107  const std::vector<std::string>& parsed_text() const;
108 };
109 
110 /** A topic contains a title, an id and some text. */
111 struct topic
112 {
113  topic() :
114  title(),
115  id(),
116  text()
117  {
118  }
119 
120  topic(const std::string &_title, const std::string &_id) :
121  title(_title),
122  id(_id),
123  text()
124  {
125  }
126 
127  topic(const std::string &_title, const std::string &_id, const std::string &_text)
128  : title(_title), id(_id), text(_text) {}
129  topic(const std::string &_title, const std::string &_id, std::shared_ptr<topic_generator> g)
130  : title(_title), id(_id), text(g) {}
131  /** Two topics are equal if their IDs are equal. */
132  bool operator==(const topic &) const;
133  bool operator!=(const topic &t) const { return !operator==(t); }
134  /** Comparison on the ID. */
135  bool operator<(const topic &) const;
136  std::string title, id;
137  mutable topic_text text;
138 };
139 
140 struct section;
141 typedef std::list<section> section_list;
142 typedef std::list<topic> topic_list;
143 
144 /** A section contains topics and sections along with title and ID. */
145 struct section {
147  title(""),
148  id(""),
149  topics(),
150  sections()
151  {
152  }
153 
154  /** Two sections are equal if their IDs are equal. */
155  bool operator==(const section &) const;
156  /** Comparison on the ID. */
157  bool operator<(const section &) const;
158 
159  /** Allocate memory for and add the section. */
160  void add_section(const section &s);
161 
162  void clear();
163  std::string title, id;
164  topic_list topics;
165  section_list sections;
166 };
167 
168 
169 /**
170  * To be used as a function object to locate sections and topics with a specified ID.
171  */
172 class has_id
173 {
174 public:
175  has_id(const std::string &id) : id_(id) {}
176  bool operator()(const topic &t) { return t.id == id_; }
177  bool operator()(const section &s) { return s.id == id_; }
178  bool operator()(const section *s) { return s != nullptr && s->id == id_; }
179 private:
180  const std::string id_;
181 };
182 
183 /** To be used as a function object when sorting topic lists on the title. */
185 {
186 public:
187  bool operator()(const topic &t1, const topic &t2) {
188  return translation::compare(t1.title, t2.title) < 0; }
189 };
190 
191 /** To be used as a function object when sorting section lists on the title. */
193 {
194 public:
195  bool operator()(const section& s1, const section& s2) {
196  return translation::compare(s1.title, s2.title) < 0; }
197 };
198 
200 {
201 public:
202  bool operator() (const std::string &s1, const std::string &s2) const {
203  return translation::compare(s1, s2) < 0;
204  }
205 };
206 
207 /** Thrown when the help system fails to parse something. */
208 struct parse_error : public game::error
209 {
210  parse_error(const std::string& msg) : game::error(msg) {}
211 };
212 
213 // Generator stuff below. Maybe move to a separate file? This one is
214 // getting crowded. Dunno if much more is needed though so I'll wait and
215 // see.
216 
217 /** Dispatch generators to their appropriate functions. */
218 void generate_sections(const config *help_cfg, const std::string &generator, section &sec, int level);
219 std::vector<topic> generate_topics(const bool sort_topics,const std::string &generator);
220 std::string generate_topic_text(const std::string &generator, const config *help_cfg,
221 const section &sec, const std::vector<topic>& generated_topics);
222 std::string generate_contents_links(const std::string& section_name, const config *help_cfg);
223 std::string generate_contents_links(const section &sec, const std::vector<topic>& topics);
224 
225 /**
226  * return a hyperlink with the unit's name and pointing to the unit page
227  * return empty string if this unit is hidden. If not yet discovered add the (?) suffix
228  */
229 std::string make_unit_link(const std::string& type_id);
230 /** return a list of hyperlinks to unit's pages (ordered or not) */
231 std::vector<std::string> make_unit_links_list(
232  const std::vector<std::string>& type_id_list, bool ordered = false);
233 
234 void generate_races_sections(const config *help_cfg, section &sec, int level);
235 void generate_terrain_sections(section &sec, int level);
236 std::vector<topic> generate_unit_topics(const bool, const std::string& race);
237 void generate_unit_sections(const config *help_cfg, section &sec, int level, const bool, const std::string& race);
240  /** Ignore this unit for documentation purposes. */
242  /**
243  * Although the unit itself is hidden, traits reachable via this unit are not hidden.
244  *
245  * This is a bug workaround - traits are defined by WML macros, and therefore the help
246  * system has to use a place where that macro is instanciated to provide the documentation.
247  * None of the normal unit types has the "loyal" trait, but there is a hidden unit which
248  * does, purely to support the help system.
249  */
251 };
252 /**
253  * Return the type of description that should be shown for a unit of
254  * the given kind. This method is intended to filter out information
255  * about units that should not be shown, for example due to not being
256  * encountered.
257  */
259 std::vector<topic> generate_ability_topics(const bool);
260 std::vector<topic> generate_time_of_day_topics(const bool);
261 std::vector<topic> generate_weapon_special_topics(const bool);
262 
263 void generate_era_sections(const config *help_cfg, section &sec, int level);
264 std::vector<topic> generate_faction_topics(const config &, const bool);
265 std::vector<topic> generate_era_topics(const bool, const std::string & era_id);
266 std::vector<topic> generate_trait_topics(const bool);
267 
268 /**
269  * Parse a help config, return the top level section. Return an empty
270  * section if cfg is nullptr.
271  */
272 section parse_config(const config *cfg);
273 /** Recursive function used by parse_config. */
274 void parse_config_internal(const config *help_cfg, const config *section_cfg,
275  section &sec, int level=0);
276 
277 /**
278  * Return true if the section with id section_id is referenced from
279  * another section in the config, or the toplevel.
280  */
281 bool section_is_referenced(const std::string &section_id, const config &cfg);
282 /**
283  * Return true if the topic with id topic_id is referenced from
284  * another section in the config, or the toplevel.
285  */
286 bool topic_is_referenced(const std::string &topic_id, const config &cfg);
287 
288 /**
289  * Search for the topic with the specified identifier in the section
290  * and its subsections. Return the found topic, or nullptr if none could
291  * be found.
292  */
293 const topic *find_topic(const section &sec, const std::string &id);
294 
295 /**
296  * Search for the section with the specified identifier in the section
297  * and its subsections. Return the found section or nullptr if none could
298  * be found.
299  */
300 const section *find_section(const section &sec, const std::string &id);
301 section *find_section(section &sec, const std::string &id);
302 
303 /**
304  * Parse a text string. Return a vector with the different parts of the
305  * text. Each markup item is a separate part while the text between
306  * markups are separate parts.
307  */
308 std::vector<std::string> parse_text(const std::string &text);
309 
310 /**
311  * Convert the contents to wml attributes, surrounded within
312  * [element_name]...[/element_name]. Return the resulting WML.
313  */
314 std::string convert_to_wml(const std::string &element_name, const std::string &contents);
315 
316 /**
317  * Return the color the string represents. Return font::NORMAL_COLOR if
318  * the string is empty or can't be matched against any other color.
319  */
320 color_t string_to_color(const std::string &s);
321 
322 /** Make a best effort to word wrap s. All parts are less than width. */
323 std::vector<std::string> split_in_width(const std::string &s, const int font_size, const unsigned width);
324 
325 std::string remove_first_space(const std::string& text);
326 
327 /** Prepend all chars with meaning inside attributes with a backslash. */
328 std::string escape(const std::string &s);
329 
330 /** Return the first word in s, not removing any spaces in the start of it. */
331 std::string get_first_word(const std::string &s);
332 
333 /** Load the appropriate terrain types data to use */
334 std::shared_ptr<terrain_type_data> load_terrain_types_data();
335 
336 extern const game_config_view *game_cfg;
337 // The default toplevel.
339 // All sections and topics not referenced from the default toplevel.
341 
342 extern int last_num_encountered_units;
344 extern boost::tribool last_debug_state;
345 
346 extern std::vector<std::string> empty_string_vector;
347 extern const int max_section_level;
348 extern const int title_size;
349 extern const int title2_size;
350 extern const int box_width;
351 extern const int normal_font_size;
352 extern const unsigned max_history;
353 extern const std::string topic_img;
354 extern const std::string closed_section_img;
355 extern const std::string open_section_img;
356 // The topic to open by default when opening the help dialog.
357 extern const std::string default_show_topic;
358 extern const std::string unknown_unit_topic;
359 extern const std::string unit_prefix;
360 extern const std::string terrain_prefix;
361 extern const std::string race_prefix;
362 extern const std::string faction_prefix;
363 extern const std::string era_prefix;
364 extern const std::string variation_prefix;
365 extern const std::string ability_prefix;
366 
367 // id starting with '.' are hidden
368 std::string hidden_symbol(bool hidden = true);
369 
370 bool is_visible_id(const std::string &id);
371 
372 /**
373  * Return true if the id is valid for user defined topics and
374  * sections. Some IDs are special, such as toplevel and may not be
375  * be defined in the config.
376  */
377 bool is_valid_id(const std::string &id);
378 
379  // Helpers for making generation of topics easier.
380 
381 inline std::string make_link(const std::string& text, const std::string& dst)
382  {
383  // some sorting done on list of links may rely on the fact that text is first
384  return "<ref>text='" + help::escape(text) + "' dst='" + help::escape(dst) + "'</ref>";
385  }
386 
387 inline std::string jump_to(const unsigned pos)
388  {
389  std::stringstream ss;
390  ss << "<jump>to=" << pos << "</jump>";
391  return ss.str();
392  }
393 
394 inline std::string jump(const unsigned amount)
395  {
396  std::stringstream ss;
397  ss << "<jump>amount=" << amount << "</jump>";
398  return ss.str();
399  }
400 
401 inline std::string bold(const std::string &s)
402  {
403  std::stringstream ss;
404  ss << "<bold>text='" << help::escape(s) << "'</bold>";
405  return ss.str();
406  }
407 
408 // A string to be displayed and its width.
409 typedef std::pair< std::string, unsigned > item;
410 
411 typedef std::vector<std::vector<help::item>> table_spec;
412 // Create a table using the table specs. Return markup with jumps
413 // that create a table. The table spec contains a vector with
414 // vectors with pairs. The pairs are the markup string that should
415 // be in a cell, and the width of that cell.
416 std::string generate_table(const table_spec &tab, const unsigned int spacing=font::relative_size(20));
417 
418 // Return the width for the image with filename.
419 unsigned image_width(const std::string &filename);
420 
421 // Add to the vector v an help::item for the string s, preceded by the given image if any.
422 void push_tab_pair(std::vector<help::item> &v, const std::string &s, const std::optional<std::string> &image = {}, unsigned padding = 0);
423 
424 } // end namespace help
std::string jump_to(const unsigned pos)
Definition: help_impl.hpp:387
const std::string ability_prefix
Definition: help_impl.cpp:95
section parse_config(const config *cfg)
Parse a help config, return the top level section.
Definition: help_impl.cpp:305
std::string id
Definition: help_impl.hpp:163
Ignore this unit for documentation purposes.
Definition: help_impl.hpp:241
std::string make_unit_link(const std::string &type_id)
return a hyperlink with the unit&#39;s name and pointing to the unit page return empty string if this uni...
Definition: help_impl.cpp:787
const std::string open_section_img
Definition: help_impl.cpp:85
std::vector< topic > generate_trait_topics(const bool sort_generated)
Definition: help_impl.cpp:724
const std::string unit_prefix
Definition: help_impl.cpp:89
void push_tab_pair(std::vector< help::item > &v, const std::string &s, const std::optional< std::string > &image, unsigned padding)
Definition: help_impl.cpp:1559
std::vector< topic > generate_unit_topics(const bool sort_generated, const std::string &race)
Definition: help_impl.cpp:976
const std::string era_prefix
Definition: help_impl.cpp:93
const std::string topic_img
Definition: help_impl.cpp:83
topic_text(const std::string &t)
Definition: help_impl.hpp:89
const int title_size
Definition: help_impl.cpp:78
bool operator()(const section &s)
Definition: help_impl.hpp:177
const std::string closed_section_img
Definition: help_impl.cpp:84
std::string remove_first_space(const std::string &text)
Definition: help_impl.cpp:1420
A section contains topics and sections along with title and ID.
Definition: help_impl.hpp:145
const std::string unknown_unit_topic
Definition: help_impl.cpp:88
const std::string race_prefix
Definition: help_impl.cpp:91
std::string generate_topic_text(const std::string &generator, const config *help_cfg, const section &sec, const std::vector< topic > &generated_topics)
Definition: help_impl.cpp:363
virtual std::string operator()() const
Definition: help_impl.hpp:75
static l_noret error(LoadState *S, const char *why)
Definition: lundump.cpp:40
topic(const std::string &_title, const std::string &_id, const std::string &_text)
Definition: help_impl.hpp:127
int compare(const std::string &s1, const std::string &s2)
Case-sensitive lexicographical comparison.
Definition: gettext.cpp:456
boost::tribool last_debug_state
Definition: help_impl.cpp:74
int relative_size(int size)
Definition: constants.hpp:29
Thrown when the help system fails to parse something.
Definition: help_impl.hpp:208
parse_error(const std::string &msg)
Definition: help_impl.hpp:210
void clear(const std::string &key)
Definition: general.cpp:203
topic_text(std::shared_ptr< topic_generator > g)
Definition: help_impl.hpp:95
std::vector< std::string > empty_string_vector
Definition: help_impl.cpp:76
Although the unit itself is hidden, traits reachable via this unit are not hidden.
Definition: help_impl.hpp:250
text_topic_generator(const std::string &t)
Definition: help_impl.hpp:74
const std::string id_
Definition: help_impl.hpp:180
STL namespace.
static void msg(const char *act, debug_info &i, const char *to="", const char *result="")
Definition: debugger.cpp:109
const int normal_font_size
Definition: help_impl.cpp:81
unsigned image_width(const std::string &filename)
Definition: help_impl.cpp:1549
const std::string terrain_prefix
Definition: help_impl.cpp:90
int last_num_encountered_terrains
Definition: help_impl.cpp:73
std::list< section > section_list
Definition: help_impl.hpp:140
color_t string_to_color(const std::string &cmp_str)
Return the color the string represents.
Definition: help_impl.cpp:1377
bool is_visible_id(const std::string &id)
Definition: help_impl.cpp:1519
std::vector< topic > generate_weapon_special_topics(const bool sort_generated)
Definition: help_impl.cpp:450
std::vector< std::string > make_unit_links_list(const std::vector< std::string > &type_id_list, bool ordered)
return a list of hyperlinks to unit&#39;s pages (ordered or not)
Definition: help_impl.cpp:813
std::string bold(const std::string &s)
Definition: help_impl.hpp:401
A single unit type that the player may recruit.
Definition: types.hpp:44
void generate_sections(const config *help_cfg, const std::string &generator, section &sec, int level)
Dispatch generators to their appropriate functions.
Definition: help_impl.cpp:344
help::section hidden_sections
Definition: help_impl.cpp:70
section_list sections
Definition: help_impl.hpp:165
Contains the database of all known terrain types, both those defined explicitly by WML [terrain_type]...
Definition: type_data.hpp:39
const section * find_section(const section &sec, const std::string &id)
Search for the section with the specified identifier in the section and its subsections.
Definition: help_impl.cpp:1232
std::string id
Definition: help_impl.hpp:136
To be used as a function object to locate sections and topics with a specified ID.
Definition: help_impl.hpp:172
The text displayed in a topic.
Definition: help_impl.hpp:81
std::string generate_table(const table_spec &tab, const unsigned int spacing)
Definition: help_impl.cpp:1573
std::vector< std::vector< help::item > > table_spec
Definition: help_impl.hpp:411
std::string hidden_symbol(bool hidden)
Definition: help_impl.cpp:1515
std::shared_ptr< terrain_type_data > load_terrain_types_data()
Load the appropriate terrain types data to use.
Definition: help_impl.cpp:1622
bool operator()(const topic &t1, const topic &t2)
Definition: help_impl.hpp:187
std::string title
Definition: help_impl.hpp:163
std::vector< topic > generate_era_topics(const bool sort_generated, const std::string &era_id)
Definition: help_impl.cpp:613
UNIT_DESCRIPTION_TYPE
Definition: help_impl.hpp:238
std::vector< topic > generate_faction_topics(const config &era, const bool sort_generated)
Definition: help_impl.cpp:649
std::vector< std::string > parsed_text_
Definition: help_impl.hpp:83
std::list< topic > topic_list
Definition: help_impl.hpp:142
std::shared_ptr< topic_generator > generator_
Definition: help_impl.hpp:84
void parse_config_internal(const config *help_cfg, const config *section_cfg, section &sec, int level)
Recursive function used by parse_config.
Definition: help_impl.cpp:200
bool operator!=(const topic &t) const
Definition: help_impl.hpp:133
const int box_width
Definition: help_impl.cpp:80
bool section_is_referenced(const std::string &section_id, const config &cfg)
Return true if the section with id section_id is referenced from another section in the config...
Definition: help_impl.cpp:152
bool topic_is_referenced(const std::string &topic_id, const config &cfg)
Return true if the topic with id topic_id is referenced from another section in the config...
Definition: help_impl.cpp:176
void generate_unit_sections(const config *, section &sec, int, const bool, const std::string &race)
Definition: help_impl.cpp:943
To be used as a function object when sorting section lists on the title.
Definition: help_impl.hpp:192
std::string id
Text to match against addon_info.tags()
Definition: manager.cpp:214
const std::string variation_prefix
Definition: help_impl.cpp:94
void generate_terrain_sections(section &sec, int)
Definition: help_impl.cpp:891
int last_num_encountered_units
Definition: help_impl.cpp:72
bool operator()(const section *s)
Definition: help_impl.hpp:178
std::string make_link(const std::string &text, const std::string &dst)
Definition: help_impl.hpp:381
bool operator==(const config &a, const config &b)
Definition: config.cpp:1450
std::string convert_to_wml(const std::string &element_name, const std::string &contents)
Convert the contents to wml attributes, surrounded within [element_name]...[/element_name].
Definition: help_impl.cpp:1326
static map_location::DIRECTION s
double g
Definition: astarsearch.cpp:64
static bool operator<(const placing_info &a, const placing_info &b)
Definition: game_state.cpp:139
const game_config_view * game_cfg
Definition: help_impl.cpp:66
void generate_races_sections(const config *help_cfg, section &sec, int level)
Definition: help_impl.cpp:828
rng * generator
This generator is automatically synced during synced context.
Definition: random.cpp:60
std::string escape(const std::string &s)
Prepend all chars with meaning inside attributes with a backslash.
Definition: help_impl.cpp:1616
std::vector< std::string > parse_text(const std::string &text)
Parse a text string.
Definition: help_impl.cpp:1253
const unsigned max_history
Definition: help_impl.cpp:82
std::vector< topic > generate_time_of_day_topics(const bool)
Definition: help_impl.cpp:403
std::string generate_contents_links(const std::string &section_name, config const *help_cfg)
Definition: help_impl.cpp:1127
const std::string faction_prefix
Definition: help_impl.cpp:92
std::string jump(const unsigned amount)
Definition: help_impl.hpp:394
has_id(const std::string &id)
Definition: help_impl.hpp:175
const std::string default_show_topic
Definition: help_impl.cpp:87
double t
Definition: astarsearch.cpp:64
void generate_contents()
Generate the help contents from the configurations given to the manager.
Definition: help_impl.cpp:1454
Base class for all the errors encountered by the engine.
Definition: exceptions.hpp:27
std::vector< topic > generate_topics(const bool sort_generated, const std::string &generator)
Definition: help_impl.cpp:315
virtual std::string operator()() const =0
const topic * find_topic(const section &sec, const std::string &id)
Search for the topic with the specified identifier in the section and its subsections.
Definition: help_impl.cpp:1216
topic(const std::string &_title, const std::string &_id, std::shared_ptr< topic_generator > g)
Definition: help_impl.hpp:129
Functions to load and save images from/to disk.
Generate a topic text on the fly.
Definition: help_impl.hpp:63
bool operator()(const topic &t)
Definition: help_impl.hpp:176
const int title2_size
Definition: help_impl.cpp:79
A topic contains a title, an id and some text.
Definition: help_impl.hpp:111
Definition: help.cpp:56
virtual ~topic_generator()
Definition: help_impl.hpp:68
std::string title
Definition: help_impl.hpp:136
topic(const std::string &_title, const std::string &_id)
Definition: help_impl.hpp:120
bool is_valid_id(const std::string &id)
Return true if the id is valid for user defined topics and sections.
Definition: help_impl.cpp:1528
A config object defines a single node in a WML file, with access to child nodes.
Definition: config.hpp:59
std::string get_first_word(const std::string &s)
Return the first word in s, not removing any spaces in the start of it.
Definition: help_impl.cpp:1428
UNIT_DESCRIPTION_TYPE description_type(const unit_type &type)
Return the type of description that should be shown for a unit of the given kind. ...
Definition: help_impl.cpp:1107
std::vector< topic > generate_ability_topics(const bool sort_generated)
Definition: help_impl.cpp:547
void generate_era_sections(const config *help_cfg, section &sec, int level)
Definition: help_impl.cpp:868
const int max_section_level
Definition: help_impl.cpp:77
bool operator()(const section &s1, const section &s2)
Definition: help_impl.hpp:195
To be used as a function object when sorting topic lists on the title.
Definition: help_impl.hpp:184
std::vector< std::string > split_in_width(const std::string &s, const int font_size, const unsigned width)
Make a best effort to word wrap s.
Definition: help_impl.cpp:1401
topic_list topics
Definition: help_impl.hpp:164
topic_text text
Definition: help_impl.hpp:137
std::pair< std::string, unsigned > item
Definition: help_impl.hpp:409
help::section default_toplevel
Definition: help_impl.cpp:68