Sophie

Sophie

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

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

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (Browse) - Chapter 1: Introduction and Overview</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
</head>
<body>


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chapA.html">A</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap0.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap2.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X1794AAAFB17FFAA46C" name="X1794AAAFB17FFAA46C"></a></p>
<div class="ChapSects"><a href="chap1.html#X1794AAAFB17FFAA46C">1 <span class="Heading">Introduction and Overview</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap1.html#X17DFB63A917E67C0A1">1.1 <span class="Heading">Introduction</span></a>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap1.html#X8389AD9217B74BA4A">1.2 <span class="Heading">Overview</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap1.html#X87A6D24784C21E54">1.2-1 <span class="Heading">The <code class="code">ncurses</code> interface</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap1.html#X80C054D881502061">1.2-2 <span class="Heading">Applications of 
<code class="code">ncurses</code></span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap1.html#X17CF47ACC83A95689">1.2-3 <span class="Heading">The interface to browse two-dimensional arrays</span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap1.html#X17A0055DE17A2C5DC9">1.2-4 <span class="Heading">Applications of the generic function
<code class="code">NCurses.BrowseGeneric</code></span></a>
</span>
</div>
</div>

<h3>1 <span class="Heading">Introduction and Overview</span></h3>

<p><a id="X17DFB63A917E67C0A1" name="X17DFB63A917E67C0A1"></a></p>

<h4>1.1 <span class="Heading">Introduction</span></h4>

<p>The motivation of the package <strong class="pkg">Browse</strong> was to provide better functionality for displaying two-dimensional arrays of data (e.g., character tables): moving through the data without loosing row and column labels, searching for text, displaying extra information, hiding information, allowing interactive user input, ...</p>

<p>We wanted to achieve this by using the capabilities of the terminal emulations in which <strong class="pkg">GAP</strong> is running, and not by some external graphical user interface. For this we have chosen to use the widely available <code class="code">C</code>-library <code class="code">ncurses</code>, see <a href="chapBib.html#biBNCursesWeb">[NCu]</a>. It contains functions to find out terminal capabilities, to change properties of terminals, to place text, to handle several windows with overlapping, ... To use these functions the terminal is switched to a <em>visual mode</em> so that the display of the non-visual mode of your terminal in which <strong class="pkg">GAP</strong> is running is not clobbered.</p>

<p><strong class="pkg">Browse</strong> has now three levels of functionality:</p>


<dl>
<dt><strong class="Mark">A low level interface to <code class="code">ncurses</code></strong></dt>
<dd><p>This may be interesting for all kinds of applications which want to display text with some markup including colors, maybe in several windows, using the available capabilities of a terminal.</p>

</dd>
<dt><strong class="Mark">A medium level interface to a generic function <code class="func">NCurses.BrowseGeneric</code> (<a href="chap4.html#X85FC163D87FAFD12"><b>4.3-1</b></a>)</strong></dt>
<dd><p>This is for displaying two-dimensional arrays of data, handles labels for rows and columns, searching, sorting, binding keys to actions, ... If you want to implement such applications for further kinds of data, first look at the examples in Section <code class="func">BrowseData.IsBrowseTable</code> (<a href="chap4.html#X81007E2F8552523B"><b>4.2-3</b></a>), then check what can be copied from the examples in Chapter <a href="chap6.html#X178D4F8EA179405AF9"><b>6</b></a>, and consult the descriptions in Chapters <a href="chap4.html#X877E60DE17F53FDEC"><b>4</b></a> and <a href="chap5.html#X82DDDC1783B4CA30"><b>5</b></a>.</p>

</dd>
<dt><strong class="Mark">Applications of these interfaces</strong></dt>
<dd><p>We provide some applications of the <code class="code">ncurses</code> interface and of the generic <code class="func">NCurses.BrowseGeneric</code> (<a href="chap4.html#X85FC163D87FAFD12"><b>4.3-1</b></a>) function. These may be interesting for end users, and also as examples for programmers of further applications. This includes (of course) a method for browsing through character tables, functions for browsing through data collections, several games, and an interface for demos.</p>

</dd>
</dl>
<p>Users interested only in these applications should perhaps just try <code class="code">NCurses.Demo()</code>.</p>

<p><a id="X8389AD9217B74BA4A" name="X8389AD9217B74BA4A"></a></p>

<h4>1.2 <span class="Heading">Overview</span></h4>

<p><a id="X87A6D24784C21E54" name="X87A6D24784C21E54"></a></p>

<h5>1.2-1 <span class="Heading">The <code class="code">ncurses</code> interface</span></h5>

<p>Chapter <a href="chap2.html#X17E049B1185A56B30"><b>2</b></a> describes <strong class="pkg">GAP</strong>'s interface to the <code class="code">ncurses</code> <code class="code">C</code>-library. The imported <code class="code">C</code>-functions are shortly explained, but for further details we refer to the documentation of that library. There are also a few utility functions on <strong class="pkg">GAP</strong> level, such as <code class="func">NCurses.SetTerm</code> (<a href="chap2.html#X879D81B317A0A4E8F"><b>2.2-2</b></a>), which simplify the use of the library.</p>

<p>The concept of an <em>attribute line</em>, see <code class="func">NCurses.IsAttributeLine</code> (<a href="chap2.html#X81D1FC9217C455AEB"><b>2.2-3</b></a>), helps to deal with text with markup for its display in a terminal window.</p>

<p>This chapter is for users who want to write their own applications of <code class="code">ncurses</code>.</p>

<p><a id="X80C054D881502061" name="X80C054D881502061"></a></p>

<h5>1.2-2 <span class="Heading">Applications of 
<code class="code">ncurses</code></span></h5>

<p>In Chapter <a href="chap3.html#X17F3A63788200AB4F"><b>3</b></a> we describe some interactive applications of the <code class="code">ncurses</code> interface. For example, there is <code class="func">NCurses.Select</code> (<a href="chap3.html#X833D321E86528981"><b>3.1-2</b></a>) for asking a user to choose one or several of a given list of items. There is also a demo function <code class="func">NCurses.Demo</code> (<a href="chap3.html#X8681359F8064597B"><b>3.2-1</b></a>) which we use to demonstrate features of the <strong class="pkg">Browse</strong> package, but it may be interesting for other kinds of demos as well.</p>

<p><a id="X17CF47ACC83A95689" name="X17CF47ACC83A95689"></a></p>

<h5>1.2-3 <span class="Heading">The interface to browse two-dimensional arrays</span></h5>

<p>Chapters <a href="chap4.html#X877E60DE17F53FDEC"><b>4</b></a> and <a href="chap5.html#X82DDDC1783B4CA30"><b>5</b></a> describe the interface to a generic function <code class="func">NCurses.BrowseGeneric</code> (<a href="chap4.html#X85FC163D87FAFD12"><b>4.3-1</b></a>) which can be used for an interactive display of two-dimensional arrays of data. The first of these covers the basic functionality which may be sufficient for many applications and the second gives more technical details. With interactive display we mean that it is not only possible to scroll through the data, but one can search for strings, sort by rows or columns, select entries, bind arbitrary actions to keys and mouse events, ask for help, and more.</p>

<p><a id="X17A0055DE17A2C5DC9" name="X17A0055DE17A2C5DC9"></a></p>

<h5>1.2-4 <span class="Heading">Applications of the generic function
<code class="code">NCurses.BrowseGeneric</code></span></h5>

<p>In Chapter <a href="chap6.html#X178D4F8EA179405AF9"><b>6</b></a> we describe several applications which are using the generic <code class="func">NCurses.BrowseGeneric</code> (<a href="chap4.html#X85FC163D87FAFD12"><b>4.3-1</b></a>) interface introduced before. They are provided as prototype applications and so we include some implementation remarks in their documentation.</p>

<p>Users who just want to use these applications hopefully do not need to read this <strong class="pkg">Browse</strong> manual, all applications are coming with built-in help windows.</p>

<p>There are different kinds of applications. First, there are methods for browsing through character tables and tables of marks (our original motivation for this package). Then there are applications for browsing through data collections, e.g., the data available through the <strong class="pkg">AtlasRep</strong> package, the <strong class="pkg">GAP</strong> bibliography or the sections of the <strong class="pkg">GAP</strong> manuals. Finally, there are several games like Sam Loyd's fifteen puzzle (generalized), peg solitaire, and Sudoku (including functions to create new puzzles and to solve puzzles).</p>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap0.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap2.html">Next Chapter</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chapA.html">A</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>