next node: MapEntryNE,
prev node: Distributor,
up to node: Subsystem Opal Window Additions


MapEntry

This structure provides an entry for the map data type. The elements of the map are displayed in two listboxes and may be edited.

Note that the columns may occasionally be off one index.

Signature of MapEntry

List of Import References :
See BOOL
See BTUnion
See Char
See Com
See DENOTATION
See Int
See Map
See Nat
See Option
See Pair
See ParserL
See Real
See Seq
See Set
See String
See Void
See WinConfig
See WinEvent
See WinInternal
See WinRegulator
See WinTclTk

SIGNATURE MapEntry[data1, <, data2, parse1, print1, parse2, print2]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

Parameters

IMPORT ParserL[data1] ONLY parser
       ParserL[data2] ONLY parser

SORT data1 data2
FUN < : data1 ** data1 -> bool

FUN parse1: parser[data1]
FUN print1: data1 -> denotation

FUN parse2: parser[data2]
FUN print2: data2 -> denotation

Imports

IMPORT Map[data1, <, data2] ONLY map
       Void ONLY void
       Com[void] ONLY com
       Com[map] ONLY com
       Com[mapEntry] ONLY com
       Pair[data1, data2] ONLY pair
       Nat ONLY nat
       Pair[nat, nat] ONLY pair
       Com[pair[data1, data2]] ONLY com

       WinConfig ONLY point
       WinInternal ONLY view:SORT config:SORT
       WinRegulator ONLY regulator:SORT
       WinEvent ONLY event:SORT eventInfo:SORT

The new sort and its constructors

SORT mapEntry

There are three versions available for mapEntries:

FUN defaultDim: pair[nat, nat]
FUN defaultConfig: config

Control for OpalWin

FUN view: mapEntry -> view
FUN regulator1: mapEntry -> regulator
FUN regulator2: mapEntry -> regulator

Accessing contents

Note: getXXX and upd fail, if text cannot be parsed as data.

set the displayed value (blocked until mapEntry is displayed!, spwan an agent to initialize the entry!

FUN set: mapEntry ** map[data1, <, data2] -> com[void]

get the displayed map or selected map

FUN get: mapEntry -> com[map[data1, <, data2]]
FUN getSelection: mapEntry -> com[map[data1, <, data2]]

get entry in line which contains point

FUN get: mapEntry ** point -> com[pair[data1, data2]]

update data as specified by function

FUN upd: mapEntry ** 
         (map[data1, <, data2] -> map[data1, <, data2]) -> com[void]

Binding Events

FUN bind: mapEntry ** event ** 
          (mapEntry ** eventInfo -> com[void]) -> com[void]
FUN bind: mapEntry ** event ** 
          (mapEntry ** eventInfo ** map -> com[void]) -> com[void]

Synchronize with Data Changes

Specify a command, which is called, whenever set or upd have been called. This may be repeated for different commands. Note that direct changes by the user do not trigger the command (but you could bind the return key to a similar command).

FUN sync: mapEntry ** (map -> com[void]) -> com[void]


next node: MapEntryNE,
prev node: Distributor,
up to node: Subsystem Opal Window Additions