Programming in XPCE/Prolog

# 1 Introduction

XPCE is an object-oriented library for building Graphical User Interfaces (GUI's) for symbolic or strongly typed languages. It provides high level GUI specification primitives and dynamic modification of the program to allow for rapid development of interfaces. It integrates a graphical tool for the specification of interfaces, in addition to powerful and uniform mechanisms to facilitate automatic generation of GUI's.

XPCE is not a programming language in the traditional sense. Language constructs and objects of the system do not have a direct textual representation. The interface to the `hosting' language defines what XPCE looks like from the programmers point of view. As a consequence, the programmer will first of all experience XPCE as a library.

XPCE however, does provide all semantic elements that can be found in many object-oriented programming languages: classes, objects, methods, instance-variables, inheritance, statements, conditions, iteration, etc.

All the above primitives are represented by first-class objects that may be created, modified, inspected and destroyed. This allows the programmer to extend the XPCE object-oriented system with new methods and classes from the host-language. In addition, procedures can be expressed as objects and then given to XPCE for execution.

The interface between XPCE and its hosting language is small, which makes XPCE especially a good GUI candidate for special-purpose languages.

The main target language for XPCE is Prolog and this document concentrates on XPCE/Prolog rather then XPCE/Lisp or XPCE/C++. XPCE/Prolog comes with a graphical programming environment that allows for quick browsing of the source-code, provides debugging tools and allows for the graphical construction of dialog boxes (graphical windows with controllers). XPCE's built-in editor is modelled after the standard (GNU-)Emacs editor and can be programmed in XPCE/Prolog .

## Section Index