The Battle for Wesnoth  1.19.0-dev
Namespaces | Macros | Functions | Variables
help.cpp File Reference

Routines for showing the help-dialog. More...

#include "help/help.hpp"
#include "config.hpp"
#include "events.hpp"
#include "font/constants.hpp"
#include "preferences/game.hpp"
#include "game_config_manager.hpp"
#include "gettext.hpp"
#include "help/help_browser.hpp"
#include "help/help_impl.hpp"
#include "key.hpp"
#include "log.hpp"
#include "show_dialog.hpp"
#include "terrain/terrain.hpp"
#include "units/unit.hpp"
#include "units/types.hpp"
#include "video.hpp"
#include "widgets/button.hpp"
#include <cassert>
#include <algorithm>
#include <vector>
Include dependency graph for help.cpp:

Go to the source code of this file.

Namespaces

 help
 

Macros

#define GETTEXT_DOMAIN   "wesnoth-help"
 
#define WRN_DP   LOG_STREAM(warn, log_display)
 
#define ERR_HELP   LOG_STREAM(err, log_help)
 

Functions

void help::show_with_toplevel (const section &toplevel, const std::string &show_topic="", int xloc=-1, int yloc=-1)
 Open a help dialog using a specified toplevel. More...
 
void help::show_unit_description (const unit &u)
 
void help::show_terrain_description (const terrain_type &t)
 
void help::show_unit_description (const unit_type &t)
 
std::unique_ptr< help_manager > help::ensure_cache_lifecycle ()
 Helper function for any of the show_help functions to control the cache's lifecycle; can also be used by any other caller that wants to ensure the cache is reused over multiple show_help calls. More...
 
void help::show_help (const std::string &show_topic, int xloc, int yloc)
 Open the help browser, show topic with id show_topic. More...
 
void help::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. More...
 
void help::show_terrain_help (const std::string &show_topic, bool hidden, int xloc, int yloc)
 Open the help browser, show terrain with id terrain_id. More...
 
void help::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. More...
 

Variables

static lg::log_domain log_display ("display")
 
static lg::log_domain log_help ("help")
 

Detailed Description

Routines for showing the help-dialog.

Definition in file help.cpp.

Macro Definition Documentation

◆ ERR_HELP

#define ERR_HELP   LOG_STREAM(err, log_help)

Definition at line 51 of file help.cpp.

◆ GETTEXT_DOMAIN

#define GETTEXT_DOMAIN   "wesnoth-help"

Definition at line 21 of file help.cpp.

◆ WRN_DP

#define WRN_DP   LOG_STREAM(warn, log_display)

Definition at line 48 of file help.cpp.

Variable Documentation

◆ log_display

lg::log_domain log_display("display") ( "display"  )
static

◆ log_help

lg::log_domain log_help("help") ( "help"  )
static