aboutsummaryrefslogtreecommitdiff
path: root/vendor/x11iraf/obm/ObmW/HTML.notes
blob: 95ab16890aabeef1bd23e239c72a758b43ea4330 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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 <LINK> 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.