On this page:
srcloc-snip:  snip%
new
activate-link
srcloc-snip:  snipclass
srcloc-snip:  select-srcloc

30 Srcloc Snips

class

srcloc-snip:snip% : class?

  superclass: editor-snip%

This snip implements clickable links to srcloc locations.
The snip is initialized with an appropriate editor, into which a representation for the link can be inserted. When the reprenstation has been inserted, the activate-link method needs to be called to activate the link.

constructor

(new srcloc-snip:snip% [srcloc srcloc])

  (is-a?/c srcloc-snip:snip%)
  srcloc : srcloc?
The srcloc field specifies where the link points.

method

(send a-srcloc-snip:snip activate-link)  void?

This makes the content of the snip’s editor clickable, such that clicking highlights the position of the srcloc.

The snip-class% object used by srcloc-snip:snip%.

procedure

(srcloc-snip:select-srcloc srcloc)  void?

  srcloc : srcloc?
Finds the editor containing the specified srcloc and selects it.