Class: Wx::ExtHelpController

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/ext_help_controller.rb,
lib/wx/doc/help_controller.rb

Overview

This class implements help via an external browser.

It requires the name of a directory containing the documentation and a file mapping numerical Section numbers to relative URLS. The map file contains two or three fields per line: numeric_id relative_URL [; comment/documentation] The numeric_id is the id used to look up the entry in #display_section/DisplayBlock(). The relative_URL is a filename of an html file, relative to the help directory. The optional comment/documentation field (after a ';') is used for keyword searches, so some meaningful text here does not hurt. If the documentation itself contains a ';', only the part before that will be displayed in the listbox, but all of it used for search. Lines starting with ';' will be ignored.

Category: HELP

See Also:

Requires:

  • USE_HELP

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initialize(parentWindow = nil) ⇒ Wx::ExtHelpController

Parameters:



25
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 25

def initialize(parentWindow=nil) end

Instance Method Details

#display_block(blockNo) ⇒ Boolean

If the help viewer is not running, runs it and displays the file at the given block number.

  • WinHelp: Refers to the context number.
  • MS HTML Help: Refers to the context number.
  • External HTML help: the same as for #display_section.
  • HTML::HtmlHelpController: sectionNo is an identifier as specified in the .hhc file. See Help Files Format. DeprecatedThis function is for backward compatibility only, and applications should use #display_section instead.

Parameters:

  • blockNo (Integer)

Returns:

  • (Boolean)


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

def display_block(blockNo) end

#display_contentsBoolean

If the help viewer is not running, runs it and displays the contents.

Returns:

  • (Boolean)


75
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 75

def display_contents; end

#display_context_popup(contextId) ⇒ Boolean

Displays the section as a popup window using a context id.

Returns false if unsuccessful or not implemented.

Parameters:

  • contextId (Integer)

Returns:

  • (Boolean)


82
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 82

def display_context_popup(contextId) end

#display_help(relativeURL) ⇒ Boolean

Call the browser using a relative URL.

Parameters:

  • relativeURL (String)

Returns:

  • (Boolean)


52
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 52

def display_help(relativeURL) end

#display_section(section) ⇒ Boolean #display_section(sectionNo) ⇒ Boolean

Overloads:

  • #display_section(section) ⇒ Boolean

    If the help viewer is not running, runs it and displays the given section.

    The interpretation of section differs between help viewers. For most viewers, this call is equivalent to KeywordSearch. For MS HTML Help, HTML help and external HTML help, if section has a .htm or .html extension, that HTML file will be displayed; otherwise a keyword search is done.

    Parameters:

    • section (String)

    Returns:

    • (Boolean)
  • #display_section(sectionNo) ⇒ Boolean

    If the help viewer is not running, runs it and displays the given section.

    • WinHelp, MS HTML Help sectionNo is a context id.
    • MS HTML Help: Pass -1 in sectionNo to display the index.
    • External HTML help: Wx::ExtHelpController implements sectionNo as an id in a map file, which is of the form:
    • HTML::HtmlHelpController: sectionNo is an identifier as specified in the .hhc file. See Help Files Format. See also the help sample for notes on how to specify section numbers for various help file formats.

    Parameters:

    • sectionNo (Integer)

    Returns:

    • (Boolean)


99
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 99

def display_section(*args) end

#display_text_popup(text, pos) ⇒ Boolean

Displays the text in a popup window, if possible.

Returns false if unsuccessful or not implemented.

Parameters:

  • text (String)
  • pos (Array(Integer, Integer), Wx::Point)

Returns:

  • (Boolean)


107
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 107

def display_text_popup(text, pos) end

#get_frame_parametersvoid

This method returns an undefined value.

Returns Only does something for Wx::HTML::HtmlHelpController.



20
# File 'lib/wx/doc/help_controller.rb', line 20

def get_frame_parameters; end

#get_parent_windowWx::Window Also known as: parent_window

Returns the window to be used as the parent for the help window.

This window is used by CHMHelpController, WinHelpController and HTML::HtmlHelpController.

Returns:



113
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 113

def get_parent_window; end

#init(dir) ⇒ Boolean

This must be called to tell the controller where to find the documentation.

If a locale is set, look in file/localename, i.e. If passed "/usr/local/myapp/help" and the current Locale is set to be "de", then look in "/usr/local/myapp/help/de/" first and fall back to "/usr/local/myapp/help" if that doesn't exist.

true on success

Parameters:

  • dir (String)

    directory name where to fine the help files

Returns:

  • (Boolean)


43
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 43

def init(dir) end

#keyword_search(keyWord, mode = Wx::HelpSearchMode::HELP_SEARCH_ALL) ⇒ Boolean

If the help viewer is not running, runs it, and searches for sections matching the given keyword.

If one match is found, the file is displayed at this section. The optional parameter allows searching the index (HelpSearchMode::HELP_SEARCH_INDEX) but this currently is only supported by the HTML::HtmlHelpController.

  • WinHelp, MS HTML Help: If more than one match is found, the first topic is displayed.
  • MS HTML Help: Pass an empty string to display the search page.
  • External HTML help, simple HTML help: If more than one match is found, a choice of topics is displayed.
  • HTML::HtmlHelpController: see HTML::HtmlHelpController::KeywordSearch.

Parameters:

  • keyWord (String)
  • mode (Wx::HelpSearchMode) (defaults to: Wx::HelpSearchMode::HELP_SEARCH_ALL)

Returns:

  • (Boolean)


127
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 127

def keyword_search(keyWord, mode=Wx::HelpSearchMode::HELP_SEARCH_ALL) end

#load_file(file = ('')) ⇒ Boolean

If the help viewer is not running, runs it and loads the given file.

If the filename is not supplied or is empty, the file specified in #initialize is used. If the viewer is already displaying the specified file, it will not be reloaded. This member function may be used before each display call in case the user has opened another file. HTML::HtmlHelpController ignores this call.

Parameters:

  • file (String) (defaults to: (''))

Returns:

  • (Boolean)


136
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 136

def load_file(file=('')) end

#on_quitvoid

This method returns an undefined value.

Does nothing.



47
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 47

def on_quit; end

#quitBoolean

If the viewer is running, quits it by disconnecting.

For Windows Help, the viewer will only close if no other application is using it.

Returns:

  • (Boolean)


142
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 142

def quit; end

#set_frame_parameters(titleFormat, size, pos = Wx::DEFAULT_POSITION, newFrameEachTime = false) ⇒ void

This method returns an undefined value.

Allows one to override the default settings for the help frame.

Parameters:

  • titleFormat (String)
  • size (Array(Integer, Integer), Wx::Size)
  • pos (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)
  • newFrameEachTime (Boolean) (defaults to: false)


60
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 60

def set_frame_parameters(titleFormat, size, pos=Wx::DEFAULT_POSITION, newFrameEachTime=false) end

#set_parent_window(parentWindow) ⇒ void Also known as: parent_window=

This method returns an undefined value.

Sets the window to be used as the parent for the help window.

This is used by CHMHelpController, WinHelpController and HTML::HtmlHelpController.

Parameters:



149
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 149

def set_parent_window(parentWindow) end

#set_viewer(viewer = (''), flags = Wx::HTML::HELP_NETSCAPE) ⇒ void Also known as: viewer=

This method returns an undefined value.

Tell it which browser to use.

The Netscape support will check whether Netscape is already running (by looking at the .netscape/lock file in the user's home directory) and tell it to load the page into the existing window.

Parameters:

  • viewer (String) (defaults to: (''))

    The command to call a browser/html viewer.

  • flags (Integer) (defaults to: Wx::HTML::HELP_NETSCAPE)

    Set this to HTML::HELP_NETSCAPE if the browser is some variant of Netscape.



33
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 33

def set_viewer(viewer=(''), flags=Wx::HTML::HELP_NETSCAPE) end