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 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
|
<!DOCTYPE html>
<html>
<head>
<title>Multi-Entry Widgets for IP Addresses</title>
<meta name="Author" content="Csaba Nemethi">
<meta name="Keywords" content="mentry, widget, IP address">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body>
<div>
<h1>Multi-Entry Widgets for IP Addresses</h1>
<h2>For Mentry Version 4.3</h2>
<h3>by</h3>
<h2>Csaba Nemethi</h2>
<address>
<a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
</address>
</div>
<hr>
<h2 id="contents">Contents</h2>
<ul>
<li><a href="#ipAddrMentry">The <code><b>mentry::ipAddrMentry</b></code>
Command</a></li>
<li><a href="#putIPAddr">The <code><b>mentry::putIPAddr</b></code>
Command</a></li>
<li><a href="#getIPAddr">The <code><b>mentry::getIPAddr</b></code>
Command</a></li>
</ul>
<div>
<p><a href="index.html">Start page</a></p>
</div>
<hr>
<h2 id="ipAddrMentry">The <code><b>mentry::ipAddrMentry</b></code>
Command</h2>
<dl>
<dt><b>NAME</b></dt>
<dd><code>mentry::ipAddrMentry</code> – Create and manipulate mentry
widgets for IP addresses</dd>
<dt class="tm"><b>SYNOPSIS</b></dt>
<dd>
<pre>
<b>mentry::ipAddrMentry</b> <i>pathName</i> ?<i>options</i>?
</pre>
</dd>
<dt><b>DESCRIPTION</b></dt>
<dd>This command creates a new mentry widget <code><i>pathName</i></code>
for displaying and editing IP addresses in the standard dotted-decimal
notation. 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.</dd>
<dd class="tm">The command sets the <code><b>type</b></code> attribute of
the widget to the value <code>"IPAddr"</code> and returns the name of the
newly created widget.</dd>
<dt class="tm"><b>DEFAULT BINDINGS</b></dt>
<dd>The <code><b>mentry::ipAddrMentry</b></code> command defines five new
keyboard bindings for the entry components of the mentry widget it
creates: The <code>Up</code> key increments the entry's value by 1 if
the latter is less than 255. Similarly, the <code>Down</code> key
decrements the entry's value by 1 if the latter is greater than 0.
The <code>Prior</code> key increments the entry's value by at most 10 if
the latter is less than 255. Similarly, the <code>Next</code> key
decrements the entry's value by at most 10 if the latter is greater than
0. If the entry is empty then all of these keys insert the value
<code>0</code> into the entry. Finally, <code>Control-v</code>
(<code>Command-v</code> on the Mac) pastes the current contents of the
clipboad into the mentry, provided that it is a valid IP address.</dd>
<dd class="tm">The actions performed by the <code>Up</code> and
<code>Down</code> keys can also be triggered with the aid of the mouse
wheel or a two-finger gesture on the touchpad. In addition, on Mac OS
X/11+ Aqua, the actions performed by the <code>Prior</code> and
<code>Next</code> keys are also triggered by the
<code><b><Option-MouseWheel></b></code> event. The same holds
true on all windowing systems if the Tk version is 8.7a4 or later, where
the <code><b>Option</b></code> modifier is bound to the <code>Option</code>
key on Mac OS X/11+ and to the <code>Alt</code> key on Windows and
X11.</dd>
<dt class="tm"><b>KEYWORDS</b></dt>
<dd>mentry, widget, IP address</dd>
</dl>
<div>
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2 id="putIPAddr">The <code><b>mentry::putIPAddr</b></code> Command</h2>
<dl>
<dt><b>NAME</b></dt>
<dd><code>mentry::putIPAddr</code> – Output an IP address to a mentry
of type <code>"IPAddr"</code></dd>
<dt class="tm"><b>SYNOPSIS</b></dt>
<dd>
<pre>
<b>mentry::putIPAddr</b> <i>address</i> <i>pathName</i>
</pre>
</dd>
<dt><b>DESCRIPTION</b></dt>
<dd>This command outputs the IP address <code><i>address</i></code> to the
mentry widget <code><i>pathName</i></code>, which must have been created
with the <code><b><a href=
"#ipAddrMentry">mentry::ipAddrMentry</a></b></code> command (this is
checked by examining the widget's <code><b>type</b></code> attribute, which
must have the value <code>"IPAddr"</code>).</dd>
<dd class="tm">The command generates an error if the address is
invalid.</dd>
<dt class="tm"><b>KEYWORDS</b></dt>
<dd>mentry, widget, IP address</dd>
</dl>
<div>
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2 id="getIPAddr">The <code><b>mentry::getIPAddr</b></code> Command</h2>
<dl>
<dt><b>NAME</b></dt>
<dd><code>mentry::getIPAddr</code> – Get an IP address from a mentry
of type <code>"IPAddr"</code></dd>
<dt class="tm"><b>SYNOPSIS</b></dt>
<dd>
<pre>
<b>mentry::getIPAddr</b> <i>pathName</i>
</pre>
</dd>
<dt><b>DESCRIPTION</b></dt>
<dd>This command returns the IP address contained in the mentry widget
<code><i>pathName</i></code>, which must have been created with the
<code><b><a href="#ipAddrMentry">mentry::ipAddrMentry</a></b></code>
command (this is checked by examining the widget's <code><b>type</b></code>
attribute, which must have the value <code>"IPAddr"</code>).</dd>
<dd class="tm">If any entry component of the widget is empty, the command
sets the focus to the first such entry, generates an error, and returns the
string <code>"EMPTY"</code>.</dd>
<dt class="tm"><b>KEYWORDS</b></dt>
<dd>mentry, widget, IP address</dd>
</dl>
<div>
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
</body>
</html>
|