beetlebug▾
/

text dump

Gives the text, the tags, the marks, the images, and the widgets of a range.

PATHNAME dump ?OPTION ...? INDEX1 ?INDEX2?

Description

Gives a list of triples: a kind, a value, and an index. The kinds are text, mark, tagon, tagoff, image, and window. The options -text, -mark, -tag, -image, and -window select kinds, and -all selects each kind, the default. With -command SCRIPT, the text calls SCRIPT with the three words of each triple in place of a result. With no INDEX2, dumps the one character at INDEX1.

Returns

A list of triples, or an empty string with -command.

Examples

% text .du
> .du insert end abc
> .du tag add b 1.0 1.2
> .du dump -tag 1.0 end
tagon b 1.0 tagoff b 1.2

% text .du2
> .du2 insert end abc
> .du2 mark set here 1.1
> .du2 dump -mark 1.0 1.2
mark here 1.1

Errors

% text .du3; .du3 dump
Usage: .du3 dump ?-all -image -text -mark -tag -window? ?-command script? index ?index2?
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also