Go to the first, previous, next, last section, table of contents.
Author(s): Montse Iglesias.
Version: 1.5#118 (2000/4/19, 18:13:43 CEST)
Version of last change: 1.5#73 (2000/3/19, 19:54:31 CET)
The
tcltk
library package is a bidirectional to the Tcl (pronounced Tickle) language and Tk toolkit. Tcl is an interpreter scripting language with many extensions packages, in particular the graphical interface toolkit Tk
- Library usage:
:- use_module(library(tcltk)).
- Exports:
- Predicates:
tcl_new/1
,
tcl_eval/3
,
tcl_delete/1
,
tcl_event/3
,
tk_event_loop/1
,
tk_new/2
,
tk_new/4
.
- Regular Types:
tclInterpreter/1
,
tclCommand/1
.
- Other modules used:
- System library modules:
tcltk/tcltk_low_level
,
write
,
strings
.
- REGTYPE: tclInterpreter/1:
-
Usage: tclInterpreter(I)
- Description:
I
is a reference to a Tcl interpreter.
- REGTYPE: tclCommand/1:
-
A Tcl command is specified as follows:
Command --> Atom { other than [] }
| Number
| chars(PrologString)
| write(Term)
| format(Fmt,Args)
| dq(Command)
| br(Command)
| sqb(Command)
| min(Command)
| ListOfCommands
ListOfCommands --> []
|[Command|ListOfCommands]
where:
- Atom
-
- Number
-
denote their printed representations.
- chars(PrologString)
-
denotes the string represented by PrologString (a list of character codes).
- write(Term)
-
denotes the string that is printed by the corresponding built-in pridicate.
- format(Term)
-
denotes the string that is printed by the corresponding built-in pridicate.
- dq(Command)
-
denotes the string specified by Command, enclosed in double quotes.
- br(Command)
-
denotes the string specified by Command, enclosed in braces.
- sqb(Command)
-
denotes the string specified by Command, enclosed in square brackets.
- min(Command)
-
denotes the string specified by Command, immediately preceded by a hyphen.
- ListOfCommands
-
denotes the strings denoted by each element, separated by spaces.
Usage: tclCommand(C)
- Description:
C
is a Tcl command.
- PREDICATE: tcl_new/1:
-
Usage: tcl_new(-(TclInterpreter))
- Description: Creates a new interpreter, initializes it, and returns a reference to it in
TclInterpreter
.
- Call and exit should be compatible with:
-(TclInterpreter)
is a reference to a Tcl interpreter.
(tcltk:tclInterpreter/1
)
- PREDICATE: tcl_eval/3:
-
Usage: tcl_eval(+TclInterpreter,+Command,-(Result))
- Description: Evaluates the commands and the result will be stored as a string in Result
- Call and exit should be compatible with:
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk:tclInterpreter/1
)
+Command
is a Tcl command.
(tcltk:tclCommand/1
)
-(Result)
is a string (a list of character codes).
(basic_props:string/1
)
- PREDICATE: tcl_delete/1:
-
Usage: tcl_delete(+TclInterpreter)
- Description: Deletes the interpreter in
TclInterpreter
and the memory used by it
- Call and exit should be compatible with:
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk:tclInterpreter/1
)
- PREDICATE: tcl_event/3:
-
Usage: tcl_event(+TclInterpreter,+Command,-(Events))
- Description: Do the receive non blocking of the event and terms will be stored from Tcl by the prolog_event command as a list of terms in Events.
- Call and exit should be compatible with:
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk:tclInterpreter/1
)
+Command
is a Tcl command.
(tcltk:tclCommand/1
)
-(Events)
is a list.
(basic_props:list/1
)
- PREDICATE: tk_event_loop/1:
-
No further documentation available for this predicate.
- PREDICATE: tk_new/2:
-
Usage: tk_new(+Options,-(TclInterpreter))
- Description: Performs basic Tcl and Tk initialization and creates the main window of a Tk application.Options is a list of optional elements according to :
- name
-
Sets the Tk application name. The application name will be displayed in the main window and is also used for communicating between applications in Tk. Default name is an empty string.
- display
-
Gives the name of the screen on which to create the main window. Default is normally determined by the DISPLAY environment variable.
- file
-
Open the sript file, commands will not be read from standard input and the execution returns back to Prolog only after all windows (and the interpreter) have been deleted.
- Call and exit should be compatible with:
+Options
is a list.
(basic_props:list/1
)
-(TclInterpreter)
is a reference to a Tcl interpreter.
(tcltk:tclInterpreter/1
)
- PREDICATE: tk_new/4:
-
No further documentation available for this predicate.
Go to the first, previous, next, last section, table of contents.