File: util.xml

package info (click to toggle)
gap-browse 1.8.21%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,296 kB
  • sloc: xml: 1,961; ansic: 1,342; makefile: 163; javascript: 155; sh: 20
file content (82 lines) | stat: -rw-r--r-- 2,610 bytes parent folder | download
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

<Chapter Label="ch:util">
<Heading>Utilities using <C>ncurses</C></Heading>

In this chapter we describe the usage of some example applications of
the <C>ncurses</C> interface provided by the &Browse; package. They may
be of interest by themselves, or they may be used as utility functions 
within larger applications. 


<Section Label="sect:ncurses_utils">
<Heading><C>ncurses</C> utilities</Heading>

If you call the functions
<Ref Func="NCurses.Alert"/>,
<Ref Func="NCurses.Select"/>,
<Ref Func="NCurses.GetLineFromUser"/>,
or
<Ref Func="NCurses.Pager"/>
from another <C>ncurses</C> application in visual mode,
you should refresh the windows that are still open,
by calling <C>NCurses.update_panels</C> and
<C>NCurses.doupdate</C> afterwards,
see Section <Ref Subsect="ssec:ncursesPan"/>
and <Ref Subsect="ssec:ncursesWin"/>.
Also, if the cursor shall be hidden after that,
you should call <C>curs_set</C> with argument <C>0</C>,
see Section <Ref Subsect="ssec:ncursesTermset"/>,
since the cursor is automatically made visible in <C>NCurses.endwin</C>.


<#Include Label="Alert_man">

<#Include Label="NCurses.Select">

<#Include Label="NCurses.GetLineFromUser">

<#Include Label="NCurses.Pager">

<Subsection Label="ssec:selhelpmatch">
<Heading>Selection of help matches</Heading>
After loading the <Package>Browse</Package> package &GAP;'s help system
behaves slightly different when a request yields several matches. 
The matches are shown via <Ref Func="NCurses.Select"/>,
the list can be searched and filtered,
and one can choose one match for immediate display.
It is possible to not choose a match
and the <C>?&lt;nr&gt;</C> syntax still works.
<P/>
If you want the original behavior call
<C>SetUserPreference( "Browse", "SelectHelpMatches", false );</C>
in your &GAP; session or <F>gap.ini</F> file,
see&nbsp;<Ref Subsect="Configuring User preferences" BookName="ref"/>.

</Subsection>

<Subsection Label="ssec:selpackagename">
<Heading>Selection of package names</Heading>

The function <Ref Func="LoadPackage" BookName="ref"/> shows a list of matches
if only a prefix of a package name is given.
After loading the <Package>Browse</Package> package,
<Ref Func="NCurses.Select"/> is used for that, and one can choose a match.
<P/>
If you want the original behavior call
<C>SetUserPreference( "Browse", "SelectPackageName", false );</C>
in your &GAP; session or <F>gap.ini</F> file,
see&nbsp;<Ref Subsect="Configuring User preferences" BookName="ref"/>.

</Subsection>

</Section>



<Section Label="sec:demo">
<Heading>A Demo Function</Heading>
<#Include Label="Demo_man">
</Section>

</Chapter>