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. |
| Ph_CURSOR_POINTER |
| Ph_CURSOR_BIG_POINTER |
| Ph_CURSOR_CROSSHAIR |
| Ph_CURSOR_FINGER |
| Ph_CURSOR_CLOCK (the default) |
| Ph_CURSOR_POINTER (the default) |
| Ph_CURSOR_BIG_POINTER |
| Ph_CURSOR_CROSSHAIR |
| Ph_CURSOR_FINGER |
| Ph_CURSOR_POINTER |
| Ph_CURSOR_BIG_POINTER |
| Ph_CURSOR_CROSSHAIR |
| Ph_CURSOR_FINGER (the default) |
| Constant | Description |
|---|---|
| Pt_HTML_RELOAD | Reloads a page. |
| Pt_HTML_PAGE_MODE | Paginates the page for printing. |
| 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. |
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-2006 by Cogent Real-Time Systems, Inc. All rights reserved.