wxRuby Documentation Home

# Wx::HelpProvider

HelpProvider is an abstract class used by a program implementing context-sensitive help to
show the help text for the given window.

The current help provider must be explicitly set by the application using
HelpProvider::Set().

## Derived from

No base class

## See also

ContextHelp, ContextHelpButton,
SimpleHelpProvider, HelpControllerHelpProvider,
Window#set_help_text, Window#get_help_text

## Methods

- HelpProvider#add_help
- HelpProvider#get
- HelpProvider#get_help
- HelpProvider#remove_help
- HelpProvider#set
- HelpProvider#show_help

destructor()

Virtual destructor for any base class.

### HelpProvider#add_help

add_help(%(arg-type)WindowBase% window, String text)

Associates the text with the given window or id. Although all help
providers have these functions to allow making Window#set_help_text
work, not all of them implement the functions.

### HelpProvider#get

HelpProvider get()

Unlike some other classes, the help provider is not created on demand.
This must be explicitly done by the application.

### HelpProvider#get_help

String get_help(%(arg-type)WindowBase% window)

Gets the help string for this window. Its interpretation is dependent on the help provider
except that empty string always means that no help is associated with
the window.

add_help(%(arg-type)Integer% id, String text)

This version associates the given text with all windows with this id.
May be used to set the same help string for all Cancel buttons in
the application, for example.

### HelpProvider#remove_help

remove_help(%(arg-type)WindowBase% window)

Removes the association between the window pointer and the help text. This is
called by the Window destructor. Without this, the table of help strings will fill up
and when window pointers are reused, the wrong help string will be found.

### HelpProvider#set

HelpProvider set(%(arg-type)HelpProvider% helpProvider)

Get/set the current, application-wide help provider. Returns
the previous one.

### HelpProvider#show_help

Boolean show_help(%(arg-type)WindowBase% window)

Shows help for the given window. Uses get_help internally if
applicable.

Returns true if it was done, or false if no help was available
for this window.

[This page automatically generated from the Textile source at 2023-06-09 00:45:37 +0000]