beetlebug▾
/

tui::snapshottui

Gives the screen of the widgets as text or as a picture in SVG.

tui::snapshot ?-text|-svg? ?-theme dark|light?

Description

The text has one line for each row of the grid, with no space at the end of a line. The SVG draws the cells with the colors of a dark or a light terminal; the pictures of the docs come from it.

Returns

The text or the SVG.

Examples

% tui::configure -size {6 1}; tui::label .s -text grid; tui::pack .s; tui::snapshot
 grid

Errors

% tui::snapshot -theme sepia
bad theme "sepia": must be dark or light
-errorcode TCL LOOKUP INDEX theme

Facts

Capability
tui. A new interpreter does not have it until the host turns it on.
Tcl release
Tcl 9.1 and 8.6.
Since
ztcl 1.0.0-beta.7

The full page: tui::snapshot.

See also