HTML Widget Composite widget consisting of a drawingArea widget and horizontal and vertical scrollbars. Resources pic_data = resolveImageFunction (w, src, noload) pic_data = resolveDelayedImage (w, src) Callbacks anchorCallback (w, cbdata) called when href is selected linkCallback (w, cbdata) called during set text for tags submitFormCallback (w, cbdata) called when form is submitted LinkInfo: href role anchorCallback: event element_id text href formCallback: event href method enctype enc_entity attrib_count attrib_names attrib_values Public Functions HTMLGetText (w, pretty) # text or Postscript HTMLPositionToId (w, x, y) # find nearest element HTMLIdToPosition (w, element_id, x, y) # cvt id to position HTMLGotoId (w, element_id) # scroll window to element HTMLAnchorToPosition (w, name, x, y) # pos of anchor given name HTMLAnchorToId (w, name) # id of anchor given name list = HTMLGetHRefs (w, num_hrefs) # HREFs of all active anchors HTMLGetImageSrcs (w, num_srcs) # SRCs of all images in doc HTMLGetLinks (w, num_links) # get list of LINK tags in doc HTMLGetWidgetInfo (w) # get widget list HTMLFreeImageInfo (w) # free image resources HTMLFreeWidgetInfo (ptr) # free WidgetInfo struct ** HTMLRetestAnchors (w, testFunc, data) # redraw all active anchors HTMLSetSelection (w, start, end) # set selection by ElementRef HTMLClearSelection (w) # clear selection HTMLGetTextAndSelection(w,startp,endp,insertp) # get selection HTMLSetText (w, text, header_text, # set document text footer_text, element_id, target_anchor, ptr) HTMLSearchText (w, pattern, m_start, # search text -> ElementRefs m_end, backward, caseless) LOCAL REVISIONS ---------------------- Added a third argument (client_data for the callback function) to the HTMLRetestAnchors function. This required changes to several files. Likewise, added a client_data argument to the pointer motion callback. Mosaic in its callbacks would assume that the HTML widget was being called from within Mosaic, but this doesn't work in a more general setting. Modified the HTML widget to add a custom Realize method. This calls the realize method of the superclass and then makes a drawGC for the HTML widget. This was necessary to avoid segvios occuring when something is drawn in the window before the application becomes idle and the widget processes the first Expose event, as the widget would create the GC only in response to the expose event. Added a "scroll" action to the widget and modified the default HTML translations to add u/d and j/k keys to permit vertical scrolling using the keyboard instead of the scroll bars.