Table of Contents
1
Introduction
1.1
Organisation of the XPCE documentation
1.2
Other sources of information
1.3
Language interfaces
1.4
Portability
1.4.1
Unix/X-windows
1.4.2
Win32 (Windows 95 and NT)
1.5
Look-and-feel
1.6
A brief history of (X)PCE
1.7
About this manual
1.8
Acknowledgements
2
Getting started
2.1
Starting
XPCE/P
rolog
2.2
Prolog ... and what?
2.2.1
Creating objects: new
2.2.2
Modifying object state: send
2.2.3
Querying objects: get
2.2.4
Removing objects: free
2.3
Optional arguments
2.4
Named arguments
2.5
Argument conversion
2.6
Send and get with more arguments
2.7
Notation
2.8
Example: show files in directory
2.9
Summary
3
Using the online manual
3.1
Overview
3.2
Notational conventions
3.2.1
Argument types
3.3
Guided tour
3.3.1
Class browser
3.3.1.1
The ClassBrowser dialog
3.3.1.2
Example queries to the classbrowser
3.3.1.3
Methods with special meaning
3.3.2
Reading cards
3.3.3
Search tool
3.3.4
Class hierarchy
3.4
Summary
4
Dialog (controller) windows
4.1
An example
4.2
Built-in dialog items
4.3
Layout in dialog windows
4.3.1
Practical usage and problems
4.4
Modal dialogs: prompting for answers
4.4.1
Example: a simple editor for multiple fonts
4.5
Editing attributes
4.5.1
Example: editing attributes of a graphical
5
Simple graphics
5.1
Graphical building blocks
5.1.1
Available primitive graphical objects
5.2
Compound graphicals
5.3
Connecting graphical objects
5.4
Constraints
5.5
Activating graphicals using the mouse
5.6
Summary
6
XPCE and Prolog
6.1
XPCE is not Prolog!
6.2
Dealing with Prolog data
6.2.1
Life-time of Prolog terms in XPCE
7
Defining classes
7.1
The class definition skeleton
7.1.1
Definition of the template elements
7.1.1.1
Syntax details
7.2
Accessing instance variables (slots)
7.3
Refining and redefining methods
7.3.1
General redefinitions
7.3.2
Redefinition in graphical classes
7.4
Handling default arguments
7.5
Advanced topics
7.5.1
More on type declarations
7.5.2
Methods with variable number of arguments
7.5.2.1
Using class templates
7.5.3
Implementation notes
8
Class Variables
8.1
Accessing Class Variables
8.2
Class variable and instance variables
8.3
The `Defaults' file
8.4
Class variables in User Defined Classes
9
Program resources
10
Programming techniques
10.1
Control-structure of
XPCE/P
rolog applications
10.1.1
Event-driven applications
10.1.1.1
Keeping control
10.1.2
XPCE and existing applications
10.2
Executable objects
10.2.1
Procedures
10.2.2
Functions
10.2.3
Example 1: Finding objects
10.2.4
Example 2: Internal behaviour of dialog window
10.3
Defining global named objects
10.3.1
Using directives
10.3.2
Inline testing
10.3.3
The `pce_global' directive
10.3.4
Global objects for recognisers
10.4
Using object references: ``Who's Who?''
10.4.1
Global named references
10.4.2
Using the prolog database
10.4.3
Using object-level attributes
10.4.4
Using window and graphical behaviour
10.4.5
Using user defined classes
10.4.6
Summary
10.5
Relating frames
10.5.1
Class application
10.5.2
Transient frames
10.5.3
Modal operation
10.6
Window layout in a frame
10.6.1
Windows sizes and automatic adjustment
10.6.2
Manipulating an open frame
10.7
Informing the user
10.7.1
Aim of the report mechanism
10.7.2
The report interface
10.7.2.1
Information types
10.7.3
Redefining report handling
10.7.4
Example
10.8
Errors
10.8.1
Handling errors in the application
10.8.2
Raising errors
10.8.3
Repairable errors
10.9
Specifying fonts
10.9.1
Physical fonts
10.9.1.1
Defining additional fonts
10.9.2
Logical fonts
10.10
Using images and cursors
10.10.1
Colour handling
10.10.1.1
Colour-mapped displays on MS-Windows
10.10.1.2
Colour-mapped displays on X11/Unix
10.10.2
Supported Image Formats
10.10.2.1
Creating XPM files
10.10.2.2
Using Images
10.11
Using hyper links to relate objects
10.11.1
Programming existence dependencies
10.11.2
Methods for handling hyper objects
10.11.2.1
Methods on class hyper
10.11.2.2
Methods on class object
10.12
User defined graphicals
10.12.1
(Re)defining the repaint method
10.12.2
Example-I: a window with a grid
10.12.3
Example-II: a shape with text
10.13
Printing from
XPCE
applications
10.13.1
Options for document generation
11
Commonly used libraries
11.1
Library ``find_file''
11.2
Showing help-balloons
11.3
Dialog support libraries
11.3.1
Reporting errors and warnings
11.3.2
Toolbar support
11.3.3
Example
11.4
Library ``pce_toc'': displaying hierarchies
11.5
Tabular layout
11.5.1
Using format
11.5.2
Using table using the ``tabular'' library
11.6
Plotting graphs and barcharts
11.6.1
Painting axis
11.6.2
Plotting graphs
11.6.3
Drawing barcharts using ``plot/barchart''
11.6.3.1
Class
bar
11.6.3.2
Class
bar_button_group
11.7
Multi-lingual applications
11.8
Drag and drop interface
11.8.1
Related methods
11.9
Playing WEB (HTTP) server
11.9.1
Class
httpd
11.10
Document rendering primitives
11.10.1
The rendering library
11.10.2
Predefined objects
11.10.3
Class and method reference
11.10.3.1
Class
vfont
11.10.3.2
Rendering actions
11.10.4
Using the ``doc/emit'' library
12
Development and debugging tools
12.1
Object-base consistency
12.2
Tracing methods
12.3
Breaking (spy) on methods
12.4
Visual hierarchy tool
12.5
Inspector tool
13
Bibliography
A
The dialog editor
A.1
Guided tour
A.1.1
Creating the target dialog window
A.1.2
Adding controls to the new window
A.1.3
Defining the layout
A.1.4
Specifying the behaviour
A.1.5
Generating source code
A.1.6
Linking the source code
A.1.7
Summary
A.2
Miscellaneous topics
A.2.1
Specifying callback to prolog
A.2.2
Advanced example of behaviour
A.2.3
Specifying conditional actions
A.2.4
Load and save formats
A.3
Status and problems
A.4
Summary and Conclusions
B
Notes on XPCE for MS-Windows
B.1
Currently unsupported features in the Win32 version
B.2
Interprocess communication, extensions and interaction
B.3
Accessing Windows Graphics Resources
B.4
Accessing Windows Colours
B.5
Accessing Windows Fonts
B.6
Accessing Windows Cursors
C
XPCE/P
rolog architecture
C.1
What is ``Object-Oriented''?
C.2
XPCE
's objects
C.2.1
Classes
C.3
Objects and integers
C.4
Delegation
C.5
Prolog
C.6
Executable objects
C.7
Summary
D
Interface predicate definition
D.1
Basic predicates
D.1.1
Portable declaration of required library predicates
D.2
Additional interface libraries
D.2.1
Library ``pce_util''
D.2.2
Library ``pce_debug''
D.2.3
Accessing the
XPCE
manual
E
Memory management
E.1
Lifetime of an object
E.2
Practical considerations
E.3
Memory usage of objects
F
Commonly encountered problems
G
Glossary
H
Class summary descriptions