class PtHtml PtContainer { html_border_width; // unsigned short (Pt_ARG_HTML_BORDER_WIDTH) html_cursor_busy; // unsigned short (Pt_ARG_HTML_CURSOR_BUSY) html_cursor_default; // unsigned short (Pt_ARG_HTML_CURSOR_DEFAULT) html_cursor_link; // unsigned short (Pt_ARG_HTML_CURSOR_LINK) html_fill_color; // color (Pt_ARG_HTML_FILL_COLOR) html_flags; // flag (Pt_ARG_HTML_FLAGS) html_h1_font; // string (Pt_ARG_HTML_H1_FONT) html_h2_font; // string (Pt_ARG_HTML_H2_FONT) html_h3_font; // string (Pt_ARG_HTML_H3_FONT) html_h4_font; // string (Pt_ARG_HTML_H4_FONT) html_h5_font; // string (Pt_ARG_HTML_H5_FONT) html_h6_font; // string (Pt_ARG_HTML_H6_FONT) html_link_color; // color (Pt_ARG_HTML_LINK_COLOR) html_page_bm; // unsigned short (Pt_ARG_HTML_PAGE_BM) html_page_h; // integer (Pt_ARG_HTML_PAGE_H) html_page_lm; // unsigned short (Pt_ARG_HTML_PAGE_LM) html_page_rm; // unsigned short (Pt_ARG_HTML_PAGE_RM) html_page_tm; // unsigned short (Pt_ARG_HTML_PAGE_TM) html_page_w; // integer (Pt_ARG_HTML_PAGE_W) html_page_x; // integer (Pt_ARG_HTML_PAGE_X) html_page_y; // integer (Pt_ARG_HTML_PAGE_Y) html_scroll_color; // color (Pt_ARG_HTML_SCROLL_COLOR) html_scroll_fill_color; // color (Pt_ARG_HTML_SCROLL_FILL_COLOR) html_scroll_horizontal; // unsigned short (Pt_ARG_HTML_SCROLL_HORIZONTAL) html_scroll_vertical; // unsigned short (Pt_ARG_HTML_SCROLL_VERTICAL) html_scroll_width; // unsigned short (Pt_ARG_HTML_SCROLL_WIDTH) html_text_font; // string (Pt_ARG_HTML_TEXT_FONT) html_url; // string (Pt_ARG_HTML_URL) }
This widget is a display viewer for HTML files, with horizontal and vertical scrollbars. Designed for creating helpviewers and similar applications, it supports only HTML 1.0, plus simple tables and a few other features. It loads and displays HTML pages from the local file system.
For detailed information, please refer to PtHtml in the Photon documentation. |
The width of an internal etched border on the page and scrollbars.
One of the following constants specifying the bitmap image for the cursor when loading a file:
Ph_CURSOR_POINTER |
Ph_CURSOR_BIG_POINTER |
Ph_CURSOR_CROSSHAIR |
Ph_CURSOR_FINGER |
Ph_CURSOR_CLOCK (the default) |
One of the following constants specifying the normal bitmap image for the cursor:
Ph_CURSOR_POINTER (the default) |
Ph_CURSOR_BIG_POINTER |
Ph_CURSOR_CROSSHAIR |
Ph_CURSOR_FINGER |
One of the following constants specifying the bitmap image for the cursor when over a link:
Ph_CURSOR_POINTER |
Ph_CURSOR_BIG_POINTER |
Ph_CURSOR_CROSSHAIR |
Ph_CURSOR_FINGER (the default) |
A number specifying a color for the background of the display. Default is 0xc0c0c0 (grey).
This instance variable determines the behavior of the widget, and may have one of the following values:
Constant | Description |
---|---|
Pt_HTML_RELOAD | Reloads a page. |
Pt_HTML_PAGE_MODE | Paginates the page for printing. |
A string specifying the font for a level 1 heading. Default is "helv24".
Level 2 heading font. Default is "helv18".
Level 3 heading font. Default is "helv14".
Level 4 heading font. Default is "helv12".
Level 5 heading font. Default is "helv10".
Level 6 heading font. Default is "helv08".
A number specifying the color for links. Default is 0xa0 (dark blue).
Integers specifying the width in pixels of the bottom, left, right and top margins of the page. Default for each is 5.
Integers indicating the height and width in pixels of the displayed HTML page.
Integers specifying in pixels the horizontal and vertical position of the viewing area with respect to the page. This number changes when the page is scrolled.
An integer specifying the color of the handle of the scrollbar. Default is 0xc0c0c0 (grey).
An integer specifying the color of the trough of the scrollbar. Default is 0x909090 (dark grey).
These instance variables specify the mode of the horizontal and vertical scrollbars. Each may have one of the following values:
Constant | Description |
---|---|
Pt_ALWAYS | The scrollbar is always displayed (the default). |
Pt_AS_REQUIRED | The scrollbar is displayed only when the page is wider than the viewer. |
Pt_ALWAYS | The scrollbar is never displayed. |
A number specifying the width in pixels of the scrollbars. Default is 15.
A string specifying the body text font. Default is "helv14".
The URL of the HTML page to display. The path can be relative or absolute, and can include a node and directory.
The following callbacks are associated with this widget:
Callback | Description |
---|---|
Pt_CB_HTML_FILE_PRE | This callback is generated when an HTML file is going to be loaded. |
Pt_CB_HTML_FILE_POST | This callback is generated when an HTML file has been loaded. |
Pt_CB_HTML_IMAGE | This callback is generated when an HTML image file is going to be loaded. |
This example, ex_PtHtml.g, is included in the product distribution.
#!/usr/cogent/bin/phgamma /* * This example demonstrates a PtHtml widget. */ if (_os_ == "QNX6") princ ("\nThis widget is not available for QNX 6.", "\n\n"); else { require_lisp("PhotonWidgets.lsp"); PtInit(nil); win = new(PtWindow); html = new(PtHtml); html.SetDim(700,350); html.html_url = "re-pthtml.html"; PtRealizeWidget(win); PtMainLoop(); }
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.