wex v24.04.0
Public Member Functions | Static Public Member Functions | List of all members
wex::tool Class Reference

Offers tool methods and contains the tool info's. More...

#include <wex/common/tool.h>

Public Member Functions

 tool (window_id id)
 Default constructor, specify the toolid to use.
 
auto id () const
 Returns the tool id.
 
const std::string info () const
 Returns info about current tool.
 
const std::string info (const statistics< int > *stat) const
 Returns info about current tool using specified statistics.
 
bool is_find_type () const
 Is this tool a find type.
 

Static Public Member Functions

static void add_info (window_id tool_id, const std::string &info, const std::string &text=std::string(), const std::string &helptext=std::string())
 Adds your own info to the tool.
 
static const auto & get_tool_info ()
 Returns all the tool info.
 

Detailed Description

Offers tool methods and contains the tool info's.

A tool with non empty text is used by menu::append_tools.

Member Function Documentation

◆ add_info()

static void wex::tool::add_info ( window_id tool_id,
const std::string & info,
const std::string & text = std::string(),
const std::string & helptext = std::string() )
inlinestatic

Adds your own info to the tool.

If you use a d in the info string, it is replaced by get_statistics with the Actions Completed element.