10 Programming techniques

This chapter is an assorted collection of techniques to programming problems that appear in many applications and for which support for generic solutions is present, but cannot easily be found using the online reference manual.


Section Index


10.1 Control-structure of XPCE/Prolog 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