Class: Wx::ExtHelpController
- 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
Instance Method Summary collapse
-
#display_block(blockNo) ⇒ Boolean
If the help viewer is not running, runs it and displays the file at the given block number.
-
#display_contents ⇒ Boolean
If the help viewer is not running, runs it and displays the contents.
-
#display_context_popup(contextId) ⇒ Boolean
Displays the section as a popup window using a context id.
-
#display_help(relativeURL) ⇒ Boolean
Call the browser using a relative URL.
- #display_section(*args) ⇒ Object
-
#display_text_popup(text, pos) ⇒ Boolean
Displays the text in a popup window, if possible.
-
#get_frame_parameters ⇒ void
Only does something for Wx::HTML::HtmlHelpController.
-
#get_parent_window ⇒ Wx::Window
(also: #parent_window)
Returns the window to be used as the parent for the help window.
-
#init(dir) ⇒ Boolean
This must be called to tell the controller where to find the documentation.
- #initialize(parentWindow = nil) ⇒ Wx::ExtHelpController constructor
-
#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.
-
#load_file(file = ('')) ⇒ Boolean
If the help viewer is not running, runs it and loads the given file.
-
#on_quit ⇒ void
Does nothing.
-
#quit ⇒ Boolean
If the viewer is running, quits it by disconnecting.
-
#set_frame_parameters(titleFormat, size, pos = Wx::DEFAULT_POSITION, newFrameEachTime = false) ⇒ void
Allows one to override the default settings for the help frame.
-
#set_parent_window(parentWindow) ⇒ void
(also: #parent_window=)
Sets the window to be used as the parent for the help window.
-
#set_viewer(viewer = (''), flags = Wx::HTML::HELP_NETSCAPE) ⇒ void
(also: #viewer=)
Tell it which browser to use.
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize(parentWindow = nil) ⇒ Wx::ExtHelpController
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.
71 |
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 71 def display_block(blockNo) end |
#display_contents ⇒ Boolean
If the help viewer is not running, runs it and displays the contents.
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.
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.
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
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.
107 |
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 107 def display_text_popup(text, pos) end |
#get_frame_parameters ⇒ void
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_window ⇒ Wx::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.
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
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.
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.
136 |
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 136 def load_file(file=('')) end |
#on_quit ⇒ void
This method returns an undefined value.
Does nothing.
47 |
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 47 def on_quit; end |
#quit ⇒ Boolean
If the viewer is running, quits it by disconnecting.
For Windows Help, the viewer will only close if no other application is using it.
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.
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.
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.
33 |
# File 'lib/wx/doc/gen/ext_help_controller.rb', line 33 def set_viewer(viewer=(''), flags=Wx::HTML::HELP_NETSCAPE) end |