gbHTMLNavigator demonstrates the various ways that a PowerBASIC application can allow the user to navigate within a single HTML document. The user's default browser already has some methods for general purpose navigation. But a programmer can design their HTML document in ways that takes advantage of how PowerBASIC can interact with a HTML document, providing the user with even more powerful features.
Download (v1.0, 0.4MB) (pre-release) |
The following image of gbHTMLNavigator contains an HTML document that is index for my 100 page PowerBASIC tutorial. The document lists 6 Chapters, each with a half dozen or so Sections. The main toolbar of gbHTMLNavigator provides ways to quickly browse, jump, search, or highlight specified information on the page.
In this case, the document is just a vehicle to highlight the features a programmer can add to a PowerBASIC application. The type of HTML document you create is limited only by your imagination (tables, lists, paragraphs, images, ...). But regardless of the document content, PowerBASIC can interact with the browser to enhance your user's ability to work with the information presented.
Additionally, a web browser context menu is available.
gbHTMLNavigator can then highlight all of the terms, as in this image:
Highlighting or terms and phrases can be customized with the following options:
Match - highlights terms that match the case. In this example, "Chapter" was
the search term. Note that lower case chapter is not highlighted.
Word - highlights whole words only (no partial words). IN this example,
"Chapter" was the search term. Not that the "chapter" in "chapters" is not highlighted.
Exact - highlights a single string, exactly as typed by the user. In
this example, the phrase "Introductory Chapter" was typed in. In this case, Match
was not selected, so case was ignored:
Any combination of the Match/Word/Exact settings may be used to customize which words are highlighted.
Copy All
Copies all text to the clipboard
Clear
Clears the web browser window
Reload
Reloads the selected HTML file
gbHTMLNavigator can open any HTML file, but not all files are written to support the features it was written to demonstrate.
The goal of gbHTMLNavigator was that programmers would use its capabilities in their own application, rather than use gbHTML as a stand-alone application.
Highlights only terms which match the case of the highlight terms
Requires highlighted terms to be a word, not partial words
Treats the highlight terms as a single string
Opens the Search dialog
Scroll to the previous chapter, from the current selection, and highlight the chapter name
Scroll to the next chapter, from the current selection, and highlight the chapter name
Scroll to the previous section, from the current selection, and highlight the chapter name
Scroll to the next section, from the current selection, and highlight the chapter name
Scroll to the top of the browser window
Scroll to the bottom of the browser window
Settings
Pressing the Settings button will toggle display of the default web browser context menu
and a custom context menu supplied by gbHTMLNavigator.
Pressing the down arrow next to the Settings toolbar button will display a context menu with the following options.
Sessions
When gbHTMLNavigator starts, it restores the previous session content.
INI File
gbHTMLNavigator application settings are saved in an INI file, kept in the same folder as the gbHTMLNavigator application.
Comments and suggestions are welcome!