Previous: Housekeeping, Up: The Tcl/Tk Prolog Library [Contents][Index]
The functions provided by the SICStus Prolog Tcl/Tk library can be grouped in two ways: by function, and by package.
By function, we can group them like this:
tcl_new/1
create a Tcl interpreter
tcl_delete/1
remove a Tcl interpreter
tk_new/2
create a Tcl interpreter with Tk extensions
tcl_eval/3
evaluate a Tcl expression from Prolog
prolog
evaluate a Prolog expression from Tcl
tcl_event/3
evaluate a Tcl expression and return a Prolog queue event list
tk_next_event/[2,3]
pass control to Tk until a Prolog queue event happens and return the head of the queue
prolog_event
place a Prolog term on the Prolog event queue from Tcl
tk_do_one_event/[0,1]
pass control to Tk until one Tk event is serviced
tk_next_event/[2,3]
also services Tk events but returns when a Prolog queue event happens and returns the head of the queue
tk_main_loop/0
control passed to Tk until all windows in all Tcl/Tk interpreters are gone
tk_main_window/2
return reference to main in of a Tcl/Tk interpreter
tk_destroy_window/1
destroy a window or widget
tk_make_window_exist/1
force display of a window or widget
tk_num_main_windows/1
return a count of the total number of Tk main windows existing in the system
By package, we can group them like this:
tcl_new/1
create a Tcl interpreter
tcl_delete/1
remove a Tcl interpreter
tcl_eval/3
evaluate a Tcl expression from Prolog
tcl_event/3
evaluate a Tcl expression and return a Prolog event list
tk_new/2
create a Tcl interpreter with Tk extensions
tk_do_one_event/[0,1]
pass control to Tk until one Tk event is serviced
tk_next_event/[2,3]
also services Tk events but returns when a Prolog queue event happens and returns the head of the queue
tk_main_loop/0
control passed to Tk until all windows in all Tcl/Tk interpreters are gone
tk_main_window/2
return reference to main in of a Tcl/Tk interpreter
tk_destroy_window/1
destroy a window or widget
tk_make_window_exist/1
force display of a window or widget
tk_num_main_windows/1
return a count of the total number of Tk main windows existing in the system
prolog
evaluate a Prolog expression from Tcl
prolog_event
place a Prolog term on the Prolog event queue from Tcl
In the next section we will discuss how to use the
tcltk
library to build graphical user interfaces to Prolog applications.
More specifically we will discuss the ways in which cooperation
between Prolog and Tcl/Tk can be arranged: how to achieve them,
and their benefits.