Contents Up Previous Next

Html

A subwindow used for displaying HTML files, using a class library written by Andrew Davison. At present only local HTML files should be loaded, and links in HTML files should again be local files, with non-URL specifications. Later releases will eventually allow Web browsing functionality, but to simplify wxCLIPS installation, this functionality has been omitted.

There are some bugs in scrolling and presentation, but for simple needs, it may prove handy to be able to show text and graphics (GIF files).

Note: this functionality is implemented in Windows only for the time being, and even then, not in all Windows releases of wxCLIPS and Hardy.

The following callbacks are valid for the html class.

OnSize
The function is called with the window identifier, width and height.
OnOpenURL
The function is called just before a URL is about to be opened, with the window identifier, and a URL. Return 1 to allow default processing, 0 to veto further processing. You can use this to program special URLs as buttons, if you test the URL and return 0 if you will process it yourself.
OnSetStatusText
This is called with the window identifier and text, whenever it is appropriate to notify the user of the URL the mouse is over.

See also window-add-callback.

html-back
html-cancel
html-clear-cache
html-create
html-get-current-url
html-on-size
html-open-file
html-resize
html-save-file
html-open-url


html-back

void ( html-back long id)

Loads and displays the previously-displayed URL or file.


html-cancel

void ( html-cancel long id)

Sets a flag to cancel the current operation.


html-clear-cache

void ( html-clear-cache long id)

Clears the internal cache.


html-create

long ( html-create long parent-id optional long x optional long y
optional long width optional long height optional string style=0 optional string name="html")

Creates an HTML window.

parent-id must be a valid frame ID.

name gives the canvas a name that can be retrieved with window-get-name.


html-get-current-url

string ( html-get-current-url long id) Returns the current URL.


html-on-size

void ( html-on-size long id long width long height)

Invokes the HTML panel's OnSize member. This may need to be called if you override OnSize.


html-open-file

long ( html-open-file long id string file) Opens and displays a file.


html-resize

void ( html-resize long id)

Resizes and displays the current file.


html-save-file

long ( html-save-file long id string file) Saves the currently displayed file.


html-open-url

long ( html-open-url long id string url)

Opens a URL (not yet functioning).