Class: Wx::HelpProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/help_provider.rb

Overview

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.

Category: HELP

See Also:

Requires:

  • USE_HELP

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.getWx::HelpProvider

Returns pointer to help provider instance.

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

Returns:



86
# File 'lib/wx/doc/gen/help_provider.rb', line 86

def self.get; end

.set(helpProvider) ⇒ Wx::HelpProvider

Set the current, application-wide help provider.

Pointer to previous help provider or NULL if there wasn’t any.

Parameters:

Returns:



93
# File 'lib/wx/doc/gen/help_provider.rb', line 93

def self.set(helpProvider) end

Instance Method Details

#add_help(window, text) ⇒ void #add_help(id, text) ⇒ void

Overloads:

  • #add_help(window, text) ⇒ void

    This method returns an undefined value.

    Associates the text with the given window.

    Remark:

    Although all help providers have these functions to allow making Window#set_help_text work, not all of them implement the functions.

    Parameters:

  • #add_help(id, text) ⇒ void

    This method returns an undefined value.

    Associates the text with the given ID.

    This help text will be shown for all windows with ID id, unless they have more specific help text associated using the other #add_help prototype. May be used to set the same help string for all Cancel buttons in the application, for example.

    Remark:

    Although all help providers have these functions to allow making Window#set_help_text work, not all of them implement the functions.

    Parameters:

    • id (Integer)
    • text (String)


49
# File 'lib/wx/doc/gen/help_provider.rb', line 49

def add_help(*args) end

#get_help(window) ⇒ String Also known as: help

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.

Parameters:

Returns:

  • (String)


56
# File 'lib/wx/doc/gen/help_provider.rb', line 56

def get_help(window) end

#remove_help(window) ⇒ void

This method returns an undefined value.

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.

Parameters:



64
# File 'lib/wx/doc/gen/help_provider.rb', line 64

def remove_help(window) end

#show_help(window) ⇒ Boolean

Shows help for the given window.

Override this function if the help doesn’t depend on the exact position inside the window, otherwise you need to override #show_help_at_point. Returns true if help was shown, or false if no help was available for this window.

Parameters:

Returns:

  • (Boolean)


71
# File 'lib/wx/doc/gen/help_provider.rb', line 71

def show_help(window) end

#show_help_at_point(window, point, origin) ⇒ Boolean

This function may be overridden to show help for the window when it should depend on the position inside the window, By default this method forwards to #show_help, so it is enough to only implement the latter if the help doesn’t depend on the position.

true if help was shown, or false if no help was available for this window.

Parameters:

Returns:

  • (Boolean)


80
# File 'lib/wx/doc/gen/help_provider.rb', line 80

def show_help_at_point(window, point, origin) end