Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5e1854624d3bc613bdd0dd13d1ef9ac7 > files > 342

gap-system-4.4.12-5mdv2010.0.i586.rpm


<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"/> 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 define <C>NoSelectHelpMatches :=
false;</C> in your &GAP; session or <F>.gaprc</F> file,
see&nbsp;<Ref Sect="The .gaprc file" BookName="ref"/>.
</Subsection>

</Section>



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

</Chapter>