21 #define GETTEXT_DOMAIN "wesnoth-help"
32 #include <boost/logic/tribool.hpp>
39 std::string var_id =
t.variation_id();
41 var_id =
t.variation_name();
43 bool hide_help =
t.hide_help();
44 bool use_variation =
false;
80 gui2::dialogs::help_browser::display(toplevel_sec, show_topic);
168 return impl_->regenerate();
std::size_t last_num_encountered_terrains_
section toplevel_section_
The default toplevel.
std::size_t last_num_encountered_units_
boost::tribool last_debug_state_
section hidden_sections_
All sections and topics not referenced from the default toplevel.
const section & regenerate()
Regenerates the cached help topics if necessary.
The help implementation caches data parsed from the game_config.
~help_manager()
Defined out-of-line so the implementation class is visible.
std::unique_ptr< implementation > impl_
Pointer-to-implementation to reduce include dependencies.
static std::weak_ptr< help_manager > singleton_
static std::shared_ptr< help_manager > get_instance()
Returns the existing help_manager instance, or a newly allocated object otherwise.
const section & regenerate()
Regenerates the cached help topics if necessary.
help_manager()
Private default constructor.
std::set< t_translation::terrain_code > & encountered_terrains()
std::set< std::string > & encountered_units()
const unit_type * find(const std::string &key, unit_type::BUILD_STATUS status=unit_type::FULL) const
Finds a unit_type by its id() and makes sure it is built to the specified level.
void build_all(unit_type::BUILD_STATUS status)
Makes sure the all unit_types are built to the specified level.
A single unit type that the player may recruit.
This class represents a single unit of a specific type.
const unit_type & type() const
This unit's type, accounting for gender and variation.
std::string hidden_symbol(bool hidden)
const std::string unit_prefix
std::string get_unit_type_help_id(const unit_type &t)
Given a unit type, find the corresponding help topic's id.
const std::string variation_prefix
void show_terrain_description(const terrain_type &t)
void show_with_toplevel(const section &toplevel_sec, const std::string &show_topic)
const std::string terrain_prefix
void show_unit_description(const unit &u)
std::pair< section, section > generate_contents()
Generate the help contents from the configurations given to the manager.
void show_help(const std::string &show_topic)
Open the help browser.
Contains the implementation details for lexical_cast and shouldn't be used directly.
A section contains topics and sections along with title and ID.
unit_type_data unit_types