tbx  0.7.6
Public Member Functions | Static Public Member Functions | List of all members
tbx::ext::StrongHelp Class Reference

class to show help from StrongHelp help files More...

#include <stronghelp.h>

Public Member Functions

 StrongHelp ()
 Construct class to control StrongHelp application. More...
 
 StrongHelp (const std::string &path)
 Construct class with path to help file. More...
 
 StrongHelp (const StrongHelp &other)
 Construct as a copy of another StrongHelp object. More...
 
const std::string & path () const
 Get the path used by this instance.
 
bool run_path ()
 Attempt to run the file name in path. More...
 
void lookup (const std::string &page, StrongHelpNotFoundHandler *handler=0)
 Lookup a page in the strong help path. More...
 
void search (const std::string &text, StrongHelpNotFoundHandler *handler=0)
 Open the free text search window. More...
 

Static Public Member Functions

static void default_path (const std::string &path)
 Set the static default path for use with the no argument constructor. More...
 
static void standard_default_path ()
 Set the static default path for the no argument constructor to be the standard !Help file for the application.
 
static const std::string & default_path ()
 Get the default path set for the application.
 
static bool run_stronghelp ()
 Attempt to start the strong help program. More...
 

Detailed Description

class to show help from StrongHelp help files

For the help files to work the !StrongHlp application must have been seen by the filer

Constructor & Destructor Documentation

◆ StrongHelp() [1/3]

tbx::ext::StrongHelp::StrongHelp ( )

Construct class to control StrongHelp application.

By default the path is set to the default path

◆ StrongHelp() [2/3]

tbx::ext::StrongHelp::StrongHelp ( const std::string &  path)

Construct class with path to help file.

Parameters
pathcan be "" to scan all loaded manuals A comma separated list of help manuals to scan. If the list ends with a comma the rest of the manuals will be scannced after the list. The complete path to the image file (used for program help)

◆ StrongHelp() [3/3]

tbx::ext::StrongHelp::StrongHelp ( const StrongHelp other)

Construct as a copy of another StrongHelp object.

Parameters
otherobject to copy

Member Function Documentation

◆ default_path()

void tbx::ext::StrongHelp::default_path ( const std::string &  path)
static

Set the static default path for use with the no argument constructor.

This allows you to set the help file once for that whole application

Parameters
paththe default path to use

◆ lookup()

void tbx::ext::StrongHelp::lookup ( const std::string &  page,
StrongHelpNotFoundHandler handler = 0 
)

Lookup a page in the strong help path.

Parameters
pagepage to look up
handlerclass to handle not found/not running errors or 0 for the default processing.

◆ run_path()

bool tbx::ext::StrongHelp::run_path ( )

Attempt to run the file name in path.

This will run the path set in the constructor and rely on the filer to use it's file type to display it.

The path in the constructor must have been set to a the full filename of the file to launch.

It is a simple way to launch the root page of a strong help file.

To provide more information and to allow fallbacks use the lookup call with the name of the root page (usually !root).

Returns
true if strong help has been seen by the filer, so there is a good chance it will run.

◆ run_stronghelp()

bool tbx::ext::StrongHelp::run_stronghelp ( )
static

Attempt to start the strong help program.

This will try to run the !StrongHlp application if it has been seen by the filer.

Returns
true if the launch location was known so it could be launched.

◆ search()

void tbx::ext::StrongHelp::search ( const std::string &  text,
StrongHelpNotFoundHandler handler = 0 
)

Open the free text search window.

Parameters
texttext to search forpage
handlerclass to handle not found/not running errors or 0 for the default processing.

The documentation for this class was generated from the following files: