next node: AEntryNE,
prev node: Subsystem Opal Window Additions,
up to node: Subsystem Opal Window Additions


AEntry

This structure provides an abstract entry for arbitrary data types, provided the user supplies a parse and a print function

Signature of AEntry

List of Import References :
See BOOL
See BTUnion
See Char
See Com
See DENOTATION
See Int
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 AEntry[data, parse, print]

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

Parameter

SORT data
FUN parse: parser[data]
FUN print: data -> denotation

IMPORT ParserL[data] ONLY parser:SORT

Imports

IMPORT Com[aEntry] ONLY com
       Com[void] ONLY com
       Com[data] ONLY com
       Void ONLY void
       WinRegulator ONLY regulator:SORT
       WinEvent ONLY event:SORT eventInfo:SORT
       WinInternal ONLY view:SORT config:SORT
       Nat ONLY nat

The new sort and its constructors

SORT aEntry

There are three versions available for aEntries:

The "long" versions can be used, if the representation is longer than the available space. A horizontal scroller is attached to the entry, otherwise there is no difference.

FUN aEntryLong: com[aEntry]
FUN aEntryLong: nat -> com[aEntry]
FUN aEntryLong: config -> com[aEntry]
 

FUN defaultDim: nat
FUN defaultConfig: config

Control for OpalWin

FUN view: aEntry -> view
FUN regulator: aEntry -> regulator

Accessing contents

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

set the displayed value (blocked until aEntry is displayed!, spawn an agent to initialize the entry!

FUN set: aEntry ** data -> com[void]

get the displayed value

FUN get: aEntry -> com[data]

update data as specified by function

FUN upd: aEntry ** (data -> data) -> com[void]

Binding Events

FUN bind: aEntry ** event ** 
          (aEntry ** eventInfo -> com[void]) -> com[void]
FUN bind: aEntry ** event ** 
          (aEntry ** eventInfo ** data -> 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: aEntry ** (data -> com[void]) -> com[void]


next node: AEntryNE,
prev node: Subsystem Opal Window Additions,
up to node: Subsystem Opal Window Additions