1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
COMMENT(!MOD!zsh/curses
curses windowing commands
!MOD!)
The tt(zsh/curses) module makes available one builtin command and
various parameters.
subsect(Builtin)
startitem()
findex(zcurses)
cindex(windows, curses)
xitem(tt(zcurses) tt(init))
xitem(tt(zcurses) tt(end))
xitem(tt(zcurses) tt(addwin) var(targetwin) var(nlines) var(ncols) var(begin_y) var(begin_x) )
xitem(tt(zcurses) tt(delwin) var(targetwin) )
xitem(tt(zcurses) tt(refresh) [ var(targetwin) ] )
xitem(tt(zcurses) tt(move) var(targetwin) var(new_y) var(new_x) )
xitem(tt(zcurses) tt(char) var(targetwin) var(character) )
xitem(tt(zcurses) tt(string) var(targetwin) var(string) )
xitem(tt(zcurses) tt(border) var(targetwin) var(border) )(
xitem(tt(zcurses) tt(attr) var(targetwin) [ var({+/-}attribute) | var(fg_col)tt(/)var(bg_col) ] [...])
item(tt(zcurses) tt(scroll) [ tt(on) | tt(off) | {+/-}var(lines) ])(
Manipulate curses windows. All uses of this command should be
bracketed by `tt(zcurses init)' to initialise use of curses, and
`tt(zcurses end)' to end it; omitting `tt(zcurses end)' can cause
the terminal to be in an unwanted state.
With tt(addwin), create a window with var(nlines) lines and var(ncols) columns.
Its upper left corner will be placed at row var(begin_y) and column
var(begin_x) of the screen. var(targetwin) is a string and refers
to the name of a window that is not currently assigned.
Use tt(delwin) to delete a window created with tt(addwin). Note
that tt(end) does em(not) implicitly delete windows.
The tt(refresh) command will refresh window var(targetwin); this is necessary to
make any pending changes (such as characters you have prepared for output
with tt(char)) visible on the screen. If no argument is given,
all windows are refreshed; this is necessary after deleting a window.
tt(move) moves the cursor position in var(targetwin) to new coordinates
var(new_y) and var(new_x).
Outputting characters and strings are achieved by tt(char) and tt(string)
respectively.
To draw a border around window var(targetwin), use tt(border).
tt(attr) will set var(targetwin)'s attributes or foreground/background
color pair for any successive character output. Each var(attribute)
given on the line may be prepended by a tt(+) to set or a tt(-) to
unset that attribute; tt(+) is assumed if absent. The attributes
supported are tt(blink), tt(bold), tt(dim), tt(reverse), tt(standout),
and tt(underline). Each var(fg_col)tt(/)var(bg_col) (to be read as
`var(fg_col) on var(bg_col)') sets the foreground and background color
for character output.
tt(scroll) can be used with tt(on) or tt(off) to enabled or disable
scrolling of a window when the cursor would otherwise move below the
window due to typing or output. It can also be used with a positive
or negative integer to scroll the window up or down the given number
of lines without changing the current cursor position (which therefore
appears to move in the opposite direction relative to the window).
In the second case, if scrolling is tt(off) it is temporarily turned tt(on)
to allow the window to be scrolled,
)
enditem()
subsect(Parameters)
startitem()
vindex(ZCURSES_COLORS)
item(tt(ZCURSES_COLORS))(
Readonly integer. The maximum number of colors the terminal
supports. This value is initialised by the curses library and is not
available until the first time tt(zcurses init) is run.
)
vindex(ZCURSES_COLOR_PAIRS)
item(tt(ZCURSES_COLOR_PAIRS))(
Readonly integer. The maximum number of color pairs
var(fg_col)tt(/)var(bg_col) that may be defined in `tt(zcurses attr)'
commands; note this limit applies to all color pairs that have been
used whether or not they are currently active. This value is initialised
by the curses library and is not available until the first time tt(zcurses
init) is run.
)
vindex(zcurses_attrs)
item(tt(zcurses_attrs))(
Readonly array. The attributes supported by tt(zsh/curses); available
as soon as the module is loaded.
)
vindex(zcurses_colors)
item(tt(zcurses_colors))(
Readonly array. The colors supported by tt(zsh/curses); available
as soon as the module is loaded.
)
vindex(zcurses_windows)
item(tt(zcurses_windows))(
Readonly array. The current list of windows, i.e. all windows that
have been created with `tt(zcurses addwin)' and not removed with
`tt(zcurses delwin)'.
)
enditem()
|