next node: Tk,
prev node: Subsystem Tk,
up to node: Subsystem Tk


Tk

This structure provides a simple interface to the Tk library.

Signature of Tk

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 String
See Tcl
See Void

SIGNATURE Tk[state]

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

-- Version 1.1

SORT state

IMPORT  Tcl[state]              ONLY interpreter
        Void                    ONLY void
        Com[void]               ONLY com
        Option[denotation]      ONLY option

The function createApp extends the given interpreter by the Tk command set and creates a Tk main window. If the optional denotation is given, it specifies a screen to connect to. The third argument specifies the application name.

FUN createApp : interpreter ** option[denotation] ** denotation -> com[void]

The functions retain and submit suspend and resume the scheduling of Tk events. This may be useful to perform a sequence of Tk commands whose result should not become immediatly visible to the user (normally, inbetween the execution of each atomic command event scheduling is performed using Tk_DoOneEvent).

Both functions may be nested: event dispatching is retained unless the number of submit calls is equal to the number of retain calls.

FUN retain  : com[void]
FUN submit  : com[void]

The function update performs all outstanding Tk events.

FUN update   : com[void]

NB. Using this structure in an OPAL program enables a specific application execution model.

The top-level command is executed as the initialization of the application. After it has successfully terminated, the Tk event dispatcher and the OPAL agent scheduler are enabled.

Typically, the use of the top-level command is to construct resources and to spawn agents. For this purpose it may contain any calls to Tcl and Tk functions and calls to create OPAL agents and service access points. However, it must not rely on that Tk events are dispatched and that agent communication is scheduled: both is disabled during the execution of the top-level command.


next node: Tk,
prev node: Subsystem Tk,
up to node: Subsystem Tk