1term::interact::pager(n)       Terminal control       term::interact::pager(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       term::interact::pager - Terminal widget, paging
9

SYNOPSIS

11       package require Tcl  8.4
12
13       package require term::interact::pager  ?0.1?
14
15       term::interact::pager object text ?options...?
16
17       object interact
18
19       object done
20
21       object clear
22
23       object text text
24
25       object configure
26
27       object configure option
28
29       object configure option value...
30
31       object cget option
32
33_________________________________________________________________
34

DESCRIPTION

36       This  package provides a class for the creation of a simple paging text
37       display.
38

CLASS API

40       The package exports a single command, the class command,  enabling  the
41       creation of pager instances. Its API is:
42
43       term::interact::pager object text ?options...?
44              This  command  creates  a new pager object with the name object,
45              initializes it, and returns the  fully  qualified  name  of  the
46              object command as its result.
47
48              The  argument is the text to show, possibly followed by configu‐
49              ration options and their values. The options  are  explained  in
50              the section Configuration.
51

OBJECT API

53       The  objects  created  by  the class command provide the methods listed
54       below:
55
56       object interact
57              Show the pager in the screen  at  the  configured  location  and
58              start interacting with it. This opens its own event loop for the
59              processing of incoming characters. The method returns  when  the
60              interaction   has  completed.  See  section  Interaction  for  a
61              description of the possible interaction.
62
63       object done
64              This method can be used by user supplied  actions  to  terminate
65              the interaction with the object.
66
67       object clear
68              This  method  can be used by user supplied actions to remove the
69              pager from the terminal.
70
71       object text text
72              This method can be used to change the text shown by  the  pager.
73              The  pager  will  reset the dispay to show the first line of the
74              text at the top.
75
76       object configure
77
78       object configure option
79
80       object configure option value...
81
82       object cget option
83              Standard methods to retrieve and configure the  options  of  the
84              pager.
85

CONFIGURATION

87       A pager instance recognizes the following options:
88
89       -in chan
90              Specifies the channel to read character sequences from. Defaults
91              to stdin.
92
93       -out chan
94              Specifies the channel to write the pager contents  to.  Defaults
95              to stdout.
96
97       -column int
98              Specifies  the  column  of the terminal where the left margin of
99              the pager display should appear. Defaults to 0, i.e.  the  left-
100              most column.
101
102       -line int
103              Specifies  the  line of the terminal where the top margin of the
104              pager display should appear. Defaults to 0,  i.e.  the  top-most
105              line.
106
107       -height int
108              Specifies  the  number  of  lines of text to show at most in the
109              display. Defaults to 25.
110
111       -actions dict
112              Specifies a  dictionary  containing  additional  actions,  using
113              character  sequences  as  keys. Note that these sequences cannot
114              override the hardwired sequences described in  section  Interac‐
115              tion.
116

INTERACTION

118       A  pager  object recognizes the control sequences listed below and acts
119       as described. The user can supply more control sequences to act on  via
120       the configuration, but is not able to overide these defaults.
121
122       Cursor Up
123              The  text  is  scrolled down a single line, making one more line
124              visible at the top. The pager will not react if the  first  line
125              of the text is already shown.
126
127       Cursor Down
128              The text is scrolled up a single line, making one more line vis‐
129              ible at the bottom. The pager will not react if the last line of
130              the text is already shown.
131
132       Page Up
133              The  text  is  scrolled down a page. The pager will not react if
134              the first line of the text is already shown.
135
136       Page Down
137              The text is scrolled up a page. The pager will not react if  the
138              last line of the text is already shown.
139
140       Enter/Return
141              The interaction with the object is terminated.
142

BUGS, IDEAS, FEEDBACK

144       This  document,  and the package it describes, will undoubtedly contain
145       bugs and other problems.  Please report such in the  category  term  of
146       the          Tcllib         SF         Trackers         [http://source
147       forge.net/tracker/?group_id=12883].  Please also report any  ideas  for
148       enhancements you may have for either package and/or documentation.
149

KEYWORDS

151       control, pager, terminal, text display
152
154       Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net>
155
156
157
158
159term                                  0.1             term::interact::pager(n)
Impressum