Doc Widgets#
The purpose of a doc widget is to navigate a document, in a doc panel. It can:
Highlight a “selection” in a document, meaning an arbitrary union of boxes
Cause a document to auto-scroll to make such a selection visible
Its visual appearance is like a link, i.e. clickable text.
Format#
TYPE
:doc
NAME
: Optional.LABEL
: Required. Appears as clickable text in the page.ROLE_FIELD
:sel
CONTENT_FIELD
: None.
Fields#
Required#
No field is required on its own, but, among doc
and sel
, at least one must be given.
Optional#
Field |
Type |
Description |
---|---|---|
|
libpath |
Indicate which document you are trying to point to, by giving a relative libpath that resolves to a doc info object. This field is optional because you may specify the document instead as a part of
the |
|
string / int |
See Navigation groups. |
|
Indicate a desired selection within the document. If not given, then |
|
(1) |
libpath |
You can use a libpath to point to a node. In this case, the node must define a doc label, and the widget will then point to the exact same document selection that the node does. This is the preferred format, and should be used whenever possible. See Reuse doc labels whenever possible. |
(2) |
string |
If you used the |
(3) |
string |
If you omitted the |