The SWI-Prolog package xpce
provides the SWI-Prolog GUI capabilities. Part of it is a console window
that provides a menu, called Epilog. If Prolog is started using swipl-win,
it starts as a GUI application running the Prolog REPL loop in an Epilog
window. SWI-Prolog allows opening multiple such console windows, each
running the REPL loop in a new thread. New Epilog windows can be started
from several menus in the GUI as well as using the predicate epilog/0.
true
, act as application main window. In this case epilog/1
runs the main thread and returns after all windows have been closed.
Insert an item in the Epilog console menu. PopupName is the popup in
which to insert the item. Item is the name for the new item. If Item is
--
, a separator is inserted. Before is the name of
the item before which to insert the new item. If this is
,
the item is appended.
-
Goal is injected into the current terminal of the Epilog window. This implies that we assume that the console is waiting for the user. Eventually, we probably want a more flexible solution.
This predicate raises existence_error(epilog, Thread)
if
the (calling) thread has no attached Epilog window. Threads are started
in an Epilog window have the Prolog flag console_menu
set to true
.