Class lwh.keys
Object
|
+--lwh.keys
- class
lwh.keys
defines the host toolbar handling ("send-keys", "button bar").
Version:
- 2006-02-26 / JF
- 2006-03-04 / JF show rectangle, small block, big block
- 2006-11-22 / JF show cursor over generated buttons as well (but not over menus)
- 2008-03-10 / JF prepare for design mode
Author: j.fellner@logics.de
See:Defined in lwhkeys.js
Field Summary |
<static> <final> {Array_String} |
ids
holds the toolbar node ids corresponding to toolbar type. |
Constructor Summary |
lwh.keys
(<boolean> value)
getter/setter for displaying the toolbar (host keys).
|
Method Summary |
<static> Object
|
gen()
Generates HTML for showing the host sendkeys.
|
<static> boolean
|
type(<int> value)
int getter/setter for type of the toolbar (host keys).
|
ids
<static> <final> {Array_String} ids
holds the toolbar node ids corresponding to toolbar type.
lwh.keys
lwh.keys(<boolean> value)
getter/setter for displaying the toolbar (host keys).
If setter; Additionally adjusts the font size to the (new) window size.
The HTML elements containing the toolbar must be generated already.
Display depends on the current type of toolbar.
Parameters:
value
- optional:
if missing: simply returns the current display state;
if true: displays the current host keys;
else: disables display;
Returns:
{boolean} the current display state
Version: - 2006-02-26 / JF
- 2006-03-04 / JF show rectangle, small block, big block
- 2006-11-22 / JF show cursor over generated buttons as well (but not over menus)
- 2008-03-10 / JF prepare for design mode
Author: j.fellner@logics.de
See:
gen
<static> Object gen()
Generates HTML for showing the host sendkeys.
The sendkey definition is the String Array lwh.keys.arr;
from each entry a button will be generated:
- entry = name of a host key, e.g. "PF1"
generates description = entry, and code for calling lw.send
with this entry as host key name
- entry == ""
is ignored (may be used at the end of a list)
- entry == "|"
generates a line separator
- entry = " |" (or "html-text|")
generates html text only (a "button separator")
- entry contains a "|" character, e.g.
"HEX|lwv.bld.data(String.fromCharCode(parseInt(prompt('enter 2 hex digits'), 16)))"
generates description from first part (here: "HEX")
and code to eval the specified second part (here: code to send hex value to VT host)
Note: do not forget to "escape" the JavaScript Strings, such as
"Call2|lwv.key('\x1b2')"
, or 'Call3|lwv.key("\x1b3")'
.
The following is correct as well, but more complex:
"Call4|lwv.key(\"\x1b4\")"
, or 'Call5|lwv.key(\'\x1b5\')'
.
Note: the specified text must be HTML encoded text, such as "&snbsp;" instead of SPACE " "
Returns:
false if no sendkeys available; else: true
type
<static> boolean type(<int> value)
int getter/setter for type of the toolbar (host keys).
If setter: displays toolbar, depending on current state.
Parameters:
value
- optional:
if missing: simply returns the current type;
else: sets type: 0=top, 1=bottom, 2=left, 3=right
Version: - 2006-11-29 / JF added; updates to ajax, menus, prefs, objects, fontAdjust
Copyright © 2006-2012 by Logics Software GmbH
Documentation generated by
JSDoc on Mon Mar 3 17:24:18 2014