wxRuby Documentation Home

Wx::HtmlHelpFrame

This class is used by HtmlHelpController
to display help.
It is an internal class and should not be used directly – except for the case
when you’re writing your own HTML help controller.

Derived from

Frame

Methods

HtmlHelpFrame.new

HtmlHelpFrame.new(%(arg-type)HtmlHelpData% data = nil) HtmlHelpFrame.new(%(arg-type)Window% parent, Integer WindowID, String title = ’’, Integer style = HF_DEFAULT_STYLE, HtmlHelpData data = nil)

Constructor.

style is combination of these flags:

HF_TOOLBAR Help frame has toolbar.
HF_FLAT_TOOLBAR Help frame has toolbar with flat buttons (aka coolbar).
HF_CONTENTS Help frame has contents panel.
HF_INDEX Help frame has index panel.
HF_SEARCH Help frame has search panel.
HF_BOOKMARKS Help frame has bookmarks controls.
HF_OPEN_FILES Allow user to open arbitrary HTML document.
HF_PRINT Toolbar contains “print” button.
HF_MERGE_BOOKS Contents pane does not showbook nodes. All books are merged together and appear as single book to theuser.
HF_ICONS_BOOK All nodes in contents panehave a book icon. This is how Microsoft’s HTML help viewer behaves.
HF_ICONS_FOLDER Book nodes in contents pane havea book icon, book’s sections have a folder icon. This is the default.
HF_ICONS_BOOK_CHAPTER Both book nodes andnodes of top-level sections of a book (i.e. chapters) have a book icon,all other sections (sections, subsections, …) have a folder icon.
HF_DEFAULT_STYLE @HF_TOOLBAR HF_CONTENTS HF_INDEX HF_SEARCH HF_BOOKMARKS HF_PRINT@

HtmlHelpFrame#create

Boolean create(%(arg-type)Window% parent, Integer id, String title = ’’, Integer style = HF_DEFAULT_STYLE)

Creates the frame. See the constructor
for parameters description.

HtmlHelpFrame#create_contents

create_contents()

Creates contents panel. (May take some time.)

Protected.

HtmlHelpFrame#create_index

create_index()

Creates index panel. (May take some time.)

Protected.

HtmlHelpFrame#create_search

create_search()

Creates search panel.

HtmlHelpFrame#display

Boolean display(%(arg-type)String% x) Boolean display(%(arg-type)Integer% id)

Displays page x. If not found it will give the user the choice of
searching books.
Looking for the page runs in these steps:

  1. try to locate file named x (if x is for example “doc/howto.htm”)
  2. try to open starting page of book x
  3. try to find x in contents (if x is for example “How To …”)
  4. try to find x in index (if x is for example “How To …”)

The second form takes numeric ID as the parameter.
(uses extension to MS format, )

HtmlHelpFrame#display_contents

Boolean display_contents()

Displays contents panel.

HtmlHelpFrame#display_index

Boolean display_index()

Displays index panel.

HtmlHelpFrame#get_data

HtmlHelpData get_data()

Return HtmlHelpData object.

HtmlHelpFrame#keyword_search

Boolean keyword_search(%(arg-type)String% keyword, HelpSearchMode mode = HELP_SEARCH_ALL)

Search for given keyword. Optionally it searches through the index (mode =
HELP_SEARCH_INDEX), default the content (mode = HELP_SEARCH_ALL).

HtmlHelpFrame#read_customization

read_customization(%(arg-type)ConfigBase% cfg, String path = ’’)

Reads user’s settings for this frame (see HtmlHelpController#read_customization)

HtmlHelpFrame#refresh_lists

refresh_lists()

Refresh all panels. This is necessary if a new book was added.

Protected.

HtmlHelpFrame#set_title_format

set_title_format(%(arg-type)String% format)

Sets the frame’s title format. format must contain exactly one “\%s”
(it will be replaced by the page title).

HtmlHelpFrame#use_config

use_config(%(arg-type)ConfigBase% config, String rootpath = ’’)

Add books to search choice panel.

HtmlHelpFrame#write_customization

write_customization(%(arg-type)ConfigBase% cfg, String path = ’’)

Saves user’s settings for this frame (see HtmlHelpController#write_customization).

HtmlHelpFrame#add_toolbar_buttons

add_toolbar_buttons(%(arg-type)ToolBar% toolBar, Integer style)

You may override this virtual method to add more buttons into help frame’s
toolbar. toolBar is a pointer to the toolbar and style is the style
flag as passed to Create method.

ToolBar::Realize is called immediately after returning from this function.

See samples/html/helpview for an example.

[This page automatically generated from the Textile source at 2023-06-13 21:31:33 +0000]