wex  v21.10.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/tool.h>

Public Member Functions

 tool (window_id id)
 Other methods. More...
 
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.
 
bool is_report_type () const
 Is this tool a report 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())
 Static interface. More...
 
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.

Constructor & Destructor Documentation

◆ tool()

wex::tool::tool ( window_id  id)
inlineexplicit

Other methods.

Default constructor, specify the toolid to use.

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

Static interface.

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.