This structure provides the gate of emitters.
List of Import References :
See BOOL
See BTUnion
See Char
See Com
See DENOTATION
See Int
See Nat
See Option
See Real
See Seq
See Set
See String
See Void
See WinConfig
See WinEvent
See WinInternal
See WinTclTk
SIGNATURE WinEmitter[data]
$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)
SORT data IMPORT Com[emitter] ONLY com Com[data] ONLY com Void ONLY void Com[void] ONLY com IMPORT WinInternal ONLY wconfig:SORT config:SORT WinEvent ONLY event:SORT
An emitter is just an asynchronous channel: each time it is triggered with a value it asynchronously throws out the given value.
SORT emitter FUN emitter : com[emitter] FUN emit : emitter ** data -> com[void] FUN await : emitter -> com[data]
An emitter may be attached to a view like a button via its configuration.
Each time the button is pressed, the emitter is triggered.
The configuration bind(E, X)
is equivalent to
bind'WinButton(emit(E, X))
.
FUN bind : emitter ** data -> config
An emitter may be also bound to an event associated with a view,
the window or the entire application.
The configuration bind(Event, E, X)
is equivalent to
bind'WinEvent(bind(Event, emit(E, X))
, and so on.
FUN bind : event ** emitter ** data -> config FUN bind : event ** emitter ** data -> wconfig FUN bind : event ** emitter ** data -> com[void]
next node: WinSelector,
prev node: WinMenu,
up to node: Subsystem Opal Windows