XPCE: the SWI-Prolog native GUI library


Feb 04, 2002 Together with SWI-Prolog, the XPCE library is now licensed under the LGPL, making it suitable for the generation of non-free software without a special license.

Nov 08, 2000 The The XPCE online reference manual both provides access to most of the material from the XPCE manual tools started by manpce/0, but also is an example of using XPCE as a web-server.


What is XPCE?

XPCE is a toolkit for developing graphical applications in Prolog and other interactive and dynamically typed languages. XPCE follows a rather unique approach of for developing GUI applications, which we will try to summarise using the points below.
Add object layer to Prolog
XPCE's kernel is a object-oriented engine that allows for the definition of methods in multiple languages. The built-in graphics are defined in C for speed as well as to define the platform-independence layer. Applications, as well as some application-oriented libraries are defined as XPCE-classes with their methods defined in Prolog.

Prolog-defined methods can receive arguments in native Prolog data, native Prolog data may be associated with XPCE instance-variables and XPCE errors are (selectively) mapped to Prolog exceptions. These features make XPCE a natural extension to your Prolog program.

High level of abstraction
XPCE's graphical layer provides a high abstraction level, hiding details on event-handling, redraw-management and layout management from the application programmer, while still providing access to the primitives to deal with exceptional cases.
Exploit rapid Prolog development cycle
Your XPCE classes are defined in Prolog and the methods run naturally in Prolog. This implies you can easily cross the border between your application and the GUI-code inside the tracer. It also implies you can modify source-code and recompile while your application is running.
Platform independent programs
XPCE/Prolog code is fully platform-independent, making it feasible to develop on your platform of choice and deliver on the platform of choice of your users. As SWI-Prolog saved-states are manchine-independent, applications can be delivered as a saved-state. Such states can be executed transparently using the development-environment to facilitate debugging or the runtime emulator for better speed and space-efficiency.

Links about motivation and impressions

Mailing list

There is a seperate mailinglist for XPCE specific issues. To post to the XPCE mailing list, send mail to xpce-users@science.uva.nl. Only registered users can post to this address. You can register to the XPCE mailing list by sending a plaintext mail to majordomo@science.uva.nl with the following body

subscribe xpce-users 

The XPCE mailing list is powered by Majordomo, which is controlled entirely using E-mail messages to majordomo@science.uva.nl. To get help, send a message to this address with a body that only contains the word help.

ManualDocumentation

For starters as well as for more experienced users who want to know how particular tasks are tackled using XPCE/Prolog, there is the XPCE UserGuide. This LaTeX maintained document is available as an online HTML document here. It is also available as PDF and HTML-tar-archive from the SWI-Prolog download page.

The reference documentation is available using a hypertext system defined in XPCE/Prolog. This tool exploits the XPCE-class descriptions as well as associated hypertext cards to provide various viewpoints and search mechanisms for browsing the reference material. The manual tools are started using the Prolog command manpce/0:

?- manpce.

Finally, the development tools and libraries form a rich set of examples. Just browse through them and then use the Visual Hierarchy Tool to locate the relevant source-code.

On Unix installations, the manpages xpce.1 and xpce-client.1 provide documentation on the command-line options of these commands.

search Search the SWI-Prolog site

The form below exploits Ht/Dig to search the SWI-Prolog site. The index is updated every sunday.

Search:

Match: Format: Restrict:


Home This page is maintained using the chpp macro language