177 lines
4.6 KiB
HTML
177 lines
4.6 KiB
HTML
<html>
|
|
<head>
|
|
<title>Multi-Entry Widgets for Real Numbers in Fixed-Point Format</title>
|
|
|
|
<meta name="Author" content="Csaba Nemethi">
|
|
<meta name="Keywords" content="mentry, widget, real number">
|
|
</head>
|
|
|
|
<body bgcolor=#ffffff>
|
|
<div align=center>
|
|
<h1>Multi-Entry Widgets for Real Numbers<br>
|
|
in Fixed-Point Format</h1>
|
|
|
|
<h3>by</h3>
|
|
|
|
<h2>Csaba Nemethi</h2>
|
|
|
|
<address>
|
|
<a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
|
|
</address>
|
|
</div>
|
|
|
|
|
|
<p><hr>
|
|
|
|
|
|
<a name="contents"></a>
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
<li><a href="#fixedPointMentry">The
|
|
<code><b>mentry::fixedPointMentry</b></code> Command</a>
|
|
<li><a href="#putReal">The <code><b>mentry::putReal</b></code> Command</a>
|
|
<li><a href="#getReal">The <code><b>mentry::getReal</b></code> Command</a>
|
|
</ul>
|
|
|
|
<div align=center>
|
|
<p><a href="index.html">Start page</a>
|
|
</div>
|
|
|
|
|
|
<p><hr>
|
|
|
|
|
|
<a name="fixedPointMentry"></a>
|
|
<h2>The <code><b><font size=5>mentry::fixedPointMentry</font></b></code>
|
|
Command</h2>
|
|
|
|
<dl>
|
|
<dt><b>NAME</b>
|
|
<dd><code>mentry::fixedPointMentry</code> - Create and manipulate mentry
|
|
widgets for real numbers in fixed-point format
|
|
|
|
<p>
|
|
<dt><b>SYNOPSIS</b>
|
|
<dd>
|
|
<pre>
|
|
<b>mentry::fixedPointMentry</b> <i>pathName count1 count2</i> ?<b>-comma</b>? ?<i>options</i>?
|
|
</pre>
|
|
|
|
<p>
|
|
<dt><b>DESCRIPTION</b>
|
|
<dd>This command creates a new mentry widget <code><i>pathName</i></code>
|
|
for displaying and editing real numbers in fixed-point format, with
|
|
<code><i>count1</i></code> characters before and
|
|
<code><i>count2</i></code> digits after the decimal point. Both
|
|
<code><i>count1</i></code> and <code><i>count2</i></code> must be
|
|
positive integers. The mentry will have two entry children,
|
|
separated by a label displaying a <code><b>"."</b></code> character by
|
|
default; the optional <code><b>-comma</b></code> switch changes the
|
|
label text to <code><b>","</b></code>. The supported
|
|
<code><i>options</i></code> are the same as in the case of the
|
|
<code><b><a href="mentryWidget.html">mentry::mentry</a></b></code>
|
|
command.
|
|
|
|
<p>
|
|
<dd>The command sets the <code><b>type</b></code> attribute of the widget
|
|
to the value <code>"FixedPoint"</code> and returns the name of the
|
|
newly created widget.
|
|
|
|
<p>
|
|
<dt><b>KEYWORDS</b>
|
|
<dd>mentry, widget, real number
|
|
</dl>
|
|
|
|
<div align=center>
|
|
<p><a href="#contents">Contents</a>
|
|
<a href="index.html">Start page</a>
|
|
</div>
|
|
|
|
|
|
<p><hr>
|
|
|
|
|
|
<a name="putReal"></a>
|
|
<h2>The <code><b><font size=5>mentry::putReal</font></b></code> Command</h2>
|
|
|
|
<dl>
|
|
<dt><b>NAME</b>
|
|
<dd><code>mentry::putReal</code> - Output a real number to a mentry of type
|
|
<code>"FixedPoint"</code>
|
|
|
|
<p>
|
|
<dt><b>SYNOPSIS</b>
|
|
<dd>
|
|
<pre>
|
|
<b>mentry::putReal</b> <i>number</i> <i>pathName</i>
|
|
</pre>
|
|
|
|
<p>
|
|
<dt><b>DESCRIPTION</b>
|
|
<dd>This command outputs the real number <code><i>number</i></code> to the
|
|
mentry widget <code><i>pathName</i></code>, which must have been
|
|
created with the <code><b><a href=
|
|
"#fixedPointMentry">mentry::fixedPointMentry</a></b></code> command
|
|
(this is checked by examining the widget's <code><b>type</b></code>
|
|
attribute, which must have the value <code>"FixedPoint"</code>).
|
|
|
|
<p>
|
|
<dd>The command generates an error if the number does not fit into the
|
|
widget because it has too many characters before the decimal point.
|
|
|
|
<p>
|
|
<dt><b>KEYWORDS</b>
|
|
<dd>mentry, widget, real number
|
|
</dl>
|
|
|
|
<div align=center>
|
|
<p><a href="#contents">Contents</a>
|
|
<a href="index.html">Start page</a>
|
|
</div>
|
|
|
|
|
|
<p><hr>
|
|
|
|
|
|
<a name="getReal"></a>
|
|
<h2>The <code><b><font size=5>mentry::getReal</font></b></code> Command</h2>
|
|
|
|
<dl>
|
|
<dt><b>NAME</b>
|
|
<dd><code>mentry::getReal</code> - Get a real number from a mentry of type
|
|
<code>"FixedPoint"</code>
|
|
|
|
<p>
|
|
<dt><b>SYNOPSIS</b>
|
|
<dd>
|
|
<pre>
|
|
<b>mentry::getReal</b> <i>pathName</i>
|
|
</pre>
|
|
|
|
<p>
|
|
<dt><b>DESCRIPTION</b>
|
|
<dd>This command returns the number contained in the mentry widget
|
|
<code><i>pathName</i></code>, which must have been created with the
|
|
<code><b><a href=
|
|
"#fixedPointMentry">mentry::fixedPointMentry</a></b></code> command
|
|
(this is checked by examining the widget's <code><b>type</b></code>
|
|
attribute, which must have the value <code>"FixedPoint"</code>).
|
|
|
|
<p>
|
|
<dd>If both entry children of the widget are empty, the command sets the
|
|
focus to the first entry child, generates an error, and returns the
|
|
string <code>"EMPTY"</code>.
|
|
|
|
<p>
|
|
<dt><b>KEYWORDS</b>
|
|
<dd>mentry, widget, real number
|
|
</dl>
|
|
|
|
<div align=center>
|
|
<p><a href="#contents">Contents</a>
|
|
<a href="index.html">Start page</a>
|
|
</div>
|
|
</body>
|
|
</html>
|