30 Srcloc Snips

▼ |  | Framework: Racket GUI Application Framework

1 | Framework Libraries Overview
2 | Application
3 | Autosave
4 | Canvas
5 | Color Model
6 | Color Prefs
7 | Color
8 | Comment Box
9 | Decorated Editor Snip
10 | Editor Snip
11 | Editor
12 | Exit
13 | Finder
14 | Frame
15 | Group
16 | GUI Utilities
17 | Handler
18 | Icon
19 | Keymap
20 | Menu
21 | Mode
22 | Notify-boxes
23 | Number Snip
24 | Panel
25 | Pasteboard
26 | Path Utils
27 | Preferences
28 | Preferences, Textual
29 | Racket
30 | Srcloc Snips
31 | Text
32 | Splash
33 | Test
34 | Version
35 | Backwards Compatibility
36 | Signatures
37 | Unit
| Index

On this page:

srcloc-snip: snip%
new
activate-link
srcloc-snip: snipclass
srcloc-snip: select-srcloc

top contents ← prev up next →

### 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.

> value srcloc-snip:snipclass : (is-a?/c snip-class%)

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.
top contents ← prev up next →