XPCE Reference Manual

A High Level X11 interface for Symbolic languages

Edition 3, for XPCE Version 4.9.4 June 1997

by Jan Wielemaker and Anjo Anjewierden

This edition 3 of the XPCE Reference manual covers the entire functionality of the system. All material described in this document should be consistent with the implementation.. Any feedback on errors that cannot easily be found by running spell is welcome: unclear descriptions, lacking relations, lacking information, suggestions for better organisation, etc. Please E-mail such suggestions to jan@swi.psy.uva.nl

Copyright \begin{matrix}c \\ ◯ \end{matrix} 1993-1995 University of Amsterdam

This is the 3-th edition of the XPCE-4 reference documentation. Typeset using Texinfo version 3.0. Texinfo generated using an XPCE/Prolog program from the online reference manual.

An electronic version of this manual is available using anonymous ftp to swi.psy.uva.nl (145.18.114.17), directory pub/xpce/doc/refman as TeX generated PostScript for a 300 DPI device.

Published by the Department of SWI University of Amsterdam Roetersstraat 15 1018 WB Amsterdam The Netherlands

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Cover art by Etienne Suvasa.

Chapter 1

Introduction

What is XPCE?

XPCE is an object-oriented symbolic environment indented to be used in cooperation with a symbolic language. The combination provides a hybrid environment with a small but powerful and transparent interface. Although PCE provides many general-purpose classes, it is primarily designed to implement user-interfaces.

The “PCE Project” was started in 1985 by Anjo Anjewierden. His aim was to develop a high-level UI environment for (C-)Prolog. The requirements for this environment came from the “Thermodynamics Coach” project in which Paul Kamsteeg used PCE/Prolog to implement the UI for a courseware system for thermodynamics. This system included a ‘scratch-pad’ that allowed the student to create structured drawings of component configurations. The application had to be able to analyse the drawing made by the student.

PCE has been redesigned and largely re-implemented on a SUN workstation using Quintus Prolog and later SWI-Prolog in the Esprit project P1098 (KADS). This project used PCE to implement a knowledge engineering workbench called Shelley. During this period PCE/Prolog has been used by various research groups to implement graphical interfaces for applications implemented in Prolog. Most of these interfaces stressed the use of direct-manipulation graphical interfaces. Feedback from these projects has made PCE generally useful and mature.

This document describes version 4 of PCE. Version 4 is a major release. PCE has been moved from SunView to the X-window platform. In the course of this the entire graphics and standard UI component library have been reorganised. The object-oriented infra-structure of PCE has been made available to the application programmer. Performance and memory management have been improved considerably.

The XPCE Reference Manual

This manual is a reference manual of XPCE. That is, all material in this manual is arranged such that finding the definitions of things already globally known to the user. If you are new to XPCE start with one of the introductions “Programming in XPCE/Prolog” or “Programming in XPCE/Lisp”. These documents provide an overview of the XPCE system and the language binding. They also contain a simple examples. After reading one of these manuals, “PceDraw” provides a big worked-out example explaining much of the misteries of programming a realistic application in XPCE/Prolog.

The “XPCE Reference Manual” is organised to help you find definitions from various viewpoints: the class, a method-name, the “functional group summary or the concept index.

Chapter 1: Introduction

This is a Generated Manual!

The “XPCE Reference Manual” is automatically generated from the online reference manual available to XPCE/Prolog using the predicate manpce/0 or manpce/1. The online manual is a hypertext system and does not impose any particular ordering of the material. This of course is not possible for a paper version. This manual is basically a sequence of automatically generated class descriptions. The order in which the classes appear and the connecting descriptions between them is defined in a set of template files.

To structure the behaviour of a class the notion of “functional group” has been introduced. Each method and variable of the system is assigned a functional group. The members of a functional group may span multiple classes. Methods and variables belong to a functional group either because they cooperate to realise some functionality or they perform similar functions. These groups are designed such that the set of members that belong to the same group and the same class is always small enough to overview quickly. This, together with the chapter “Summary of Functional Groups” provides quick access to related methods based on the function they perform.

There is a global list defining the order in which functional groups appear in a class description. The order in this list is based on the global notion of “common use”. As the group list is global for all classes, the order in which groups appear is the same for each class. Consistency is preferred over the few conflicts with the “common use” notion that result from this approach.

Structure of this Manual

Each chapter contains a number of related classes (Primitive Graphics, Text Manipulation, ...) and generally starts with a short description on the relation between the described classes. Thus description is followed by a full description of each class.

The description of a class consists of the inheritance path, possible delegations, an overview of the class, a summary of instance variables and finally a list of behaviour (instance variables, send- and get methods. Behaviour is grouped in “functional groups”. Members of a functional group either cooperate to achieve a single (functional) goal or perform conceptually related operations. The methods inside a functional group are ordered alphabetically.

At the end of this manual there are various indices.

(Re-)Generating this Manual

To regenerate this manual from the online documentation you need XPCE/Prolog and TeX-3. See

‘xpce/man/info’.

Chapter 2 Notation

This manual uses a number of symbols that are special to the XPCE documentation. Below is a summary of these constructs.

Behaviour references in running text

In running text, the following notation to reference behaviour, functions, etc. is used:

‘class →selector’ Send method ‘selector’ on class ‘Class’
‘class ←selector’ Get method ‘selector’ on class ‘Class’
‘class ↔selector’ Both the send- and the get method.
‘class -selector’  Non-accesible variable on class ‘Class’
→selector  Send method on ‘this’ class
←selector  Get method
↔selector  Both send-, and get method
-selector  Non-accesible variable
name/arity  Prolog predicate ‘name’ with ‘arity’
Pce.Class.selector Named X-resource (For your ∼/.Xdefaults)

Behaviour definition headers

A behaviour definition header describes a behaviour (variable, send- or get method) for the currently described class (mentioned at the top of the page). Each definition consists of a bold-printed name of the behaviour at the left margin and a type indication at the right margin. The description in between depends on the type of behaviour.

Variables

After the name follows the type (see below), the access between brackets (-: none, ←: get, →: send or ↔: send and get). If there is a X-resource defined for the variable (which implies the user may change the default in his/her ~/.Xdefaults file) this is notated as:

    [Pce.Class.selector: default]

Where ‘default’ describes the default in the format it should appear in your ~/.Xdefaults file.

The exact syntax and semantics of a type declaraction is specified with class type. Below is a short summary:

Type ...  Zero or more of these arguments

Chapter 2: Notation

Type1|Type2  Disjunction (either of the types)
Type*  The type or the constant @nil
[Type]  The type or @default (optional argument)
{Name1,Name2} One of these names
int  An integer (the only non-object datum)
3..5  An integer 3 <= value <= 5
3.2..5.6  A real (float) in this range

Send Method

After the name follows a list of arguments. The arguments are separated by commas. Each argument is either of the form ‘argument-type’ or of the form ‘argument-name=argument-type’. Arguments of the first type may only be specified by their position. Arguments of the second type may also be specified as (for example):

    send(Area, set, y := 6)

Get Method

After the list follows a list of argument as with the send method, followed by ‘⇒Return Type’.

Chapter 3

Displays, Windows and Frames

An X-window created by PCE consists of a ‘frame’ and a collection of ‘tiled’ (i.e. non-overlapping) windows. Class frame handles the communication with the X-window manager (twm, olwm, mmw, etc.).

A PCE window is an X-subwindow of the X-mainwindow owned by the frame. PCE windows may not overlap. The spatial relation between PCE windows is expressed in the terms as ‘above’, ‘below’, ‘left’ and ‘right’. Their relative sizes are expressed in terms of an ‘ideal’ size and a merit for stretching and shrinking. The layout of windows in a frame is maintained by tile objects.

The general window defines the management of graphical objects. Class picture is very similar to class window. It is designed as a general purpose graphics window with scrollbars. Class dialog is a window specialised for displaying dialog item objects (menus, buttons, text-entry-fields, etc.), although dialog windows can also display normal graphical objects. Class dialog and friends are described in a seperate chapter. Class view and browser define window-versions of the classes editor (EMACS-like text editor) and list browser (browser for a (long) list of objects).

A window may be ‘decorated’ using scroll-bars and/or a label. In that case the window is wrapped in a window decorator object. The user seldomly needs to be aware of this object as class window delegates all messages concerning decorations to its ←decoration.

Class display represents an X screen. Normally there is only a single instance (@display) which represents the default display from the Unix DISPLAY environment variable. Class display is seldomly used directly by the user. It may be used to obtain information on the dimensions of the X-screen or the selection and the PCE frames on it. PCE allows for multiple displays on different X-screen’s. The class display manager with its single instance @display manager represents the collection of available displays. It also defines some methods for controlling low-level event handling.

Although the classes tile and scroll bar may be used outside the context of frames they are described here as they are so commonly used in the context of frames and windows.

3.1 Class frame — Collection of tiled windows

Inheritance: ⇒ frame ⇒ visual ⇒ object

A ‘frame’ is a collection of ‘windows’. Class frame is responsible for communication to the X window manager and the layout of the associated frames.

Two types of windows are supported: windows that are visible to the window manager and windows that are not. The first is the default. The second is normally used for confirmer (or popup) windows; windows that require immediate attention by the user and are removed from the display before the application continues.

The windows in a frame are ‘tiled’. This implies together they cover the entire area of the frame and they are not allowed to overlap. Management of the tile relation is done by a ‘tile’ object associated with the frame.

Any window needs a frame before it can be opened. For simple applications the user does not need to know about frames as frames are automatically created by windows when necessary. Windows delegate all messages they don’t understand to their associated frames.

Applications build using user-defined classes may wish to create sub-classes of class frame. This manual tool is an example. The various tools are subclass of man frame, which in turn is a subclass of frame. Class man frame implements the generic communication with the overall manual tool.

The set of windows in a frame and their spatial relationships may be changed after the frame has been opened.

Instance Variables

name

name ↔ name Name of the frame

label

label ← name Label of the frame

icon

icon image  ← image*  Image used for the iconic representation
icon label  - name*  Label in the iconic representation
icon position  ← point*  Position of the iconic image

transient

transient for  ← frame*  Frame I’m transient for (i.e. support for)
transients  ← chain*  Back pointer for transient frames

window manager

wm protocols ← sheet Protocol-name -→ message

appearance

background  ← colour|pixmap  Background of the frame
border  ← [int]  Width of border
colour map  ← [colour map]*  Colourmap for the window’s frame
kind  ← {toplevel,transient,popup}  Tool, support or popup

area

area  ← area  Area of the opened frame on the display
geometry  - name*  X-window geometry specification

visibility status ← {unmapped,hidden,iconic, window,full screen}

Current visibility of the frame

permission

can delete  ↔ bool  Frame can be deleted by user
confirm done  ↔ bool  Ask confirmation on user-delete

event

input focus ← bool Frame has focus for keyboard events

modal

modal  ← {application,transient}*  Operate as modal window
return value  - any  Bin for value of →return

organisation

application  ← application*  Application the frame belongs too
display  ↔ display  Display the frame resides on
members  - chain  Windows in the frame

window system

ws ref  - alien:WsRef  Window-System reference

internal

destroying - bool Handle destruction gracefully

wm protocols attached ← bool

Have we registered the protocols

Behaviour

3.1.1 Oms — Object management operations

Get Method convert window=window ⇒frame Refinement of: object<-convert Converts a window to its containing frame. Useful for methods expecting a frame argument.

Send Method initialise label=[name], kind=[{toplevel,transient,popup}],

display=[display], application=[application]

Send Method initialise label=[name], kind=[{toplevel,transient,popup}],

display=[display], application=[application] Refinement of: object->initialise Create a frame object from its ←label, ←kind and ←display. Note that frames are often created as a side-effect of creating windows.

Send Method unlink

Refinement of: object->unlink Removes frame and all member windows. Possible transient windows related to this window are send a →free message.

3.1.2 Conversion — Conversion (for type checking)

Get Method image [{bitmap,pixmap}] ⇒image Image with the pixels of the frame. See also ‘display←image’.

3.1.3 Name — Naming objects

Variable name name (↔)

Name of the frame

3.1.4 Label — Visible name of objects

Send Method label label=name, icon label=[name] Set the label of the frame. The first argument is the label of the frame itself, while the second argument is the label of the icon (see also →icon label). Whether and how these labels are displayed is defined by the X-window manager.^{1}

Variable label name (←)

Label of the frame

1 The icon-name can only be set after the frame is created. It’s value is ignored if the frame is not yet created.

3.1.5 Icon — Iconising Frames

Get Method closed ⇒bool

Whether or not the frame is opened (@off) or displayed as an icon (@on).

Send Method closed open=bool The X-window system identifies three different states: normal, zoomed and iconic. This method may be used to change the state to ‘normal’ (using ‘Frame →closed: @on’) or iconic (using ‘Frame →closed: @off’).^{2}

Send Method icon image=image, icon label=[name] Sets the image and optionally the the label for the iconic representation of the frame. See also →icon label and →label.

Variable icon image image* (←) [Pce.Frame.icon image: @pce image] Image object used for the iconic representation of the frame. Whether and how the icon is displayed is determined by the X window manager.

Get Method icon label ⇒name

Text displayed with the iconic representation. If the variable ‘icon label’ equals @nil, this is the value of ‘frame ←label’. Otherwise it is the value of the ‘icon label’ variable.

Variable icon label name* (-) [Pce.Frame.icon label: @nil]

Send Method icon label name*

Label for the iconic representation. When @nil, this is the same as ‘frame ←label’. When using the TWM window manager this value is displayed in the Icon Manager of TWM.

Get Method icon position ⇒point* Variable icon position point* (←) Send Method icon position point*

Position of the icon relative to the top-left corner of the display.

3.1.6 Open — Making objects visible

Send Method create Send Method create

Creates the X-counterpart of the window. It performs the following steps:

1. If the frame is already created, succeed immediately

2. Obtain remaining resources (‘object →obtain resources’)

3. Open the display if this has not been done

4. Append itself to ‘display ←frames’

5. invoke ‘frame→fit’ to fix the layout of the subwindows

6. Create the realising X-widget

7. Send →create to all member windows

2 Considering the three states recognised by the window system (and may other window systems), a boolean method is not appropriate.

8. Make the widgets of the windows part of the frame’s widget

9. Realise the X-widget

10. Update the cursor for all windows

11. Inform the window manager about ‘transient’ relations

12. If a geometry is specified, invoke ‘frame →geometry’

Send Method mapped bool=bool This method is called whenever the frame receives a MapNotify or UnMapNotify event from X. These events are generated by the X-server when the frame has been mapped on the display or removed from it.

Frames can be mapped by the user (using window-manager functionality) or by the method →show, which is also called by →open.

When the frame has transient windows, these are sent a →show: bool.

Send Method open position=[point], grab=[bool], normalise=[bool] Send Method open position=[point], grab=[bool], normalise=[bool]

Open frame at specified position, optionally grabbing the pointer focus. It performs the following steps:

1. If the frame is not created, invoke ‘frame →create’

2. If point is specified, invoke ‘frame →set’ with the specified X- and Y-coordinate.

3. Invoke ‘frame →status: window’,

To open a frame immediately in full-screen mode, create the window and then invoke:

    send(Frame, status, full_screen)

Send Method open centered center=[point], grab=[bool] Similar to ‘frame →open’, but centers the frame around point. If ‘center’ is omitted the frame is centered on the X-screen.

Send Method uncreate

Destroy window-system counterpart

Send Method wait Send Method wait

Dispatch events until the frame object has been mapped on the display, and the system has received a repaint request on all of the windows in the frame.

This call should be used to force a window to become visible on the screen during an ongoing computation. See also →flush and →synchronise. The implementation is very similar to ‘frame ←confirm’.

3.1.7 Transient — Support windows (e.g. prompters)

Send Method transient for frame*

Indicate PCE that this frame is only a support frame for the argument. This declaration has the following effects:

• Inform window-manager The window manager is informed using the XSetTransientForHint about this relation. Though defined, most window-managers seem to ignore this declaration.

• Destruction, mapped, exposed, hidden When the main window is destroyed/mapped, exposed or hidden, the same action will be executed on it’s transient windows.

3

Variable transient for frame* (←)

Frame for which this window is a transient. May only be filled if this frame has ↔kind ‘transient’.

Variable transients chain* (←)

Chain with transient frames. This chain is updated by the methods →transient for and →unlink. It is used by mapped, exposed and hidden to inform the transient windows of a state-change in the main window.

3.1.8 WindowManager — Interaction with the X-window manager

Send Method delete wm protocol protocol=name

Delete an X window manager protocol attached with →wm protocol.

Send Method done message action=code Send Method done message action=code

Trap window manager request to delete this window. See ‘frame →wm protocols’.

Send Method save message action=code Send Method save message action=code

Trap window manager request to save the data associated with this window. See ‘frame →wm protocols’.

Send Method wm delete Send Method wm delete

Invoked by the default →done message. When the user requests to delete the window from the window manager. Performs the following steps:

1. If ←can delete equals @off, return failure

2. If ←confirm done == @on, issue ‘display →confirm: ‘Delete window “%s”’, frame←name Fails if action is canceled by the user

3. invokes ‘frame →destroy’ to the frame

Send Method wm protocol protocol=name, action=code Send Method wm protocol protocol=name, action=code

Register an X window manager protocol with specified name. The consequence of this is highly dependent on the X-implementation and notably the X window manager used. An intuitive way to describe it is the following:

3 At least when running with twm, PCE fails to get the X-notifications telling the frame has been exposed/hidden.

    Tell the window manager (or any other X-application) that
    this frame is prepared to handle `WM_PROTOCOLS' client
    events.  If such an event is received, execute `code'.

When the frame receives a ‘ClientMessage’ event of ‘message type’ WM PROTOCOLS, it searches the sheet ‘frame ←wm protocols’ with the protocol name specified in the X-event. When found it will execute ‘code’ with the following arguments:

@Receiver The frame
@arg1  The first window of the frame.

The X11 documentation describes the following standard messages:

WM SAVE YOURSELF Save contents of window
WM DELETE WINDOW Delete this window

These are understood by the ‘TWM’ window manager. Other window manager may define more (or other) requests.

Variable wm protocols sheet (←)

Sheet mapping names of WM PROTOCOL requests listened to on code objects executed if such a protocol request is received.

3.1.9 Behaviour — Definition of behaviour

Get Method contained in ⇒display Get Method contained in ⇒display

Equivalent to ‘frame ←display’.

Get Method contains ⇒chain

Chain with all member windows. Equivalent to ‘frame ←members’.

Send Method convert old slot slot=name, value=any Convert old ‘show’ slot

Send Method initialise new slot var=variable

Refinement of: object->initialise new slot Part of saved-object conversion (see ‘file ←object’). Called when -while loading an instance from a file-, the current definition of the class has a new instance variable (compared to when the instance was saved to file using →save in file). The argument is the new variable object from the class. May be used to initialise the new slot to some sensible value.

Send Method reset

Refinement of: visual->reset This method sends →reset to all visual objects it contains (recursively). ‘Visual →reset’ is automatically invoked from the host-language after an abort to the hostlanguage toplevel. Various subclasses of visual implement this method to reset parameters such as status, event-focus, etc.

3.1.10 Animate — Behavariour to support animation

Send Method flush

Invokes ‘display→flush’ on the associated display.

Send Method synchronise

Invokes ‘display →synchronise’ on its associated display, updating the display immediately and handling all pending events from the X-server.

3.1.11 Appearance — “Look-and-feel” related aspects

Variable background colour|pixmap (←) [Pce.Frame.background: @ dialog bg] Send Method background colour|pixmap

Background of the frame

Send Method border thickness=int Issue a geometry request to the X window manager to change the border width of the frame. This may or may not be honoured by the manager. The actual value of the border may be read from ‘frame ←border’.

Variable border [int] (←)

Width of the surrounding border. This value is updated if the border changes by trapping the X ‘ConfigureNotify’ events.

Variable colour map [colour map]* (←) Send Method colour map [colour map]*

Colour map object used for the frame itself and all child windows. The values:

• @nil Use the displays default colour map. For Win32 systems, this implies only the 20 ‘static’ colours are available.

• @default Use the colour map from ‘display ←colour map’. This is the default on Windows systems.

• A colour map object Use this specific colour map object.

Send Method kind {toplevel,transient,popup} PCE supports three kinds of frames. As far as PCE itself is concerned there is no difference between these kinds. The types are made known to the window manager and the exact difference on the screen therefore depends on the window manager used.

The available ‘kinds’ are:

• toplevel Normal application toplevel window. By most window managers shown with a titlebar indicating the label of the frame. Normally toplevel windows can be closed (iconised) and resized through the window manager. This is the default ↔kind.

• transient Transient frames are used for (temporary) frames, normally holding a dialog box. ‘Frame →transient’ may be used to indicate the window manager for which frame this frame is a transient.

• popup Popup frames are completely invisible to the window manager. They are normally used for quick confirmers and popup-menu’s. On various window managers, popup frames will normally not see keyboard input. Use transient frames if you want the user to be able to type in the window.

The ‘kind’ of a frame cannot be changed after it has been created.

Variable kind {toplevel,transient,popup} (←)

Current setting of →kind.

Send Method show label show=bool

Alternative for ‘Frame →kind’. ‘Frame →show label: @on’ is equivalent to ‘Frame →kind: toplevel’ and ‘Frame →show label: @off’ is equivalent to ‘Frame →kind: transient’.

Compatibility only. New code should use ‘Frame →kind’.

3.1.12 Layout — Spatial relations between graphical objects

Send Method fit Send Method fit

(Re)computes the layout of its subwindows and resizes the frame to fit the tiled subwindows. It performs the following steps:

• invoke ‘tile →enforce: @off’ on the root-tile of the frame

• Invoke → compute desired size on all subwindows Currently only defined on class dialog: it recomputes the layout of the dialog and requests the dialog to resize.

• Invoke ‘tile →enforce: @on’ on the root-tile of the frame

• Invoke ‘frame →set’ with the computed ideal width and ideal height of the root-tile.

‘Frame →fit’ is normally called from ‘frame →create’. Users may wish to call this method after a ‘window →size’ or after modifying a dialog window that is part of this frame.

Send Method resize

Recompute layout of sub-windows

Get Method tile ⇒tile

Each window of the frame has an associated tile object that negotiates its size and position with the other windows and the frame. These tile objects are organised on a hierarchy. This method finds the root of this hierarchy.

3.1.13 Area — Handling size and position

Send Method area area=area Invokes ‘frame →set: area?x, area?y, area?w, area?h’, defining the area of the frame on the display.

Variable area area (←)

Area of the opened frame. Note that this reflects the area of the frame’s X-widget itself. The ‘decorations’ attached by the X-window manager (label and border) are not included in this area.

This variable is automatically updated if the area is changed by trapping the X ‘ConfigureNotify’ events. If the area has changed, the frame will recompute the layout of all its subwindows (which will cause ‘window →resize message’ to be called for windows that change size).

Send Method center center=[point] Center frame around point. This method only produces the expected result if the frame has already been created.

Get Method geometry ⇒name

Variable geometry name* (-) [Pce.Frame.geometry: @nil] The value of this variable is either @default, or a name representing an X geometry specification. It is filled by →initialise if the class of the frame has a geometry resource defined or by ‘frame →geometry’. It is used by ‘frame→create’ to realise the requested geometry.

Class frame itself does not have a geometry resource, which implies the default position of the frame is determined by its contents and the default position by the X window manager.

The geometry resource is often attached to subclasses of frame that represent applications. In this case the user may define the geometry of the application in ~/.Xdefaults.

For the definition of an X geometry specification see →geometry..

Send Method geometry name*

Parses the named X-geometry specification and adapts the frame accordingly if it has already been opened. An X-geometry specification is of the form

    <width>x<height>[+-]<X>[+-]<Y>

Where any of these 4 parts may be omitted. Negative ‘X’ or ‘Y’ values take the other right/bottom edge of the frame relative to the right/bottom edge of the screen. Example:

    400x200+0-0

Tells the frame to be 400x200 pixels and be located exactly in the bottom-left corner.

Send Method height height=int Equivalent to ‘frame →set: @default, @default, @default, Height’.

Send Method move position=point Send Method position position=point Send Method position position=point

Position the top-left corner of the frame relative to the screen. Equivalent to ‘frame →set’ with the X- and Y-coordinates of the point.

Get Method position ⇒point

Position of ‘frame ←area’: top-left corner of the frame on the display.

Send Method set x=[int], y=[int], width=[int], height=[int] If the frame is not created, the ‘frame ←area’ variable is filled. Else ‘frame →set’ makes a request to the X window manager to modify the specified X-, Y-, W- and Hparameters. Whether or not this request is honoured and whether or not the resulting values are exactly those requested depends on the window manager.

Get Method size ⇒size

Size of ‘frame ←area’: size of the frame on the display.

Send Method size size=size Invokes ‘frame →set’ with specified width and height.

Send Method width width=int Invoke ‘frame →set’ with specified width.

Send Method x x=int Invoke ‘frame →set’ with specified X.

Send Method y x=int Invoke ‘frame →set’ with specified Y.

3.1.14 Stacking — Overlapping frames and graphicals

Send Method expose Send Method expose

Raise a frame to the top of the window stack on the display. ‘Frame →expose’ first invokes ‘Frame →closed: @off’ to open the frame when it is closed.

Send Method exposed

Invoked when the window received a ‘CirculateNotify’ event from X, informing the frame that it has been exposed. Sends →expose to all frames registered as ‘transient’ frames for this frame.

May be redefined.

Send Method hidden

Similar to →exposed when the frame is hidden below the other windows.

Send Method hide Send Method hide

Requests the window manager to put this frame below all other windows on the display.

3.1.15 Visibility — Making object (in-)visible

Get Method show ⇒bool

@on iff ←status = open; @off otherwise

Send Method show show=bool (Un)show the frame on the display

Variable status {unmapped,hidden,iconic,window,full screen} (←) Send Method status {unmapped,hidden,iconic,window,full screen,open}

Current status of a frame. Meaning:

• unmapped The frame has no counterpart in the Window Environment (i.e. it just exists as an XPCE object).

• hidden The Window Environment counterpart is not visible; neither as an icon, nor as an open window. This status is normally used to preserve a window for later reusage.

• iconic The Window Environment counterpart is visible as an icon.

• window (same as open) The Window Environment counterpart is fully visible. A window is normally brought in this state using →open.

• full screen The frame is shown in maximized mode, occupying the whole screen. To open a window initially in this state, create the window and then use the →status method, instead of →open.

See also →open, ←confirm and →wait. The methods →show and →closed are mapped to this method for compatibility reasons.

3.1.16 Permission — Access rights

Variable can delete bool (↔)

When @off, the frame cannot be deleted by a WM DELETE WINDOW request (a request from the X window manager to delete this window, normally issued from a menu at the decoration of the frame.

Variable confirm done bool (↔) [Pce.Frame.confirm done: @off] When @on, a prompter is displayed when an attempt is made to delete the window from the window manager.

When the user deletes the window through the window manager this invokes ‘frame →wm delete’, which behaviour depends on the ↔can delete and ↔confirm done variables.

Applicable to toplevel frames only.

3.1.17 Event — Event processing

Send Method busy cursor cursor=[cursor]*, block input=[bool] Define a temporary cursor for all (sub)windows of this frame. The default cursor is the X11 ‘watch’ cursor. If ‘block input’ is @on, all mouse and keyboard events are blocked while this cursor is active.

→busy cursor: @nil restores the original cursor and makes all windows sensitive again.

Implemented using the -busy window. See also ‘display →busy cursor’.

Send Method cursor [cursor] Define the cursor for the frame-background. Used by →event to provide feedback for subwindow resizing. See also →busy cursor.

Send Method event event=event This method is called to handle methods arriving on the background or decorations of the frame. The default implementation handles two cases:

• If the event is a keyboard related event, and a subwindow has the →input focus, forward the keyboard event to this window.

• If the pointer is on the border between two subwindows, indicate the possibility to resize these. Perform the resizing when the user drags the border with any of the mouse-buttons.

Send Method grab pointer grab=bool, cursor=[cursor] If grab is @on, forward all pointer events to the →event method of this frame and show the given cursor. →grab pointer: @off is used to resume normal event processing. Used to implement subwindow resizing as realised by the default →event implementation. See also ‘window →grab pointer’, →cursor and ‘display→grab server’.

Variable input focus bool (←) Send Method input focus bool=bool

When @on, the frame is in focus for the keyboard. This method is invoked from the window interface whenever the keyboard switches to/from this frame.

When changed to @on, the method will invoke ‘window→input focus’ on ←keyboard focus or the window that currently has the pointer (mouse). When changed to @off, the window that has ‘window ←input focus: @on’ (if any) will be sent ‘window →input focus: @off’.

See also →keyboard focus and →input window.

3.1.18 Accelerator — Binding the keyboard

Send Method typed event id=event id Dispatch over available windows

3.1.19 Report — Reporting events, status and errors

Send Method bell volume=[int] Rings the bell on the display on which the frame is displayed.

Send Method report {status,inform,progress,done,warning,error},

format=[char array], argument=any ...

Send Method report {status,inform,progress,done,warning,error},

format=[char array], argument=any ... Refinement of: visual->report A frame is a collection of windows. Many frames have one window (usually a dialog object) that is used to give commands or print feedback messages.

This method is a redefinition of ‘visual →report’. It performs the following actions:

1. Invoke ←report to. If this succeeds and returns a value not equal to ‘frame ←display’, invoke →report on this value.

2. Invoke →report on each of the ←members windows until it succeeds. Windows by default delegate the →report message to their frame. This method provides for detecting and breaking loops.

3. If the frame is a transient frame, invoke →report on ←transient for.

4. Invoke →report of super-class (class visual).

3.1.20 Focus — Focussing events to objects

Send Method input window window=window All keyboard input arriving on this frame will be redirected to the indicated window. This is appropriate if there is only one window with keyboard-sensitive controls inside the frame.

Get Method keyboard focus ⇒window

Window for default keyboard input

Send Method keyboard focus [window]*

When assigned to a window, all keyboard input arriving at any window in this frame will be directed to this window. The argument window does not need to be a ←member of the frame.

When set to @nil or @default, keyboard input will follow the pointer (mouse).

3.1.21 Modal — Event sub-loops: modal windows

Get Method confirm position=[point], grab=[bool], normalise=[bool] ⇒any Get Method confirm position=[point], grab=[bool], normalise=[bool] ⇒any

Opens the frame if this has not been done and block until ‘frame →return’ is invoked. This method is used when the applications wants to wait for input from the user, notably prompters for arguments such as filenames, names, etc.

‘Point’ is the position to open the frame. If ‘Bool’ equals @on all input will be directed to this frame. When @off (default), other windows may still receive input too.

‘frame ←confirm’ is closely connected to ‘frame →return: any’. Without the latter, the frame will block infinitely. The frame normally contains one or more buttons that invoke →return.

If the frame is →free’d while the confirmer is running, this method will return failure.

Example:

         ask_name(Name) :-
             new(D, dialog('Name Prompter')),
             send(D, append, new(N, text_item(name, ''))),
             send(D, append,
                  button(ok, message(D, return, N?selection))),
             send(D, append,
                  button(cancel, message(D, return, @nil))),
             send(D, default_button, ok),
             get(D, confirm, Answer),
             send(D, destroy),
             Answer \== @nil,
             Name = Answer.

Get Method confirm centered center=[point], grab=[bool] ⇒any Get Method confirm centered center=[point], grab=[bool] ⇒any

Similar the ‘frame ←confirm’, but makes ‘point’ the center of the frame rather than the top-left corner. When ‘point’ equals @default, the frame is centered on the screen.

Variable modal {application,transient}* (←) Send Method modal {application,transient}*

Operate as modal window

Send Method return any=any Send Method return any=any

Make the blocking ‘frame ←confirm’ call return with the specified argument.

Sets ‘frame -return value’ to the argument and ‘frame -has returned’ to @on.

Variable return value any (-)

Bin for value of →return

3.1.22 Organisation — Organisation of (graphical) objects

Send Method append subwindow=window Send Method append subwindow=window

Append a window to the frame. The method is commonly used when multiple windows are combined in an instance of some subclass of frame.

The following example illustrates this:

         :- pce_begin_class(mail, frame, "Simple mail tool").

    initialise(M) :→
        "Create mail tool"::
        send(M, send_super, initialise, mail),
        /* append the various parts to the tool */.
        send(M, append, new(B, browser)),
        send(M, append, new(V, view)),
        send(M, append, new(D, dialog)),
        /* specify the layout of the parts in the tool */
        send(V, below, B),
        send(D, below, V),
        ...

Send Method application application* Changes the application object this frame belongs too. Combining multiple frame objects in an application allows for finding frames as well as defining modal relations between frames. See ‘frame→modal’.

The application to which a frame belongs may be changed at any time. Using the @nil argument, to frame is detached from any application.

This method invokes ‘application →delete’ to the application currently holding the frame (if any) and ‘application →append’ to the application receiving the frame.

Variable application application* (←)

Application the frame belongs too

Get Method catch all window name=name ⇒window If ‘name’ is of the from <wndow name> member this method will return the corresponding window:

    ?- new(@f, frame),
       send(@f, append, new(V, view)),
       send(new(D, dialog), below, V),
       send(V, open).
    ?- send(@f?view_member, format, 'Hello World\n').

See also ‘device ←catch all’ and ←member.

Send Method delete member:window Delete window from the frame

Variable display display (↔)

Display on which the frame resides. Changing after the frame has been created is not allowed.

Get Method frame ⇒frame

Equivalent to ←self. Implemented to find the frame from both the frame, its member windows and all graphicals displayed therein with the same selector.

Get Method member name=name ⇒window Find (first) window with specified name. Automatically searches for the undecorated window.

Get Method members ⇒chain

Variable members chain (-)

Chain of windows that are member of this frame. The variable -members holds a chain consisting of plain windows and windows decorated by a window decorator object. The method ←members returns a chain holding the undecorated windows.

3.1.23 Postscript — Generating PostScript for printing

Send Method postscript

Used by ‘frame ←postscript’. This method should not be invoked directly by the programmer.

Get Method bounding box ⇒area

This method attempts to determine the area of the display occupied by this frame and its decorations. As the decorations area owned and managed by the window manager, the result is not guaranteed. It is tested with the ‘twm’ window manager.

Get Method postscript landscape=[bool], scale in=[area] ⇒string Get Method postscript landscape=[bool], scale in=[area] ⇒string

Create a PostScript description of the area of the display where this frame is displayed. The frame should be opened on the display and not obscured by any other frame (see ‘frame →expose’).

The arguments are described with ‘graphical ←postscript’

3.1.24 WindowSystem — Connection to the underlying window system

Variable ws ref alien:WsRef (-)

Window-System reference

3.1.25 Internal — Private behaviour

Variable destroying bool (-)

Internal flag to properly execute the two-stage destruction-process of frames.

Variable wm protocols attached bool (←)

@on if the protocols have been registered with the X-counterpart.

3.2 Class window — Interface between X-window and device

Inheritance: ⇒ window ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: frame (frame*), tile (tile*), decoration (window decorator*)

A window is a subwindow of a frame object. It appears on the screen as a rectangular area inside a frame. It defines an infinite two-dimensional drawing plane of which a rectangular sub-area is ←visible. A window optionally has →scrollbars attached that allows the user to move the visible rectangle over the infinite plane.

Class window takes care of the communication with a frame and the X-window window it uses for it’s graphical representation.

As defined in class device, a window can display graphical objects (i.e. instances of one of the subclasses of graphical). There are several kinds of windows:

• picture Normally used for representing drawings or diagrams. Can contain all types of graphical objects. By default has scrollbars.

• dialog Normally used for defining dialog boxes. Normally contains instances of one of the subclasses of ‘dialog item’. Does automatic layout. By defaults no scrollbars.

• browser Displays a single list browser to examine a list of objects.

• view Displays a single editor to edit/browse a text.

Instance Variables

appearance

background  ← colour|pixmap  Background colour or pattern
decoration  ← window decorator*  Window displaying me and my decorations

selection feedback ← {invert,handles,

colour}|elevation|colour*

How ←selected graphicals are visualised

layout

tile - tile* Tile that manages my area

resize

resize message ← code* Executed after window has resized

area

bounding box - area Union of graphicals

menu

popup ↔ popup* Popup-menu of the window

cursor

focus cursor ← cursor* Cursor while there is a focus

event

current event  ← event*  Event being processed now
has pointer  ↔ bool  If @on, pointer (mouse) is in window
sensitive  ↔ bool  Window accepts events

focus

focus  ← graphical*  Graphical in focus
focus button  ← [button name]*  Button that should terminate focus
focus event  ← event*  ←current event when →focus was set
focus recogniser  ← recogniser*  Recogniser in focus
input focus  ← bool  Window has input focus
keyboard focus  ← graphical*  Graphical in focus of keyboard events

organisation

device  ← device*  Device I’m displayed on
frame  - frame*  Frame the window is member of

repaint

changes data - alien:UpdateArea Summary info for redraw

window system

ws ref - alien:WsRef Window-System reference

internal

displayed cursor  - cursor*  Currently displayed cursor
scroll offset  - point  How much the window is scrolled

Behaviour

3.2.1 Oms — Object management operations

Send Method initialise label=[name], size=[size], display=[display] Refinement of: object->initialise Create a window object from its label, size and the display on which is has to be displayed.

This will create a default frame for this window. When two windows are related using ‘window →above’, ‘window→below’, ‘window→left’ or ‘window→right’, both windows will be made part of the same frame. The frame of the receiver of the ‘window →above’, etc. method will be destroyed and this window will be made part of the frame of the argument window.

Send Method unlink Send Method unlink

Refinement of: object->unlink In addition to ‘device →unlink’, this method takes care of the ←decoration and the associated X-resources.

3.2.2 Conversion — Conversion (for type checking)

Get Method convert graphical=graphical ⇒window Refinement of: graphical<-convert Convert a graphical to it’s window using ‘graphical ←window’. Simplifies activating methods that accept a window as argument.

3.2.3 Delegate — Delegation of behaviour

Send Method catch all name=name, unchecked ...

Handle delegation to ←decoration, ←frame and ←tile while these slots are not yet filled. If the selector is found on any of these classes, the corresponding object is associated to the window and the message is delegated. This implementation ensures that messages like ‘window decorator →scrollbars’, ‘frame →kind’ and ‘tile →hor stretch’ may always be send directly to the window.

3.2.4 Open — Making objects visible

Send Method create [window] Send Method create [window]

‘Window →create’ creates the X-counterpart of the frame and all other windows part of this frame. ‘window →create’ is a no-op when the window is already created.

This method may be used to create a window without immediately opening it at the X-display. This method may be redefined, but it should be aware that it might be called more then once.

Send Method open [point], normalise=[bool] Send Method open [point], normalise=[bool]

When not created, invokes ‘window→create’ to create the X-counterpart and then opens it on the X-display with the top-left corner or the frame at the specified location.

Send Method open centered [point]

Equivalent to ‘window →open’, but the frame is centered around the given point.

Send Method uncreate

Destroy associated X-window structure. This method is used internally when a window is deleted from another window or its frame.

3.2.5 Behaviour — Definition of behaviour

Get Method contained in ⇒frame|device Implements ‘visual ←contained in’ for class window. Windows are always contained in a frame.

Send Method destroy

Destroys the associated window. See ‘visual →destroy’ for details.

Send Method free

‘window →free’ causes the entire frame and possible other windows that are part of the frame to be freed.

If a window is just to be deleted from its ←frame use ‘frame →delete’.

Send Method move point=point Class window redefines the inherited placement methods of class device to be equivalent to those of class graphical again. Class device defines the position to be the origin of the coordinate system, while the position of a window is the position of the top-left corner as with class graphical.

Send Method x int=int Refinement of: device->x Set the X-coordinate of the origin. See ‘Device →move’

Send Method y int=int Refinement of: device->y Set the Y-coordinate of the origin. See ‘Device →move’

3.2.6 Animate — Behavariour to support animation

Send Method flush Send Method flush

Refinement of: graphical->flush Updates all graphicals in this window and flushes the connection to the X-server (see ‘display →flush’).

3.2.7 Appearance — “Look-and-feel” related aspects

Send Method background colour|pixmap Colour of the drawing plane. Changing the colour will force a redraw.

Variable background colour|pixmap (←) [Pce.Window.background: white] Background colour of the window.

Send Method colour [colour|pixmap] Refinement of: graphical->colour Set the default colour for all graphicals displayed on this window: each graphical that has its colour set to @default will be displayed in the colour specified. If the window is displayed, it will be redrawn.

Send Method decorate area=[{grow,shrink}], left margin=[int], right margin=[int],

top margin=[int], bottom margin=[int], decorator=[window] Attach a window decorator object to this window for displaying scroll bar objects or a label. This method is used by ‘window decorator →initialise’.

Variable decoration window decorator* (←)

Window displaying me and my decorations. This slot will normally contain an instance of class window decorator.

Get Method foreground ⇒colour

Equivalent to ←colour.

Send Method foreground colour=colour Refinement of: device->foreground The foreground colour of a device determines the colour used to draw member graphicals that have ←colour not equal to @default. ‘Device →foreground’ is equivalent to ‘Graphical →colour’.

Send Method pen 0..

Refinement of: graphical->pen Thickness of the line surrounding the window.

Variable selection feedback {invert,handles,colour}|elevation|colour* (←)

[Pce.Window.selection feedback: when(@colour display, colour, invert)]

Send Method selection feedback {invert,handles,colour}|elevation|colour* The value of this variable determines how graphicals with ←selected: @on are visualised. Values:

• invert Paint the graphical and then invert the area inside the bounding box of the graphical object. Suitable for monochrome displays or colour windows using a white background and black foreground on most servers.

• handles Paint inverted blobs at positions defined by the resource Pce.Graphical.selection handles. Used in PceDraw.

• an elevation object Paint the graphical and then elevate the bounding box according the the elevation object. Only suitable for colour windows with a non-white background. Using a light-grey background is a good choice.

• a colour object Ignore the ‘graphical ←colour’ attribute, drawing the graphical using the colour specified here. Suitable on colour devices only. Using a light-grey or otherwise coloured ‘window ←background’ generally improves the result.

See also ‘graphical →paint selected’ and Pce.Graphical.selection handles.

3.2.8 Layout — Spatial relations between graphical objects

Send Method compute desired size Send Method compute desired size

This method is invoked by class frame to as part of ‘frame →fit’. It allows the window to resize itself to fit with its contents. By default this method is only active for class dialog.

This method may be redefined.

Send Method above window|tile Part of the definition of the layout of windows inside a frame. Requests the receiver to be placed above the argument window.

If the receiver window is not already part of the same frame as the argument window it will be made part of this frame. Thus method may be used after one or both windows have been created.

Send Method below window|tile Send Method below window|tile

Refinement of: graphical->below Similar to →above, but rhe receiver is placed below the argument.

Send Method left window|tile Similar to →above, but rhe receiver is placed left of the argument.

Send Method right window|tile Refinement of: graphical->right Similar to →above, but rhe receiver is placed right of the argument.

Get Method tile ⇒tile

Variable tile tile* (-)

Tile associated with this window. The associated tile negotiates the layout of windows in the frame with the frame and finally dictates the size and position of the window.

3.2.9 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Send Method geometry x=[int], y=[int], width=[int], height=[int]

Refinement of: graphical->geometry Traps the →set, →size, →position and other methods to manipulate the geometry that are inherited from class graphical. It sets the ‘←display area’ of the window.

Note that the size and position of a window is dictated by its associated ←tile. To change the layout of windows in a frame, please examine the behaviour defined on class tile. Windows delegate to their tile.

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Send Method request geometry x=[int], y=[int], width=[int], height=[int]

Refinement of: graphical->request geometry Invoked internally from ‘graphical →set’, which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Invokes →geometry to change the ←area. The indirection →request geometry ==> →geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.

Send Method resize message code*

Set the variable ←resize message and executes it if the window has already been created. Arguments:

@receiver: The WIndow
@arg1  Same as @receiver
@arg2  Size object reflecting the new size

Variable resize message code* (←)

The message is executed after the window has been resized by its frame. It allows the programmer to reorganise the contents of the frame such that they better fit the new size. The arguments are:

@receiver The window
@arg1  The window
@arg2  New size of the window

This message is always sent when the associated frame is created.

Resizing a window may also be specified by redefining the →geometry method. See also ←visible.

3.2.10 Area — Handling size and position

The basic area management of a window is inherited from class graphical and class device (→set, →geometry, etc.). Manipulating the area in this sence is used by class tile to position the window on its ←frame.

Only the methods →size, →height and →width may be used to manipulate the area of the window. These methods determine the actual drawing area of the window (i.e. the requested value is enlarged with the dimensions of the ←border and possible scrollbars).

The method ←visible may be used to query the visible part (viewport) of the window. The method ←area is inherited from class device and thus returns the bounding box of all displayed ←graphicals.

Get Method bounding box ⇒area Variable bounding box area (-)

Union of graphicals in this window in the coordinate system of the window.

Send Method position point=point Refinement of: device->position Move graphical such that ←x and ←y match the x- and y-coordinates of the argument point. Invokes ‘graphical →set’.

Synonym for ‘graphical →move’.

Send Method resize Send Method resize

Refinement of: device->resize Resize the member graphicals of the device in X and Y direction. See ‘Graphical →resize’ for details on the parameters.

Get Method visible ⇒area Get Method visible ⇒area

New area object reflecting the visible area of the drawing plane. The ←position of this area is the coordinate of the top-left corner of the window. Its value is initially (0,0), but may be changed if the window is scrolled. The ←size is the size of the visible area of the drawing plane.

3.2.11 Scroll — Controlling the ‘viewport’

Send Method bubble scroll bar scroll bar=scroll bar Update bubble of given scroll bar object. Called by ‘scroll bar →compute’.

Send Method changed union ox=int, oy=int, ow=int, oh=int Send Method changed union ox=int, oy=int, ow=int, oh=int

Refinement of: device->changed union This method is invoked from class ‘device’ when the union of all graphicals has changed. Used to update the scrollbars accordingly.

Send Method normalise area|graphical|chain Try to make ‘object’ visible by scrolling the window. Object is either an area, a graphical or a chain of graphicals. The area that is made visible is the area itself, the area of the graphical or the union of the areas of the graphicals in the chain.

If it is not possible to make the entire area visible, it is ensured the top-left corner of the area is visible.

Send Method scroll horizontal {forwards,backwards,goto}, {page,file,line},

int=int Traps a scroll-request from the horizontal scrollbar. See class scroll bar for details.

Send Method scroll to point=point Point is in the coordinate system of the graphicals displayed in the window. Makes this point the top-left corner of the window. Windows can scroll both the positive and negative coordinates. See also ←visible.

Send Method scroll vertical {forwards,backwards,goto}, {page,file,line}, int=int Trap scroll-request from vertical scroll bar.

3.2.12 Stacking — Overlapping frames and graphicals

Send Method expose

Refinement of: graphical->expose Exposes (take to the front) the frame of the window on its screen. Invokes ‘frame →expose’.

Send Method hide

Refinement of: graphical->hide Hides (put at the back) the frame of the window on its screen. Redefines ‘graphical →hide’.

3.2.13 Visibility — Making object (in-)visible

Send Method displayed bool=bool

Refinement of: graphical->displayed If @off, the graphical will not be displayed even if it is member of a device. The initial value is @off. It is set to @on by ‘device →display’ an @off by ‘device →erase’.

‘Graphical →displayed’ is used to remove a graphical temporary from the display. See also ‘figure →status’.

3.2.14 Update — Update Dependant properties

Send Method compute Send Method compute

Refinement of: device->compute Send →compute to all members of -recompute, next recomputes the ←format if requested by -bad format and finally recomputes the ←area (bounding box) requested by -bad bounding box.

3.2.15 Menu — Associating (Popup) menus

Variable popup popup* (↔)

Popup menu associated with this window. It is activated through the global object @ popup gesture when all other attempts to handle the button-event have failed. See ‘window →event’.

3.2.16 Cursor — Image of the pointer (mouse) cursor

Get Method displayed cursor ⇒cursor*

Currently visible cursor. This attribute is computed dynamically. The actually displayed cursor of a window is:

• If there is a focus and a ↔focus cursor: the ↔focus cursor

• If there is a focus and the object in focus has a ↔cursor the cursor of the object in focus

• If the mouse is a a graphical with a cursor: the cursor of the most local and exposed graphical with a cursor defined.

• In all other cases the ↔cursor of the window.

Send Method focus cursor cursor*

Changes the ←focus cursor variable and displayed cursor if the window has ↔focus not equal to @nil. The cursor is automatically reset if the focus of the window is set to @nil. This method is often used by gestures to change the cursor while the gesture is active.

Variable focus cursor cursor* (←)

When not @nil and ←focus is not @nil, this cursor will be displayed.

3.2.17 Event — Event processing

Variable current event event* (←)

Event that is currently being processed by this window or @nil if this window is not processing any events. This variable is managed by ‘window →event’.

This is not necessarily the same as @event. Consider the case were the window has opened a popup. In this case ‘window ←current event’ will point to the event that caused the popup to open (generally an ms right down event), while @event will point to the various events that are processed during the opened state of the popup window.

Send Method event event=event Send Method event event=event

Refinement of: graphical->event Process an X-event. This method is normally invoked from the X-callback function called by the X ‘intrinsic’ layer. It may also be called from ‘event→post’ when events are forwarded to other windows. It performs the following steps:

1. If ‘window ←sensitive’ equals @off, return failure

2. Set ‘window ←current event’ to this event

3. Determine objects entered and left and generate ‘area enter’, ‘area exit’ or ‘area cancel’ events for them.

4. Check for ‘display ←inspect handlers’ and process them

5. If there is a ←keyboard focus and the event is a keyboard related event, →post it to the object in focus

6. If there is a ←focus, post the event to this focus. If the event is a button-up-event with the same button as ←focus button, release the event-focus.

7. Invoke the device’s →event method. If this fails, check whether there is a ↔popup associated with the window and the event is suitable to be handled by this popup. If so, send it to the popup.

8) If nothing worked and the event is a keyboard event, invoke →typed with the ‘event←id’ of the event. 9) Update the cursor according to the changed status 10) reset ←current event to @nil.

This method succeeds if one of the event-postings succeeds and fails otherwise.

Send Method grab keyboard bool=bool

When @on, all typing (anywhere on the display) is forwarded to this window.

Handle this method with care: if the window does not allow you to release the keyboard focus again, your screen is stuck. If this is the case:

• Try to delete the window using the mouse.

• Do remote-login from another machine on the network (if you have any) and kill the PCE process.

• If you don’t have a network, you probably have to reboot your entire system.

Send Method grab pointer bool=bool

If @on is specified, all subsequent events will be reported as if they happened on this window. @off should be used to resume normal event-processing.

The normal XPCE event-processing ensures the window in which a mouse-down event occurrs grabs the pointer until the mouse-button is released (see also class gesture).

Be careful using this method as it is easy to lock the screen if the application ‘hangs’ before processing the →grab pointer: @off message. If this happens on a networked Unix machine, you may kill the XPCE process from another terminal.

Variable has pointer bool (↔)

If @on, pointer (mouse) is in window. The method is invoked from →event and may be redefined, but should always invoke the primary implementation.

Variable sensitive bool (↔)

Determines whether or not the window is sensitive for events. When @off, all events are ignored. Rarely used.

3.2.18 Accelerator — Binding the keyboard

Send Method typed event id=event id, delegate=[bool] Handle accelerator bindings. This method is normally invoked from →event if no graphical object in the window accepted the typed key. The window will forward the typed key to the frame using ‘frame →typed.’ The frame in turn will check for another window (generally a dialog object) that is capable of handling the typed key.

If delegate = @on (as invoked from →event) it invokes →typed on ←frame.

3.2.19 Report — Reporting events, status and errors

Send Method flash area=[area], time=[int] Refinement of: graphical->flash Flashes the window by temporary inverting it. Normally, applications should invoke ‘graphical →alert’, which depending on the setting of the resource ‘visual bell’ will either ring the bell or flash the object.

3.2.20 Focus — Focussing events to objects

Send Method focus graphical*, [recogniser]*, [cursor]*, [name]* Send Method focus graphical*, [recogniser]*, [cursor]*, [name]*

Forward events arriving on this window to some graphical. This method is normally used only by class gesture to process all events starting with a mouse-down and ending with the mouse-up of the same mouse-button.

‘Graphical’ is the graphical object in focus. If ‘Recogniser’ is not @nil, events are given to this particular recogniser object. If ‘Cursor’ is not @nil, the cursor is set to this value until the focus is released. The ‘Name’ argument indicates the button that initiated the focus. If a button-up event is received of this button, the focus will be released automatically. If the value is @nil, the focus remains active until a new ‘Window →focus’ message is received.

Variable focus graphical* (←)

Graphical object in focus of events. When not @nil, events will be sent to this graphical. When ←focus recogniser too is not @nil the event will be posted to this recogniser only.

Note that keyboard events will be send to the ←keyboard focus when this is not @nil.

Variable focus button [button name]* (←)

When a focus is set (←focus is not @nil), this focus remains active until a button-up-event is received with this button. When @nil, the focus remains set till it is explicitly cleared.

Variable focus event event* (←)

←current event when →focus was set

Variable focus recogniser recogniser* (←)

When not @nil and ←focus is not @nil, events are given to this recogniser object.

Variable input focus bool (←) Send Method input focus bool=bool

When @on, this window is the window receiving keyboard input. See also ‘frame →input focus’. When modified, and the ←keyboard focus is not @nil, the method will generate either an activate keyboard focus or a deactivate keyboard focus event to ←keyboard focus.

Variable keyboard focus graphical* (←) Send Method keyboard focus graphical*

Graphical object in the window to which keyboard events should be posted. When @nil, keyboard events are dispatched the same way as pointer events.

A graphical getting the keyboard focus will be sent an ‘obtain keyboard focus’ event. Graphicals loosing the keyboard focus will be sent a ‘release keybaord focus’ event.

3.2.21 Modal — Event sub-loops: modal windows

Get Method confirm position=[point], grab=[bool], normalise=[bool] ⇒any Creates the window and then invokes ‘frame ←confirm’ on its frame.

Get Method confirm centered center=[point], grab=[bool] ⇒any Similar to ‘window ←confirm’, but centers the frame of the window around the given position instead of putting the top-left corner at the given position.

3.2.22 Pointer — Pointer related methods

Send Method pointer point=point Send Method pointer point=point

Refinement of: graphical->pointer Move the pointer to the indicated position, which is in the same coordinate system as the graphicals displayed in the window. The pointer needs not be in the window, nor need the indicated coordinate be inside the window.

This method should be used with care. Users tend not to like jumping mice. It is generally better to place a UI component close to the pointer location (see ‘event ←position’) than to place the UI component far away and jump the pointer towards it.

Class resize gesture uses it to position the pointer exactly on the border of a graphical if it was depressed close to it.

3.2.23 Organisation — Organisation of (graphical) objects

Send Method device device* Refinement of: graphical->device Display window on device, take care of ←decoration

Variable device device* (←)

Device I’m displayed on

Get Method frame create=[bool] ⇒frame Variable frame frame* (-)

Frame of which the window is a member. Note that windows always have a frame, but the frame to which a window is associated may change before the window is created when multiple windows are combined in one frame. See ‘window →above’.

Send Method reparent

Refinement of: device->reparent Called from PCE graphics kernel if something has changed to the ←device organisation up in the ←device hierarchy. This general method performs the following:

• Updates ‘device ←level’ to reflect the distance to the ‘top-most’ graphical device.

• Sends →reparent to all its member graphicals

• Invoked ‘graphical →reparent’ on itself

See ‘graphical →reparent’ for details.

3.2.24 Abort — Cleanup after aborting execution

Send Method reset

Refinement of: visual->reset Assigns ‘window ←current event’ to @nil and releases a possible event-focus. Then invokes ‘visual →reset’ to take care of the graphicals displayed on it.

3.2.25 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: device-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Variable changes data alien:UpdateArea (-)

Summary info for redraw

Send Method redraw [area]

Redraw the entire window or some area of it. This method is normally invoked automatically if the window is opened on the display or part of it is exposed after it has been obscured by other windows.

PCE is designed to take care of all visual side-effects automatically, so the user should never have to invoke methods explicitly. An exception on this rule are the decorations (scrollbars and label) of the window. If these are changed this method needs to be called explicitly to update the window.

3.2.26 WindowSystem — Connection to the underlying window system

Variable ws ref alien:WsRef (-)

Window-System reference

3.2.27 Internal — Private behaviour

Variable displayed cursor cursor* (-)

Currently visible cursor. This attribute is computed dynamically. The actually displayed cursor of a window is:

• If there is a focus and a ↔focus cursor: the ↔focus cursor

• If there is a focus and the object in focus has a ↔cursor the cursor of the object in focus

• If the mouse is a a graphical with a cursor: the cursor of the most local and exposed graphical with a cursor defined.

• In all other cases the ↔cursor of the window.

Variable scroll offset point (-)

Indicates how much the window is scrolled. The top-left corner of the window is -in the coordinate system of the displayed graphicals- negative the x- and y- parameters of this point.

‘window ←visible’ is the proper way to get information on the current location of the visible area of the window.

3.3 Class window decorator — Attach scrollbars and label to a window

Inheritance: ⇒ window decorator ⇒ window ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: frame (frame*), tile (tile*), decoration (window decorator*)

A window decorator object is used to decorate a window with scroll bar objects and/or a label. Like frame objects, window decorators are normally kept invisible to the application programmer. Class window delegates to its associated ‘window ←decoration’.

Class window decorator may be refined to modify PCE’s window look-and-feel.

Instance Variables

label

label text ← text* Text object to display label

client

window ← window Decorated window

scroll

horizontal scrollbar  ← scroll bar*  Scrollbar for X-direction
vertical scrollbar  ← scroll bar*  Scrollbar for Y-direction

Behaviour

3.3.1 Oms — Object management operations

Send Method initialise window=window,

scrollbars=[{none,vertical,horizontal,both}], label=[char array] Refinement of: window->initialise Create a decoration for the given window. The optional arguments specify the scrollbars and label of the window.

Window decorators are normally created by PCE itself by invoking →scrollbars and/or label to the window to be decorated. See also ‘window →catch all’, ‘window →decorate’ and ‘window ←decoration’.

Send Method unlink

Refinement of: window->unlink

Make sure the ←window is destroyed too.

3.3.2 Label — Visible name of objects

Get Method label ⇒char array

Variable label text text* (←)

Send Method label format=char array*, argument=any ...

Define a window-level (opposed to ‘frame ↔label’) label for the window. The label is visualised by ←label text using the font Pce.WindowDecorator.label font.

←label returns the ‘text ←string’ of the ←label text or fails if ←label text yields @nil.

3.3.3 Client — Controlled object

Variable window window (←)

This variable describes the decorated window.

3.3.4 Layout — Spatial relations between graphical objects

Send Method compute desired size

Refinement of: window-> compute desired size This method is invoked by class frame to as part of ‘frame →fit’. It allows the window to resize itself to fit with its contents. By default this method is only active for class dialog.

This method may be redefined.

Send Method layout dialog gap=[size], size=[size], border=[size] Refinement of: device->layout dialog This method implements the layout of dialog objects (see ‘dialog →layout’). It may be used to define compound dialog windows or to exploit the layout mechanism for dialog windows in a normal window or graphical device.

Send Method rearrange

Rearrange ←window, ←scrollbars and ←label text. The default method places the label text at the top-left corner and the scrollbars according to the resource Pce.ScrollBar.placement.

This method is normally called by →geometry and may be redefined to achieve different window layouts.

3.3.5 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: window->geometry Calls ‘window →geometry’, followed by →rearrange to update the layout.

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Refinement of: window->request geometry Handle a geometry request. It will enlarge the requested values by the space needed for the decorations and call →geometry with the enlarged size.

3.3.6 Area — Handling size and position

Send Method resize

Refinement of: window->resize Resize the member graphicals of the device in X and Y direction. See ‘Graphical →resize’ for details on the parameters.

3.3.7 Scroll — Controlling the ‘viewport’

Variable horizontal scrollbar scroll bar* (←) Variable vertical scrollbar scroll bar* (←) Send Method horizontal scrollbar bool=bool Send Method vertical scrollbar bool=bool

These variables point to the associated scrollbars. The send methods take a boolean argument and attach or detach a scrollbar. Normally called through →scrollbars.

Get Method scrollbars ⇒{none,horizontal,vertical,both} Send Method scrollbars {none,horizontal,vertical,both}

Translates the requested scrollbars in calls to →horizontal scrollbar and →vertical scrollbar.

Send Method show scroll bar show=[bool], which=[scroll bar] Control visibility of the indicated scroll bar

3.3.8 Visibility — Making object (in-)visible

Send Method displayed bool=bool

Refinement of: window->displayed

Refines ‘graphical →displayed’, ensuring that both the decorated window and the decorator have consistent ←displayed.

3.4 Class display — Global management of display

Inheritance: ⇒ display ⇒ visual ⇒ object

Class ‘display’ actually maps on an X-window screen, augmented with some additional PCE housekeeping. Class display allows for overall control over the display, such as querying its size, setting and fetching the X cut-buffers, keeping track of associated bitmaps, cursors, fonts, etc.

PCE creates a single instance of this class at boot time which is called @display. This display is by default created on the address read from the Unix environment variable DISPLAY.

Other instances may be created, allowing windows to be created on multiple displays.

Instance Variables

address

address ↔ [name] Host/screen on which display resides

window manager

window manager → [{twm,olwm,mwm}|name] Window manager running on this display

appearance

background  ← colour  Windows default background colour
colour map  ← [colour map]*  Default for ‘frame →colour map’
foreground  ← colour  Windows default foreground colour

font

font table ↔ hash table Mapping for logical font-names to fonts

resource

resource class ← name Resource class of display [Pce]

dimension

size - size* Size (width, height) of display

event inspect handlers

←

chain Chain of handlers to support inspector tools

organisation display manager

←

display manager The global display manager (@display manager)

frames ← chain Frames displayed on this display

cache

cache  ↔ image*  Scratch image to avoid flickering
quick and dirty  ↔ bool  Painting quick or correct?

window system

ws ref  - alien:WsRef  Window-System reference

Behaviour

3.4.1 Oms — Object management operations

Get Method convert any=any ⇒display Get Method convert any=any ⇒display

Refinement of: object<-convert

This method is useful when dealing with multiple displays. It translates a graphical object to the display on which it is displayed or string of the form ‘host:display[:screen]’ (see ‘display ↔address’) to the display object residing on that address (or creates one if no display exists for this address). Example

    ?- new(P, picture('Hello', @default, 'sun10:0')),
         send(P, open).

Creates a graphical window on the display of host ‘sun10’, provided sun10 is accessible through the internet, has an X-server running and this X-server allows your PCE process to contact it. See the X-manuals for details on X-window authorisation principles.

Send Method initialise address=[name], resource class=[name] Send Method initialise address=[name], resource class=[name]

Refinement of: object->initialise Create a display from its address and resource class. The default address is determined by the Unix environment variable ‘DISPLAY’. The default resource class is ‘Pce’.

Note that the global object @display is created at boot-time. It has default address and resource class.

3.4.2 Conversion — Conversion (for type checking)

Get Method image [area] ⇒image Image with the pixels of a region from the display. See also ‘frame←image’ and ‘display ←postscript’.

3.4.3 Address — Address specifications

Variable address [name] (↔)

Host and screen on which the display resides. May be changed before the display is opened. Its value must be of the form

    <HostName>:<DisplayNumber>[:<ScreenNumber]

<HostName> is the name of the host on which to open the display. It may also be an internet number.d <DisplayNumber> is the logical number of the attached display (almost always 0) and <ScreenNumber> is the logical number of the screen, which defaults to 0.

3.4.4 Open — Making objects visible

Send Method open Send Method open

‘Display →open’ opens the actual connection to the X-server process and initialises the graphics context for this display. If the display is already open, →open simply succeeds.

This method will be invoked automatically whenever certain information about the display is necessary.

If your host-language is capable to create a saved-state of its image, this may not be done after the display is opened as the data of the process is then distributed over the PCE/Prolog process and the X-server. When the debug-subject ‘display’ is active (see ‘pce →debug subject’), PCE prints a message when it opens the display.^{1}

1 There is no way to find out whether the display is opened.

3.4.5 Selection — Manipulation and query of selections

Send Method copy char array=char array Copy to selection and cut buffer

Get Method cut buffer buffer=[0..7] ⇒string Get Method cut buffer buffer=[0..7] ⇒string

New string with the value of the indicated X-window cut-buffer. Cut-buffer 0 is for many X11 applications treated equivalent to the X-selection.

Send Method cut buffer buffer=[0..7], value=string Send Method cut buffer buffer=[0..7], value=string

Set value of numbered X-cut buffer

Get Method paste ⇒string Simple interface to get clipboard value

Get Method selection which=[name], target=[name], type=[type] ⇒any Get Method selection which=[name], target=[name], type=[type] ⇒any

Query value of the X-window selection. The selection may be ‘owned’ (see →selection owner) by an object of the current XPCE process or by an external X-application connected to the same X-display.

‘which’ is the type of selection requested. Default is ‘primary’. Other common values are ‘secondary’ and ‘clipboard’. The specified textual value is converted into uppercase before it is passed to the X11 selection handling.

‘target’ is the type of information requested. The default is ‘string’. ‘type’ specifies the PCE type of the return value. The return value of the selection system will be translated to this type using ‘type ←check’.

Send Method selection which=[name], value=char array Set the (textual) selection

Get Method selection owner which=[name] ⇒object Send Method selection owner owner=object*, which=[name], convert=[function],

loose=[code], type=[{text}]

Send Method selection owner owner=object*, which=[name], convert=[function],

loose=[code], type=[{text}] Specify the owner of the indicated selection. The selection owner must be prepared to deliver th value of the selection if requested. For this purpose, ‘convert’ is evaluated when the selection is requested with the following arguments:

@receiver The selection owner
@arg1  ‘which’ selection (primary, ...)
@arg2  ‘target’, see ←selection

if another PCE object is granted the selection or another X11 application requests the selection, the code object ‘loose’ is executed with the following arguments:

@receiver The selection owner
@arg1  ‘which’ selection (primary, ...)

If ‘owner’ is @nil, XPCE will release the selection ownership. ‘which’ defaults to ‘primary’. ‘convert’ and ‘loose’ may only be default if ‘owner’ is @nil.

The following fragment indicates how a PCE editor object is made holder of the X11 selection:

    send(E, selection_owner, primary,
         @receiver?selected,
         message(@receiver, selection, 0, 0)).

In the X11 implementation, type ‘text’ is the only available type for the selection, and the value should be convertable to a string object. In the Win32 version, the types ‘emf’ and ‘wmf’ both require a win metafile object, which is placed on the clipboard as either an enhanced metafile or an encapsulated Windows 3.x metafile. See also class win metafile.

Get Method selection timeout ⇒real Send Method selection timeout real=real

Set/get the timeout for getting the current selection value (see ←selection). The time is in seconds. The X11 granularity is 1 millisecond. The X11 default timeout is 5 seconds.

3.4.6 WindowManager — Interaction with the X-window manager

Get Method window manager ⇒[{twm,olwm,mwm,fvwm}|name] If the slot ←window manager is running, return its value. Otherwise try to guess the running window manager. Unfortunately there is no standard way to find out about the running window manager. In the current implementation it will only find-out a running mwm (Motif) window manager when XPCE is compiled for the AIX operating system.

Knowledge about the running window manager may be used by future XPCE releases to adopt to the look-and-feel of the window manager.

Variable window manager [{twm,olwm,mwm}|name] (→)

[Pce.Display.window manager: @default] Window manager running on this display

3.4.7 X — X-window interaction

Send Method screen saver bool=bool

Activate (@on) or deactivate (@off) screensaver

3.4.8 Behaviour — Definition of behaviour

Get Method contained in ⇒display manager Refinement of: visual<-contained in Returns the ‘parent’ visualiser. Defined at each of the various subclasses of visualiser to deal with the different implementations. All visualiser classes should define this method, except for class display which is at the root of the visualise consists-of hierarchy.

Get Method contains ⇒chain

Refinement of: visual<-contains Returns a chain with the visualisers of the next level of the contains hierarchy. Each of the subclasses that defines a ‘compound’ visualiser defines this method to deal with it’s particular implementation.

3.4.9 Host — Communication with the host language

Get Method connection fd ⇒int

Integer giving the Unix file-descriptor used to communicate with the X-server. This information is necessary to synchronise input handling for some host-systems. See also ‘display manager→dispatch’.

3.4.10 Animate — Behavariour to support animation

Send Method flush Send Method flush

Requests all frames to update itself immediately and flushes the output to the X-server. This method is normally called automatically from PCE’s main event-loop. It must be used by the application programmer when the display needs to be updated while a computation is in progress (for giving information on progress of the computation for example).

See also →synchronise and ‘frame →wait’.

Send Method grab server grab=bool

When ‘grab’ equals @on, the X-server on this display will not handle any request from another client (effectively freezing other applications on the same display).

This method should be used with care. It is intended to be used in combination with →draw in to ensure that drawing twice in invert-mode properly restores the display.

→reset automatically releases the server and so does killing the XPCE process.

Send Method synchronise Send Method synchronise

Similar to ‘display →flush’, but also handles possible pending events from the X-server. This method is needed in the following circumstances:

• Windows are created during ongoing computation When a window is opened using →open, the PCE process will sooner or later receive an event from the X-server indicating the window has been created and requesting to actually paint the contents of the window. Just using →flush won’t show the window as this event will not be handled.

• Events needs processed during computation If the application wants a to process events during computation, this method should be called somewhere in the main-loop of the application. For good interactive response it should be called at least about 5 times per second.

3.4.11 Appearance — “Look-and-feel” related aspects

Variable background colour (←) [Pce.Display.background: white] Send Method background colour=colour

Initial background colour for all created windows. Note that changing this value does not affect existing windows.

Variable colour map [colour map]* (←) Send Method colour map [colour map]*

Default for ‘frame →colour map’. If @nil, the systems default colour map will be used. If @default, and this is a Win32 based system, it is filled with the colour map(pce). This colour map object will be automatically expanded if new colour objects are opened on the display.

Variable foreground colour (←) [Pce.Display.foreground: black] Send Method foreground colour=colour

Windows default foreground colour

3.4.12 Font — Available fonts

Get Method font alias name=name ⇒font Send Method font alias name=name, font=font, force=[bool] Send Method font alias name=name, font=font, force=[bool]

Define a logical font-name for a physical font object. The first argument specifies the name, the second the related font object. If the force argument is @off (default), the alias will only be set if there was no alias for this font. If force is @on, a possible existing alias will be removed. See also ‘font ←convert’.

Variable font table hash table (↔)

Mapping for logical font-names to fonts

Send Method load font aliases resource=name Send Method load font aliases resource=name

Load font aliases from named resource

Send Method load font family family=name Send Method load font family family=name Send Method load fonts Send Method load fonts

Called by ‘font ←convert’ to establish the systems default set of fonts. It performs the following steps:

1. Get the resource Pce.Display.font families

2. For each word in this chain, get the associated resource-value and create fonts from it using the method ‘display →load font family’.

For example if ‘Pce.Display.font families’ contains the word ‘symbol fonts’, the resource ‘Pce.Display.symbol fonts’ may be defined to be a string of the form:

    Pce.Display.symbol_fonts: \
      [ font(symbol, normal, 12, \

"-adobe-symbol--*-normal-*-12-*-*-*-*-*-*-") \

      ]

Personal extensions to the default font-list may be defined in the file ~/.Xdefaults by redefining the Pce.Display.font families resource and defining new resources for the added families.

Available X-fonts may be located using the standard X11 applications xfontsel(1) and or xlsfonts(1). After modifying the font defining resources you should restart XPCE to make the modifications effective. The FontViewer demo program program can be used to verify your modifications.

3.4.13 Colour — Defining and managing colours

Get Method depth ⇒int Get Method depth ⇒int

Number of bits used to represent a display pixel. 1 for monochrome displays, higher for grey scale and colour displays. See also ←visual type and @colour display.

Get Method visual type

⇒{monochrome,static grey,grey scale,static colour,pseudo colour,true colour,direct colour} Determine the type of the attached display. The definition of the return-types is conform X11’s classification of visual types:

monochrome: Same as ←depth:1
static grey: Multiple predefined grey-levels
grey scale:  Multiple grey levels
static colour: Multiple predefined colours
pseudo color: Colour-map defined colours
direct colour: Separate RGB values on colour-map
true colour: Nearly linear predefined direct colour

Most Unix and PC colour adapters use pseudo colour displays: A pixel is an entry in a dynamically changeable ‘colour-map’ that translates the pixel value into an RGB triple feeding the monitor. On these displays, the number of colours that may be displayed simultaneously is limited to 2 ** ←depth. 8 is the most common value for ←depth, allowing for 256 distinct colours. See also @colour display.

3.4.14 Resource — Interface to ~/.Xdefault

Send Method load resource file file=file

Load resource-definitions from file

Variable resource class name (←)

Principal X-window resource class. The default is ‘Pce’, which implies that all PCE relevant resources are denoted

    Pce.ClassName.resource_name: value

This value may be changed before the display is opened. Note however that PCE may run various applications simultaneously and there is only one resource class name.

3.4.15 Dimension — Dimensions of (graphical) objects

Get Method height ⇒int

Height of the display in pixels

Get Method size ⇒size

Variable size size* (-)

Size (width, height) of display. The first invocation of ←size will fill the instancevariable and return the size object.

Get Method width ⇒int

Width of the display in pixels

3.4.16 Event — Event processing

Send Method busy cursor cursor=[cursor]*, block input=[bool] Define (temporary) cursor for all frames on the display by calling ‘frame →busy cursor’ on all ←frames. Used by ‘popup →execute’ and ‘click gesture →terminate’.

Send Method dispatch

Invokes ‘display manager →dispatch’, dispatching events for about 1/4 of a second.

Send Method event queued Send Method event queued

If the display is opened, performs ‘display →flush’ and then checks for possible events from the X-server. Succeeds if events are ready without handling them. Fails immediately if no events are present.

Send Method inspect handler handler=handler Adds handler (using ‘chain →add’ to ‘display ←inspect handlers’.

Variable inspect handlers chain (←)

Chain of handler objects used to support debugging tools. When an event occurs on a window and this chain is non-empty, the handlers in this chain will be tried before the normal event-handling procedure is started.

PCE searches for the deepest nested graphical that overlaps the event-position. A possible event focus is ignored. If the event matches the type of the handler, the message of the handler is executed with the following argument binding:

@receiver The graphical
@arg1  Idem
@arg2  The event

If this message succeeds, the event is considered to be dealt with.

The following query prints the reference of a graphical to the terminal and stores it in the X-cut buffer 0 when the user types META-CONTROL-p to a graphical:

    ?- send(@display, inspect_handler,
       handler('M-\C-p',
               and(message(@pce, write_ln, @arg1),
                   message(@display, cut_buffer, 0,
                           @arg1?object_reference)))).

3.4.17 Report — Reporting events, status and errors

Send Method bell volume=[int] Rings bell on this display. The argument describes the volume, which’ default is described by the resource ‘Pce.Display.volume’.

Send Method confirm name=name, any ...=any ... Send Method confirm name=name, any ...=any ...

Format a string from the arguments and display a window with this text and the text

    Press LEFT button to confirm, RIGHT button to cancel

This method grabs all pointer-events until the user presses either of the buttons. When LEFT button is depressed, the message returns successful. When the RIGHT button is depressed, the message returns with failure.^{2}

Send Method inform name=name, any ...=any ... Send Method inform name=name, any ...=any ...

Simple mechanism to inform the user of anything. This behaviour displays a prompter window on the center of the screen holding the specified text. ‘display →inform’ succeeds after the user presses any of the mouse-buttons.

The first argument is a format string (similar to printf, see ‘string →format’). The remaining arguments are used for substitution in this format string. See also ‘pce →format’ and ‘visual →report’.

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ... Refinement of: visual->report This method serves as a ‘catch-all’ for →report messages invoked on visual objects. If the type of the report is ‘inform’ or ‘error’, it will invoke ‘display →inform’. If the kind is ‘error’ it will also invoke ‘graphical →alert’ to @reportee.

Warnings are indicated using ‘graphical →alert’ to @reportee.

Status reports are ignored.

3.4.18 Organisation — Organisation of (graphical) objects

Variable display manager display manager (←)

The global display manager (@display manager)

Variable frames chain (←)

Chain with all frames displayed on this window. Maintained by ‘frame →create’ and ‘frame →unlink’. This implies that frame objects that are not yet created (see ‘frame →create’) do not appear in this chain.

2 The window is modelled to a very old implementation of PCE. The user however may decide to redefine this method using a different type of prompter window.

3.4.19 Root — Manipulation of the root window (background)

Send Method draw in graphical=graphical, at=[point], invert=[bool],

subwindow=[bool] Draw the indicated graphical object directly on the root-window of the display. This is similar to ‘image →draw in’ in the sense that this operation just affects the current pixels on the display: the user has to take care of redraw, etc.

If ‘invert’ is @on, the affected pixels are inverted rather than painted. This way the graphical may be removed by painting it a second time. If ‘subwindow’ is @on not only the rootwindow, but also all overlapping subwindows are affected by the drawing operation.

This method is intended to support feedback of gestures that perform operations not bound to a single window.

See also class move outline gesture and →grab server.

3.4.20 Debugging — Debugging PCE programs

Send Method synchronous [bool]

When @on, PCE waits for acknowledgment for each call to the X-window server. Normally Xlib (the lowest communication level) will not wait for acknowledgment.

This method may be used to find the exact context in which X-errors are generated. Only applicable for debugging PCE’s drawing primitives.

3.4.21 Abort — Cleanup after aborting execution

Send Method reset

Refinement of: visual->reset This method sends →reset to all visual objects it contains (recursively). ‘Visual →reset’ is automatically invoked from the host-language after an abort to the hostlanguage toplevel. Various subclasses of visual implement this method to reset parameters such as status, event-focus, etc.

3.4.22 Quit — Exiting from PCE

Send Method quit

Destroy all window-system references

3.4.23 Postscript — Generating PostScript for printing

Send Method postscript

Create PostScript

Get Method bounding box ⇒area

PostScript bounding box for the display

Get Method postscript landscape=[bool], max area=[area] ⇒string Get Method postscript landscape=[bool], max area=[area] ⇒string

Get PostScript or (area of) display. See also ‘graphical ←postscript’, and ‘display ←image’.

3.4.24 Cache — Caching information (speed up)

Variable cache image* (↔)

To avoid flickering during repaint, xpce paints a modified area of a window on this image and then copies this image to the (changed) window. If the area to be repainted is larger than this image or this image is not present (@nil), pce paints directly on the changed window.

This image is created by ‘display →open’ from the resource ‘Display.graphics cache’, which defines the size of the image. When @default, ‘display ←size’ is used.

When using a terminal with limited memory, use something like 200x200. This avoids flickering small objects and is not too costly in terms of memory.

Variable quick and dirty bool (↔) [Pce.Display.quick and dirty: @on] When @on, drawing of shapes with pen > 1 is achieved by drawing multiple shapes with pen = 1. On most X-servers this is much faster. Sometimes this gives inferior results and some X-servers do handle pen > 1 fast. In these cases, set this value to @off

3.4.25 WindowSystem — Connection to the underlying window system

Variable ws ref alien:WsRef (-)

Window-System reference

3.4.26 Internal — Private behaviour

Send Method confirm pressed event=event

Handle confirmer events

3.5 Class application — Collection of frames

Inheritance: ⇒ application ⇒ visual ⇒ object

An application object defines a collection of cooperating frame objects. Applications are new as of XPCE version 4.9, and therefore do not yet have a stable definition. It is however assumed that the current implementation will only be enhanced with new, compatible, features.

Applications are designed to deal with the following issues:

• Find frames belonging to the application Using the ←member method, frames that constitute an application can find each other. See also ‘frame↔name’ and ‘graphical←application’.

• Define the scope of ‘modal’ frames Frames may be defined modal over the other frames in the application. See ‘frame →modal’.

• Define general application properties XPCE itself uses applications of ←kind: service to realise the programming environment, and avoid the environment from tracing and debugging itself.

Normally, applications are created explicitely, often as global named objects. Frames are attached to it using the application initialisation argument application:

    :- pce_global(@my_application, make_my_application).
    make_my_application(App) :-
        new(App, application(mine)),
        ...
        ...
        new(F, frame('My title',
                     application := @my_application)),
        ...

Instance Variables

name

name ↔ name Identifier name of the application

event

modal ← frame* Frame for modal operation

organisation

members ← chain Chain holding member frames

debugging

kind  ↔ {user,service}  If @off, events cannot be debugged

Behaviour

3.5.1 Oms — Object management operations

Send Method initialise name=name

Refinement of: object->initialise

Create an application with the given name. The application is added to the chain object @applications.

Send Method unlink

Refinement of: object->unlink Destroying an application will invoke ‘frame →destroy’ on all ←members.

3.5.2 Name — Naming objects

Variable name name (↔)

Identifier name of the application. Currently not used.

3.5.3 Event — Event processing

Variable modal frame* (←)

Frame that currently acts as modal window for the application. This implies that no window in another frame object can receive events. See also ‘frame→modal’.

3.5.4 Organisation — Organisation of (graphical) objects

Send Method append frame=frame Add frame to the application. See also ‘frame →application’, and the ‘application’ argument of ‘frame →initialise’.

Get Method contains ⇒chain

Refinement of: visual<-contains Implementation of ‘visual ←contains’, returning ←members.

Send Method delete frame=frame Remove frame from the application. Associating a frame with another application object will automatically delete it from the application it was a ←member of. This method may be redefined to keep track of the applications, but must call the superimplementation.

Get Method member name=name ⇒frame Find a member frame object with given ‘frame ←name’.

Variable members chain (←)

Chain holding member frames. This chain is maintained by →delete and →append.

3.5.5 Debugging — Debugging PCE programs

Variable kind {user,service} (↔)

If ‘user’, (default), the methods and predicates called as a result of event-handling by windows and frames of the application can be debugged. If ‘service’, all Prolog and XPCE activity will be run in ‘system’ mode to avoid debugging the XPCE environments tools, while trying to debug the user application.

3.5.6 Abort — Cleanup after aborting execution

Send Method reset

Refinement of: visual->reset Implementation of ‘visual ←reset’. Removes any possible ←modal frame object.

3.6 Class display manager — Manager of available displays

Inheritance: ⇒ display manager ⇒ visual ⇒ object

Class display manager has a single instance @display manager created at boot time of XPCE. The display manager has two functions:

• Keep track of the available displays (←members, ←member)

• Organise the toplevel loop of the XPCE process (→dispatch)

Instance Variables

display

members ← chain Available displays

current

current  - chain  Stack with current displays

Behaviour

3.6.1 Oms — Object management operations

Send Method initialise Send Method initialise

Refinement of: object->initialise Create the display manager

3.6.2 Event — Event processing

Send Method dispatch file descriptor=[int], milliseconds=[int]* Waits for events received from one of the displays xpce is currently connected to, input from one of the running subprocesses and input from the terminal. When an event or input from a subprocess is received, it is handled and this method returns. If input is available from the terminal, this method returns without reading this input.

The file descriptor argument specifies the Unix file-descriptor used by the host-language to read commands. @default implies to use the same file descriptor as used by the last call to this method.

The milliseconds argument defines the maximum time to wait for input or events. When @nil, this method will block until input is available or an event is processed.

This method is normally activated through the PCE C-interface function pceDispatch(). It may however also be used by the application programmer to block in a function until the user has performed some action:

    :- dynamic quit/0.
    ?- send(button(quit,
                   message(@prolog, assert, quit)),
            open).
    ?- repeat,
       ignore(send(@display, dispatch)),
       retract(quit), !.

1

3.6.3 Organisation — Organisation of (graphical) objects

Get Method contains ⇒chain

Refinement of: visual<-contains Equivalent to ←members: returns a chain holding all created instances of class display.

3.6.4 Display — X-Screen oriented behaviour

Send Method append display=display Attach a new display to the manager

Get Method member name=name ⇒display Find display for specified address

Variable members chain (←)

Available displays

3.6.5 Current — Operations on ‘current’ object

The methods below deal with the notion of ‘current’ display. This idea is not well worked-out. Application programmers should not realy on these methods.

Get Method current ⇒display

Get the current display

Send Method current display=display Make display the current display

Variable current chain (-)

Stack with current displays

Send Method pop current

Pop the current stack

1 Assumes the terminal at Unix file-descriptor 0.

3.7 Class tile — Manage non-overlapping areas

Inheritance: ⇒ tile ⇒ object

A tile is an object that manages the area of a rectangular object, such as a graphical or window. Tiles are used by class frame to manage the layout of the windows in the frame.

Normal users hardly ever need to be aware of the existence of tile objects. Tiles are managed by and manages window objects and frame objects. The only relevant messages that are directly delegated to from class window are →hor stretch, →hor shrink, →ver stretch and →ver shrink that determine how easily the managed window object can grow bigger or smaller.

Tiles are organised in a consists-of hierarchy. The leafs of this tree are connected to the actually managed objects (for frames, these are the windows). The root of the tree is associated with the total area over which the objects must be distributed (the frame).

A tile describes the *ideal size* as well as the merits to be larger (stretch) or get smaller (shrink). A tile negotiates with its super-tile in the consists-of hierarchy to get a size that is a close as possible to its ideal size, but it is always the super-tile that decides on the size.

Leaf-tiles communicate with the actual object by means of the methods

←width, ←height To set the initial ideal size
→set: X, Y, W, H To resize/move the object

The non-leaf tiles are either horizontal or vertical. Horizontal tiles manage a set of sub-tiles that are next to one-another. Vertical tiles manage a set of sub-tiles that are above one-another.

Defining a tile hierarchy

A tile-hierarchy is build inwards-out. First of all, all objects that need to be tiled are given a tile (the leaf-tiles). Next, the deepest-nested adjacent tiles that must have the same width or height are connected to one another, etc. This is done using the →left, →above, etc. behaviour. The creation messages are always sent to the leaf-tiles, who create and maintain tiles higher in the hierarchy whenever needed.

Instance Variables

client

object ← object* Object managed

appearance

border ↔ int Distance between areas

layout

enforced  ← bool  If @on, the tile’s layout will be enforced
orientation  ← {none,horizontal,vertical}  Direction of adjacent sub-tiles

resize

hor shrink  ↔ int  Encouragement to get smaller
hor stretch  ↔ int  Encouragement to get wider
ver shrink  ↔ int  Encouragement to get lower
ver stretch  ↔ int  Encouragement to get higher

dimension

area  ← area  Area of the object
ideal height  ↔ int  Desired height of the tile
ideal width  ↔ int  Desired width of the tile

organisation

members  ← chain*  Managed tiles (subtiles)
super  ← tile*  Tile that manages me

Behaviour

3.7.1 Oms — Object management operations

Send Method initialise object=object*, width=[int], height=[int] Send Method initialise object=object*, width=[int], height=[int]

Refinement of: object->initialise

Create a tile for the specified object. If width and height are given, these values will be used as ←ideal width and ←ideal height. Otherwise these values will be extracted from the object using ‘graphical ←width’ and ‘graphical ←height’.

Send Method unlink

Refinement of: object->unlink Unlink sub and super-tiles

3.7.2 Client — Controlled object

Variable object object* (←)

‘Leaf-tiles’ directly manage the area of an object. This may be any object provided it implements ←width, ←height and →set.

3.7.3 Iterate — Run code on each element of a collection

Send Method for all code=code Iterate over all ←object’s

3.7.4 Appearance — “Look-and-feel” related aspects

Variable border int (↔) [Pce.Tile.border: 3] Distance between the object tiled and its reserved area.

3.7.5 Layout — Spatial relations between graphical objects

A tiled layout of objects is constructed using the methods →above, →below, →left and right. These methods are used to create lists of horizontally or vertically aligned tiles. Such a layout is built inwards-out. The order in which these messages are given is important. Assume the following layout is desired:

    aaaaa ccccccc
    aaaaa ccccccc
          ccccccc
    bbbbb ccccccc
    bbbbb ccccccc
    bbbbb ccccccc

The proper way to arrive at this layout is:

    ?- send(A, above, B),
       send(C, right, B).    % or send(C, left, A).

Do not try

?- send(A, left, C),
  send(B, left, C).

This sequence results in the following layout:

bbbbb aaaaa ccccccc
bbbbb aaaaa ccccccc

Send Method above object=object, delegate=[bool] Place the argument tile above me.

Send Method below object=object, delegate=[bool] Send Method below object=object, delegate=[bool]

Place a tile below me

Send Method enforce [bool]

If the tile is not yet ←enforced, it will force its subtitles to fit the computed ←ideal width and ←ideal height of the tile using →layout.

If the argument is @off, the ←enforced argument will be set to @off on this tile and all subtiles, after which the ideal sizes are recomputed. See also ‘frame→fit’.

Variable enforced bool (←)

If @on, the tile’s layout will be enforced

Send Method layout x=[int], y=[int], width=[int], height=[int] Compute subtile layout and adjust objects

Send Method left object=object, delegate=[bool] Place a tile to my left

Variable orientation {none,horizontal,vertical} (←)

Direction of adjacent sub-tiles. If ‘none’, the tile is a leaf tile controlling an ←object. If ‘horizontal’, the ←members are places left-to-right. If ‘vertical’ they are placed top-to-bottom.

Send Method right object=object, delegate=[bool] Place a tile to my right

3.7.6 Resize — Controlling and trapping resizes

Variable hor shrink int (↔)

Encouragement to decrease the width of this tile. When multiple tiles are related left-to-right, the system will compute the sum of the ←ideal width’s of the stacked tiles. If this sum is equal to the desired total width the stretch- and shrink-parameters are ignored. If the sum is smaller than the desired width ←hor stretch is considered. Finally, if the sum is larger than the desired total width the system first attempts to shrink all windows that have ←hor shrink > 0 proportional to their ←hor shrink value. If this does not make the total width small enough, all windows with ←hor shrink == 0 are made equally less wide.

Variable hor stretch int (↔)

Encouragement to get wider

Variable ver shrink int (↔)

Encouragement to get lower

Variable ver stretch int (↔)

Encouragement to get higher

3.7.7 Dimension — Dimensions of (graphical) objects

Variable area area (←) Send Method area area=area

Area of the object

Send Method center point=point Set center by moving tile

Send Method corner point=point Set point opposite to origin

Send Method height int=int Set H of tile

Variable ideal height int (↔)

Desired height of the tile

Variable ideal width int (↔)

Desired width of the tile

Send Method position point=point Set XY of the tile

Send Method set x=[int], y=[int], width=[int], height=[int] Send Method set x=[int], y=[int], width=[int], height=[int]

Principal manipulation method for the area occupied by a tile. Its behaviour depends on the place of the tile in the hierarchy as well as whether or not the tile is already ←enforced.

If the tile is not yet ←enforced, the width and height components are used to set ←ideal width and ←ideal heigth and the ideal sizes are propagated over the tile hierarchy using →compute.

If the tile is already enforced, it will set the ideal size of this tile. Next, it will change the stretch/shrink properties of all members of the ←super tile, such that all members before and upto (above, left of) this tile have fixed size and all members after (below, right of) can be resized. Used by ‘frame →event’ to realise resizable subwindows.

Send Method size size=size Set WH of the tile Send Method width int=int

Set W of tile

Send Method x int=int Set X of the tile

Send Method y int=int Set Y of the tile

3.7.8 Update — Update Dependant properties

Send Method compute

Compute ideal sizes from sub-tiles

3.7.9 Event — Event processing

Get Method sub tile to resize point=point ⇒tile

Normally invoked on the ←root of a tile hierarchy. If ‘point’ is on the border between any two tiled object in the tile hierarchy, return the tile above or left of the given position.

Used by ‘frame →event’ to implement resizing of subwindows.

3.7.10 Organisation — Organisation of (graphical) objects

Variable members chain* (←)

If a tile is not directly managing an object (‘leaf-tile’) it is managing a horizontal or vertical stack of subtiles. These subtiles are in the chain ←members. Each of the subtiles’ ←super points to this tile object. The variable ←orientation is set to either horizontal or vertical.

A tile that manages a number of sub-tiles is normally created by its sub-tiles:

    ?- new(X, tile(box(100, 100))),
       new(Y, tile(box(200, 100))),
       send(X, right, Y).

Will create two tiles and a third, which is a tile with ←orientation: horizontal and ←members the X and Y tiles.

Get Method root ⇒tile

Root of the tile-hierarchy

Variable super tile* (←)

Tile that manages me

3.8 Class scroll bar — Scroll windows, text or other objects

Inheritance: ⇒ scroll bar ⇒ graphical ⇒ visual ⇒ object

A scroll bar object allows the user to examine and modify the position of a view –provided by some window– onto a larger object. Scrollbars are normally attached to windows, editors and list browsers. Scrollbars probably are rarely used by normal PCE application programmers. They may be used in combination with class figure using ‘figure →clip area’ to create a ‘mini-window’ (note that windows may also be displayed on other window objects).

A scroll bar assumes there is an object of a certain size and a ←view on this object that allows the user to see part of it. This part is defined by a ←start position and a ←length. See →bubble’ A scroll bar is a normal graphical object. To connect it to some other object, two communications should be established:

• Object -→ scroll bar Each time the view or viewed object changes such that the scrollbar needs to be updated, the scroll bar should be sent a →request compute message. When XPCE’s redraw system is activated, →compute will be called to update the scrollbar. See →compute for the methods that need to be provided by the scrolled ←object to make this connection work.

• Scroll bar -→ object When the user activates the scroll bar this information is passed to the ←object as follows: If ←message equals @default, invoke →scroll vertical on ←object if ←orientation equals vertical and →scroll horizontal if ←orientation equals horizontal. This method is passed three arguments: ‘direction’, ‘unit’ and ‘amount’. If ‘direction’ equals ‘forwards’, the view should move further down/right the object. ‘Unit’ may be ‘page’, in which case ‘amount’ is the permillage of page the view should be moved or ‘line’, in which case ‘amount’ is the number of lines to move. If ‘direction’ equals ‘backwards’, the same parameters are passed, but the view should be moved up/left. If ‘direction’ equals ‘goto’, ‘amount’ is a permillage indicating an absolute position in the file: ‘0’ means goto the top/left, ‘1000’ to the bottom/right.

Instance Variables

client

object ↔ graphical* Graphical to be scrolled scrolled

action

message ↔ [code]* Message used to inform object

appearance

look  ← {x,open look,motif,win}  Look-and-feel (only ‘x’)
orientation  ← {horizontal,vertical}  Scroll object horizontal or vertical

layout

distance  ← int  Relative distance (pixels)
placement  ← chain  Relative automatic placement

scroll

length  ← int  Total length of object
start  ← int  Start of visible part
view  ← int  Length of visible part

event

drag  ↔ bool  If @on, messages are sent continuously
status  ← name  Current status for event parsing

internal

amount  - int  Amount to scroll

auto hide  ← bool  If @on, hide if all is visible
bubble length  - int  Pixel size of bubble
bubble start  - int  Pixel position of bubble
direction  - {forwards,backwards,goto}  Direction in which to scroll or jump
offset  - int  Offset of down from top of bubble
unit  - {line,page,file}  Unit to scroll

Behaviour

3.8.1 Oms — Object management operations

Send Method initialise object=object, orientation={horizontal,vertical},

message=[code]*

Send Method initialise object=object, orientation={horizontal,vertical},

message=[code]* Refinement of: object->initialise Create a scroll bar to scroll ‘object’ either horizontally or vertically. See also →message.

Send Method unlink

Refinement of: graphical->unlink Stop/disconnect repeat timer

3.8.2 Client — Controlled object

Variable object graphical* (↔)

Object scrolled. This object should understand the following messages

←start Start of the visible part
←view Length of the view part
←length Total length of the object

The returned values are integers. The unit is not important as a scroll bar only considers the relative values.

3.8.3 Behaviour — Definition of behaviour

Send Method compute Send Method compute

If ←request compute is not @nil, this method will:

1. test if the ←object has the send method →bubble scroll bar. If this is the case, this method is called with this scrollbar as argument. The receiving object is supposed to activate →bubble, passing the current viewport settings to the scrollbar.

2. If the ←object has all the methods ←start, ←view and ←length, the scrollbar will invoke them and update the viewport using the result. Backward compatibility

        only.

If the scrolled object or the viewport is modified, the window or ←object should invoke →request compute on the scroll bar to activate this mechanism.

Send Method convert loaded object int=int, int=int

Refinement of: object->convert loaded object Called by ‘file ←object’ if the current save version is not the same as save version when the file was loaded. The two arguments are the old and the new save versions. See ‘pce ←save version’.

3.8.4 Action — Associated action

Variable message [code]* (↔)

Message executed when the user operates the scrollbar. See the description of class scroll bar for the forwarded values.

3.8.5 Appearance — “Look-and-feel” related aspects

Variable look {x,open look,motif,win} (←) [Pce.ScrollBar.look: open look] Send Method look {x,open look,motif,win}

Look-and-feel. Currently only ‘x’, which implies compatible with the scrollbars from the Xaw library. Future version should offer Motif and OpenLook compatible versions of the scrollbar.

Variable orientation {horizontal,vertical} (←) Send Method orientation {horizontal,vertical}

Determines the layout of the scroll bar as well as the default messages sent (see description of class scroll bar). If this value is changed by the send method, the ←width and ←height are swapped.

3.8.6 Layout — Spatial relations between graphical objects

Variable distance int (←) [Pce.ScrollBar.distance: 0] Distance between the scrollbar and the object. The default is -1, so the lines of the scrollbar and object scrolled overlap. This variable is used by →place.

Variable placement chain (←) [Pce.ScrollBar.placement: [right,bottom]] Name consisting of ‘left or right’ and ‘top’ or bottom’, separated by spaces. It determines where the scroll bar is placed using →place.

3.8.7 Area — Handling size and position

Send Method place [graphical] Position scrollbar relative to the given object. If no object is given, ←object is used. Exploits the variables

←placement to place left/right, top/bottom.
←distance to determine the distance to the object.

The scrollbar is displayed on the same ←device as the given graphical.

3.8.8 Scroll — Controlling the ‘viewport’

These methods define the ‘bubble’. The bubble provides feedback on the current location of the ‘viewport’ in the total object and (depending on the look-and-feel) the relative size of the viewport compared to the total object.

To avoid updating the scrollbar multiple times if the object or window is changed multiple times it is adviced that the scrolled object sends →request compute to the scroll bar instead of using →bubble. During PCE’s repaint cycle this will make PCE invoke →compute on the scroll bar.

Variable length int (←)

Variable start int (←) Variable view int (←) Send Method bubble length=int, start=int, view=int Send Method length int=int Send Method start int=int Send Method view int=int

The three parameters ←length, ←start and ←view tell the scrollbar which part of the object scrolled is currently in the window:

→length Total size of the object
→start Start of the visible part
→view Size of the visible part

The method →bubble allows the user to change all three parameters with one message. See also →compute.

Send Method repeat

Repeat last action (→look: open look)

3.8.9 Event — Event processing

Variable drag bool (↔)

If @on, messages are sent continuously

Send Method event event=event Refinement of: graphical->event Operate the scrollbar The exact definition depends on ←look. See ←message and the description of class scroll bar for establishing the communication with the scrolled ←object.

Variable status name (←)

Current status for event parsing

3.8.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

3.8.11 Internal — Private behaviour

Variable amount int (-)

Amount to scroll

Variable auto hide bool (←) [Pce.ScrollBar.auto hide: @on] Send Method auto hide bool=bool

If @on, hide if all is visible

Variable bubble length int (-)

Pixel size of bubble

Variable bubble start int (-)

Pixel position of bubble

Variable direction {forwards,backwards,goto} (-)

Direction in which to scroll or jump

Variable offset int (-)

Offset of down from top of bubble

Variable unit {line,page,file} (-)

Unit to scroll 64 Class scroll bar XPCE Reference Manual

Chapter 4

Dialogs and Menus

This chapter describes the PCE classes to build dialogue boxes. The classes used to build dialogue boxes are a specialisation of the generic graphics classes of XPCE. Class dialog and class dialog item add automatic layout and protocols to deal with keyboard accelerators, ‘applying changes’ and restoring the dialog box.

4.1 Class dialog — Window with dialog items

Inheritance: ⇒ dialog ⇒ window ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: frame (frame*), tile (tile*), decoration (window decorator*)

A dialog is a window that is designed to be used for creating dialog boxes. A dialog performs automatic layout over its contents, thus largely simplifying the definition of simple dialog windows and the automatic generation of dialog windows.

Dialog windows normally only display instances of subclasses of class dialog item. These are added to the dialog using the ‘dialog →append’ method rather than ‘window →display’. ‘dialog →append’ places the item relative to the other items in the dialog. When the frame in which the dialog resides is created, the final positions are automatically calculated by ‘dialog →layout’.

Dialog windows may be operated in two modes: each change to an item in the dialog immediately sends a message or pressing an ‘apply’ button will apply all modifications made to the dialog. The example below illustrates a dialog of the latter type for editing some window attributes:

    dialog(W) :-
        new(D, dialog('Edit Window Attributes')),
        send(D, append, label(reporter)),
        send(D, append,
             text_item(frame_label,
                   W?frame?label,
                   message(W?frame, label, @arg1))),
        send(D, append,
             slider(width, 50, 500, W?visible?width,
                    message(W, width, @arg1))),
        send(D, append,
             slider(height, 50, 500, W?visible?height,
                    message(W, height, @arg1))),
        send(D, append, button(apply)),
        send(D, append, button(restore)),
        send(D, append, button(quit, message(D, destroy))),
        send(D, default_button, apply),
        send(D, open).
    ?- new(@w, window),
         send(@w, open),
         dialog(@w).

This dialog may be converted into an ‘immediate’ changing dialog by deleting the apply button. See →apply, →modified item and →restore for details.

Instance Variables

layout gap

↔

size Distance in X and Y direction between items

size given  - bool  User specified explicit size

Behaviour

4.1.1 Oms — Object management operations

Send Method initialise label=[name], size=[size], display=[display] Send Method initialise label=[name], size=[size], display=[display]

Refinement of: window->initialise Create an empty dialog window. After creation it is normal to display instances of class dialog item in the dialog using →append.

4.1.2 Apply — Applying dialog windows

Send Method apply always=[bool] Invoke the ‘dialog item ←message’ for each of the dialog item’s in ←graphicals. If ‘always’ equals @on the message will be invoked regardless whether the user has modified the item or not. If ‘always’ equals @off or @default the message will only be invoked if ‘dialog item ←modified’ yields @on. If the dialog has a ←default button, execute ‘button→active: @off’.

See also →restore.

Send Method modified item item=graphical, modified=bool This message is normally invoked by one of the member dialog item objects. If the dialog has a ←default button, this button will be activated using ‘button →active: @on’. Otherwise, this method fails. Dialog-items will send their ‘dialog item ←message’ immediately if this message fails. Otherwise they assume the default button will activate ‘dialog →apply’.

See also ‘dialog item →modified’, →apply and →restore.

Send Method restore

Restores all items in the dialog to their default state by invoking ‘dialog item →restore’ to all ←graphicals. If the dialog has a ←default button, this is send ‘button→active: @off’.

See also ‘dialog item →restore’, ‘dialog item ←default’ and ‘dialog item →modified’, ‘dialog item →apply’ and →apply.

4.1.3 Active — Activation (greying) of dialog objects

Get Method active ⇒bool

Equivalent to ‘window ↔sensitive’. Both for consistency with class dialog item and for backward compatibility.

Send Method active bool=bool Refinement of: graphical->active If @off, the colour of the drawing pen will be set to ←resource value: inactive colour. The method →event will simply fail if ←active is @off.

4.1.4 Layout — Spatial relations between graphical objects

Send Method compute desired size Send Method compute desired size

Refinement of: window-> compute desired size This method is normally called from ‘frame→fit’. It invokes the automatic →layout, assigns the →caret to the first text item and -if the user did not specify a →size- it resizes the dialog to fit its contents.

Variable gap size (↔) [Pce.Dialog.gap: size(15,8)] Distance in X and Y direction between items

Send Method layout size=[size] Send Method layout size=[size]

Refinement of: graphical->layout Align the dialog item objects in the dialog. This method is normally called from ‘dialog → compute desired size’ when then dialog’s frame is created. See also ‘frame →fit’.

The layout process consists of the following stages:

1. Place all items for which ‘dialog item ←auto align: @on’ in a two-dimensional grid.

2. Automatically align labels and values of items placed above each other depending

on • ‘dialog item ←auto label align’

• ‘dialog item ←label width’

• ‘dialog item ←auto value align’

• ‘dialog item ←value width’

3. Items that have ‘dialog item ←alignment’ not ‘column’, but one of ‘left’, ‘center’ or ‘right’ are not horizontally with items above or below them, but combined with items to their left and right into sequences of items with the same alignment. At the end of the layout process aligned such sequences are aligned in the available space. Notably button objects have ‘button ←alignment: center’, so a row of buttons is normally centered in the dialog window.

4. Compute the cell-size of the matrix and align the • ‘dialog item ←reference’

in the two-dimensional grid.

Variable size given bool (-)

Set by →size to @on. When set, → compute desired size will call →layout, but it will not change the user-defined size.

4.1.5 Area — Handling size and position

Send Method size size=size Set the size of the window as ‘window→size’ and sets ←size given to @on to avoid overruling of the given size by the automatic layout system invoked by → compute desired size.

4.1.6 Accelerator — Binding the keyboard

Send Method assign accelerators Send Method assign accelerators

Assign accelerators for the dialog item objects

Get Method default button ⇒button

Send Method default button member:button* The default window of a dialog window is the button that has accelerator ‘RET’. There is no default default button. See also →modified item and →apply.

Send Method typed event id=event id, [bool] Send Method typed event id=event id, [bool]

Refinement of: window->typed Handle keyboard accelerators registered with buttons and menu items part of the dialog. See ‘button ←accelerator’ and ‘menu item←accelerator’.

This method is normally invoked from ‘window →event’. It performs the following steps:

1. Convert the event id into a key-name (see also class key binding).

2. invoke ‘dialog item →key’ on each member of the dialog window until one succeeds.

3. If no member accepts the key it will invoke ‘frame →typed: event id’ on the associated frame.

4.1.7 Report — Reporting events, status and errors

Get Method report to ⇒graphical|frame Get Method report to ⇒graphical|frame

Refinement of: visual<-report to If there is a ←member dialog item called ‘reporter’, this item is returned. Otherwise ‘visual ←report to’ is invoked.

This method is normally exploited by displaying a label object with name ‘reporter’ on the dialog object. This label will then display all error messages raised from operating the dialog item. See ‘visual →report’, ‘object →report’ and class error.

4.1.8 Focus — Focussing events to objects

Send Method caret member:graphical Assign the caret to the named text item object. See also →advance and ‘text item ←advance’.

4.1.9 Organisation — Organisation of (graphical) objects

Send Method append item=graphical, relative to last=[{below,right,next row}] Send Method append item=graphical, relative to last=[{below,right,next row}]

Append an instance of class dialog item or a plain graphical object to the dialog object. The appended item is placed according to ‘relative to last’:

below  below the last one
right  right of the last one
next row below the left-most item of previous row

If relative to last is omitted, the following defaults apply: if the last item and this item are instances of class button, the item is placed ‘right’. Otherwise the item is placed ‘next row’.

Send Method delete member:graphical Delete (named) dialog item

Send Method display graphical=graphical, at=[point] Refinement of: device->display Display a graphical or dialog item on a fixes position rather than exploiting automatic layout. Equivalent to ‘device→display’, but invokes

    `dialog_item →auto_align: @off'

To inform →layout not to move this object.

Get Method member name|graphical ⇒graphical Get Method member name|graphical ⇒graphical

Refinement of: device<-member Return the first graphical of ‘Device ←graphicals’ that has name ‘name’. This mechanism is commonly used to address parts of a device.

Send Method member name|dialog item Test if dialog item or name is a member

Get Method members ⇒chain

Equivalent to ←graphicals

4.2 Class dialog item — Item (menu) in a dialog window

Inheritance: ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

Class dialog item describes the communication between a ‘dialogue window’ (class dialog). and an item in such a window. Besides the normal communication between graphicals and windows, this entails:

• Automatic layout of dialog windows (‘dialog →layout’).

• Forwarding changes (‘dialog →modified item’).

• ‘Applying’ a dialog window (‘dialog →apply’).

Dialog Item’s are normally appended to a dialog using ‘dialog→append’. In some cases there spatial relationship is specified using →above, →below, →left or →right.

Fine tuning of layout is achieved using →auto align, →alignment, →auto label align, →auto value align and →reference.

Dialog items may also be displayed on normal graphical device objects (including window objects). With automatic layout, this is achieved using ‘device →append dialog item’ and ‘device →layout dialog’. Without automatic layout using ‘device →display’.

Instance Variables

label

label  ← char array|image*  Label of the item
label font  ← font*  Font used for the label if not an image

action

message ↔ [code]* Associated command

appearance

background ← image|colour* Opaque background for item

look ← {x,open look,motif, win}|name

Look-and-feel switch

layout

above  ← graphical*  DialogItem above me
accelerator  ← name*  Automatically align value
alignment  ↔ {column,left,center,right}  Align in columns or right of item to the left
auto align  ↔ bool  Item is automatically placed by its dialog
auto label align  ↔ bool  Automatically align label
auto value align  ↔ bool  Automatically align value
below  ← graphical*  DialogItem below me
label format  ← {left,center,right}  Align labels in their box
label width  - [int]  Width of the label in pixels
left  ← graphical*  DialogItem left of me
reference  → [point]  Reference point for alignment
right  ← graphical*  DialogItem right of me

menu

popup ↔ popup* Associated popup menu

event status ← {inactive,active,preview,

execute}

Status for event-processing

Behaviour

4.2.1 Oms — Object management operations

Send Method initialise name=name

Refinement of: object->initialise Create a dialog item from its name. Class dialog item is just a super-class of the real dialog items and it is of very little use to create a instance of this super-class. ‘← label’ is filled with ‘char array ←label name’ and the label is guaranteed to end with Pce.DialogItem.label suffix.

Send Method unlink

Refinement of: graphical->unlink Remove left,right,above,below links

4.2.2 Name — Naming objects

Send Method name name=name The name of a graphical can be used to locate it on its device. Finding graphicals by name is a simple but very effective way. Graphicals generally do not visualise their ←name.

See ‘device←member’ and ‘device ←catch all’.

4.2.3 Label — Visible name of objects

Variable label char array|image* (←) Send Method label char array|image*

Label of the item. For most items, the label is displayed in the ‘label font’ and indicates the function of the item.

Variable label font font* (←) [Pce.DialogItem.label font: bold]

Send Method label font font*

Font used for the label if not an image

Get Method label name name=name ⇒name Get Method label name name=name ⇒name

Determine default-label from the name

4.2.4 Action — Associated action

Variable message [code]* (↔)

Message executed when the item is executed. The conditions on which the execution takes place as well as the arguments forwarded are determined by the specific type of item.

4.2.5 Apply — Applying dialog windows

Get Method default ⇒any

The ←default of a dialog item defines the value to which the ←selection will be reset by →restore. The ↔default mechanism is defined for all sub-classes of class dialog item that may be modified by the user.

Send Method default any=any

Virtual method. Defined by subclasses that may be modified. It assigns the initial value as well as the value to which the item is →restore’d.

Get Method modified ⇒bool

Virtual method. Subclasses that define items which may be modified by the user (class text item, class menu) redefine this method to return @on after the user has modified the item. See also →apply and ‘dialog →modified item’.

Send Method modified bool=bool When @on, this method invokes →modified item: @receiver, @on on its ←device (normally ‘dialog→modified item’). When @off is method just succeeds.

This method is redefined by subclasses of dialog item that allow the user to modify the selection.

See also →restore, ←default and ‘dialog →modified item’.

4.2.6 Appearance — “Look-and-feel” related aspects

Variable background image|colour* (←) [Pce.DialogItem.background: @ dialog bg] Send Method background image|colour*

Opaque background for item

Variable look {x,open look,motif,win}|name (←) [Pce.DialogItem.look: open look] Send Method look {x,open look,motif,win}|name

General look-and-feel switch. The interpretation is left to the subclasses. See also ‘scroll bar ↔look’.

XPCE is shipped with resource-files both to generate PCE’s default look-and-feel and to emulate (most of) the OpenLook style. Check the installation instructions for more details.

4.2.7 Layout — Spatial relations between graphical objects

Variable above graphical* (←)

Dialog-item immediately above me.

Variable accelerator name* (←) Send Method accelerator name*

Automatically align value

Variable alignment {column,left,center,right} (↔) [Pce.DialogItem.alignment:

column] Determines how the dialog is fitted in the two-dimensional space of the dialog window by ‘dialog →layout’. The values are:

# column

    Align the item below the upper-neighbour

• left Place the item immediately right of its left-neighbour. (left means ‘flush-left’).

• center Place centered items adjacent and centered in the available horizontal space.

• right Flush the item to the right of the available horizontal space.

For example, button objects in OpenWindow dialog windows should be centered. Setting the resource Pce.Button.alignment to center will properly align buttons for Open-Window look-and-feel.

Variable auto align bool (↔)

Item is automatically placed by its dialog

Variable auto label align bool (↔)

Align the width of the label automatically with the labels of the items in the same column.

Variable auto value align bool (↔)

Automatically align the width of the values. Currently applicable to menu’s only, where it refers to the width of the entries in the menu.

Variable below graphical* (←)

Dialog item immediately below me.

Variable label format {left,center,right} (←) [Pce.DialogItem.label format: right] Send Method label format {left,center,right}

Determines how labels of dialog objects aligned in a vertical column are aligned by ‘dialog →layout’. ‘Dialog →layout’ first determines the widest label, after which it requests all dialog items to make their label equally wide. This resource determines how a small label is aligned in a wider box.

See also Pce.DialogItem.label suffix.

Get Method label width ⇒int Get Method label width ⇒int Variable label width [int] (-) Send Method label width [int]

The width of the area in which the label is displayed. Used to implement automatic alignment of labels of items displayed in a vertical row. See also ‘dialog →layout’.

Variable left graphical* (←)

Item immediately to the left.

Get Method reference ⇒point

Variable reference [point] (→)

Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

Variable right graphical* (←)

Item immediately to the right.

Get Method value width ⇒int Get Method value width ⇒int Send Method value width [int]

Methods used to align the values of dialog items placed above each other. Implemented for class menu to align the field width when multiple menu’s are in a vertical column,

4.2.8 Menu — Associating (Popup) menus

Variable popup popup* (↔)

Popup menu associated with the item.

4.2.9 Event — Event processing

Send Method cancel

Cancel current gesture. Equivalent to →status: inactive.

Send Method event event=event Refinement of: graphical->event Show ←popup when defined.

First invoke ‘graphical →event’. If this fails and ←popup is not @nil, open this popup menu. This method is redefined by most subclasses.

Variable status {inactive,active,preview,execute} (←) Send Method status {inactive,active,preview,execute}

The status variable describes the current status with regard to processing user-events. The values are:

• inactive Default initial value

• active In focus of events; the item may indicate so.

• preview Indicates releasing the button now will start execution

• execute Indicates the ↔message is currently executing

4.2.10 Organisation — Organisation of (graphical) objects

Send Method device device* Send Method device device*

Refinement of: graphical->device If the device is changed all ←above, etc. relations are destroyed first.

Send Method open Send Method open

Convenience method: if the dialog item is not yet placed in a dialog window, place it in a default dialog window and open this window on the display, so

    ?- send(text_item(name), open).

Suffices to create a default text item object in a window on the display.

Get Method show ⇒bool

Send Method show bool=bool Equivalent to ↔displayed. Retained for backward compatibility.

4.2.11 Abort — Cleanup after aborting execution

Send Method reset

Refinement of: visual->reset Reset the ←status to inactive. This will reset dialog items if the execution is aborted from the activated code.

4.3 Class button — Push button to invoke a command

Inheritance: ⇒ button ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

A button appears on the screen as a rectangle with a textual label. When the user presses the button, it will execute its associated message with the following parameters:

@receiver The button itself

If ←message is @default, the button will send its ←name to its ←device. Thus, a button named ‘apply’ will invoke →apply on the dialog box it is displayed on.

A button may be assigned a key-sequence to activate it. See ←accelerator. If the ←accelerator is "RET" the button is the ‘default’ button of its device and will be highlighted. See also ‘dialog →default button’).

A button may be assigned a popup menu using →popup. Existence of a popup menu is indicated using a small triangle.

Instance Variables

appearance

popup image  ← image*  Indication that button has a popup menu
radius  ← int  Rounding radius for corners
shadow  ← int  Shadow shown around the box

accelerator

default button  ← [bool]  Button is default button for its ←device

Behaviour

4.3.1 Oms — Object management operations

Send Method initialise name=name, message=[code]*, label=[name] Send Method initialise name=name, message=[code]*, label=[name]

Refinement of: dialog item->initialise

Create a button with the specified ←name. The displayed ←label is computed from this name using ‘char array ←label name’ from the ←name.

When the button is depressed (using the left-button) it will →execute itself, activating the given code object.

4.3.2 Label — Visible name of objects

Send Method label char array|image* Send Method label char array|image*

Refinement of: dialog item->label

Label of the item. For most items, the label is displayed in the ‘label font’ and indicates the function of the item.

Get Method selection ⇒name

Send Method selection char array|image* Equivalent to ↔label. For compatibility with older versions as well as for compatibility with other dialog item’s.

4.3.3 Behaviour — Definition of behaviour

Send Method compute Send Method compute

Computes the ←width and ←height using the ←name and ←font. If the required size turns out to be smaller than the resource Button.size this size is used instead.

4.3.4 Action — Associated action

Send Method execute

Switches the button in ‘execute’ →status, executes (see ‘message →forward’) the message associated with the button and switches the →status back to ‘inactive’.

With a @default ←message, the button will send a message to its device. The selector of this method is the ←name of the button. There are no arguments.

4.3.5 Appearance — “Look-and-feel” related aspects

Send Method font font=font same as →label font

Variable popup image image* (←) [Pce.Button.popup image:

when(@colour display, @nil, @ol pulldown image)]

Send Method popup image image*

Indication that button has a popup menu. If present this image is painted right-of the label of the button.

Variable radius int (←) [Pce.Button.radius: when(@colour display, 8, 12)] Send Method radius int=int

Rounding radius for corners

Variable shadow int (←) [Pce.Button.shadow: when(@colour display, 0, 1)] Send Method shadow int=int

Shadow shown around the box

4.3.6 Layout — Spatial relations between graphical objects

Get Method reference ⇒point Get Method reference ⇒point

Refinement of: dialog item<-reference Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

4.3.7 Menu — Associating (Popup) menus

Get Method popup create=[bool] ⇒popup* Get the popup object associated with the button. If the -popup slot has value @nil and ‘create’ is @on, a popup is associated with the button. This popup has one item with the following attributes:

‘menu item ←value’  ←name
‘menu item ←label’  ←label
‘menu item ←message’ message(@arg1, execute)

The message will →execute the button when the first item is selected.

Send Method popup popup* Refinement of: graphical->popup Assign ←popup and update (add/remove) the indication on the button for the existence of a popup menu.

4.3.8 Event — Event processing

Send Method wants keyboard focus Send Method wants keyboard focus

Refinement of: graphical-> wants keyboard focus Test if graphicals wants keyboard events (fail). Used by ‘device →advance’ and redefined by various sub-classes.

Send Method event event=event Refinement of: dialog item->event First calls ‘dialog item →event’. If this fails it passes the event to @ button gesture (a click gesture object).

Send Method status {inactive,active,preview,execute} Refinement of: dialog item->status Assign ←status and redraw:

active and inactive ‘Normal’ appearance
preview  Inverted inside
execute  Grey inside background

4.3.9 Accelerator — Binding the keyboard

Variable default button [bool] (←) Send Method default button [bool]

Button is default button for its ←device. This implies two things. First of all, if an item in the dialog is modified, the item will invoke ‘dialog →modified item’. If the dialog finds a ‘dialog ←default button’, it will make the default button →active. If the RETURN key is hit in the dialog window, the default button will be →execute’d.

Send Method key key=name Normally invoked from ‘dialog →typed’. ‘Key’ is the symbolic name of the key(- sequence) typed. If this ‘key’ is equal to ←accelerator, →execute the button.

4.3.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.4 Class label — Provide feedback in a dialog window

Inheritance: ⇒ label ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

A label is a dialog item object used to inform the user. It’s selection is either a string or an image. This selection is the only visual part of a label. Labels are normally used to provide feedback inside a dialog window or to describe a group of dialog items.

Labels play a role in the predefined (error) reporting system initiated by ‘object →report’. If a label object named ‘reporter’ appears in a dialog object, the dialog’s ‘dialog ←report to’, combined with ‘frame ←report to’ ensures that all status, warning and error messages initiated by →report will be displayed by this label. See →report and ‘visual →report’.

It is possible to attach a message to a label, which is than executed when the user presses the label with the left button. This use is not advocated.

Instance Variables

selection

selection ← char array|image Text or image displayed

appearance

border  ← 0..  Space around the image
font  ← font  Font for selection

area

length  ← int  Length in characters (with text)

Behaviour

4.4.1 Oms — Object management operations

Send Method initialise name=[name], selection=[string|image], font=[font] Send Method initialise name=[name], selection=[string|image], font=[font]

Refinement of: dialog item->initialise

Create a label from its name (used to reference it in its device; see ‘device ←member’) and its selection. The default name is ‘reporter’, which makes the label the reporter of the dialog (see ‘dialog ←report to’). The default selection is ”. The default font is determined my the font resource.

4.4.2 Delegate — Delegation of behaviour

Send Method catch all name=name, unchecked ...

Messages not understood are delegated to the current ←selection. If the selection is a name object and the method is known to class string, the selection will automatically be translated into a string object. This implies that a label that displays a name still understands all methods defined on class string. Notably ‘string→append’, and ‘string→format’ are commonly used methods.

4.4.3 Selection — Manipulation and query of selections

Send Method clear

Equivalent to →selection: ”

Variable selection char array|image (←) Send Method selection char array|image

Currently displayed text or image object. If the selection is a text (instance of class char array), it is displayed in ←font. The field width is described by ←length. If the actual text does not fit in the field the label is automatically enlarged.

4.4.4 Behaviour — Definition of behaviour

Send Method compute Send Method compute

Computes the ←area of the label from the ←selection. If the selection is text and the width of the text is smaller than ←length times ←font←ex, the width is made equal to this value. This will reserver sufficient space when the label is placed by the automatic ‘dialog →layout’ mechanism.

4.4.5 Execute — Execution of dialog objects

Send Method execute

Execute ←message. Arguments:

@receiver the label

This method is normally invoked from →event through a click gesture object.

4.4.6 Appearance — “Look-and-feel” related aspects

Variable border 0.. (←) [Pce.Label.border: 1]

Send Method border 0..

Space around the image

Variable font font (←) [Pce.Label.font: normal] Send Method font font=font

Font used to display the label. Note that the font is only applicable if the ←selection’s value is a char array object (text).

4.4.7 Layout — Spatial relations between graphical objects

Get Method reference ⇒point Get Method reference ⇒point

Refinement of: dialog item<-reference Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

4.4.8 Area — Handling size and position

Variable length int (←) [Pce.Label.length: 25] Send Method length int=int

Width of the label’s field in ‘ex’ units (i.e. width of the character ‘x’ in the current ←font).

4.4.9 Format — Formatted write (as C printf())

Send Method format name=name, any ...=any ...

Create a formatted string from the arguments and make it the ←selection. Equivalent to:

    send(Label, selection, string(Format, Argument ...)).

4.4.10 Event — Event processing

Send Method event event=event Refinement of: dialog item->event Make the button behave as a button object if ←message is defined.

First invokes ‘dialog item →event’. If this fails and ←active == @on and ←message is not @nil, forward ←message on a left-click. Uses @ button gesture.

Send Method status {inactive,active,preview,execute} Refinement of: dialog item->status Status of the label with regard to event processing. Not used.

4.4.11 Report — Reporting events, status and errors

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ...

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ... Refinement of: visual->report →format the message in the label. If the type of the information is either warning or error it will invoke ‘graphical →flash’ on @reportee.

Note that class dialog redefines ←report to (see ‘dialog ←report to’). If a label is called ‘reporter’ (see ‘dialog item ←name’), the dialog will delegate →report messages to this label.

‘Kind’ is progress is equivalent to ‘status’, but sends →flush to update the display immediately after changing the ←selection. ‘Kind’ is done appends the formatted text to the current ←selection of the label. If ‘format’ is @default, ‘done’ is appended to the selection.

4.4.12 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.5 Class text item — Text entry field

Inheritance: ⇒ text item ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

Delegation: value text (text)

A text item is a entry field for a short text. It is normally used in dialog windows for entering names or other short textual information. A text item consists of a label, and an entry field. The label is fixed. The user may type in the entry field.

When the user hits RETURN, the text item will forward the current ←selection over the associated ←message with the following arguments:

@receiver The text item
@arg1  The current selection

Text item’s may used to edit/examine any PCE type that defines a ‘object ←print name’ and an ‘object ←convert’ which allows the item to convert a typed textual representation into an object of the requested type. See ←type.

If is possible to generate a set of possible completions for a partially typed text, the text item may be programmed to perform automatic completion. See →complete.

The mapping from key-strokes to edit actions is determined by the reusable key binding object named text item, a reference to which may be obtained using:

    ?- new(KB, key_binding(text_item)).

See also class label.

Instance Variables

type

type ↔ type Value-type of the selection

visualisation

value text ← text Graphical text object for selection

selection

selection - any Current value

action

advance ↔ {next,clear,none} If ‘next’, proceed to next in window

apply

default - any|function The default value

appearance

show label  ← bool  Whether label is visible
style  ← {normal,combo box}  Show combo-box item for completions
value font  ← font  Font for entry field

layout

hor stretch  ↔ 0..100  Horizontal stretchability
value width  - [int]  Width of the value-part in pixels

area

length ← int Length of entry field in characters

event

editable ← bool TextItem may be edited

complete

value set ← [chain|function]* Set of possible values

textual

print name  - char array  Text-representation of ↔selection

Behaviour

4.5.1 Oms — Object management operations

Send Method initialise name=[name], default=[any|function], message=[code]* Refinement of: dialog item->initialise Create a text-entry-field from its label, initial value and message to execute after the value is edited by the user. The initial value will be processed as →default’

4.5.2 Type — Type definition, test and conversion

Variable type type (↔) Send Method type type=type

The ↔type slot describes the value-type represented by the text item. When a value is displayed, it is translated into a string using ‘text item ←print name’. After editing, it is translated into a PCE object of the specified type using ‘Type ←check’.

Slot ←type is set by →default, where it is deduced from the initial value. When the value is an integer, the type is ‘int’. Otherwise the type describes the class the selection belongs to.

If the type can generate a value set (see ‘type ←value set’ and ↔value set, the →style will automatically be changed to ‘combo box’.

Example

    ?- new(P, picture),
       send(P, display, new(B, box(100,100))),
       send(new(D, dialog), below, P),
       send(D, append,
            text_item(size, B?size,
                      message(B, size, @arg1))),
       send(P, open).

4.5.3 Delegate — Delegation of behaviour

Send Method delegate program object=program object, text=text, unchecked ...

This is a ‘delegate variable ←wrapper’ method dealing with the side-effects of manipulating the ←value text object.

4.5.4 Visualisation — Making data visible

Variable value text text (←)

PCE text-object used to display the print-representation of the selection. The textobject takes care of editing commands, etc.

4.5.5 Selection — Manipulation and query of selections

Send Method clear

Equivalent to ‘→selection: ”’. This method is meaningless when type is not ‘name’ or some other type that allows for ”.

Send Method paste [int] Send Method paste [int]

Paste the value of the indicated X-cut buffer. See ‘display ←cute buffer’. By default invoked from →event on a middle button click.

Get Method selection ⇒any

Recompute the ←selection from the entered value. Performs the following steps:

1. →enter completer

2. If ←modified equals @on, convert the ‘text←string’ of the ←value text (i.e. the displayed value) using ‘type←check’ to the requested type. If this succeed assign ←selection and ←print name. If it fails generate a connot convert text error.

3. Finally return the ←selection slot value

Send Method selection any=any

Set the ←selection. If the given value is not equal to the ←selection, convert it to ←type using ‘type ←check’. If the value is still not equal to the ←selection, obtain a printable representation using ←print name with the value as argument. Finally assign ←selection with the (converted) value and ←print name with the textual representation and update the display.

See also ←selection and →default.

Variable selection any (-)

Value of the selection. Set by →selection and ←selection if the text has been edited by the user.

4.5.6 Behaviour — Definition of behaviour

Send Method compute

Updates the ←value text, the label and value positions and the ←reference.

4.5.7 Action — Associated action

Variable advance {next,clear,none} (↔)

Determine the behaviour after the user hits RETURN while the text item was modified. See also →enter. Values are:

• next Send message and goto next item in dialog

• clear Send message and clear item. Do not move caret to next.

• none Just send message.

Send Method enter [event id] The method →enter is by default bound the the RETURN key. It’s behaviour is rather complicated to get proper default action both if the dialog window in which the text item resides has a ‘dialog ←default buttun’ and if this is not the case.

1. Send ‘window →typed’ to the ←window of the text item. If the window has an accelerator for ‘RET’ this will be activated. If this message returns successfully the text item considers the RETURN handled.

2. Otherwise, →apply the text item. If this succeeds and ←advance = ‘clear’, clear the text item using →selection ”. Otherwise proceed to the next text item using →next.

Send Method execute

Execute the text item. Equivalent to →apply: @on.

4.5.8 Apply — Applying dialog windows

Send Method apply [bool] Executes ←message iff it is a code object, always is @on or ←modified is @on and ←selection succeeds. The following arguments are forwarded:

@receiver The text item
@arg1  The ←selection.

Get Method default ⇒any

Refinement of: dialog item<-default If the value of -default is a function, execute it. Otherwise just return the value of this slot.

Send Method default any|function Refinement of: dialog item->default Set the variable -default to the argument and then →restore the text item.

Variable default any|function (-)

Value to which the text item is →restore’d.

Get Method modified ⇒bool

Refinement of: dialog item<-modified Test if the user has modified the selection. Succeeds if the current value of the text entry field is not equal to ←print name.

Send Method modified bool=bool Refinement of: dialog item->modified If the argument equals @off, ‘→modified’ runs ‘←selection’ to reset the -selection and -print name slots.

Send Method restore

Computes the current ←default value and sets the →selection to this value.

4.5.9 Appearance — “Look-and-feel” related aspects

Variable show label bool (←) Send Method show label bool=bool

Determines whether or not the label is visible. Used seldomly.

Variable style {normal,combo box} (←) Send Method style [{normal,combo box}]

Class text item can represent a ←value set or do completion on the basis of their associated ←type. In both cases, visualisation by means of a ‘combo box’ provides useful feedback to the user as well as a commonly found user interface style.

←style combo box is automatically selected after →value set or →type with a suitable type. It may be switched afterwards.

A text item showing as a combo-box both supports completion and opening the combobox.

Variable value font font (←) [Pce.DialogItem.value font: normal]

Send Method value font font=font

Font for entry field

4.5.10 Layout — Spatial relations between graphical objects

Variable hor stretch 0..100 (↔)

Horizontal stretchability. This is interpreted by ‘dialog →layout’. The item will be extended towards the item at its right or the right-side of the dialog window.

Get Method label width ⇒int Send Method label width [int]

Refinement of: dialog item<-label width The width of the area in which the label is displayed. Used to implement automatic alignment of labels of items displayed in a vertical row. See also ‘dialog →layout’.

Get Method reference ⇒point

Refinement of: dialog item<-reference Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

Variable value width [int] (-)

Width of the value-part in pixels. Note that →right side is often a comfortable for helping allignment. See also ←hor stretch.

4.5.11 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Resize the image

4.5.12 Area — Handling size and position

Variable length int (←) [Pce.TextItem.length: 25] Send Method length int=int

Length of the value-part of the text item in ←value font’s ‘ex’ units (see ‘font ←ex’).

Send Method value width int=int

Refinement of: dialog item->value width Width of the value-part in pixels. Note that →right side is often a comfortable for helping allignment. See also ←hor stretch.

Send Method width characters=int Equivalent to →length. New code should use →length, to avoid the ambiguity with ‘graphical →width’.

4.5.13 Caret — Moving the insertion point

Send Method next

Advance to next item in same ←device

4.5.14 Event — Event processing

Send Method wants keyboard focus

Refinement of: graphical-> wants keyboard focus Test if the text item is prepared to get the keyboard focus. Succeeds if:

1. TextItem is displayed

2. TextItem is active

3. TextItem is editable

Send Method activate bool=bool Select all/deselect

Variable editable bool (←)

Send Method editable bool=bool If @on, text may be edited by typing. If @off, any attempt to type will invoke →alert on the text item.

Send Method event event=event Refinement of: dialog item->event Process an event:

• When ↔active equals @off: fail

• Left button: try to get the caret (see ‘→caret’).

• Middle button: paste X-cut-buffer 0

Finally is the event is a keyboard event and @completer is working for this text item ‘event →post’ this event to @completer. Otherwise invoke ‘text item →typed’.

Get Method pointed at=point ⇒int Convert position to character index

Send Method status {inactive,active,preview,execute} Refinement of: dialog item->status If ‘active’, show the caret (‘text →show caret’). Otherwise the caret is not visible.

Send Method typed event id=event id Activates the key binding object named ‘text item’ from @key bindings. This key binding object will map the typed keys onto functions (selectors) which will then be invoked on the text item.

For example, if the user types an ‘a’ to a text item the following sequence of method is traversed:

1. →event

2. →typed

3. ’a’ mapped by key binding object to

           →insert_self: @default, 97

4. →insert self is delegated to ←value text

4.5.15 Accelerator — Binding the keyboard

Send Method key key=name Request keyboard if accelerator is typed

4.5.16 Complete — Automatic completion of textual constants

Send Method complete [event id] Attempt to complete the value typed so far. If this fails or there is no completion defined for this item. activate ‘text →insert self’.

This method is the central method of the text item’s completion mechanism. This completion mechanism both deals selecting in hierarchical organised data (like the Unix file-system) and with simple lists of possible values. The second case is generally handled by ↔value set. For selecting from hierarchical organised data the following methods need to be redefined:

• ←split completion Split the currently typed value in a ‘directory’ part and a ‘file’ part.

• ←completions Return a set of possible ‘files’ in the indicated ‘directory’ using the result of ←split completion.

• →indicate directory Indicate the match of a ‘directory’.

In this documentation we refer to ‘files’ and ‘directories’, but in general this may refer to any organised data using any syntactical convention. The Prolog library file ‘file item.pl’ illustrated how the methods described above may be redefined to select a file from the Unix file-system.

When →complete is invoked, it attempts to complete the current entry. To do so, it locates the first choice-point and the set of objects that may be selected after this choice-point using ‘chain ←complete name’. If the current point is a choice-point it will pop-up the browser object @completer with all possible completions. If the current point is a unique description of a completed value it will indicate such using the error sole completion. Otherwise it will replace ←displayed value with the text leading to the first choice-point or completion.

Get Method completions char array|tuple ⇒chain This method is normally invoked by →complete. The argument is the return-value of ←split completion.

If the argument is a char array the text item completes from a plain list. It should return a chain of objects that match the indicated start of their ←print name. The chain may contain objects whose name does not start with the indicated char array. These will be filtered out by →complete.

If the argument is a tuple the text item is used for a hierarchical structure. This method should return a chain of ‘files’ matching ‘tuple ←second’ in the ‘directory’ ‘tuple ←first’.

The default implementation exploits ←value set.

Get Method has completions ⇒bool

Return @on if item can generate completions. Used by →style: @default to see whether the item should appear as a normal entry-field or as a combo-box.

Send Method indicate directory text=string

This method is invoked by →complete if the expansion is unique. It provides a possibility to indicate that this string represents a ‘directory’. Class file item from the PCE/Prolog library defines this method as:

    indicate_directory(_FI, Dir:string) :→
        (   send(directory(Dir), exists)
        → send(Dir, ensure_suffix, /)
        ;   true
        ).

Send Method keyboard quit

Remove completer and →alert

Send Method select completion value set=chain, prefix=[char array]*,

search=[char array]*, auto hide=[0..] Called by →complete. It’s function is to allow the user to select a value from the set of possible values. Prefix is the value entered so far,

By default this method pops-up the browser @completer. This may be redefined.

Send Method selected completion item=char array, apply=[bool] Called from @completer with the dict item object selected by the user. This will change the current value if the dict item.

Send Method show combo box bool=bool

Called internally to show/unshow the combo-box browser. This browser is actuially @completer, as used by →select completion.

Get Method split completion value=char array ⇒char array|tuple The task of this method is to split the current ←displayed value (passed as argument) into a ‘directory’- and a ‘file-part’ to deal with hierarchically organised data. This method should return:

• its argument If the text item is used to select from a flat list of (named) objects. This is the default behaviour of this method.

• A tuple object with the ‘directory’ and ‘file’ component if the text item is used to select from a hierarchical structure. Note that the return-value of this message is passed to ←completions.

Variable value set [chain|function]* (←) Send Method value set [chain|function]*

Set of possible values. This slot is used by the default completion mechanism built in class text item. See →complete and ←completions. The interpretation of this slot is:

• @nil ←completions fails (no completion).

• @default ←completions activates ‘type ←value set’ on the associated ←type.

• chain object ←completions answers with this chain.

• function object ←completions invokes the function and returns the result. During execution of the function @arg1 is bound to the ‘file’ return of ←split completions. If this function is invoked to generate all values for opening a combo-box, @arg1 is bound to the empty name (”). The function is supposed to return a chain of possible values whose textual description starts with @arg1. Note that →complete will not consider elements of the chain whose ←print name does not start with ←displayed value. Using @arg1 to select candidates is only useful if this speeds up the selection process.

4.5.17 Textual — Textual representation

Get Method displayed value ⇒char array

Send Method displayed value char array=char array Currently visible text. Equivalent to ‘text←string’ of ←value text.

Variable print name char array (-)

This slot contains the ←selection converted to text. It is used to detect if the user has modified the selection.

Get Method print name of value any=any ⇒char array

This method is called whenever the text item wants to convert a value into a string. The default implementation just calls ‘object ←print name’. May be redefined. See also -print name.

4.5.18 Abort — Cleanup after aborting execution

Send Method quit completer

Remove completer

Send Method reset

Refinement of: dialog item->reset Equivalent to →quit completer.

4.5.19 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.6 Class slider — DialogItem to select from a numeric range

Inheritance: ⇒ slider ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

A slider is a graphical representation of a numeric value in a predefined range. The value can be changed by dragging the slider. Sliders are commonly used to view/edit numeric values that should not be exact (it is difficult to drag to an exact value). Examples are the speed of something or a percentage(done).

A slider selects or visualises an numeric value in the range (←low, ←high). Its current value is (as with all dialog item objects) accessible through ↔selection. The exact value is normally shown in textual form as well. This may be controlled by ↔show value. →show label determines whether or not the label visible.

If either ←low or ←high is a real object, the slider will assume it operates on floating point numbers. If both ←low and ←high is integer, the slider will assume integer values. So, to specify a slider from 0 to 10 in floating point, use:

    ?- new(S, slider(value, 0,0, 10.0, 5.0)).

When a slider is operated by the user (by dragging the value), ←message may be send either on termination or at each drag-event. This is controlled by ↔drag. When message is executed, the arguments are:

@receiver The slider
@arg1  The current ←selection
@arg2  The event object.

Instance Variables

selection

displayed value  ← int|real  Currently displayed value
high  ← int|real  Maximum of range
low  ← int|real  Minimum of range
selection  ← int|real  Current selection

apply

default - int|real|function The default selection or function to get it

appearance

format  ← [name]  Format for the printed values
show label  ← bool  Whether label is shown
show value  ← bool  Whether selection is shown
value font  ← font  Font for current selection

area

width - int Length of the bar

event

drag  ↔ bool  Send messages while dragging

Behaviour

4.6.1 Oms — Object management operations

Send Method initialise name=name, low=int|real, high=int|real,

value=int|real|function, message=[code]* Refinement of: dialog item->initialise Create a slider object from its ←label, ←low, ←high and →default.

4.6.2 Selection — Manipulation and query of selections

Variable displayed value int|real (←) Send Method displayed value int|real

Currently displayed value

Variable high int|real (←) Send Method high int|real

Together with ←low this variable describes the (including) range.

Variable low int|real (←) Send Method low int|real

Lowest value for ↔selection. See →high.

Get Method selection ⇒int|real

Variable selection int|real (←)

Send Method selection int|real

Current value. An integer for which ←low <= ←selection <= ←high.

4.6.3 Behaviour — Definition of behaviour

Send Method compute

Computes the layout and sets ←area and ←reference using the various attributes.

4.6.4 Apply — Applying dialog windows

Send Method apply always=[bool] Refinement of: graphical->apply Virtual method, defined by most subclasses of class dialog item. This method should forward the ←message of the dialog item if the dialog item has been modified by the user or the argument is @on. See also ‘dialog →apply’

Get Method default ⇒int|real Refinement of: dialog item<-default If -default holds a function, execute it and return the result. Otherwise return the plain value of -default. Used by →restore.

Send Method default value=int|real|function Refinement of: dialog item->default Sets the -default value and the →selection.

Variable default int|real|function (-)

The default selection or function to get it. Used by →restore.

Get Method modified ⇒bool

Refinement of: dialog item<-modified A slider is considered modified if the currently displayed value (←selection) is not equal to the ←displayed value.

→modified: @off sets ←displayed value to ←selection.

Send Method modified bool=bool Refinement of: dialog item->modified When @on, this method invokes →modified item: @receiver, @on on its ←device (normally ‘dialog→modified item’). When @off is method just succeeds.

This method is redefined by subclasses of dialog item that allow the user to modify the selection.

See also →restore, ←default and ‘dialog →modified item’.

Send Method restore

Refinement of: graphical->restore Set →selection to ←default

4.6.5 Appearance — “Look-and-feel” related aspects

Variable format [name] (←)

Send Method format [name]

Format specification used to represent the textual values. The specification is as for the C printf() call (see also ‘string→format’). The default format for floating point values is %f and for integers %d. The following defines a slider in 0.01 steps from 0.0 .. 1.0:

    ?- new(S, slider(value, 0.0, 1.0, 0.5)),
       send(S, format, '%.2f').

Variable show label bool (←) Send Method show label bool=bool

When @on, the ←label of the slider is printed at the left-side in ←label font.

Variable show value bool (←) Send Method show value bool=bool

When @on, the current value is printed in textual format too. It will be printed in ←value font.

Variable value font font (←) [Pce.DialogItem.value font: normal]

Send Method value font font=font

Font for current selection

4.6.6 Layout — Spatial relations between graphical objects

Get Method label width ⇒int

Send Method label width pixels=[int] Refinement of: dialog item<-label width The width of the area in which the label is displayed. Used to implement automatic alignment of labels of items displayed in a vertical row. See also ‘dialog →layout’.

Get Method reference ⇒point

Refinement of: dialog item<-reference Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

4.6.7 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Adjust ←width

4.6.8 Area — Handling size and position

Get Method width ⇒int

Variable width int (-) Send Method width int=int

Refinement of: graphical<-width Length of the bar-part of the slider in pixels.

4.6.9 Event — Event processing

Variable drag bool (↔)

When @on, ←message will be activated on each drag-event received by the slider. Otherwise, ←message will only be sent when the mouse-button is released.

Send Method event event=event Refinement of: dialog item->event A slider is operated by the left pointer-button. It will execute it’s ←message when the user releases the button (←drag: @off) or anytime the user moves the pointer with the button held down (←drag: @on).

First tries ‘dialog item ←event’.

4.6.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.7 Class menu — Dialog item for lists of options

Inheritance: ⇒ menu ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

A Menu is a dialog item that allows the user the select one or more values from a list. In its functionality it is similar to a list browser object. However, a list browser is meant to select from a dynamically generated list that may be large, while a menu is meant to select from a small number of alternatives that is generally static.

Class menu defines a large number of options that determine both the layout of the items, the feedback provided for the selected item, and whether or not one or more items may be selected at the same time. For convenience, there is a method called ‘Menu →kind’ that allows you to select some common configurations with a single message.

Message forwarding

← multiple selection = @on

If the ‘toggled’ menu item has ↔message not equal to @default, this message is executed with:

@receiver The menu
@arg1  The menu item
@arg2  New value of ‘menu item ←selected’
@arg3  Equivalent to @event

If the message of the menu item is @default, the message associated with the menu is executed. The arguments are:

@receiver The menu
@arg1  ‘menu item ←value’
@arg2  New value of ‘menu item ←selected’
@arg3  Equivalent to @event

← multiple selection = @off

If the ‘toggled’ menu item has ↔message not equal to @default, this message is executed with:

@receiver The menu
@arg1  ‘menu item ←value’
@arg2  Equivalent to @event

If the message of the menu item is @default, the message associated with the menu is executed. The arguments are:

@receiver The menu
@arg1  The ←selection
@arg2  Equivalent to @event

Menu layout

A menu consists of a label and a list of items. The label is placed in a box described by the area ‘Menu ←label area’. The items are placed in a two-dimensional array, each in its own box. These item boxes all have the same size (‘Menu ←item size’). The top-left-corner of the first item is at ‘Menu ←item offset’.

If ‘Menu ↔layout’ equals horizontal, the items are placed left-to-right. If ‘Menu ↔layout’ equals vertical, the items are placed top-to-bottom. The items are spread over ‘Menu ←columns’ columns. The following illustrates the placement of a menu with horizontal layout, 2 columns and 5 items:

  label   item-1   item-2   item-3
          item-4   item-5

Various parameters influence the final layout. ‘Menu↔gap’ defines the horizontal and vertical space between the items. ‘Menu↔pen’ defines the thickness of the lines for the boxes drawn around the items. ‘Menu↔border’ defines the white space between the item and the box around it.

Instance Variables

selection

multiple selection  ← bool  If @on, more than one item may be selected
selection  - any|chain  Value(s) of currently selected menu items

apply

default - any|chain|function* Default value

appearance

accelerator font  ← font*  When not @nil, font for accelerators
border  ← 0..  Width of border around item
columns  ← 1..  Number of columns

feedback ← {box,invert,image,

show selection only}

Type of feedback for selection

format  ← {left,center,right}  Horizontal alignment of items in box

kind ← {cycle,marked,choice,toggle, popup,cycle popup}

Kind of menu

layout  ← {horizontal,vertical}  Horizontal or vertical layout

margin

←

0..

Extra margin at left and right side of values (for popup)

off image  ← image|{marked}*  Left mark if selected equals @off
on image  ← image|{marked}*  Left mark if selected equals @on
popup image  ← image*  Right mark if popup not equal @nil

preview feedback ↔ {box,rounded box,

inverted rounded box,invert, colour}

Feedback given to item in preview state

show label  ← bool  Whether label is visible
value font  ← font  Font for value

vertical format

←

{top,center,bottom} Vertical alignment of items (and decorations) in box

layout

gap  ← size  Gap between items
value width  ← 0..  Minimum width for values

update

item offset  ← point  Offset of the first item
item size  ← size  Size of item-box

label area

←

area* Area for the label (if show label equals @on)

left offset  ← 0..  Offset of item in its box (left-side)
right offset  ← 0..  Offset of item in its box (right-side)

event

preview ← menu item* Item in ‘preview’ state

organisation

members  ← chain  Menu items (alternatives)

Behaviour

4.7.1 Oms — Object management operations

Send Method initialise name=[name], kind=[name], message=[code]* Refinement of: dialog item->initialise Create from its →label, →kind and →message. See class menu for details.

Send Method unlink

Refinement of: dialog item->unlink Sets ‘menu item ←menu’ of all member items to @nil, clears →members and invokes →unlink on the super-class.

4.7.2 Items — Manipulation and query items of a browser or menu

Send Method append item=menu item Send Method append item=menu item

Append a menu-item to the menu. The appended item will always be the last. Note that class menu item defines a conversion function that converts popups (for pullright menu’s) and values into menu items.

Send Method clear

Delete all items from the menu.

Send Method delete item=member:menu item Delete a menu item or the menu item that has the same ↔value as the argument from the menu. Note that it is generally bad style to change the contents of menu’s. Normally items that should not be activated in some context are made inactive.

Get Method member value=any ⇒menu item When the argument is a menu item, return this menu item if it is part of this menu. Otherwise, find the menu item that has ↔value equal to the provided value and return this.^{1}

Send Method member item=member:menu item Succeeds if the argument is a member menu item.^{2}

Send Method members chain=chain Chain of menu-items that are part of the menu.

Send Method prepend item=menu item Associate the argument menu item as first rather than last item of the menu.

Send Method sort [code] Sort members (see ‘chain →sort’)

1 For backward compatibility, if there is no item with ‘menu item ←value’ that matches the specification, it will return the first item for which the conversion of the argument and ‘menu item ←value’ to a name yield the same name.

2 Used to set the notion of ↔current in older versions. In its current definition it is not very useful. Use ←member to test membership.

4.7.3 Selection — Manipulation and query of selections

Send Method clear selection

Deselect all items.

Variable multiple selection bool (←) Send Method multiple selection multiple=bool

If @on, any item can be either selected or deselected. It @off, exactly one item has status ‘menu item ↔selected: @on’.

Send Method next

Selects the first item with ‘menu item ←active: @on’ after the currently selected menu item. When the currently selected item is the last or there is no currently selected item, the first active item is selected.

Used internally when ←show selection only equals @on (↔kind: ‘cycle’).

Get Method selected item=member:menu item ⇒bool Indicates whether or not the graphical is selected. The visual feedback is determined by the resource ‘selection style’.

Send Method selected item=member:menu item, selected=bool Refinement of: graphical->selected Set ‘menu item ←selected’ of ‘item’. Equivalent to sending the message directly to the menu item object, but type-conversion will convert a ‘menu item ←value’ to the corresponding menu item.

Get Method selection ⇒any|chain* When ←multiple selection equals @off, returns ‘menu item ←value’ of the selected menu item. Otherwise it returns a new chain with the ←value for each of the selected items (the chain may be empty).

Send Method selection selection=member:menu item|chain* Select the specified menu item or chain of menu items. All other menu items are deselected.

If the argument is @nil, this is equivalent to →clear selection, unless there is a menu item with ‘menu item ←value: @nil’. Backward compatibility.^{3}

Variable selection any|chain (-)

Value(s) of currently selected menu items

4.7.4 Behaviour — Definition of behaviour

Send Method compute

‘Menu →compute’ recalculates various variables to speed-up redraw. These are ←label area, ←item offset, ←item size, ←left offset and ←right offset.

3 Does not check ←multiple selection, resulting in an inconsistent menu when multiple object are selected in a menu with ←multiple selection: @off.

4.7.5 Execute — Execution of dialog objects

Send Method execute event=[event] Execution of a menu implies setting the selection and -if there is a message to execute-, execute this message. The exact behaviour is determined by various style parameter:

• ‘Menu ←feedback’ equals show selection only Select the next item

• ‘Menu ←multiple selection’ == @on Toggle the ↔selected attribute of the item on which the event occurred.

• ‘Menu ←multiple selection’ == @off Make the selection of the menu the item on which the event occurred.

4.7.6 Apply — Applying dialog windows

Send Method apply always=[bool] Refinement of: graphical->apply If ←modified yields @on or ‘always’ equals @on and ←selection succeeds, ←message is forwarded with the following arguments:

@receiver the menu
@arg1  ←selection.

See also ‘dialog →apply’.

Get Method default ⇒any|chain Variable default any|chain|function* (-) Send Method default value=int|function

Refinement of: dialog item<-default Initial value as well as the value to which the ←selection is restored by →restore. If the menu has ←multiple selection: @off this is a single value, otherwise it is a chain of values.

The default value may also be a function object. In this case →restore evaluates this function and uses the result to set the ←selection.

Get Method modified ⇒bool

Refinement of: dialog item<-modified Yields @on if the user has modified the menu since the last →selection, →modified: @off or →default. See also →apply.

If →modified is set to @on the ←device will be informed using ‘dialog →modified item’. See ‘dialog item →modified’.

Send Method modified modified=bool Refinement of: dialog item->modified When @on, this method invokes →modified item: @receiver, @on on its ←device (normally ‘dialog→modified item’). When @off is method just succeeds.

This method is redefined by subclasses of dialog item that allow the user to modify the selection.

See also →restore, ←default and ‘dialog →modified item’.

Send Method restore

Refinement of: graphical->restore Set →selection to ←default

4.7.7 Active — Activation (greying) of dialog objects

Send Method active all items active=bool

If @on, all items will be made active; otherwise all items will be made inactive.

Get Method active item item=member:menu item ⇒bool Returns a boolean, indicating the active status of the referred to menu item.

Send Method active item item=member:menu item, active=bool (De) activate a single item indicated by ‘object’. ‘Object’ is either a menu item or the value of a menu item. Example:

    ?- new(M, menu(fill_pattern, marked)),
       send_list(M, append,
                 [ @nil,
                   @grey12_image,
                   @grey25_image
                 ]),
       send(M, active_item, @grey12_image, @off).

Send Method all off

Equivalent to

    send(Menu, active_all_items, @off).

Available for backward compatibility.

Send Method all on

Equivalent to

    send(Menu, active_all_items, @on).

Available for backward compatibility.

Send Method is off item=member:menu item Find menu-item from object and test whether ↔active equals @off.

Send Method is on item=member:menu item Find menu-item from object and test whether ↔active equals @on.

Send Method off item=member:menu item Invokes ‘menu item →active: @off’ on the indicated menu-item, making the indicated menu-item insensitive.

Send Method on item=member:menu item As ‘menu →off’, but activates the menu item.

Send Method update context=[any] Send Method update context=[any]

Update the activation of the menu items in this menu. For each menu item that has a ↔condition not equal to @nil, it invokes the ‘menu item ↔condition’ attribute, providing the following context information:

@receiver The menu item
@arg1  The argument (i.e. the context)

If the message evaluates successfully, the menu item is activated, otherwise it is deactivated.

4.7.8 Appearance — “Look-and-feel” related aspects

Variable accelerator font font* (←) [Pce.Menu.accelerator font: @nil] Font in which keyboard accelerators are annotated. When @nil, possible accelerators are not annotated. Used by class popup.

Variable border 0.. (←) [Pce.Menu.border: 2] Send Method border width=0..

Border (in pixels) between the item and its box if ‘Menu ←pen’ is not zero. When ‘Menu←pen’ equals 0, border is only an additional gap.

Variable columns 1.. (←)

Send Method columns number=1..

Number of columns over which the menu-items are spread. See the class documentation for details.

Variable feedback {box,invert,image,show selection only} (←) [Pce.Menu.feedback:

image]

Send Method feedback feedback={box,invert,image,show selection only} Style parameter that determines the visual feedback for the selection. The possible values are:

• show selection only Only applicable when ‘Menu ↔multiple selection’ equals @off. In this mode, only the selected item is displayed. Used to implement ‘Menu ↔kind: cycle’.

• box Draw a box around the selected item(s). The thickness of the line equals the pen of the menu plus 1.

• invert Invert the selected item(s). Used to implement ‘Menu →kind: choice’. Note that inverting images gives strange results on colour displays.

• image Indicate the selection by painting ‘Menu ←off image’ left of not-selected items and ‘Menu ←on image’ left of selected items. Used to implement ‘Menu →kind: ‘marked’ or ‘toggle’.

Variable format {left,center,right} (←) [Pce.Menu.format: left] Send Method format alignment={left,center,right}

The layout of menu items in a menu is a 1 or 2 dimensional table. The menu will first determine the number and size of the rectangular cells in this table. This parameter determines how the items are aligned in their cell.

Send Method kind kind={cycle,marked,choice,toggle,popup,cycle popup} The ‘Menu →kind’ method allows for the selection of some commonly occurring combinations of menu parameters with a single method. The available options are:

• cycle Only display the selection. Clicking on the menu selects the next right-item. The menu has a popup-menu associated that allows for an overview of all available items. Useful for not very commonly used menu’s as it uses much less space on the screen.

• marked Single selection menu with markers (see ‘Menu ←on image’ and ‘Menu ←off image’) to indicate the selected item.

• toggle As marked, but multiple items may be selected.

• choice As marked, but the selection is indicated by inverting the it.

• popup Used internally. Popup menus are implemented on top of class menu.

• cycle popup Used internally for the popup of ←kind cycle menus.

Variable kind {cycle,marked,choice,toggle,popup,cycle popup} (←) [Pce.Menu.kind:

marked] The kind attribute is a shorthand for setting various style attributes to some predefined value. The variable ‘Menu ←kind’ provides the argument of the latest ‘Menu →kind’ invocation. Note that the menu may look very different due to subsequent style-parameters changed.

Variable layout {horizontal,vertical} (←) [Pce.Menu.layout: horizontal] Send Method layout orientation={horizontal,vertical}

Determines whether subsequent items are places left-to-right (horizontal) or top-to-bottom (vertical). If ‘Menu ←columns’ is greater than 1 and layout is ‘horizontal’, the items are placed in horizontal rows. If layout is ‘vertical’, the items are placed in vertical columns.

Variable margin 0.. (←) [Pce.Menu.margin: 0] Send Method margin margin=0..

Extra margin at left and right side of values (for popup)

Variable off image image|{marked}* (←) [Pce.Menu.off image: @nomark image] Send Method off image image=image|{marked}*

Image painted in front of items that have ‘MenuItem ↔selected’: @off. When @nil, no image is painted before the item.

Variable on image image|{marked}* (←) [Pce.Menu.on image: @mark image] Send Method on image image=image|{marked}*

Image painted in front of items that have ‘MenuItem ↔selected’: @on. When @nil, no image is painted before the item.

Variable popup image image* (←) [Pce.Menu.popup image: @nil] Send Method popup image image=image*

Image painted to the right of items that have a popup associated with them. Only applicable to popup menu’s with pullright submenu’s in them.

Variable preview feedback {box,rounded box,inverted rounded box,invert,colour}

(↔) [Pce.Menu.preview feedback: box] Visual feedback used to indicate the item that is in the preview state. Possible values:

• box Draw a box around the item (like ‘Menu →feedback: box’)

• invert Invert the box in which the item is formatted. Similar to ‘Menu →feedback: invert’, but the latter only inverts the item.

Variable show label bool (←) [Pce.Menu.show label: @on]

Send Method show label show=bool

If @on, the label is formatted in ‘Menu ←label font’ in the box determined by ‘Menu ←label area’. Otherwise the label is invisible.

Variable value font font (←) [Pce.Menu.value font: normal]

Send Method value font font=font

Default font used to display the text of the items. This font may be overruled for an individual item using ‘menu item ↔font’. The latter is often used for font-selectors to display each item in the font that will be selected.

Variable vertical format {top,center,bottom} (←) [Pce.Menu.vertical format:

center]

Send Method vertical format alignment={top,center,bottom} Vertical alignment of items (and decorations) in box

4.7.9 Layout — Spatial relations between graphical objects

Variable gap size (←) [Pce.Menu.gap: size(0,0)] Send Method gap size=size

Amount of white space between the items in both X- and Y-direction. Note that the ‘Menu ↔border’ is between the item and its surrounding box, while ‘Menu ↔gap’ defines the distance between the surrounding boxes of adjacent items.

Get Method label width ⇒int

Send Method label width width=[int] Refinement of: dialog item<-label width The width of the area in which the label is displayed. Used to implement automatic alignment of labels of items displayed in a vertical row. See also ‘dialog →layout’.

Get Method reference ⇒point

Refinement of: dialog item<-reference Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

Get Method value width ⇒int

Variable value width 0.. (←) [Pce.Menu.value width: 0]

Send Method value width width=0..

Refinement of: dialog item<-value width Minimum width used for the value. It is used for two purposes:

• popup menu’s It is defined for popup-menu’s to avoid very small windows when only short options are provided.

• Alignment of menu’s The automatic layout mechanism of dialog window will align the values of menu’s displayed below each other if their layout is horizontal.

4.7.10 Update — Update Dependant properties

Variable item offset point (←)

Offset in pixels of the first item, relative to the origin of the menu. Normally not useful for application programmers.

Variable item size size (←)

Size of the box in which each item is formatted. An item at location (X,Y) is located at x-pixel location:

    Menu?x + Menu?item_offset?x +
    X*(Menu?item_size?w + Menu?gap?w).

and similar for the y-coordinate.

Variable label area area* (←)

Pixel area relative to the origin of the menu for formatting the label. Only applicable if ‘Menu ↔show label’ equals @on.

Variable left offset 0.. (←)

Left margin between the item-box and the item itself. Used to reserve space for placing the selection markers if present. Its value is 0 if both ‘Menu ←on image’ and ‘Menu ←off image’ equal @nil and the maximum width plus ‘Menu ←border’ if one or both of the markers are defined.

Variable right offset 0.. (←)

Right-margin between the item and its surrounding box. Its value is 0 if ‘Menu ←popup image’ equals @nil or there is no item in the menu that has a ↔popup. Otherwise it is the width of ‘Menu ←popup image’ plus ‘Menu ←border’.

4.7.11 Event — Event processing

Send Method event event=event Refinement of: dialog item->event First tries ‘dialog item →event’. On failure it passes the event of @ button gesture if ←active equals @on. The real work is done by →execute.

Get Method item from event event=event ⇒menu item When ‘event’ is an event that occurred on the menu, return the menu item on which are it occurred. May be used to redefine event-handling of menu’s.

Variable preview menu item* (←) Send Method preview item=menu item*

Menu item in the preview state. Currently only used for popup-menu’s.

Send Method status {inactive,active,preview,execute} Refinement of: dialog item->status The ←status of a menu is not used.

4.7.12 Accelerator — Binding the keyboard

Send Method assign accelerators

Assign accelerators for the items

4.7.13 Complete — Automatic completion of textual constants

Send Method keyboard quit

Remove completer

4.7.14 Organisation — Organisation of (graphical) objects

Get Method contains ⇒chain

Refinement of: visual<-contains Returns the ←members chain of menu item objects.

Variable members chain (←)

Chain of menu-items that are part of the menu.

4.7.15 Repaint — Behaviour dealing with repaint

Send Method changed item changed=menu item Internal method to deal with changed items. When a menu-item is changed directly, it will send ‘ changed item’ to its menu.

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.7.16 Internal — Private behaviour

Send Method selected completion dict item=dict item

Handle combo box message

4.8 Class menu item — Item in a menu or popup

Inheritance: ⇒ menu item ⇒ visual ⇒ object

A ‘menu item’ is an item of a menu. Note that class ‘popup’ is a subclass of menu and therefore menu items also describe entries of popups.

The menu items of a menu are organised in a chain (‘menu ←members’). The menu decides on the layout and how they are displayed. The menu also takes care of handling the user-interaction.

The ↔value of a menu item is used to address it in the menu. The ↔label determines what is shown on the display, It can either be a string or a bitmap. The ↔message what happens if the user selects this menu item. The message may be @default, in which case the message associated with the menu is used. ↔end group tells the menu this is the last entry of a logical group. Used by popup’s only. Finally, the ↔condition is a code object that determines whether or not the item should be active when in a popup.

Instance Variables

value

value ← any Value of the item

selection

selected ← bool Member of menu-selection

action

message ↔ [code]* Message sent when selected

active

active  ← bool  Can be selected by user
condition  ↔ code*  If true, item becomes active

appearance

colour  ← [colour]  Colour for label
font  ← [font]  Font for label
label  ← [name|image]  Image or string displayed

menu

popup ← popup* Associated popup (pull-right)

accelerator

accelerator ↔ name* Activate when →key: name is received

organisation

menu ← menu* Menu I’m part of

group

end group  ← bool  Popup: add separation-line

Behaviour

4.8.1 Oms — Object management operations

Get Method convert value=any ⇒menu item Get Method convert value=any ⇒menu item

Refinement of: object<-convert

When argument is an instance of class popup, create a menu item from the ←label of the popup and relate the popup with this menu item using (‘menu item →popup’ and ‘popup →context’). This conversion allows simple specification of pullright menus:

         new(P, popup(attributes)),
         new(C, popup(colour)),

new(F, popup(font)),
send_list(C, append, [...]),    % fill sub-popups here
send_list(F, append, [...]),
send_list(P, append, [C, F]).   % associate as pullright

When the argument is not a popup, ←convert will create a menu-item using the argument as a value and leaving all other initialisation parameters @default.

Send Method initialise value=any, message=[code]*, label=[name|image],

end group=[bool], condition=[code]*, accelerator=[name]

Send Method initialise value=any, message=[code]*, label=[name|image],

end group=[bool], condition=[code]*, accelerator=[name] Refinement of: object->initialise Create a menu item from

1. ↔value (any) This argument is the value associated with this item.

2. ↔message [code]* Message sent when item is activated. @default uses the ‘menu ↔message’.

3. ↔label [name|image] Visual appearance: text or image. When @default, this is computed using ‘menu item ←default label’ from the value.

4. ↔end group [bool] Popup menu’s only. When @on, a line is drawn between this item and the next.

5. ↔condition [code]* Popup menu’s only. Condition to determine ↔active status. When @nil (default), this is not evaluated when the popup is mapped on the screen.

Send Method unlink

Refinement of: object->unlink Unlink from menu

4.8.2 Label — Visible name of objects

Get Method default label value=any ⇒name|image Get Method default label value=any ⇒name|image

Computes the default label from the value. This method is normally called by ‘menu item ←initialise’ when the label argument is @default.

It performs the following steps:

• When the argument is a graphical object, create an image with the size of the graphical and call ‘image →draw in’ to draw the graphical in the image.

• When the argument is a name, all ‘char array ←label name’ to map the word-separator (default ’ ’, see ‘pce →syntax’) to a space and capitalise all the words.

• When argument ←name yields a name, call ‘char array ←label name’ on it and return the result.

• Call PCE’s pretty-print to print the object-reference and class. The latter is an emergency to simplify debugging.

To realise multi-language support, one might wish to redefine this method yielding labels in the user’s preferred language from internal program names.

4.8.3 Value — Related value

Send Method value value=any, label=[name|image] Set the -value and recompute the label similar to →initialise.

Variable value any (←)

Value associated with this item. Menu items have both a value and a label. The latter is displayed while the value is used for internal communication in the program.

This separation is useful for two purposes. First of all menu’s are often used to select some value. For example a colour in a drawing tool. In this case the colour object is used as a value, while an all-1’s image with is used as label and ↔colour is set to ↔value. When the user selects a menu-item, the colour object to be used may be read directly from the ↔value object of the menu item.

Second, this mechanism may be used to implement multi-language interfaces. In this case the ↔value represents the internal name used by the program and the ↔label the external name that may be in a different language.

The default ↔label is compute from the initial ↔value using ‘menu item ←default label’.

4.8.4 Selection — Manipulation and query of selections

Variable selected bool (←)

Send Method selected bool=bool Describes whether or not the menu item is currently selected. Whether multiple menu items may be selected at the same time is determined by ‘menu ↔multiple selection’. The visual feedback is determined by ‘menu ↔feedback’.

4.8.5 Behaviour — Definition of behaviour

Get Method print name ⇒char array

←print name of ←value

4.8.6 Action — Associated action

Get Method message ⇒[code]*

Variable message [code]* (↔)

Send Method message [code]*

Message executed when the item is selected. When @nil, no message will be sent. When @default, the ←message from the associated ←menu will be sent.

The arguments forwarded depend on the menu. See description with class menu.

4.8.7 Active — Activation (greying) of dialog objects

Variable active bool (←) Send Method active bool=bool

When @on, the menu item may be selected by the user. When @off, the menu item is insensitive to events. Normally the menu will indicate this by greying the menu item.

Variable condition code* (↔)

Applicable to popup-menu’s only. When not @nil, the truth value of this code object is tested just before the popup menu is mapped on the screen and the item is made ←active according the this truth value.

Tested by ‘popup →update’.

Send Method off

Equivalent to ‘menu item →active: @off’. Backward compatibility.

Send Method on

Equivalent to ‘menu item →active: @on’. Backward compatibility.

4.8.8 Appearance — “Look-and-feel” related aspects

Variable colour [colour] (←) Send Method colour [colour]

Colour used to paint the label of this menu item. Normally used only to create colour palets.

Variable font [font] (←) Send Method font [font]

Font used to paint the ←label. Normally used to realise font-selection menus.

Variable label [name|image] (←) Send Method label [name|image]

When a name, the menu will display this text in the ←colour and ←font specified with this item. When is is an image, the menu will display this image in ←colour.

The initial value is normally computed by ←default label from the ←value by →initialise.

4.8.9 Menu — Associating (Popup) menus

Variable popup popup* (←) Send Method popup popup*

Popup menu’s only. When not @nil, this is the pullright menu associated with this item. The ←convert method transforms popup objects in menu items with this popup associated, which allows appending popup menu’s to popup menus to create pullright menus.

4.8.10 Accelerator — Binding the keyboard

Variable accelerator name* (↔)

Used by ‘menu→key’, which will make the menu behave as if this menu item was selected if the argument key matches this slot.

4.8.11 Organisation — Organisation of (graphical) objects

Get Method contained in ⇒menu

Refinement of: visual<-contained in Return the menu in which this menu item resides.

Variable menu menu* (←)

Menu I’m part of. Used to forward changes to the associated menu which is responsible for the visual representation and event-processing for this menu item.

The menu maintains a list of menu items manipulated in ‘menu ←members’.

4.8.12 Group — Functional grouping of behaviour

Variable end group bool (←)

Send Method end group bool=bool Popup-menus only. When @on, a line is painted between this item and the next.

4.9 Class popup — Popup menu

Inheritance: ⇒ popup ⇒ menu ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

A ‘popup’ is a menu that is associated with a graphical object, but is normally invisible. When the user depresses a predefined button, the popup is ‘pop’ed-up’. After the user has made a choice, the popup is removed from the display again.

Some types of graphicals have an attribute called ↔popup. For these types the easiest way to attach a popup to them is to fill this attribute with a popup menu. General graphicals don’t have this feature. For these graphicals a popup gesture object has to be used to connect the popup with some event. See also ‘graphical →popup’ and ‘graphical →event’.

PCE encourages you to associate popup-menus with the right mouse-button only.

By default, a popup menu inverts the current item. This gives odd results on colour displays. You can change this into a box by adding the following line to your ~/.Xdefaults file.

    Pce.Popup.preview_feedback: box

The method →execute is activated to execute the behaviour associated with the selected item. The documentation of this method describes the available context parameters.

Instance Variables

context

context ↔ any* Invoking context

selection

selected item ← menu item|popup* Selected menu-item/sub-popup

active

update message ↔ code* Ran just before popup is displayed

appearance

default item  ↔ {first,selection}|any*  Initial previewed item
show current  ← bool  If @on, show the currently selected value

event

button ← button name Name of invoking button

part

pullright  - popup*  Currently shown pullright menu

Behaviour

4.9.1 Oms — Object management operations

Send Method initialise name=[name], message=[code]* Send Method initialise name=[name], message=[code]*

Refinement of: menu->initialise

Create a popup menu from its name (which is only displayed if ←show label equals @on) and a message. This message will be executed when a menu item object is selected that has ‘menu item ←message: @default’. Using a message at the popup (menu) level is commonly used if the menu selects from a value-set (fonts, colours, names. ...). If the menu is used to activate commands the actions are normally associated with the individual items.

4.9.2 Open — Making objects visible

Send Method close

Remove the popup from the display. First it will →close possible open pullright menus. Then is removes the popup menu from its ←window and adds the window to the pool of window objects used to display popup menu’s.

This method is always called as a normal message and thus may be redefined.

Send Method open on=graphical, offset=point, offset is pointer=[bool],

warp=[bool], ensure on display=[bool] Refinement of: dialog item->open Open a popup menu on the display. Normally invoked from a popup gesture object. The arguments are:

• on Graphical (window) for which the popup is displayed (←context)

• offset

• offset is pointer [@on] Position of the top-left corner of the popup relative to the ←context iff offset is pointer equals @off, otherwise the position of the pointer.

• warp pointer [@on] If the popup is moved (see ensure on display), move the pointer accordingly.

• ensure on display [@on] If @on, move the popup if it would otherwise be (partly) outside the display.

4.9.3 Context — Context I belong too, I am executed in

Variable context any* (↔)

Invoking context

4.9.4 Selection — Manipulation and query of selections

Variable selected item menu item|popup* (←)

Selected menu-item/sub-popup

4.9.5 Execute — Execution of dialog objects

Send Method execute context=[object]* Send Method execute context=[object]*

Refinement of: menu->execute This method is normally invoked from ‘popup gesture →terminate’. The argument (denoted ‘context’) is normally the object to which the popup menu is associated.

First it locates the selected menu item object and the message to execute. This message is ‘menu item ←message’ if this does not yeild @default, otherwise ←message. The forwarded arguments are:

• ←multiple selection: @off using ‘menu item ←message’

@receiver: The popup
@arg1:  The context argument

• ←multiple selection: @off using ‘popup ←message’

@receiver: The popup
@arg1  ‘menu item ←value’
@arg2:  The context argument

• ←multiple selection: @on using ‘menu item ←message’

@receiver: The popup
@arg1:  ‘menu item ←selected’
@arg2:  The context argument

• ←multiple selection: @on using ‘popup ←message’

@receiver: The popup
@arg1:  ‘menu item ←value’
@arg2:  ‘menu item ←selected’
@arg3:  The context argument

4.9.6 Active — Activation (greying) of dialog objects

Send Method update context=any Send Method update context=any

Refinement of: menu->update This behaviour is normally invoked just before the popup-menu is mapped on the display. This is done automatically for popups associated with menu bars or managed by a popup gesture (i.e. all normal ways to manage a popup).

Update first invokes ↔update message, providing its argument as @arg1. This message is supposed to update the available entries of the popup; not the activation status of the individual entries. Next, →update invokes ‘Menu →update: context’, which takes care of activating the appropriate entries.

Variable update message code* (↔)

If not @nil, this message is invoked by ‘Popup →update: context’. This message is meant to generate the entries of the popup. Activating individual items is normally done by the condition message associated with each menu item of the popup.

When executed, the following arguments are forwarded:

@receiver The popup itself
@arg1  The argument of →update

4.9.7 Appearance — “Look-and-feel” related aspects

Variable default item {first,selection}|any* (↔) [Pce.Popup.default item: first] Determines the initial positioning of the menu. Values:

• first Position the pointer on the first item with ‘menu item←active: @on’.

• @nil As ‘first’, but places the pointer a few pixels to the left of the item so that it is not immediately selected.

• selection Position the pointer on the current ←selection of the popup. In practice this is the last selected item.

• Anything else Position the pointer on the menu item with the specified ‘menu item ←value’.

See also

Send Method end group bool=bool If this is a pullright menu, set ‘menu item →end group’ in the associated menu item. This will put a line below the item.

Variable show current bool (←) Send Method show current bool=bool

If @on, show the currently selected value

4.9.8 Event — Event processing

Variable button button name (←)

Name of invoking button

Send Method drag event=event, check pullright=[bool] Handle a drag event. This method is called from →event. It should not be used, nor be redefined, except for emergencies.

This method locates the ‘current’ item using ←item from event and activates this using →preview. If the drag event is on an item with a ‘menu item ←popup’ and the event is near the popup marker (see ←popup image), the pullright menu is activated by invoking →show pullright menu.

Send Method event event=event Refinement of: menu->event Performs the following steps

• If the popup has a -pullright and the event is on an item of this menu, →close the pullright menu.

• If the popup has a -pullright and the event is a button-up of the same button that started the popup, assign ←selected item with the pullright menu, assign -pullright with @nil and →close the pullright.

• If there is no -pullright and the event is the button-up event, assign ←selected item with ←preview and →close the popup.

• If the event is a button-down, set ←selected item to @nil and send ←button to the ‘event ←button’

• If the event is a drag event, update →preview. If a pullright area is entered, →update the pullright and →open it.

Send Method show pullright menu item=menu item, event=[event],

context=[any] Show pullright for this item. Called from →drag. ‘item’ is the item for which to show a pullright menu. First updates the ‘menu item ←popup’ and -if the popup has ←members- opens the popup.

4.9.9 Accelerator — Binding the keyboard

Send Method key key=name Refinement of: graphical->key Set ←selected item according to accelerator

4.9.10 Part — Managed objects

Variable pullright popup* (-)

Currently shown pullright menu

4.9.11 Reset — Aborting execution

Send Method reset

Refinement of: dialog item->reset Equivalent to →close.

4.10 Class menu bar — List of pulldown menus

Inheritance: ⇒ menu bar ⇒ dialog item ⇒ graphical ⇒ visual ⇒ object

A menu bar represents a series of popup objects operated as pulldown menus. See for example the menu bar in the PCE manual window. Various techniques are commonly used to give commands through graphical interfaces:

• A menu bar object The menu bar contains all possible actions on the application. The actions are grouped in pulldown menu’s. If an action needs an argument, this is normally the selection.

• Popup object (Graphical) objects in the application have a popup object attached to them. This menu contains operations that can be performed on this object. Normally the popup menu is associated with a standard (the right-) mouse-button.

• Gesture objects Direct manipulation of objects. Examples are dragging an object onto the waste-basket to delete it, moving objects directly with the mouse, etc. See class gesture.

• Keyboard accelerators This is normally done in combination with menu-bars. Instead of choosing a menu-entry from one of the pulldown menus, a predefined keystroke combination may be typed.

Applications may chose for any of these techniques or a combination thereof. See also example ‘Menu Bar’.

Instance Variables

appearance

format  ← {left,center,right}  Format of labels in their box
gap  ← int  Distance between buttons
radius  ← int  Radius for the buttons

event

button  - button name*  Button that caused me to start
current  ← popup*  Currently visible popup

organisation

members ← chain The pulldown menus

repaint

buttons  ← chain  Chain holding the buttons

Behaviour

4.10.1 Oms — Object management operations

Send Method initialise name=[name] Send Method initialise name=[name]

Refinement of: dialog item->initialise

Create a menu bar from its label. The label is not shown, but the menu bar will be given this name. This may be used to find the reference of the menu bar in the dialog object (see ‘dialog ←member’).

4.10.2 Behaviour — Definition of behaviour

Send Method compute

Determines the size and ←item size. The ←item size is the largest of the resource Pce.MenuBar.size and the size needed to display the largest label.

4.10.3 Active — Activation (greying) of dialog objects

Send Method active member popup=member:popup, active=bool (De) activate the indicated popup object. When inactive, the label will be greyed-out. Modifies ‘popup ←active’.

Send Method all active bool=bool

Invokes →active member for all member popups.

Send Method all off member:popup Deactivate all items of popup or name

Send Method all on member:popup Activates ‘menu →on’ on the specified popup object, activating all menu item objects part of it.

Send Method off name|menu item Deactivate menu item or name

Send Method on name|menu item Invokes ‘menu →on’ with same argument on all member popups. Always succeeds.

4.10.4 Appearance — “Look-and-feel” related aspects

Variable format {left,center,right} (←) [Pce.MenuBar.format: left] Describes how the labels are formatted in their boxes. See also →pen and →label font.

Variable gap int (←) [Pce.MenuBar.gap: 10] Distance between buttons

Variable radius int (←) [Pce.MenuBar.radius: 0] Radius for the buttons

4.10.5 Layout — Spatial relations between graphical objects

Get Method hor stretch ⇒0..

Refinement of: graphical<-hor stretch Horizontal stretchability. The returned value (1) ensures that, if the containing device (normally a dialog object) is given a layout, the menu bar is stretched to the right-edge of the window. See also →geometry.

Get Method reference ⇒point

Refinement of: dialog item<-reference Reference point for alignment in two-dimensional grid. When to items are aligned horizontally or vertically, ‘dialog →layout’ aligns the ←x or ←y component of their reference points.

The get-method returns the value of the variable when filled and fails otherwise. This method is redefined by most dialog-item subclasses (‘button ←reference’, ‘text item ←reference’, etc.).

Invoking →reference: @default will make the item return its class-defined default. Invoking this method with an instance of class point will explicitly set the reference-point.

4.10.6 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Changes the menu-bar geometry. It the ‘width’ argument is not @default and larger than the space required by the buttons, the first button with ‘button ←alignment: right’ and all succeeding buttons are flushed to the right. See also →append.

4.10.7 Event — Event processing

Variable button button name* (-)

Name of the button (see ‘event ←button’) that caused the first menu to appear. Used internally.

Variable current popup* (←)

Currently visible popup object or @nil if the menu bar is inactive

Send Method event event=event Refinement of: dialog item->event Show ←popup when defined.

First invoke ‘graphical →event’. If this fails and ←popup is not @nil, open this popup menu. This method is redefined by most subclasses.

Get Method popup from event event=event ⇒popup Find popup to open from event. This method locates the button on which the event took place and returns the associated popup. Used by →event. See also →show popup and ←current.

Send Method show popup popup=popup Make popup ←current and →open it. See also ←current and ←popup from event. Used by →event.

4.10.8 Accelerator — Binding the keyboard

Send Method assign accelerators

Assign accelerators for the items Send Method key key=name

Refinement of: graphical->key Execute (first) menu item with accelerator

4.10.9 Organisation — Organisation of (graphical) objects

Send Method append member=popup, alignment=[{left,right}] Send Method append member=popup, alignment=[{left,right}]

Attach a popup object to the menu bar. The menu bar object will append a button object to ←buttons with the following attributes:

‘button ←popup’ Set to the popup
‘button ←label’ ‘popup ←label’
‘button ←font’  Set to ←label font
‘button ←pen’  Set to ←pen
‘button ←radius’ Set tp ←radius

The ←label font, ←pen and ←radius of the button are not set from the menu bar if ←look equals open look. Because an OpenLook menu-bar really is a row of buttons.

If the ‘alignment‘ argument is ‘right’, this button is flushed to the right if the menu-bar is resized to be wider than the space required by the buttons. Motif and Windows 95 look-and-feel normally flush the help menu to the right:

    ...,
    new(MB, menu_bar),
    send(MB, append, new(F, popup(file))),
    send(MB, append, new(H, popup(help)), right),
    ...,

Send Method clear

Remove all menus from the menu bar

Get Method contains ⇒any

Refinement of: visual<-contains Returns the chain of ←members popup’s

Send Method delete member:popup Delete the indicated popup from the menu bar.

Get Method member name|popup ⇒popup When the argument is a popup object, return it if it is a member of this menu bar. When the argument is a name, return the first popup whose ‘popup ←label’ equals the argument.

Variable members chain (←)

Chain of popup objects. The ‘popup ←labels’ are displayed left-to-right from from this chain.

4.10.10 Abort — Cleanup after aborting execution

Send Method reset

Refinement of: dialog item->reset Reset the ←status to inactive. This will reset dialog items if the execution is aborted from the activated code.

4.10.11 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Variable buttons chain (←)

Chain holding button objects to represent each of the entries. When a popup object is →append’ed, a button is added to this chain to visualise the popup. The ‘button ←popup’ slot refers to the popup.

This implementation allows for easy emulation of the OpenLook look-and-feel style as OpenLook does not define menu-bars.

4.11 Class dialog group — Group of dialog items

Inheritance: ⇒ dialog group ⇒ device ⇒ graphical ⇒ visual ⇒ object

A dialog group object is a compound dialog item, a number of dialog item objects displayed on a specialised device object.

Class dialog group specialises class device to ensure proper handling of the layout of the controls displayed inside it as well as the placement of the group in the dialog. The class is also responsible for proper handling of keyboard input, including the ←default button.

A dialog group is built exactly the same as a dialog object. Here is a small example:

    ...,
    new(DG, dialog_group(location)),
    send(DG, append, text_item(address)),
    send(DG, append, text_item(city)),
    send(DG, append, text_item(country)),
    ...

Instance Variables

label

label ← name Text displayed for the label

appearance

border  ← [size]  Space around the items
elevation  ← elevation*  Elevation from background
gap  ← size  Distance between the items
label font  ← font  Font used to display the label
label format  ← {top,center,bottom}  Alignment of label with top
radius  ← 0..  Radius for the corners

layout

alignment  ↔ {column,left,center,right}  Align in columns or right of item to the left
auto align  ↔ bool  Automatically align in dialog (@on)

area

size  ← [size]  Size of the contents

Behaviour

4.11.1 Oms — Object management operations

Send Method initialise name=[name], kind=[{box,group}] Refinement of: object->initialise Create an empty dialog group from its name. The name is used to assign the ←name slot and handed to →name to compute the default ←label from it. Using the standard configuration, the ←name is capitalised to produce the ←label.

4.11.2 Name — Naming objects

Send Method label name=name Text displayed to lable the dialog group. If the label is the empty name object (”), the label is not displayed. See also →name and ←label font.

Send Method name name=name Assigns the ‘graphical ←name’ and determines the displayed ←label. The label is computed using the ←label name method.

4.11.3 Label — Visible name of objects

Variable label name (←)

Text displayed to lable the dialog group. If the label is the empty name object (”), the label is not displayed. See also →name and ←label font.

Get Method label name name=name ⇒name Determine default-label from the name using the method ‘name ←label name’. The latter by default capitalises the name, replacing underscores by spaces. It may be redefined to map labels to a different language.

4.11.4 Apply — Applying dialog windows

Send Method apply always=[bool] Send Method modified item item=graphical, modified=bool

Send Method restore

Refinement of: graphical->apply These methods are reimplementations of the corresponding methods on class dialog. See ‘dialog →apply’, ‘dialog →modified item’ and ‘dialog →restore’.

4.11.5 Appearance — “Look-and-feel” related aspects

Variable border [size] (←) [Pce.DialogGroup.border: @default]

Send Method border [size]

Space around the items. The value @default uses the same value for the border as for the ←gap between items. See also →kind.

Variable elevation elevation* (←) [Pce.DialogGroup.elevation:

when(@colour display, 1, @nil)]

Send Method elevation elevation* Elevation from background

Variable gap size (←) [Pce.DialogGroup.gap: size(15,8)] Send Method gap size=size

Distance between the dialog items displayed in the group. See ‘device →layout dialog’ for a description of the layout algorithm

Send Method kind kind=[{box,group}] Set default appearance. The default →kind is ‘box’. Its values:

• box Sets ←border to @default, ←label to the ←label name calculated from the ←name and ←pen to 1. This results in a (3d-) box with a label containing the items, which is normally used to visually group items for the user.

• group Sets ←border to size(0,0), ←label to ” and ←pen to 0. This mode is normally used to group dialog items for technical reasons. One such reason is the definition of a single dialog item for a special type that requires multiple sub-items as a subclass of class dialog group. The other is to subdivide the items in a dialog window in multiple groups to define layouts that do not fit in the standard matrix layout provided by dialog windows.

Variable label font font (←) [Pce.DialogGroup.label font: bold]

Send Method label font font=font

Font used for displaying the ←label.

Variable label format {top,center,bottom} (←) [Pce.DialogGroup.label format:

center]

Send Method label format {top,center,bottom} Alignment of the label with the line drawn around the group. Its value should normally be controlled by the resource to ensure consistent appearance of compound dialog groups.

Variable radius 0.. (←) [Pce.DialogGroup.radius: when(@colour display, 8, 12)]

Send Method radius 0..

Radius for the corners of the box surounding the group elements. Used to commit to the style.

4.11.6 Layout — Spatial relations between graphical objects

Variable alignment {column,left,center,right} (↔) [Pce.DialogGroup.alignment:

column] Alignment of the dialog group in the surrounding dialog window. See ‘dialog item ←alignment’.

Variable auto align bool (↔)

Automatically align in dialog (@on). See ‘dialog item ←auto align’.

Send Method layout dialog

Refinement of: device->layout dialog Invokes ‘device →layout dialog’ using the ←gap and ←size attributes.

4.11.7 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry If either width or height is specified, a size object is computed and →size is invoked. The group is moved.

4.11.8 Area — Handling size and position

Get Method position ⇒point

Refinement of: device<-position Top-left corner of tab Send Method position point=point

Refinement of: device->position Determines the top-left corner of the group.

Variable size [size] (←) Send Method size [size]

Size of the contents. @default implies the size is computed from the items displayed in the group.

Get Method x ⇒int Refinement of: device<-x Returns the X-coordinate of ‘Device ←offset’.

Send Method x int=int Refinement of: device->x Set the X-coordinate of the left-side of the group.

Get Method y ⇒int Refinement of: device<-y Returns the Y-coordinate of ‘Device ←offset’.

Send Method y int=int Refinement of: device->y Set the Y-coordinate of the top-side of the group.

4.11.9 Update — Update Dependant properties

Send Method changed label

Add label-area to the update

Send Method compute

Refinement of: device->compute Send →compute to all members of -recompute, next recomputes the ←format if requested by -bad format and finally recomputes the ←area (bounding box) requested by -bad bounding box.

4.11.10 Event — Event processing

Send Method wants keyboard focus

Refinement of: graphical-> wants keyboard focus Succeeds if one of the items displayed in the group is willing to accept the keyboard focus. Together with the handling of the keyboard focus events by →event, this ensures the caret is moved in/out the group transparently.

Send Method event event=event Refinement of: graphical->event Maps the obtain keyboard focus event to →advance, and otherwise simply invokes ‘device →event’ to dispatch the event over the items.

4.11.11 Accelerator — Binding the keyboard

Get Method default button ⇒button

Current Button connected to ‘RET’

4.11.12 Organisation — Organisation of (graphical) objects

Send Method append item=graphical, relative to last=[{below,right,next row}] Mimics the behaviour of ‘dialog →append’.

4.11.13 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: device-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.12 Class tab — Tab-sheet for tabbed dialog window

Inheritance: ⇒ tab ⇒ dialog group ⇒ device ⇒ graphical ⇒ visual ⇒ object

A tab object is a refinement of a dialog group object, which implies it is a device specialised for displaying dialog item objects.

A tab shows as an elevated rectangle with a little ‘tab’ attached to it displaying its name. Tabs are designed to cooperate in a tab stack object, to achieve a ‘stack’ of sheets holding controllers, which allows the user to switch by clicking the desired tab.

Tabs are normally used to establish settings for a system that has many settings. Groups of related settings will be placed on a separate tab.

See also class tab stack.

Instance Variables

appearance

label format  ← {left,center,right}  Alignment of label in box
status  ← {on top,hidden}  Currently displayed status

layout

label offset  ← int  X-Offset of label-box
label size  ← size  Size of the label-box

Behaviour

4.12.1 Oms — Object management operations

Send Method initialise name=[name] Refinement of: dialog group->initialise Create a new tab-entry

4.12.2 Appearance — “Look-and-feel” related aspects

Variable label format {left,center,right} (←) [Pce.Tab.label format: left] Send Method label format {left,center,right}

Deternines how the label is aligned the box. A style resource.

Variable status {on top,hidden} (←) Send Method status {on top,hidden}

A tab object can be in ←status: on top, in which case it will display both the label and the contents. Otherwise it will only display the label.

4.12.3 Layout — Spatial relations between graphical objects

Variable label offset int (←) Send Method label offset int=int

Distance from the left-side of the object to the left-side of the label-box. Normally set by ‘tab stack →layout labels’.

Variable label size size (←) [Pce.Tab.label size: size(80, 20)] Size of the label-box. If the text does not fit the size of the box, it will automatically be enlarged.

4.12.4 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: dialog group->geometry Move/resize tab

4.12.5 Area — Handling size and position

Get Method position ⇒point

Get Method x ⇒int Get Method y ⇒int Send Method position point=point Send Method x int=int Send Method y int=int

Refinement of: dialog group<-position Determines the top-left corner of the tab, while the origin of the tab, regarded as a device object is the top-level of the rectangle used for displaying the contents.

4.12.6 Update — Update Dependant properties

Send Method changed label

Refinement of: dialog group-> changed label Add label-area to the update

Send Method compute

Refinement of: dialog group->compute Send →compute to all members of -recompute, next recomputes the ←format if requested by -bad format and finally recomputes the ←area (bounding box) requested by -bad bounding box.

4.12.7 Event — Event processing

Send Method event event=event Refinement of: dialog group->event If the tab has ←status: hidden, a button-down-event on the label will invoke the method ‘tab stack →on top’ to its ←device. Otherwise the super-class is invoked (‘dialog group→event’).

4.12.8 Report — Reporting events, status and errors

Send Method flash area=[area], time=[int] Refinement of: graphical->flash If the ←status is ‘on top’, the drawing area of the tab is inverted, otherwise the tag is inverted. See also ‘graphical →flash’.

4.12.9 Focus — Focussing events to objects

Send Method advance from=[graphical]*, propagate=[bool] Refinement of: device->advance Advance the keyboard-focus to the next graphical object of this device for which the test ‘Graphical → wants keyboard focus’ succeeds. Used by text item to implement ‘text item →advance’.

This method cycles through the ←graphicals chain. If the argument is a graphical and there is no graphical that requests the keyboard focus further down the ←graphicals chain and the device is not the window itself, and ‘propagate’ not is @off, it will invoke →advance on its ←device, passing itself as argument. This behaviour allows for handling the keyboard focus in dialog-windows built from nested devices.

Otherwise, If no graphical wants to have the keyboard focus, the keyboard focus of the ←window is set to @nil.

4.12.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: dialog group-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

4.13 Class tab stack — Stack of tabbed control-windows

Inheritance: ⇒ tab stack ⇒ device ⇒ graphical ⇒ visual ⇒ object

A tab stack object controls a set of tab objects, sheets holding controllers. Tab-stacks are normally used to make dialog windows with large numbers of options manageble.

The code below is a partial implementation of a dialog to specify a PC:

new(D, dialog('PC Specifiation sheet')),
send(D, gap, size(0,0)),
send(D, pen, 0),
send(D, append,
    tab_stack(new(CPU, tab(cpu)),
              new(Disk, tab(disk)),
              new(Monitor, tab(monitor)),
              ...)),
send(CPU, append,
    new(CPUT, menu(cpu, choice))),
send_list(CPUT, append, [386, 486, pentium]),
...
send(D, open).

Instance Variables

Behaviour

4.13.1 Oms — Object management operations

Send Method initialise member=tab ...

Refinement of: object->initialise Create a tab-stack holding the argument members. The arguments are handed to →append, left to right.

4.13.2 Layout — Spatial relations between graphical objects

Send Method layout dialog [size]

Refinement of: device->layout dialog This method is normally called by the generic dialog layout mechanism to fix the layout of its members. It will invoke ‘tab→layout dialog: size’ to force all member tab objects to adjust themselves to the requested size.

If size is @default, the system will invoke ‘tab→layout dialog’ to all its members and then compute the union of the member tab objects to determine the required size. Next it will call this method again with the computed size.

Send Method layout labels

Assign positions for the labels

4.13.3 Event — Event processing

Send Method event event=event Refinement of: graphical->event Process an event. It performs the following operations:

• Update ‘Device ←pointed’ and generate ‘area enter’ and ‘area exit’ events to graphicals that were added/removed from this chain. Implemented by ‘Device →update pointed’

• Post the event to the elements on ‘Device ←pointed’ using ‘Event →post’. If ‘Event →post’ succeeds on some graphical, stop with success.

• Activate ‘Graphical →event’ to process recognisers defined on the device.

4.13.4 Organisation — Organisation of (graphical) objects

Send Method append tab=tab Append a tab object to the right of the member tabs. If it is the first tab, it will become the one →on top. Tabs may be added both before and after displaying a tab stack. See →layout dialog for fixing the layout after adding to a displayed tab stack.

4.13.5 Stack — Stacking order (object, goals)

Get Method on top ⇒tab

Find tab on top. Returns the first member tab object with ‘tab ←status: on top’.

Send Method on top member:tab Put indicated tab on top of the others. Normally this is called from the ‘tab→event’ method after the user clicks on the label. of a hidden tab object.

Note that the argument may be the name of the tab rather than the tab itself.

4.13.6 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: device-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object

→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

138 Class tab stack XPCE Reference Manual

Chapter 5

Lists, Dictionaries and Browsers

A PCE browser visualises a list of objects and lets the user select one of more of these objects. Browsers are in some sence like menus. Menus however are only suitable for presenting a stable list of a few items, while browsers are designed to handle very large lists of items. Browsers are commonly used for selecting files or objects from a database.

A browser appears as a field holding a line of text for each item in the browser with a scrollbar attached to it. Each field of the browser may have it’s own font, style (underlined, highligh, bold) and colour, but all characters of the line are displayed in the same style, font and colour.

Browsers have incremental searching facilities that allow the user to find items in a very long list quickly. Just typing in a browser starts this mechanism.

A browser actually is a window displaying a list browser object. The latter realises both the scrollbar as the area for displaying the items. The text is visualised by a text image object. Class text image defines tab-stops and it is therefor easy to present tabular information, even when using a proportional font. See for example the PCE Class Browser tool of the online manual.

The underlying data of a browser is stored in a dict object. ‘Dict’ is short for ‘dictionary’. A dict is a list of dict item objects (‘Dictionary Entries’). Each dictionary entry consists of a ‘key’ to identify it and a ‘label’ which is visualised.

5.1 Class browser — Window version of list browser

Inheritance: ⇒ browser ⇒ window ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: list browser (list browser), frame (frame*), tile (tile*), decoration (window decorator*)

A browser is a window-based version of a class list browser. It is implemented as a window object that displays a single list browser object and resizes this object if the window is resized. A browser delegates to its list browser.

Many of the methods of class browser direct methods defined for both class window and class list browser to the list browser. Inheritance is considered before delegation in PCE’s message passing algorithm.

Instance Variables

delegate

list browser  ← list browser  Displayed list browser

Behaviour

5.1.1 Oms — Object management operations

Send Method initialise label=[name], size=[size], display=[display] Refinement of: window->initialise Create a browser from its frame-label, size and display. Unlink for the super-class window, the size is measured in character units.

Send Method unlink

Refinement of: window->unlink

Delete the list browser

5.1.2 Delegate — Delegation of behaviour

Variable list browser list browser (←)

Displayed list browser

5.1.3 Lookup — (Table) lookup methods

Get Method member any=any ⇒dict item Refinement of: device<-member Return ‘dict←member’ of the (through the list browser) associated dict object rather than the named graphical.

5.1.4 Selection — Manipulation and query of selections

Send Method selected member:dict item Refinement of: graphical->selected Overrule inherited window selection mechanism. See class list browser for the functionality of these methods.

Get Method selection ⇒chain|dict item* Refinement of: device<-selection Returns a new chain with all graphicals that have ‘Graphical ←selected: @on’. If there are no such graphicals, an empty chain is returned.

Send Method selection member:dict item|chain* Refinement of: device->selection Delegate to ‘list browser →selection’.

5.1.5 Resize — Controlling and trapping resizes

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Refinement of: window->request geometry Invoked internally from ‘graphical →set’, which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Invokes →geometry to change the ←area. The indirection →request geometry ==> →geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.

5.1.6 Area — Handling size and position

Get Method size ⇒size

Return ‘list browser←size’ of the associated ←list browser. This is the size of the list browser is character units.

5.1.7 Scroll — Controlling the ‘viewport’

Send Method normalise member:dict item Refinement of: window->normalise Scrolls the view such that the indicated dict item will become visible. This method may also be passed a ‘dict item←key’ name, which will be translated to the corresponding ←member dict item automatically.

Send Method scroll to int=int

Refinement of: window->scroll to Scroll to the numbered dict item object. The first item is numbered 0.

5.1.8 Menu — Associating (Popup) menus

Get Method popup ⇒popup* Access ‘list browser ↔popup’ rather than ‘window ↔popup’.

Send Method popup popup* Send Method popup popup*

Refinement of: graphical->popup Popup menu associated with this window. It is activated through the global object @ popup gesture when all other attempts to handle the button-event have failed. See ‘window →event’.

5.1.9 Cursor — Image of the pointer (mouse) cursor

Send Method cursor cursor* Refinement of: graphical->cursor Defines the cursor for the item-area of the list browser ‘text image ↔cursor’.

5.1.10 Delete — Text deletion commands

Send Method clear

Remove all dict item objects from the associated dict object.

5.1.11 Accelerator — Binding the keyboard

Send Method typed event id=event id, delegate=[bool] Refinement of: window->typed Handle accelerator bindings. This method is normally invoked from →event if no graphical object in the window accepted the typed key. The window will forward the typed key to the frame using ‘frame →typed.’ The frame in turn will check for another window (generally a dialog object) that is capable of handling the typed key.

If delegate = @on (as invoked from →event) it invokes →typed on ←frame.

5.1.12 Organisation — Organisation of (graphical) objects

Get Method contains ⇒chain

Refinement of: visual<-contains Hides the existence of the list browser by returning ‘list browser←contains’.

5.2 Class list browser — Select object, visualisation of dict

Inheritance: ⇒ list browser ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: dict (dict*)

A list browser object is a visualisation of a dict object. It appears as a scrollable list of (textual) items. The user may examine this list by scrolling and searching. S/he may select one or multiple items from the list (see ←multiple selection).

List Browsers are commonly used for browsing or selection from a (possibly) large list of (named) objects. For example the manual’s card viewer uses a browser to show existing see-also relation. The class-browser and various of the other manual tools use them to visualise sets of documentation cards.

List browsers are normally used through class browser which defines a window displaying a list browser (like class view displays an editor object).

Various messages may be associated with list browser objects:

↔select message  Activated on left-click
↔select middle message Activated on middle-click
↔open message  Activated on double-click

The ↔open message is also activated when an item is selected using the keyboard.

All these messages forward the following arguments:

@receiver The browser or list browser object
@arg1  The dict item object selected.

It is possible to associate a popup with a list browser. See →popup. Finally, it is possible to program the event-handling yourself. The method ←dict item may be used to translate events to dict item objects.

Fonts and images

XPCE browsers support multiple fonts and images indicating the type of the item. Each item can only be displayed in one font. Font and icon specification use the style object based mechanism to specify the appearance of a dict item object of specified style. For example, to make a browser for files and directories, where the directories are printed purple and using the ‘dir.bm’ icon, use the following code as a starting point:

    ...
    new(B, browser),
    send(B, style, directory,
         style(icon := 'dir.bm', colour := purple)),
    send(B, style, file,
         style(icon := 'file.bm')),
    ...
    append_directory(B, Name) :-
        send(B, append,
             dict_item(Name, style := directory)).

Instance Variables

delegate

dict ← dict* Associated dict object (table of items)

components

image  ← text image  TextImage used to display textlines
label text  ← text*  Text object that displays the label
scroll bar  ← scroll bar  Scrollbar used to scroll window

selection

multiple selection  ← bool  If @on, multiple items may be selected
selection  - chain|member:dict item*  Selected items

action

open message  ↔ code*  Send on keyboard selection or double click
select message  ↔ code*  Send on left-click on item

select middle message ↔ code*

Send on middle-click on item

appearance

font  ← font  Font for displayed items
selection style  ← [style]  Style for selection feedback
styles  ← sheet  Name -→ style mapping

area

size ← size Size in characters/lines

scroll

start ← int Object on top-row of display

menu

popup ↔ popup* Associated popup menu

search

search hit  - int  Current hit
search origin  - int  Start of incremental search
search string  - char array*  Current search string

event

status ← {active,inactive} Handle typing?

accelerator

key binding ↔ key binding Key binding table

cache

start cell  - alien:Cell  Cell reference to top-row of display

Behaviour

5.2.1 Oms — Object management operations

Send Method initialise dict=[dict], width=[int], height=[int] Refinement of: object->initialise Create a list browser for the specified dict object with specified width and height. If no dict is specified a default dict is created. If no size is specified the resource Pce.ListBrowser.size is used. The size is interpreted in character units.

Send Method unlink

Refinement of: graphical->unlink

Unlinks the ←dict from the list browser object and then invokes ‘device →unlink’.^{1}

1 Implicitely created dict objects generally will not be garbage collected as a dict has internal references.

5.2.2 Delegate — Delegation of behaviour

Variable dict dict* (←) Send Method dict dict*

Associated dict object (table of items)

5.2.3 Components — Parts I’m built from

Variable image text image (←)

Text image object used for visualisation of the items. Class text image is also used by class editor. There are many similarities in the architecture of class editor and class list browser.

Variable label text text* (←)

Text object used to display the ↔label. When @nil, no label is displayed (default). The ←label text may be accessed directly, but be aware that the layout of the list browser (i.e. placement and sizes of the ←scroll bar, ←image and ←label text) will not be updated automatically.

Variable scroll bar scroll bar (←)

Scrollbar used to scroll window

5.2.4 Label — Visible name of objects

Get Method label ⇒name

Send Method label name=name A list browser may be assigned a label. When a label is assigned, a ←label text will be displayed on the list browser. See also ↔show label.

Note that class browser inherits →label from class window.

5.2.5 Selection — Manipulation and query of selections

Send Method change selection action={set,toggle,extend,clear},

context=[dict item] Hook in selection management. This method is invoked from →event and may be used to keep track of selection changes in the list browser object. If ‘action’ is ‘set’, the selection will be cleared and then set to the argument dict item object. Action ‘toggle’ will toggle the status of the argument dict item, while ‘clear’ will empty the selection.

Redefinition of this method may be used to keep track of the selection. See also →select message and →open message.

Send Method deselect member:dict item Unselect (remove from selection) item

Variable multiple selection bool (←) Send Method multiple selection bool=bool

When @on, any number of items may be in the selected state. When @off (default), only zero or one item may be selected. This flag has consequences for the way events are processed and the selection is communicated.

Send Method next line [int] Send Method previous line [int]

Move forward by arg lines. If an incremental search is in progress, moves it moves the current search to the next line. If the current search pattern does not match the new item, it is set to the entire next item. If there is no search in progress, the browsercan only select a single object (→multiple selection: @off) and the selection is in the visible part of the browser, the selected object is taken as the start of the search. Otherwise, the top of the visible page is choosen.

→previous line simply negates the argument before calling →next line.

Send Method select member:dict item Select (add to selection) item

Send Method selected member:dict item Refinement of: graphical->selected Indicates whether or not the graphical is selected. The visual feedback is determined by the resource ‘selection style’.

Get Method selection ⇒chain|dict item Refinement of: device<-selection Get the value of the variable ‘selection’. Defined as a method to overrule the corresponding method defined on class ‘device’.

Variable selection chain|member:dict item* (-) Send Method selection chain|member:dict item*

The current selection of the list browser. If ↔multiple selection equals @on, this is an (empty) chain of dict items. If ↔multiple selection equals @off, this is either @nil or a dict item.

5.2.6 Behaviour — Definition of behaviour

Get Method master ⇒device

Return the ←window is this is an instance of class browser. See ‘visual ←master’ for details.

5.2.7 Action — Associated action

Variable open message code* (↔)

This message is send when the user double-clicks an item or selected an item using the keyboard (see also →enter). During the execution of this message the ←cursor is switched to the wait cursor. The following arguments are forwarded:

@receiver The browser or list browser
@arg1  The dict item object selected

See also ↔select message

Variable select message code* (↔)

If not @nil, this message is sent when the user clicks on an item with the left mousebutton. The following arguments are forwarded:

@receiver: The (list )browser
@arg1:  The dict item selected
@arg2:  @on if item is selected

The second argument (@arg2) is used to distinguish between selection and deselection for ←multiple selection: @on browsers. Selecting multiple items or deselecting items is achieved by holding the shift-key down while clicking an item. See also ↔open message and →change selection.

Variable select middle message code* (↔)

When the user selects an item with the middle button this message is forwarded with the following arguments:

@receiver The browser or list browser
@arg1  The selected dict item object

5.2.8 Appearance — “Look-and-feel” related aspects

Variable font font (←) [Pce.ListBrowser.font: normal] Send Method font font=font

Font for displayed items

Variable selection style [style] (←) [Pce.ListBrowser.selection style:

when(@colour display, style(background := black, colour := white), style(highlight := @on))]

Style for selection feedback

Get Method show label ⇒bool Send Method show label show=bool

If @on, the label is visible. See also ←label text and ↔label.

Send Method style style name=name, style=style Display any item with ‘dict item ↔style’ = name using the attributes from the given style object.

Suppose one has a list browser that visualises a lexicon and we want the present all items that also appear in a glossary on the same domain in bold-face. This may be achieved using:

    show_lexicon :-
        new(B, browser('Lexicon')),
        send(B, style, glossary, style(bold := @on)),
        (   lexicon(Item),
            send(B, append, new(D, dict_item(Item))),
            (   glossary(Item)
            → send(D, style, glossary)
            ;   true
            ),
            fail
        ;   true
        ),
        send(B, open).

Variable styles sheet (←)

Sheet object mapping logical style-names onto style objects.

Send Method tab stops vector*

Set a number of tabulator stops. The argument is a vector with pixel locations of the tab stops. See also ‘text image →tab stops’.

This feature may be used for multi-column tables and is especially useful when the items in the browser are displayed in a proportional font. The following example displays a database of persons where each person has a unique id and a name. The database is in the predicate person/2.

    ?- new(B, browser('Persons')),
       send(B, tab_stops, vector(200)),
       forall(person(Id, Name),
              send(B, append,
                   dict_item(Id, string('%s\t%s',
                                        Id, Name)))),
       send(B, open).

5.2.9 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Resize the ←image and ←scroll bar.

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->request geometry Invoked internally from ‘graphical →set’, which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Invokes →geometry to change the ←area. The indirection →request geometry ==> →geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.

5.2.10 Area — Handling size and position

Send Method size pixels=size Resizes the list browser to the indicated pixel size. Normally list browser sizes are communicated in character units. This method is used internally to handle resize requests of the browser window.

Get Method height ⇒int

Refinement of: graphical<-height Set/Query the height in lines. See also ←width and ↔size.

Variable size size (←) [Pce.ListBrowser.size: size(15,10)] Set the size of the list browser. The ↔width and ↔height attributes of the size are interpreted in characters of the current font.

To resize in pixel units, please see ‘ListBrowser → size’ and ‘ListBrowser →set’.

Get Method width ⇒int

Refinement of: graphical<-width Width of the list browser in the ←font’s ‘font ←ex’ units.

5.2.11 Scroll — Controlling the ‘viewport’

Get Method length ⇒int Get Method view ⇒int

The triple ←length, ←start and ←view are used by the ←scroll bar and describe the following properties:

←length Number of items in the browser
←start First item on the window
←view Number of items on the window

Send Method normalise member:dict item Scroll window such that the indicated dict item is visible. If this requires the window to be scrolled one line up or down the indicated item will be the first or last in the window. Otherwise the item will be centered in the window,

See also →scroll to.

Send Method recenter [int]

Recenter current line (to be implemented)

Send Method scroll down [int]

Scroll lines down (default one window)

Send Method scroll to [int]

Make nth-1 item first of window

Send Method scroll up [int]

Scroll lines up (default one window)

Send Method scroll vertical {forwards,backwards,goto}, {file,page,line}, int=int Handle scroll bar request

Send Method show scroll bar show=[bool], which=[scroll bar] Control visibility of the ←scroll bar

Variable start int (←)

0-based index number of the first visible dict item object.

5.2.12 Update — Update Dependant properties

Send Method compute

Refinement of: device->compute →compute’s the ←image and ←scroll bar. Initialises ←start cell to speed up redraw.

5.2.13 Menu — Associating (Popup) menus

Variable popup popup* (↔)

There are two ways to associate a popup with a browser. One is to use ‘list browser →popup’. In this case the popup will only be displayed if the right-down event is detected on an item and @arg1 will be bound to the dict item object on which the right-down was trapped.

Alternatively, one may attach a popup gesture using ‘Object →recogniser’. In this case the popup will behave as if it were attached to any graphical object.

5.2.14 Edit — Modify object

Send Method clear

Removes all items from the browser. Invokes ‘dict →clear’ to the ←dict.

5.2.15 Caret — Moving the insertion point

Send Method extend prefix or next

If the list browser is searching (see →insert self), this method extends the current -search string to the next choice-point (see →extend prefix). Otherwise →next is invoked to advance to the next item requesting the keyboard in the same device.

Send Method next

Move caret to next item (‘device →advance’). See also ‘text item →next’.

5.2.16 Search — Finding plain text, regex or objects

The methods in this section are normally called from the associated ←key bindin. They implement incremental search in the same style as class editor or GNU-EMACS.

If the user selects the currently found item using RETURN, →enter is activated, which in turn executes ↔open message.

Send Method backward delete char

Undo last search extension

Send Method cancel search

Cancel the incremental search (see →typed). Incremental search is normally canceled when the pointer leaves the window and when the user hits ESC or Control-G.

Send Method enter

Select current item as double-click. This method is normally invoked through the ←key binding when the user hits return to confirm searching for an item.

Send Method extend prefix

Part of incremental search. Determines all items who’s ‘dict item ←label’ start with the ←current search and extends the search string to the common prefix of the matching items. In other words, it will extend the search string to the next choice-point.

Send Method extend to current

Extends the ←search string to the current item. Useful when the user is searching for an item that starts as the current. See also →extend prefix.

Send Method insert self times=[int], character=[char] Send Method insert self times=[int], character=[char]

Start/Continue incremental search

Send Method keyboard quit

Equivalent to →cancel search

Send Method repeat search

Repeat with same string

Variable search hit int (-)

Current hit

Variable search origin int (-)

Start of incremental search

Variable search string char array* (-)

Current search string

5.2.17 Event — Event processing

Send Method wants keyboard focus

Refinement of: graphical-> wants keyboard focus Succeeds if the list browser has a ←dict that is not empty. Note that typing in a list browser searches for an item.

Get Method dict item event=event ⇒dict item DictItem on which event occurred

Send Method event event=event Refinement of: device->event Performs the following steps:

1. Invoke ‘device →event’ and succeed if this succeeds.

2. If the event is a keyboard event, invoke →typed to realise incremental search.

3. If the event is an area exit event, cancel an ongoing search.

4. If the event is a right-button-down (ms right down) and there is a ←popup, open the popup using @ popup gesture.

5. If the event is a left-or middle-click, modify the ←selection using →change selection and, If appropriate, execute one of the messages

←open message  double-click
←select message  left-click
←select middle message middle-click

Variable status {active,inactive} (←) Send Method status {active,inactive}

Handle typing?

5.2.18 Accelerator — Binding the keyboard

Variable key binding key binding (↔)

A key binding object that maps typing in the list browser object to actions. The initial value is an empty table that delegates to the predifined table named ‘list browser’. New functions may be added using:

    ...
    send(LB?key_binding, function, Name, Action)
    ...

These functions are local to this list browser.

Send Method typed event id=event id Activates the key binding object ←key binding. ←key binding is filled in →initialise with an empty sub-keybinding of the default key binding named ‘list browser’ from @key bindings.

The default key binding object implements incremental search. See also class key binding and class editor.

5.2.19 Organisation — Organisation of (graphical) objects

Get Method contains ⇒chain

Refinement of: visual<-contains Return the ‘dict ←members’ chain of the ←dict.

5.2.20 Member — Find objects (by name)

Get Method member any=any ⇒dict item Refinement of: device<-member Return the first graphical of ‘Device ←graphicals’ that has name ‘name’. This mechanism is commonly used to address parts of a device.

5.2.21 DialogItem — Dialog Item placement for graphicals

Send Method reference point=point Move the reference-point (offset) of the device to be at point, but move the member graphicals the same amount in the other direction, such that they remain displayed at the same position.

The default reference point is the top-left corner of the bounding box of all the member graphicals.

5.2.22 Repaint — Behaviour dealing with repaint

The following methods are invoked by the ←dict. Modification actions to dict object are automatically forwarded to the list browser.

Send Method change item dict item=dict item Handle changed item from dict

Send Method clear

Handle clear from dict

Send Method delete item dict item=dict item Handle deleted item from dict

Send Method insert item dict item=dict item Handle inserted item from dict

Send Method redraw area area=area

Refinement of: device-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

5.2.23 Cache — Caching information (speed up)

Variable start cell alien:Cell (-)

Cell reference to top-row of display

5.2.24 Internal — Private behaviour

These function pointers are requested by the text image object. The communication between the ←image and data represented in the dict object is implemented using direct C-function pointer for better performance.

Get Method fetch function ⇒alien:FetchFunction Pointer to C-function to fetch char

Get Method margin function ⇒alien:MarginFunction Pointer to C-function to fetch margins

Get Method rewind function ⇒alien:RewindFunction Pointer to C-function to rewind object

Get Method scan function ⇒alien:ScanFunction Pointer to C-function to scan for char-type

Get Method seek function ⇒alien:SeekFunction Pointer to C-function to seek to position

5.3 Class dict — Dictionary of objects (also for browser)

Inheritance: ⇒ dict ⇒ visual ⇒ object

A dict object (a dictionary) is a collection of dictionary items (dict item objects), each of which is a triple (key, label, object). The key must be unique over the dict.

Dict objects can be made visible by attaching them to a browser object or list browser object. The browser can then be used to select dict item objects.

The access to a dict item object from a key is implemented using a hash table object.

Instance Variables

visualisation

browser - list browser* Associated browser (visualisation)

order

sort by ← [code]* Sorting rule to apply

organisation

members ← chain Objects in the dictionary

hashing

table  - hash table*  Hashtable for access on key

Behaviour

5.3.1 Oms — Object management operations

Send Method initialise member=dict item ...

Refinement of: object->initialise

Create a dict and append the arguments

Send Method unlink

Refinement of: object->unlink

Destroy hash-table and unlink from browser

5.3.2 Visualisation — Making data visible

Get Method browser ⇒list browser|browser Variable browser list browser* (-)

When not @nil, this is the list browser object that visualises this dictionary. The slot ‘list browser ←dict’ contains the reverse pointer.

When the dict is modified, it will send messages to the list browser object:

• ‘list browser → delete item: dict item’ The indicated item has been deleted from the dict

• ‘list browser → insert item: dict item’ The indicated item has been inserted in the dict

• ‘list browser → clear’ The dict has been cleared.

5.3.3 Add — Adding elements to a list

Send Method append item=dict item Append the dict item at the end (see ←members). Note that class dict item defines a conversion function to create a dict item from a key. See ‘dict item ←convert’.^{1}

Send Method insert item=dict item Insert dict item according to ←sort by. If ←sort by is @nil, just →append. If ←sort by is @default, insert the item before the first item that is alphabetically larger. It ←sort item contains a code object, insert it before the first item for which executing the code (if it is a function) return ‘larger’. See also ‘chain→sort’, →append, →sort and →sort by.

Send Method insert after after=dict item, item=any|dict item* Add a dict item object (like →append) after the specified item (a dict item or key). If the second argument is @nil, the dict item is inserted as the first item.

5.3.4 Set — Set operations (no duplicates)

Send Method member any|dict item Test if the argument (a dict item object or a ‘dict item ←key’) is member of the is dict.^{2}

Send Method members chain=chain Chain with all the members. Class dict stores its members twice: once in ←members to maintain ordering information (see →sort and →append) and once in the hash table object ←table to get fast access from a key to a dict item object.

5.3.5 Order — Sorting sequences

Send Method sort [bool|code|function], ignore blanks=[bool], reverse=[bool] Sort the contents of the dict. The ordering information is kept in ←members. There are two possibilities:

• Alphabetical sorting When the first argument is not a code object, the dict will be sorted alphabetically on the ‘dict item ←label’. The first argument requests to compare case-insensitive. The second to ignore leading and trailing blank space and to collapse multiple blanks in the middle to a single space character. (see also ‘string →strip’).

• Sorting on a comparison function. In this case the first argument is a code object. This code object is passed pairs of dict item objects as @arg1 and @arg2. See ‘chain →sort’ for details.

If ←sort by contains a code object, this will be used as the default. See also ←sort by to maintain a list of sorted objects.

1 If there is already a dict item with this ‘dict item ←key’, the old entry is deleted from ←table. A

subsequent ←member wil this return the last appended dict item with this ←key. 2 Redundant. Use ‘dict ←member’ instead.

Variable sort by [code]* (←) Send Method sort by [code]*

The method ↔sort by defines the behaviour of →insert as well as the default behaviour of →sort. If its value is @nil, no sorting is done. →insert and will behave as →append. Using @default, the arguments are sorted alphabetically on their printed representation. →insert will insert a new item according to this order. If the ←sort by contains a code object, this will be used for comparing the value-pairs. See also ‘chain →sort’. It ←sort by is assign another value than @nil, →sort will be activated to establish the desired order.

Using →sort by is a good technique to insert new items at the right place in the list. It is not a good technique to build up a sorted list as this will result in quadratic behaviour for long lists, while →sort uses the QuickSort algorithm.

5.3.6 Lookup — (Table) lookup methods

Get Method member any|dict item ⇒dict item When the argument is a dict item object, return it if ‘dict item ←dict’ equals this dict. Otherwise, invoke ‘hash table ←member’ on ←table and return the result.

Note that many of the methods of the class that require a member dict item argument use ←member to find the dict item.

5.3.7 Iterate — Run code on each element of a collection

Send Method for all action=code, safe=[bool] Invokes ‘chain →for all’ on the chain of ←members.

Send Method for some action=code, safe=[bool] Invokes ‘chain →for some’ on the chain of ←members.

5.3.8 Search — Finding plain text, regex or objects

Get Method find test=code ⇒dict item Invokes ‘chain ←find’ on the chain of ←members.

Get Method find all test=code ⇒chain Invokes ‘chain ←find all’ on the chain of ←members.

Get Method find prefix for=string, from=[int], no exact case=[bool] ⇒dict item Return the first dict item object from ←members whose ←label (or ←key if the ←label is @default) has the specified prefix. The search starts at the nth dict item (0-based). The last argument requests case-insensitive (@on) or case-sensitive (@off).

Get Method match char array=char array ⇒chain Return a new string holding all dict item objects in this dict whose ‘dict item ←label’ (or ‘dict item ←key’ when the label is @default) match (using ‘char array →sub’) the argument name.

Note that more complicated searches may be performed using ←find all.^{3}

3 Should allow for case-insensitive matching.

5.3.9 Delete — Text deletion commands

Send Method clear

Removes all dict item objects from the dict. Informs a possibly related ←browser.

Send Method delete any|dict item Delete a dict item object. The dict item to be deleted may be specified using its ‘dict item ←key’.

5.3.10 Organisation — Organisation of (graphical) objects

Get Method contained in ⇒list browser|browser Refinement of: visual<-contained in Returns the ‘parent’ visualiser. Defined at each of the various subclasses of visualiser to deal with the different implementations. All visualiser classes should define this method, except for class display which is at the root of the visualise consists-of hierarchy.

Get Method contains ⇒chain

Refinement of: visual<-contains Returns a chain with the visualisers of the next level of the contains hierarchy. Each of the subclasses that defines a ‘compound’ visualiser defines this method to deal with it’s particular implementation.

Variable members chain (←)

Chain with all the members. Class dict stores its members twice: once in ←members to maintain ordering information (see →sort and →append) and once in the hash table object ←table to get fast access from a key to a dict item object.

5.3.11 Hashing — Caching information (speed up)

Get Method table ⇒hash table Variable table hash table* (-)

The mapping from ‘dict item ←key’ to the corresponding dict item object is maintained by this hash table object.

5.4 Class dict item — Item (element) of a dictionary

Inheritance: ⇒ dict item ⇒ visual ⇒ object

Delegation: object (any)

A dict item object is an entry in a dictionary (dict object). It consists of four fields: a ←key, used for indexing purposes; a ←label to be displayed when the dict item is visualised in a browser object and and an ←object, which can be anything that is to be associated with the dict item and finally a ←style to indicate the ‘category’ the object belongs too. Each category may be displayed using another font, colour or attributes. See ‘list browser→style’.

The ←label defaults to the ←key, the object and style default to @nil.

Instance Variables

delegate

object ↔ any Associated data

value

key ← any Key used to index from dict

order

index ← int Index in dict (0-based)

appearance

label  - [char array]  Label used to display in browser
style  ← [name]  Display style for item

organisation

dict  ← dict*  Dict holding me

Behaviour

5.4.1 Oms — Object management operations

Get Method convert any=any ⇒dict item Refinement of: object<-convert Convert a name to a dict item object with default ←label and ←object.

Send Method initialise key=any, label=[char array], object=[any]*, style=[name] Refinement of: object->initialise Create from key, label, object and style

Send Method unlink

Refinement of: object->unlink

Delete from dict

5.4.2 Delegate — Delegation of behaviour

Variable object any (↔)

This value may contain any user-defined information to be associated with this item of the dictionary. It is commonly used for two purposes:

• Store additional info When a dict (normally though a browser object) is used to browse and select some information, ←object is often used to store additional information. For example, the summary browsers of this online manual store the documentation card represented by an entry in the ←object slot.

• Store a frame Dict objects where originally intended to store and visualise structured databases. The object was generally filled with a sheet object to store attributes of this entry. For example, a dict object may be used to store a database of clients, The ←key would be the client’s name or identifier. The ←object a sheet or instance of a user-defined class that contains the client’s phone, address and other info.

Dict items delegate to their ←object.

5.4.3 Value — Related value

Variable key any (←) Send Method key any=any

The key value of this dict item. This should be a unique value with respect to the other members of the dict object holding this dict item. See also ←label, ‘dict →append’ and ‘dict ←member’.

If the registered key is an instance of class char array or one of its subclasses, the key is automatically converted to a name object.

5.4.4 Order — Sorting sequences

Variable index int (←)

Index-number of the dict item in the dict. The first item has number 0. Used to speed up changes forwarding and repaint.

5.4.5 Appearance — “Look-and-feel” related aspects

Get Method label ⇒char array Variable label [char array] (-) Send Method label [char array]

When @default, the displayed label is the ←print name of the ←key. Otherwise the value of this variable is displayed. See ←label.

Variable style [name] (←) Send Method style [name]

Logical name of the category the item belongs too. The sheet ‘list browser ←styles’ maps these category names onto style objects describing the font, colour and attributes for the item.

5.4.6 Area — Handling size and position

Get Method position ⇒point

Return a new point object describing the top-left corner of the area used by this dict item in the coordinate system of the list browser object it is displayed on.

Fails silently if the dict item is currently not displayed or outside the visible part of the list browser.

5.4.7 Popup — Associating (Popup) menus

Get Method image ⇒list browser Internal method that allows popup menu’s to operate on dict item’s. See ‘list browser →popup’.

5.4.8 Organisation — Organisation of (graphical) objects

Get Method contained in ⇒dict

Refinement of: visual<-contained in Returns the ←dict of the item.

Variable dict dict* (←) Send Method dict dict*

Dict object I’m part of. When @nil, I’m not part of a dict. Otherwise I’m member of the chain ‘dict ←members’.

162 Class dict item XPCE Reference Manual

Chapter 6

General Purpose Graphics

This chapter describes non-specialised graphics. For more specialised graphics, see Section 4.13.6 [Dialogs and Menus], page 136, Section 5.4.8 [Lists], page 161, Section 11.10.4 [Text Processing], page 375.

Class graphical defines the most general graphical object. Instances of class graphical may be displayed in instances of class device or class window (a subclass of device). A device may be regarded as a collection of graphical objects. Devices themselves are graphical objects too, allowing for a hierarchical organisation of diagrams.

After the classes graphical and device this chapter continues with the primitive graphical building blocks of PCE (box, circle, text, etc.).

6.1 Class picture — Graphics window

Inheritance: ⇒ picture ⇒ window ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: frame (frame*), tile (tile*), decoration (window decorator*)

A picture is a basic window for displaying arbitrary graphical objects. A picture by default has scrollbars for horizontal and vertical scrolling attached. This is its only difference from a basic window.

Instance Variables

Behaviour

6.1.1 Oms — Object management operations

Send Method initialise label=[name], size=[size], display=[display] Refinement of: window->initialise Create a picture window. A picture is a window with scrollbars attached. Invokes ‘window →initialise’, followed by ‘window →scrollbars: both’.

6.2 Class graphical — Displayable graphical object

Inheritance: ⇒ graphical ⇒ visual ⇒ object

PCE contains a large number of classes related to creating and manipulating graphical objects. The graphics facilities were designed for interactively manipulating diagrams and graphical representations of information and knowledge. The graphics facilities are not suitable for 2-D or 3-D modeling of real-life objects (such as cars and planes).

The most commonly used subclasses of class graphical are:

class box  Rectangle (filled, rounded)

class ellipse class line

class path  Multiple segment line (curved)
class bitmap  Image
class text  Short text objects
class device  Compound graphical objects
class dialog item Specialised items for dialogue

Example types of diagrams for which PCE has been used are the representation of graphs (hierarchies, lattices, flow-charts), tabular information, iconic representations of computer networks, knowledge bases and various graphical editors.

A graphical describes an image, all of whose affected pixels are within a rectangular area, represented by ←area. The main role of class graphical to facilitate the communication to its ←device. A device object is a collection of graphical objects. Class device is a subclass of class graphical. This allows us to display devices on devices, leading to nested graphicals with local coordinate systems.

Graphics in PCE is more complicated than most of the other facilities, although the maxim “if your needs are simple, it will be simple in PCE as well” still applies. Advanced use of graphics, however, requires a good understanding of the basic concepts and how they are applied.

Mouse and keyboard events are made available to a graphical using the method →event. By default the primitive graphical classes do not respond to this message. There are two ways to make a graphical sensitive to the mouse and/or keyboard. The first is to associate a recogniser object using ‘object →recogniser’. The second is to redefine the →event method.

Refining graphicals

A couple of methods are commonly redefined on class graphical for creating customised graphical objects:

• →event: event May be redefined to modify event processing. This is a class-level alternative for ‘graphical →recogniser’.

• →device: device Called if the device of the graphical object is changed. May be redefined to take care of side-effects, but the user must call the super-behaviour.

• →displayed: bool Called if the ←displayed attribute is changed. Like →device, this method may be redefined, but the user must call the super-behaviour.

• →reparent: int Indicates that the consists-of tree of graphicals has changed between this graphical and the window. May be redefined, but the user must call the super-behaviour.

Instance Variables

name

name ↔ name Name of graphical

relation

connections  - chain*  Connections (links) to other graphicals
handles  - chain*  Connection points for connections

selection

selected ← bool If @on, I’m selected

appearance

colour  ← [colour|pixmap]  Colour of drawing pen
inverted  ← bool  If @on, invert bounding box after painting
pen  ← 0..  Thickness of drawing pen
texture  ← texture name  Stipple pattern of drawing pen

area

area - area Bounding box of affected pixels

visibility

displayed ← bool If @on, graphical is visible

update

request compute ← any* Graphical requests recomputing

cursor

cursor ← cursor* Cursor when in focus of events

event

active ← bool If @off, greyed out and insensitive

organisation

device  ← device*  Device I’m displayed on

Behaviour

6.2.1 Oms — Object management operations

Send Method initialise x=[int], y=[int], width=[int], height=[int] Refinement of: object->initialise Initialise a graphical using the area components ←x, ←y, ←width and ←height. It sets the following defaults:

←displayed  @off (will be set by →display)
←device  @nil
←area  new area from the arguments
←pen  1 1
←texture  none
←colour  @default
←selected  @off
←name  Classname (box, ellipse, ...)
←handles  @nil
←inverted  @off
←cursor  @nil
←request compute @nil

Class graphical is a super-class of all graphical classes. Instances of this class can be created, but are probably of little use.

Send Method unlink Send Method unlink

Refinement of: object->unlink Delete possible connections using →disconnect and remove the graphical from it’s ←device.

6.2.2 Conversion — Conversion (for type checking)

Get Method convert object=object ⇒graphical Get Method convert object=object ⇒graphical

Refinement of: object<-convert General object are converted into graphicals by invoking ←image on the object. This simplifies manipulation of non-graphical objects that manipulate a graphical (such as class ‘node’).

6.2.3 Name — Naming objects

Variable name name (↔)

The name of a graphical can be used to locate it on its device. Finding graphicals by name is a simple but very effective way. Graphicals generally do not visualise their ←name.

See ‘device←member’ and ‘device ←catch all’.

6.2.4 Nodes — Nodes in a hierarchy (tree)

Get Method node ⇒node

Yields the node object that has ‘node ←image’ equal to this graphical. Commonly used to find the node object in recognisers associated with the graphical image.^{1}

6.2.5 Relation — Relations, constraints, (graphical) connections

This section explains graphical ‘connections’. A connection is a line between two graphicals that is automatically updated if either of the two connected graphicals is moved, resized, deleted, etc. The primitives for handling connections are spread over a large number of classes:

graphical The methods of this section
connection The real connection
link  Prototype description for a connection
handle  Connection point on a graphical
expression Formula to specify the location of a link

The example below illustrates how two boxes may be given handles for input and output and related. We assume input links at the top and left and output links at the bottom and right.

1 Only works if the node is attached to a tree and actually displayed. It checks whether the graphical’s device is a tree and then uses ‘node ←find node’ to find the node object belonging to this graphical.

?- send(new(P, picture('Connection Demo')), open),
  send(P, display, new(B1, box(50,50)), point(25,25)),
  send(P, display, new(B2, box(100,50)), point(200, 25)),
  send_list([B1, B2], recogniser,
        [ new(resize_gesture),
          new(move_gesture)
        ]),
  send_list([B1, B2], handle,
        [ handle(0,   h/2, input, input_1),
          handle(w/2, 0,   input, input_2),
          handle(w,   h/2, output, output_1),
          handle(w/2, h,   output, output_2)
        ]),
  new(L, link(output, input, line(0,0,0,0,second))),
  send(B1, connect, B2, L).

Note that neither the handles, nor the link has any direct reference to the involved graphical objects. It is therefore allowed create these objects once for an application and reuse them for all instances of similar graphicals and connections.

Send Method connect to=[graphical], link=[link], to kind=[name],

from kind=[name] Create a connection (line) to another graphical, which must be displayed on the same window, but not necessarily on the same device object.

‘graphical →connect’ simply invokes ‘link←connection’ passing the receiver as ‘from’, as well as ‘to’, ‘from kind’ and ‘to kind’. The normal way to redefine the type of connection established is using either ‘link→connection class’ or by redefining ‘link ←connection’.

Send Method connected to=[graphical], link=[link], to kind=[name],

from kind=[name] Test if graphical has a connection that matches the specification. Any of the values may be @default, which refers to ‘anything’. See ←connections for a description of the arguments.

Get Method connections to=[graphical], link=[link], from kind=[name],

to kind=[name] ⇒chain Compute a new chain with all connections of graphical. The arguments are:

to:  Graphical at other side
link:  Link that must be in the connection
from kind: Name of the handle at the from-side
to kind:  Name of the handle at the to-side.

Fails if there are no connections.

Variable connections chain* (-)

Chain of connection objects. Connections are lines relating two graphical objects. Connection are automatically updated when either of the connected graphicals is updated.

Send Method disconnect to=[graphical], link=[link], to kind=[name],

from kind=[name] →free all connections to- and from this graphical that match the arguments. @default is taken to match anything. The arguments are described with ←connections.

Get Method handle name=name ⇒handle Returns handle object with specified name. First scans ‘graphical -handles’ followed by ←handles of the graphical’s class. The first matching handle is returned.

Send Method handle handle=handle Associates a handle with the graphical. A handle is a named connection-point, which position is determined by two expression objects in terms of the ←width and ←height of the graphical. Connections between graphicals can only be made if both graphicals have suitable handles defined.

Note that handles may also be attached at the class of the graphical. Such handles are used by all instances of the class. See ‘class →handle’.

Get Method handle position name=name, device=[device] ⇒point Determine position of the named handle in the coordinate system of the given device. The default device is the graphicals ←device.

Get Method handles near=[point], kind=[name], distance=[int] ⇒chain New chain with all handles (both from -handles as from ‘class ←handles’ that are within distance pixels from the given point and have the given kind. Fails if no handles match the criterion.

Variable handles chain* (-)

Chain of handles. Each handle defines a position to which a connection can attach. See ‘T Connections’.

Handles can be attached at the instance level and at the class level (see ‘Class →handles’) or both.

Get Method network link=[link], from kind=[name], to kind=[name] ⇒chain Get Method network link=[link], from kind=[name], to kind=[name] ⇒chain

Computes a new chain, holding the receiving graphical and all graphicals that can be reached from it by following the specified types of connections:

• link When specified, follow only connections of this link

• from, to When specified, follow only links that are connected to the named handles

This method is save on cyclic graphs. See also →layout.

6.2.6 Selection — Manipulation and query of selections

Variable selected bool (←)

Send Method selected bool=bool Indicates whether or not the graphical is selected. The visual feedback is determined by the resource ‘selection style’.

Send Method toggle selected

If ←selected equals @on, invoke →selected: @off and visa-versa. Useful for implementing selection handling.

6.2.7 Meta — Analysing behaviour and objects

Get Method all recognisers create=[bool] ⇒chain Return a chain holding all the object-level extensions to the object of the given type. If ‘create’ equals @on, this call will always succeed, possibly returning an empty chain. Otherwise the call might fail.

The following extensions are defined:

→attribute  Object-level ‘instance variable’
constraint  Binary constraint between two objects
hyper  Binary relation (two-way attribute)
→recogniser  Handler for event objects (class graphical)
→send method Object-level method (send)
→get method Object-level method (get)

See also class constraint and class hyper.

6.2.8 Apply — Applying dialog windows

Send Method apply [bool] Send Method apply [bool]

Virtual method, defined by most subclasses of class dialog item. This method should forward the ←message of the dialog item if the dialog item has been modified by the user or the argument is @on. See also ‘dialog →apply’

Send Method restore Send Method restore

Virtual method

6.2.9 File — Saving and loading files, file operations

Send Method initialise new slot new=variable

Refinement of: object->initialise new slot Part of saved-object conversion (see ‘file ←object’). Called when -while loading an instance from a file-, the current definition of the class has a new instance variable (compared to when the instance was saved to file using →save in file). The argument is the new variable object from the class. May be used to initialise the new slot to some sensible value.

6.2.10 Animate — Behavariour to support animation

Send Method flush Send Method flush

Invokes ‘window →flush’ when the graphical is related to a window, immediately updating the display. Always succeeds.

Send Method synchronise [always=bool] Invokes ‘display →synchronise’ on the result of ‘graphical ←display’. Always succeeds, also if graphical has no display attached.

6.2.11 Appearance — “Look-and-feel” related aspects

Variable colour [colour|pixmap] (←) [Pce.Graphical.colour: @default] Send Method colour [colour|pixmap]

The ↔colour attribute of a graphical describes the colour used to draw the affected pixels. It is either a colour object or @default. The latter implies the ↔colour attribute of the device is used.

Get Method display colour ⇒colour|pixmap

Return the colour in which the graphical is actually displayed. If the variable ‘graphical ←colour’ equals @default, this is the ←display colour of the graphical’s device. Otherwise it is the value of the ←colour variable.

If the graphical is displayed, this will always return a colour. Otherwise this method fails if neither the graphical, nor its device specify the colour.

Variable inverted bool (←)

Send Method inverted bool=bool If @on, ‘Graphical ↔area’ is inverted after the graphical is painted, inverting all pixels in the bounding-box of the graphical. Note that this implies at inverted circle appears as a white circle in a black square (using white background and black foreground colours). Also note that graphicals below (i.e. hidden by this graphical) are inverted too.

Variable pen 0.. (←)

Send Method pen 0..

The pen attribute denotes the thickness in pixels of the drawing pen for drawing lines. It is defined at class graphical, but only applicable to classes whose images actually contain lines. If the pen is 0 (zero), lines are not displayed.

Variable texture texture name (←) Send Method texture texture name

Stipple pattern used for drawing lines. Applicable to all graphicals that have line elements in them. Values:

none  Straight line
dotted  Pattern: 1 on 2 off ...
dashed  Pattern: 7 on 7 off ...
dashdot  Pattern: 7 on 3 off 1 on 7 off ...
dashdotted Pattern: 11 on 3 off 1 on 3 off 1 on 3 off 1 on 3 off
longdash  Pattern: 15 on 7 off ...

6.2.12 Layout — Spatial relations between graphical objects

Get Method above ⇒graphical Get Method below ⇒graphical Get Method left ⇒graphical Get Method right ⇒graphical

Dialog item integration; fails Send Method above graphical* Send Method below graphical* Send Method below graphical* Send Method left graphical* Send Method right graphical* Send Method right graphical*

Integrates plain graphical objects in the layout system defined for class dialog. The →above relation is stored using →attribute. This method handles combinations of plain graphical objects and dialog item objects correctly.

See also ‘dialog item →above’, ‘dialog →layout’ and ‘device →layout dialog’.

Get Method alignment ⇒name

Dialog item integration

Send Method alignment {left,center,right,column} Send Method reference point=point

Dialog item integration. These methods associate the requested value using an →attribute. See ‘dialog item →alignment’ and ‘dialog item →reference’ for details.

Get Method auto align ⇒bool Get Method auto label align ⇒bool Get Method auto value align ⇒bool Get Method reference ⇒point Send Method auto align bool=bool

→auto align is for the integration with class dialog item. It associates an →attribute auto align with the specified value. ←auto align returns the value of this attribute if present. Otherwise @on if one of the attributes ←above, ←below, ←left, ←right exists and @off otherwise.

Send Method auto label align bool=bool Send Method auto value align bool=bool

Dialog item integration

Get Method hor stretch ⇒0..100 Get Method hor stretch ⇒0..100

Horizontal stretchability of dialog item (fail)

Send Method layout attract=[real], nominal=[real], repel=[real], adapt=[int],

iterations=[int]

Send Method layout attract=[real], nominal=[real], repel=[real], adapt=[int],

iterations=[int] When graphical is member of a ‘network’ (see ‘graphical ←network’) of connected graphicals (see ‘graphical →connect’), this method tries to give the entire graph of connected graphicals a sensible layout. Don’t expect too much: this algorithm does not know anything about what your graph is representing.

The algorithm is based on [Eades:84]. It defines a number of springs between connected and non-connected nodes. The algorithm does a Monte-Carlo simulation using these springs.

The parameters are:

• real, default is 2 ‘Strength’ of the springs

• real, default is 30 ‘Natural Length’ of the springs

• real, default is 15 Force (outwards) between any pair of non-connected graphicals

• int, default is 15 Determines how much the network is changed each iteration

• int, default is 100

Determines the number of iterations.

2

Send Method layout dialog Send Method layout dialog

Compute layout as a dialog object

Get Method ver stretch ⇒0..100 Get Method ver stretch ⇒0..100

Vertical stretchability of dialog item (fail)

6.2.13 Rotate — Rotating objects

Send Method rotate int=int Send Method rotate int=int

Exchanges ←width and ←height if the rotation is 90 or 270 degrees. ←center is maintained.^{3}

6.2.14 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Send Method geometry x=[int], y=[int], width=[int], height=[int]

Invoked from ‘graphical →request geometry’, which is, though ‘graphical →set’, invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Sets the area and informs the graphical’s device on the changed geometry. The device will answer with a → redraw area when this is necessary.

This method is commonly refined, dealing with all possible resize and move requests. If this method is refined if should always call the →geometry method of the super-class. It is allowed to changed the parameters though The example below defines a box fits on a 10x10 pixel grid.

    :- pce_begin_class(grid_box, box).

2 •Gets slow if there are many nodes (> 50). •Produces bad results on large networks with many

connections. 3 Someday, xpce should support real rotation and scaling at the level of class device.

    geometry(B, X:[int], Y:[int], W:[int], H:[int]) :→
        align_to_grid(X, NX),
        align_to_grid(Y, NY),
        align_to_grid(W, NW),
        align_to_grid(H, NH),
        send(B, send_super, geometry, NX, NY, NW, NH).
    align_to_grid(@default, @default).
    align_to_grid(Value, Aligned) :-
        Aligned is ((Value + 4) // 10) * 10.
    :- pce_end_class.

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Send Method request geometry x=[int], y=[int], width=[int], height=[int]

Invoked internally from ‘graphical →set’, which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Invokes →geometry to change the ←area. The indirection →request geometry ==> →geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.

6.2.15 Area — Handling size and position

Get Method absolute position [device] ⇒point

Returns a point object indicating the position of the top-left corner of the graphical in the coordinate system of the argument device (or window).

Get Method absolute x [device] ⇒int X coordinate of graphical in coordinate system of device. See ‘graphical←absolute position’.

Get Method absolute y [device] ⇒int Y coordinate of graphical in coordinate system of device. See ‘graphical←absolute position’.

Get Method area ⇒area

Variable area area (-)

The area object associated with each graphical describes a bounding-box inside which all pixels affected by the graphical are. The area is used for:

• Representing the position and size of the graphical.

• Planning redraw of the window.

• Dispatching events to graphicals ‘below’ the mouse.

The get method first invokes →compute to update the graphical.

Send Method area area=area Changes position and size. Implemented using ‘Graphical →set’.

Get Method bottom side ⇒int

Y-coordinate of the bottom-side of the graphical in the coordinate system of its device. With positive height, this is ←y + ←height. With negative height, this is ←y.

Send Method bottom side int=int

Resize graphical to set bottom-side

Get Method center ⇒point

New point representing center

Send Method center point=point Send Method center point=point

Moves the graphical such that the center of its area becomes point. Moving is realised using ‘Graphical →set’.

Get Method center x ⇒int Get Method center x ⇒int

X-coordinate of center

Send Method center x int=int

Move horizontal to make int the ←x center

Get Method center y ⇒int Get Method center y ⇒int

Y-coordinate of center

Send Method center y int=int

Move vertical to make int the ←y center

Get Method corner ⇒point

New point defined as:

    point(←x + ←width, ←y + ←height)

Send Method corner point=point Sets the corner opposite the origin of the graphical (see ‘graphical →orientation’) to the indicated position in the coordinate system of the graphical’s device.

This method used to support resizing graphicals: sending →corner messages to with the location of the device resizes the graphical. Resizing is now dealt with by class resize gesture.

Get Method corner x ⇒int

X-coordinate of the corner, defined as

    ←x + ←width.

Send Method corner x int=int

Resize to set X of →corner

Get Method corner y ⇒int

Y-coordinate of the corner, defined as

    ←y + ←height

Send Method corner y int=int

Resize to set Y of →corner

Get Method display position ⇒point

Determines the position of the top-left corner of the graphical relative to the display. Sometimes use to determine the position of a new (prompter) window. Note that the position of the current event, relative to the display may be found using

    get(@event, position, @display, Point)

See ‘event ←position’ and @event.^{4}

Send Method do set x=[int], y=[int], width=[int], height=[int] Send Method do set x=[int], y=[int], width=[int], height=[int]

Set X, Y, W and H for graphical. Unlike the other geometry management methods, this method calls →geometry rather then →request geometry.

Get Method height ⇒int Get Method height ⇒int

Height in pixels. Note that for some graphicals this value may be negative, indication the top-side is above rather than below the y-position.

Send Method height int=int Invokes ‘graphical →set’ width specified H-value.

Get Method left side ⇒int

Left-side of graphical

Send Method left side int=int

Resize graphical to set left-side

Send Method move point=point Synonym for ‘graphical →position’: moves the origin of the graphical to the indicated position. Normally the origin is the top-left corner. Note however that this depends on the ‘graphical ←orientation’.

The origin of devices is the origin of the device’s coordinate system.

Send Method normalise

Equivalent to ‘graphical →orientation: north west’: Ensures ←width and ←height are positive, making the origin the top-left corner of the graphical.

4 Yields incorrect results if the window is not actually displayed on the screen.

Get Method orientation ⇒{north west,south west,north east,south east} Send Method orientation {north west,south west,north east,south east}

Some graphical objects may have negative ←width and ←height. The origin is the (X,Y) point of the graphical. (X+W, Y+H) refers to the opposite corner (see ↔corner). This method places the origin at one of the indicated corner. The graphicals location and size on the screen is not affected by this method. The values are:

north west W>=0, H>=0 (→normalise)
north east W < 0, H>=0
south west W>=0, H < 0
south east W < 0, H < 0

Get Method position ⇒point Get Method position ⇒point

New point representing origin

Send Method position point=point Send Method position point=point

Move graphical such that ←x and ←y match the x- and y-coordinates of the argument point. Invokes ‘graphical →set’.

Synonym for ‘graphical →move’.

Send Method relative move point=point

Move the graphical relative to its current position using the X- and Y-values of ^point^.

Send Method resize factor x=real, factor y=[real], origin=[point] Send Method resize factor x=real, factor y=[real], origin=[point]

Realises together with ‘device →resize’ resizing of collections of objects. This method resizes the graphical with specified factor relative to the given origin. The X- and Y-distance of each of the corners to this reference point is multiplies by resp. the Xand Y-resize factor (1st and 2nd argument).

Get Method right side ⇒int

Right-side of graphical

Send Method right side int=int

Resize graphical to set right-side

Send Method set x=[int], y=[int], width=[int], height=[int] Send Method set x=[int], y=[int], width=[int], height=[int]

Set the X-, Y-, W- and H- parameter of the graphical. This method is invoked by all the other geometry managing methods (→size, →position, →x, ...).

Note that this method is faster than →size, →position, etc. when the geometry has to be changed from a set of integer values as no intermediate object has to be created.

It first determines whether any action is necessary (i.e. there is a non-default value that is not equal to the current value). If so, it invoked ‘graphical →geometry’ which takes care of the class-dependent geometry-changing action.^{5}

5 ‘graphical →geometry’ is invoked using the internal function ‘simpleSend()’, which bypasses possible object-level methods. Geometry management can only be programmed at thee class level.

Get Method size ⇒size

New size object created from ←height and ←width of the graphical’s area. Either or both of ←width and ←height may be negative. See ↔orientation.

Send Method size size=size Invokes ‘graphical →set’ with specified W- and H-parameter.

Get Method top side ⇒int

Top-side of graphical

Send Method top side int=int

Resize graphical to set top-side

Get Method width ⇒int Get Method width ⇒int

Width of graphical

Send Method width int=int Invokes ‘graphical →set’ with specified X-value to set the width of the graphical.

Get Method x ⇒int X or origin

Send Method x int=int Invokes ‘graphical →set’ width specified X- value.

Get Method y ⇒int Y of origin

Send Method y int=int Invokes ‘graphical →set’ width specified Y- value.

6.2.16 Stacking — Overlapping frames and graphicals

Send Method expose [graphical] Send Method expose [graphical]

Moves graphical in the stacking order of its device such that it is displayed just on top of the argument graphical.

Send Method hide [graphical] Send Method hide [graphical]

Place in background or below argument

Send Method overlap graphical|area Succeeds if graphical overlaps with argument

Send Method swap graphical=graphical Swap the positions of both graphicals in the device’s ←graphicals chain. The ‘background’ graphicals are at the head of this chain, wile the ‘foreground’ graphicals are at the tail.

6.2.17 Visibility — Making object (in-)visible

Variable displayed bool (←) Send Method displayed bool=bool

If @off, the graphical will not be displayed even if it is member of a device. The initial value is @off. It is set to @on by ‘device →display’ an @off by ‘device →erase’.

‘Graphical →displayed’ is used to remove a graphical temporary from the display. See also ‘figure →status’.

Get Method is displayed [device] ⇒bool Tests whether graphical is actually displayed, assuming ‘device’ is displayed.

6.2.18 Draw — Methods for user-defined graphics

Send Method clip [area] Send Method clip [area]

Send Method unclip

Clip subsequent drawing actions to the indicated rectangle. If the rectangle is @default, all operations are clipped to the ←area of the graphical. Note that on entry of → redraw area clipping is set to the argument area, which will normally be larger than ←area.

Each →clip must be undone by an →unclip before → redraw area returns. See also → redraw area, →graphics state →draw line, etc.

Send Method draw arc x=int, y=int, w=int, h=int, angle1=[real], angle2=[real],

fill=[colour|image]* Draw an ellipse-part. X,Y,W,H define the bounding box if the entire ellipse. Angle1 and Angle2 the start and end angles (in degrees). When omitted, an entire ellipse will be drawn.

Fill defines the fill-pattern used. If @nil, the shape is not filled.

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method draw box x=int, y=int, w=int, h=int, radius=[0..],

fill=[image|colour|elevation], up=[bool] Draw rectangular (rounded) box with the given X, Y, W, H. Radius defines the rounding radius for the corners. If the last argument is an image or colour object, the interior will be filled with this. If it is an elevation object, a 3D effect will be simulated. In this case ‘up’ defines whether the box is painted elevated or lowered.

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method draw fill x=int, y=int, w=int, h=int, fill=[colour|image]* Fill rectangle with specified pattern. If the pattern is @nil, the area is cleared to the current background. If the pattern is @default, the area is filled with the current foreground.

To fill a rounded rectangle, use →draw box with the pen set to 0.

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method draw image image=image, x=int, y=int, sx=[int], sy=[int],

sw=[int], sh=[int], transparent=bool Draw a bitmap or pixmap image. The image is drawn from X,Y. SX,SY,SW,SH define the source-area on the image. The default area is the entire image object. If the image is monochrome, (‘image ←kind: bitmap’), the ‘on’ pixels are painted in the current foreground and the off pixels in the current background. If transparent is @on, the off pixels are not painted.

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method draw line x1=[int], y1=[int], x2=[int], y2=[int] Draw line segment from (X1,Y1) to (X2,Y2) using the current settings of the graphics state (see →graphics state).

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method draw poly points=chain|vector, closed=[bool], fill=[colour|image]* Draw/fill a polygon. Points is a chain object or vector object containing the points though which the polyline is drawn. If closed is @on, a line is drawn from the last to the first point. If fill is specified, the interior is filled with the given pattern.

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method draw text string=char array, font=font, x=int, y=int, w=[0..],

h=[0..], hadjust=[{left,center,right}], vadjust=[{top,center,bottom}] Draw a string in the given font object. If only X and Y are given, they describe the left-side of the baseline. If W and H are given, the text is positioned in a box according the the alignment-specifiers hadjust an vadjust. The box described by X,Y,W,H does not need to be large enough to contain the text. For example, a box of size 0.0 and hadjust/vadjust center/center may be used to center text around a point.

Multiple lines are aligned according to hadjust (default: left).

The redraw-method below draws a text-box:

    '_redraw_area'(TB, _Area:area) :→
        "Redraw text-box"::
        get_object(TB, area, area(X,Y,W,H)),
        send(TB, draw_box, X, Y, W, H),
        get(TB, font, Font),
        get(TB, string, String),
        send(TB, draw_text, String, Font,
             X, Y, W, H, center, center).

This method is part of the user-defined graphics infra-structure described with → redraw area and should not be called outside this context.

Send Method graphics state pen=[0..], texture=[texture name],

colour=[colour|pixmap], background=[colour|pixmap] Modify the graphics state. Only the specified values will be modified. This method will normally be called using the named-argument conventions of XPCE:

    ...,
    send(Gr, graphics_state, pen := 2, colour := red),
    ...

See also →save graphics state and →restore graphics state.

NOTE: It is generally advised to paint graphical objects that require the same graphics state together. So, if you need to paint alternating thick and thin lines, first draw all thick lines and then all thin lines instead of switching the state between each line.

Send Method restore graphics state Send Method save graphics state

Save the current setting for the device’s pen, texture and fore- and background. The old values are restored using →restore graphics state. Each →save graphics state must be closed with a →restore graphics state before → redraw area returns. See also →graphics state.

6.2.19 Update — Update Dependant properties

Send Method compute

This method is invoked by PCE’s graphical kernel when:

• One of the area attributes is needed (X, Y, size, ...).

• The graphical needs to be repainted.

The →request compute →compute mechanism is used by graphical objects that need complex computations to determine their area and appearance from some internal state.

For example, a menu is determined by its member menu items and several flags manipulating its visual appearance. It would be a waste to recompute the entire layout of the menu on each change of its state as there will often be multiple changes before it actually needs to be repainted on the screen. A menu will therefore just issue ‘graphical →request compute’ on itself if recomputation is needed. PCE graphics kernel will cause a message →compute to be send to the graphical just before the → redraw area.

The definition of this method at the level of class graphical just assigns ←request compute to @nil.

Variable request compute any* (←) Send Method request compute [any]*

When not @nil, indicates that the graphical is in inconsistent state. Used for graphical objects that require significant computation to determine their area and visual representation.

When no argument is specified with →request compute the variable will be filled with @on.

If a →request compute is invoked on a graphical, PCE’s graphical kernel will invoke a →compute on it if the graphical needs to be repainted or one of the dimensions of the graphical is requested. See ←area, ‘display →dispatch’ and ‘→compute’.

6.2.20 Menu — Associating (Popup) menus

Get Method popup ⇒popup

Associated →popup Send Method popup popup=popup Send Method popup popup=popup

Utility method to associate a popup with an object. It performs the following steps.

1. If the object has a ‘popup’ instance variable, it will fill this variable with the popup object and assume the class knows how to display it.

2. Otherwise it will attach an attribute ‘popup’ to the object and append the recogniser @ popup gesture, which is a default popup gesture object

6

6.2.21 Cursor — Image of the pointer (mouse) cursor

Variable cursor cursor* (←) Send Method cursor cursor*

Cursor displayed in this window when the graphical is in focus of events. When @nil, the cursor of the device is displayed.

Get Method displayed cursor ⇒cursor*

Currently displayed cursor

6.2.22 Event — Event processing

Variable active bool (←) Send Method active bool=bool

If @off, the colour of the drawing pen will be set to ←resource value: inactive colour. The method →event will simply fail if ←active is @off.

Send Method delete recogniser recogniser=recogniser Delete a recogniser

Send Method event event=event Send Method event event=event

Process a (user-) event. This function is normally invoked by class device through ‘event →post’.

If the graphical has recogniser objects associated (see ‘object ←all recognisers’) and ←active equals @on, the recognisers are activated in the order they appear in this chain until one succeeds, after which this method returns successfully.

This method is redefined by many subclasses of class graphical to achieve predefined response to user-events. When programming user-defined (graphical) classes, this method is commonly used to attach predefined user-interface behaviour to the new class.

The following creates a box that may be moved using the middle button:

    ?- new(B, box(100,100)),
       send(B, recogniser, new(move_gesture)).

And the following example defines a class movable box from which all instances can be moved:

6 Notably 1) is a dubious assumption.

    :- pce_begin_class(movable_box, box).
    :- pce_global(@movable_box_gesture,
                  new(move_gesture)).
    event(B, Ev:event) :→
        (   send(B, send_super, event, Ev)
        → true
        ;   send(@movable_box_gesture, event, Ev)
        ).
    :- pce_end_class.

Send Method generate event event id=event id Send Method generate event event id=event id

Generate a new event-object and post it to this graphical. The new event has the given id. Its window is the window in which the graphical is displayed. All other values default (to the values of the latest event).

Used internally to generate area enter and area exit events from other pointer-oriented events.

Send Method in event area x=int, y=int

Used by class ‘device’ to determine ‘device ←pointed objects’. Performs the following steps:

1. if the width or height is very small (< 5 pixels), it is enlarged to make it at least 5 pixels. Fails if (X,Y) is outside this (enlarged) area. The tolerance is read from the resource Pce.Graphical.event tolerance.

2. if the class has the C-function ‘class -in event area function’ defined, this function is called and its value is returned. Otherwise success is returned.

7

Send Method keyboard focus [bool]

Change the ‘window →keyboard focus’ to this graphical if it passes the test → wants keyboard focus. See also ‘device →advance’

Send Method prepend recogniser recogniser=recogniser Add recogniser for user events (first)

Send Method recogniser recogniser=recogniser Add recogniser for user events (last). This is the normal way of associating event recogniser objects with graphical objects.

Recognisers associated this way are store very similar to attributes associated with ‘object →attribute’. If the graphical is saved to a file using →save in file, the recognisers will be saved with the graphical object.

7 •The 5 pixels should be a resource •The test should be a normal method, making it accesible to the user. •Currently the C-function is only implmented for lines. Must be implemented for ellipses, circles, paths, etc.

Using class-level programming, recognisers mat be associated with graphical objects in two ways: by redefining the →initialise method, calling →recogniser to associate event handling or by redefining the class ‘graphical →event’ method.

The following example defines movable box as a class:

    :- pce_begin_class(movable_box, box).
    :- pce_global(@movable_box_recogniser,
                  new(move_gesture)).
    event(MB, Ev:event) :→
        "Associate @movable_box_recogniser"::
        (   send(MB, send_super, event, Ev)
        ;   send(@movable_box_recogniser, event, Ev)
        ).
    :- pce_end_class.

See also: class gesture, class event, →prepend recongiser, ‘event →post’, pce global/2.

6.2.23 Accelerator — Binding the keyboard

Send Method key name=name Send Method key name=name

Accelerator-key pressed (fail)

6.2.24 Report — Reporting events, status and errors

Send Method alert Send Method alert

Alert the user s/he has made an error. Depending on the resource Graphical.visual bell, either the →flash or →bell are invoked.

Send Method bell [int] Send Method bell [int]

Rings the bell on the associated display. The argument is the volume.

Send Method flash area=[area], time=[int] Send Method flash area=[area], time=[int]

Alert the user of a possible problem by shortly inverting the graphical. Area specifies the area to be inverted, relative to the ←area of the graphical itself. Time is the time in milliseconds which the graphical remains in the inverted time; the time of the total operation is this time, plus two time the required time to invert the area. The default time the graphical is inverted is determined by the resource Graphical.visual bell duration.

See also ‘window→flash’, ‘device→flash’ and ‘tab→flash’.

Normally one should invoke ‘graphical →alert’, which depending on the resource ‘Graphical.visual bell’ will either ring the bell or flash the graphical.

6.2.25 Focus — Focussing events to objects

Send Method wants keyboard focus Send Method wants keyboard focus

Test if graphicals wants keyboard events (fail). Used by ‘device →advance’ and redefined by various sub-classes.

Send Method focus recogniser=[recogniser], cursor=[cursor], button=[name] When the graphical is related to a window, invoke

    send(Window, focus, Graphical, Recogniser, Cursor, Button).

Focusing further user-events to this graphical object.

Send Method focus cursor cursor*

Invokes ‘window →focus cursor’ it the graphical is displayed in a window. Always succeeds. This will modify the cursor of the window until the window’s focus is changed.

Get Method keyboard focus ⇒bool

@on if graphical is in focus of the keyboard

6.2.26 Pointer — Pointer related methods

Send Method pointer point=point Send Method pointer point=point

Move the pointer relative to the coordinate system of the graphical: computes offset relative to window’s coordinate system and then invokes ‘window →pointer’.

6.2.27 Organisation — Organisation of (graphical) objects

Get Method application ⇒application

Application my frame belongs too

Get Method common device with=graphical ⇒device Graphical devices may be used to create complex diagrams by combining simple and other complex diagrams (see class device). This method locates the most ‘local’ device that displays both the receiver and the argument graphical.

‘Graphical ←common device’ is used internally to determine the device on which to draw connections between graphicals that are not displayed on the same device.

Get Method contained in ⇒device|node

Refinement of: visual<-contained in Device this graphical is displayed on when not @nil. When the device is a tree, it will return the associated node using ‘graphical ←node’.

Variable device device* (←) Send Method device device*

The device (normally picture, dialog or figure) on which the graphical is displayed. A graphical can only be displayed on one device. The ↔device slot is used by graphicals to inform their device of changes, so the device can perform the appropriate redraw operations. The following is always true:

    If the device of a graphical is not @nil, the graphical is
    member of `Device ←graphicals' of this device and
    visa-versa.

Normally, a graphical is assigned a device using ‘Device →display’.

Get Method display ⇒display

Display on which the graphical is displayed. Useful when using multiple displays (see class display).

Send Method display on device*

Display graphical on device. Equivalent to ‘device →display: graphical’, which is the recommended way to display graphical objects.

Get Method distance graphical=graphical ⇒int Invokes ‘area ←distance: area’ using the areas of both graphicals.^{8}

Get Method distance x graphical=graphical ⇒int Yields an integer representing the distance between the graphicals in X-direction. Yields 0 if both areas overlap in X-direction.

Get Method distance y graphical=graphical ⇒int Distance between graphicals’s in Y-direction

Get Method frame ⇒frame

Frame on which the graphical is displayed.

Frames are commonly used to represent a tool of an application (or an entire application). This method provides an easy way to find the application object from some ‘deep-down’ part of it.

Send Method reparent Send Method reparent

Updates the ←device of possible associated connections. This method. It is invoked from class device when the position of the graphical in the consists-of tree relative to its window has changed:

• When the graphical is first connected to a device.

• When the graphical is erased from its device.

• When the device received a →reparent.

Get Method window ⇒window

Window on which the graphical is displayed. Yields itself if graphical is a window.

8 Silently assumes that both graphicals are displayed on the same device.

6.2.28 Postscript — Generating PostScript for printing

Send Method draw post script

Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

Send Method postscript

Internal method supporting ‘Graphical ←postscript’.

Get Method bounding box ⇒area

Same as ←area; used for PostScript

Get Method postscript landscape=[bool], maximum area=[area] ⇒string Get Method postscript landscape=[bool], maximum area=[area] ⇒string

Create postscript description of graphical. This method creates ‘real’ PostScript. PCE lines area mapped on PostScript lines, PCE text is printed using PostScript fonts, etc.

When the first argument is @on, the drawing is rotated 90 degrees (landscape). When @off or @default, the drawing is generated in PostScripts normal portray mode. ‘Area’ describes an area in PostScript’s coordinate system into which the object is to be scaled.

PCE does not define conversion functions for all graphical objects. Notably for dialog items, list browsers and editors there are no provisions to generate PostScript. Pure PostScript can be generated if a class defines the method → draw post script.

The output of ‘graphical ←postscript’ starts with the contents of the file ‘@pce ←postscript header’, which contains definitions of PostScript commands used in the generated PostScript.

6.2.29 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle

→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Send Method draw offset=[point], area=[area] Draw the graphical on the current device. If ‘offset’ is given, the coordinate system of the device is moved by the given offset prior to painting the graphical. The optional argument is the changed area of the device.

This method may be used to redefine → redraw area. It should not be called outside this context.

Send Method paint selected

Paint the selection attributes if the graphical is ←selected and the ←window defines one of the following ‘window ←selection feedback’ values:

• invert Invert the bounding box.

• handles Request the ←resource value: selection handles and paint the handles accordingly.

• an elevation object Elevate the bounding box.

This method should not be called by the application programmer directly. It is called by → redraw area.

Send Method redraw [area]

Request the graphical to repaint the specified area. When @default, the entire graphical is repainted. Should not be necessary for the application programmer as PCE takes care of redraw automatically. See also →request compute.

6.3 Class device — Collection of graphicals

Inheritance: ⇒ device ⇒ graphical ⇒ visual ⇒ object

A (graphical) device is a collection of graphical objects. As device itself is a graphical objects; devices may be nested. Class device describes the management of such a collection: adding (displaying) graphical objects; erasing graphical objects; changing them; dispatching events over their displayed graphical objects; etc.

Devices communicate changed area’s to their super-device and eventually to the window, which takes care of planning and executing the actual redisplay of the X-window.

The PCE-user normally uses the behaviour of devices via the classes figure or one of the sub-classes of window. Class device itself may be used for the definition of compound graphical objects.

The ←area of a device is by definition the bounding box of all ←displayed graphical objects.

Instance Variables

layout

format ← format* Use tabular layout

area

offset - point Offset of origin

scroll

clip area - area* Clip all graphicals to this area

update

bad bounding box  - bool  Indicate bounding box is out-of-date
bad format  - bool  Format needs to be recomputed
recompute  - chain  Graphicals that requested a recompute

event

pointed ← chain Graphicals pointed-to by the mouse

organisation

graphicals  ← chain  Displayed graphicals (members)
level  ← int  Nesting depth to topmost device

Behaviour

6.3.1 Oms — Object management operations

Send Method initialise

Refinement of: graphical->initialise

Create an empty device

Send Method unlink

Refinement of: graphical->unlink

→erases all ←graphicals from the device and then calls ‘graphical →unlink’. Note that erased graphicals are only garbage-collected if they have no references from other objects. See also ‘visual →destroy.

6.3.2 Selection — Manipulation and query of selections

Get Method inside area=area ⇒chain Returns a new chain object with all graphicals that are entirely inside the argument area. If no graphicals can be found, an empty chain is returned. Described with ‘selection’ because it is commonly used to implement selecting multiple graphicals by dragging a box around them. See PceDraw.

Get Method selection ⇒chain Get Method selection ⇒chain

Returns a new chain with all graphicals that have ‘Graphical ←selected: @on’. If there are no such graphicals, an empty chain is returned.

Send Method selection graphical|chain* Send Method selection graphical|chain*

Set the member graphicals that have ‘graphical ↔selected: @on’. If the argument is a graphical, this graphical will be selected. If it is a chain of graphicals, each member of this chain will be selected. If the argument is @nil, no graphical will be selected.

All graphicals displayed on this device, except for the indicated one’s will be deselected.

6.3.3 Iterate — Run code on each element of a collection

Send Method for all [name], code=code Run code on all graphicals with given ↔name. Stops with failure executing code fails for some graphical. If name is @default, code is executed on all member graphicals, which makes the method equivalent to

    send(Dev?graphicals, for_all, Code)

Send Method for some [name], code=code Run code on all member graphicals that have ←name equal to name. The exit status is ignored and →for some always succeeds. If ‘name’ is @default, code is run on all ←graphicals in the device object.

6.3.4 Appearance — “Look-and-feel” related aspects

Send Method foreground colour=colour Send Method foreground colour=colour

The foreground colour of a device determines the colour used to draw member graphicals that have ←colour not equal to @default. ‘Device →foreground’ is equivalent to ‘Graphical →colour’.

6.3.5 Layout — Spatial relations between graphical objects

Send Method format format*|name, [any] This method has two modes of operation:

• Device →format: format* Attaches a format object to a device. This implies the graphicals are placed in a two-dimensional grid.

• Device →format: name, value Change an attribute of the associated format object and recompute the layout of the graphicals in the device according to the new format.

See class format for details.

Variable format format* (←)

When not @nil, the positions of the graphicals displayed on the device is computed using the attached format.

If a device has a ←format, graphicals cannot be moved any more. Also, the position argument of →display is simply ignored.

Send Method layout dialog gap=[size], size=[size], border=[size] Send Method layout dialog gap=[size], size=[size], border=[size]

Refinement of: graphical->layout dialog This method implements the layout of dialog objects (see ‘dialog →layout’). It may be used to define compound dialog windows or to exploit the layout mechanism for dialog windows in a normal window or graphical device.

Send Method room area=area Test if there are no graphicals that have ‘Graphical ↔displayed: @on’ and overlap with area on the device. See also ←inside.

6.3.6 Resize — Controlling and trapping resizes

Send Method changed union ox=int, oy=int, ow=int, oh=int Send Method changed union ox=int, oy=int, ow=int, oh=int

If the union of the displayed graphicals (see ‘area→union’) has changed, this method is called. The arguments indicate the old union of the graphicals. This method may be used to implement custom scroll bar objects with figure objects.

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry ‘Device →geometry’ updates ‘Device ←offset’ (the offset of the device’s coordinate system relative to its super-device) such that the top-left corner is at (X, Y).

The ←width and ←height of a device is defined to be the union of the area of the member graphicals (intersected with ‘Device ←clip area’) and the W and H parameters of the geometry request are thus ignored.

6.3.7 Area — Handling size and position

Send Method move point=point Refinement of: graphical->move Move the origin of the device to be at point. Note that this need not be the top-left corner. To set the top-left corner, use ‘Device →set: X, Y’.

Get Method offset ⇒point

Variable offset point (-)

Get Method position ⇒point Get Method position ⇒point

Offset of the coordinate-system to the coordinate-system of it’s device. Managed via the geometry-changing behaviour of devices (→position, etc.).

Send Method position point=point Send Method position point=point

Refinement of: graphical->position Move graphical such that ←x and ←y match the x- and y-coordinates of the argument point. Invokes ‘graphical →set’.

Synonym for ‘graphical →move’.

Send Method reference [point] Send Method reference [point]

Refinement of: graphical->reference Move the reference-point (offset) of the device to be at point, but move the member graphicals the same amount in the other direction, such that they remain displayed at the same position.

The default reference point is the top-left corner of the bounding box of all the member graphicals.

Send Method resize x factor=real, y factor=[real], origin=[point] Send Method resize x factor=real, y factor=[real], origin=[point]

Refinement of: graphical->resize Resize the member graphicals of the device in X and Y direction. See ‘Graphical →resize’ for details on the parameters.^{1}

Get Method x ⇒int Get Method x ⇒int

Refinement of: graphical<-x Returns the X-coordinate of ‘Device ←offset’.

Send Method x int=int Send Method x int=int

Refinement of: graphical->x Set the X-coordinate of the origin. See ‘Device →move’

Get Method y ⇒int Get Method y ⇒int

Refinement of: graphical<-y Returns the Y-coordinate of ‘Device ←offset’.

Send Method y int=int Send Method y int=int

Refinement of: graphical->y Set the Y-coordinate of the origin. See ‘Device →move’

6.3.8 Scroll — Controlling the ‘viewport’

1 The contents are resize by sending ‘graphical →resize’ to each graphical. If graphicals are related using constraints the result may be incorrect.

Variable clip area area* (-)

If not @nil, no pixels outside this area are affected. The area of the entire device is the intersection of the union of the area’s of all graphicals and the clip area.

The variable is defined at the level of class device for technical reasons. The clip area mechanism is activated at the level of class figure.

6.3.9 Update — Update Dependant properties

Variable bad bounding box bool (-)

Indicates that the contents has been changed such that the bounding-box (area) needs to be recomputed.

Variable bad format bool (-)

Indicates the contents has been changed such that the attached format object needs to be recomputed.

Send Method compute Send Method compute

Refinement of: graphical->compute Send →compute to all members of -recompute, next recomputes the ←format if requested by -bad format and finally recomputes the ←area (bounding box) requested by -bad bounding box.

Variable recompute chain (-)

Graphicals that requested a recompute

6.3.10 Cursor — Image of the pointer (mouse) cursor

Get Method displayed cursor ⇒cursor*

Refinement of: graphical<-displayed cursor Currently displayed cursor

6.3.11 Search — Finding plain text, regex or objects

Get Method find at=[point|event], condition=[code] ⇒graphical Find the most ‘local’ graphical overlapping with ‘at’ for which ‘condition’ succeeds.

This methods uses a similar search technique as used by →event and is first of all intended to help writing gestures that have to relate two graphical objects, possibly not placed on the same device object. Examples are class connect gesture or a ‘dragand-drop’ gesture.

←find performs the following steps:

• Traverse the list ←graphicals from tail to head (i.e. starting at the topmost graph-

ical). For each graphical:

• if ‘at’ is given and ‘graphical →in event area’ fails Continue with the next graphical

• if the graphical is a device object Recursively call ←find on the device. Return with the result if any.

• if the graphical is not a device

Evaluate the condition and return the graphical if the condition succeeds.

• Finally, evaluate the condition on the device itself and return the device if the condition succeeds.

The following example finds a graphical that defines the send-method ‘drop’ in the same window as where the event occurred:

    ...
    get(@event?window, find, @event,
        message(@arg1, has_send_method, drop), Gr),
    ...

6.3.12 Event — Event processing

Send Method event event=event Send Method event event=event

Refinement of: graphical->event Process an event. It performs the following operations:

• Update ‘Device ←pointed’ and generate ‘area enter’ and ‘area exit’ events to graphicals that were added/removed from this chain. Implemented by ‘Device →update pointed’

• Post the event to the elements on ‘Device ←pointed’ using ‘Event →post’. If ‘Event →post’ succeeds on some graphical, stop with success.

• Activate ‘Graphical →event’ to process recognisers defined on the device.

Variable pointed chain (←)

Chain of (graphical) members whose bounding-box overlap the position of the mouse. Internally used to generate area enter and area exit events and perform eventdispatching. May be used from code that handles an event to detect which graphicals overlap the mouse-position.

The first element of this chain is the top-most graphical. The others are further and further in the background.

Get Method pointed objects at=point|event, append to=[chain] ⇒chain Determines all objects that overlap with some position. This method is used internally to determine the objects to which an event should be send. The first argument describes the position. It is either a point or an event. In the latter case the position of the event is taken.

If chain is supplied, this chain is filled with the matching graphicals. This chain is ‘chain→clear’ed first. If it is @default, a new chain object with the matching graphicals it returned.

The matching graphicals are the graphicals for which ‘Graphical →in event area’ succeeds. The graphicals are stored in the chain, such that the top-most graphical is the head of the chain.

Send Method update pointed event=event

Update the ‘Device ←pointed’ chain to represent all graphicals displayed on the device for which ‘event’ is in the event area. Graphicals that are deleted from the chain are send an ‘area exit’ event. Graphicals that are added to the chain are send an ‘area enter’ event. If on or more of the mouse-buttons are down, these events are ‘area cancel’ and ‘area resume’.

6.3.13 Accelerator — Binding the keyboard

Send Method typed event id=event id, [bool] Handle accelerators

6.3.14 Report — Reporting events, status and errors

Send Method flash area=[area], time=[int] Refinement of: graphical->flash Alert the user of a possible problem by shortly inverting the graphical. Area specifies the area to be inverted, relative to the ←area of the graphical itself. Time is the time in milliseconds which the graphical remains in the inverted time; the time of the total operation is this time, plus two time the required time to invert the area. The default time the graphical is inverted is determined by the resource Graphical.visual bell duration.

See also ‘window→flash’, ‘device→flash’ and ‘tab→flash’.

Normally one should invoke ‘graphical →alert’, which depending on the resource ‘Graphical.visual bell’ will either ring the bell or flash the graphical.

6.3.15 Focus — Focussing events to objects

Send Method advance from=[graphical]*, propagate=[bool] Send Method advance from=[graphical]*, propagate=[bool]

Advance the keyboard-focus to the next graphical object of this device for which the test ‘Graphical → wants keyboard focus’ succeeds. Used by text item to implement ‘text item →advance’.

This method cycles through the ←graphicals chain. If the argument is a graphical and there is no graphical that requests the keyboard focus further down the ←graphicals chain and the device is not the window itself, and ‘propagate’ not is @off, it will invoke →advance on its ←device, passing itself as argument. This behaviour allows for handling the keyboard focus in dialog-windows built from nested devices.

Otherwise, If no graphical wants to have the keyboard focus, the keyboard focus of the ←window is set to @nil.

6.3.16 Organisation — Organisation of (graphical) objects

Send Method append dialog item item=graphical,

relative to last=[{below,right,next row}] Append a graphical object using the dialog-layout mechanism. This method may be used to define sub-dialogs. See ‘dialog →append’ for details.

Get Method catch all name=name ⇒graphical Find a displayed graphical by it’s name. To find a graphical named ‘hello’, type

    ?- get(Device, hello_member, Hello).

NOTE: Graphicals may also be found using ←member.

Send Method clear

Remove all graphicals from the device by sending ‘Device →erase’ for each of them.

Get Method contains ⇒chain

Refinement of: visual<-contains Implementation of the visual part-of hierarchy. Equivalent to ‘Device ←graphicals’.

Send Method display graphical=graphical, position=[point] Send Method display graphical=graphical, position=[point]

Display a graphical object on the device. This is the principal way of drawing on a device. It performs the following operations:

• if ‘point’ is not @default, invoke ‘graphical →set’ with the X and Y values of the point.

• invoke ‘graphical →device: device’

• invoke ‘graphical →displayed: @on’

Note that the geometry management may be redefined for each graphical using ‘graphical →geometry’. Also ‘graphical →device’ and ‘graphical →displayed’ may have been redefined.

Send Method erase graphical=graphical Erase a graphical from the device. The graphical is removed from the ←graphicals chain of the device, the graphical’s ←device is set to @nil and the display is updated.

Note that the graphical is only destroyed if it had no other references. To make sure the graphical is destroyed, use ‘Graphical →free’.

Variable graphicals chain (←)

Chain of graphicals displayed on the device. The first graphical is the one that is entirely in the background; the last is entirely in the foreground. See ‘graphical →expose’ and friends to change the stacking order of overlapping graphicals.

The contents of this chain may be queried but not changed. Use the manipulation behaviour defined on devices and graphicals to change the contents of the device. Note that the ‘collection enumeration’ methods →for all and ‘→for some’ are also available for devices. The following example changes the pen thickness of all graphicals of a device to 2:

    send(Device, for_some, @default,
         message(@arg1, pen, 2)),

Variable level int (←)

Nesting depth from the window. The window itself has ←level equals 0. Used for quick detection of a common device for two graphicals.

Get Method member graphical name=name ⇒graphical Get Method member graphical name=name ⇒graphical

Return the first graphical of ‘Device ←graphicals’ that has name ‘name’. This mechanism is commonly used to address parts of a device.

Send Method reparent Send Method reparent

Refinement of: graphical->reparent Called from PCE graphics kernel if something has changed to the ←device organisation up in the ←device hierarchy. This general method performs the following:

• Updates ‘device ←level’ to reflect the distance to the ‘top-most’ graphical device.

• Sends →reparent to all its member graphicals

• Invoked ‘graphical →reparent’ on itself

See ‘graphical →reparent’ for details.

6.3.17 Virtual — Dummy methods on super-classes

Send Method modified item graphical=graphical, bool=bool Virtual method, fails. Dialog item’s send this message to their device after they have been modified. If this message succeeds, they assume the dialog is an ‘attribute editor’ and will not forward their ←message. Otherwise they will immediately forward their ←message. See also ‘dialog →modified item’.

6.3.18 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.3.19 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle

→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.3.20 Compatibility — Methods for backward compatibility

Send Method convert loaded object old version=int, new version=int Refinement of: object->convert loaded object Called by ‘file ←object’ if the current save version is not the same as save version when the file was loaded. The two arguments are the old and the new save versions. See ‘pce ←save version’.

6.4 Class figure — Collection of graphicals

Inheritance: ⇒ figure ⇒ device ⇒ graphical ⇒ visual ⇒ object

A figure defines -like a device- a collection of graphicals. In addition of class device, a figure offers:

→clip area  Clip graphicals to this area
→pen, →texture Draw a box around the figure
→background  Fill the background

Instance Variables

appearance

background  ← image|colour*  Fill pattern used as background
border  ← int  Border around graphicals
elevation  ← elevation*  Elevation from background
radius  ← int  Radius of outline

visibility

status  ← name  Name of visible graphical (or all active)

Behaviour

6.4.1 Oms — Object management operations

Send Method initialise

Refinement of: device->initialise

Create an empty figure. In addition to ‘device →initialise’, it assigns ←background to @nil, ←pen to 0 and ←status to all active.

6.4.2 Appearance — “Look-and-feel” related aspects

Variable background image|colour* (←) Send Method background image|colour*

Fill pattern used as background. Commonly used to prevent the figure from being transparent (→background: @white image).

Variable border int (←)

Send Method border int=int Border around graphicals

Variable elevation elevation* (←) Send Method elevation elevation*

Elevation from background

Variable radius int (←)

Send Method radius int=int Radius of outline

Send Method shadow 0..

Attach ‘shadow’ elevation object

6.4.3 Scroll — Controlling the ‘viewport’

Get Method clip area ⇒area Send Method clip area area*

If not @nil, no pixels outside this area are affected. The area of the entire device is the intersection of the union of the area’s of all graphicals and the clip area.

The variable is defined at the level of class device for technical reasons. The clip area mechanism is activated at the level of class figure.

6.4.4 Visibility — Making object (in-)visible

Send Method next status

Make next in ←graphicals visible

Variable status name (←) Send Method status name=name

The ←status of a figure is a name indicating which graphicals of the figure should be visible: if ←status equals ‘all active’, all ←graphicals are visible, otherwise only graphicals with the same name as ←status are made visible.

This mechanism may be used to define graphical objects that should be switched between different states. Consider the example where we want to have a diagram which can be displayed ‘opened’ and as an ‘icon’. The code below outlines a possible approach:

    create_closable_diagram(F) :-
        new(F, figure),
        send(F, status, opened),
        send(F, display, new(BM, bitmap('my_icon'))),
        send(BM, name, closed),
        send(BM, recogniser,
             click_gesture(left, '', double,
                           message(F, status, opened),
        send(F, display, new(F2, figure)),
        send(F2, name, opened),
        ...
        <create the real diagram on F2>

6.4.5 Update — Update Dependant properties

Send Method compute

Refinement of: device->compute Send →compute to all members of -recompute, next recomputes the ←format if requested by -bad format and finally recomputes the ←area (bounding box) requested by -bad bounding box.

6.4.6 Organisation — Organisation of (graphical) objects

Send Method display graphical=graphical, [point] Refinement of: device->display Similar to ‘device →display’, but if ←status not is all active and the graphical has not the same name, the graphical is added to the figure with ←displayed: @off.

6.4.7 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: device-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.4.8 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: device-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.4.9 Compatibility — Methods for backward compatibility

Send Method convert old slot slot=name, value=any Translate old shadow into elevation

Get Method shadow ⇒0..

Read ‘elevation ←height’

6.5 Class format — Tabular specification for device

Inheritance: ⇒ format ⇒ object

A format object can be used to turn a device object into a table of graphicals. Two modes are defined. In ‘column’ mode, the graphicals are aligned in a two-dimensional grid that is (depending on the orientation) ‘n’ columns width or high. In ‘non-column’ mode, if aligns the graphicals in rows, very similar as words are placed in a paragraph of text with no aligned right margin.

A format object is just a data-object. It is interpreted by attaching it to a graphical device using ‘device →format’.

Examples:

• format(horizontal, 300, @off)

        aaa bbb ccccccc ddd eeee
        ff ggggggg hhhhhh

• format(horizontal, 2, @on)

        aaa      bbbbbbbbb
        ccccccc  dddd
        eeee

• format(vertical, 2, @on)

        aaaaa   cccc   eeeee
        bbbbb   dddd

Instance Variables

table

adjustment  ↔ vector*  left,center,right alignment
column sep  ↔ int  Distance between columns/rows
columns  ↔ bool  Use columns/rows
row sep  ↔ int  Distance between rows/columns

orientation

direction ↔ {horizontal,vertical} horizontal (rows) or vertical (columns)

dimension

width  ↔ int  Width in columns/rows or pixels

Behaviour

6.5.1 Oms — Object management operations

Send Method initialise orientation=[{horizontal,vertical}], width=[1..],

columns=[bool] Refinement of: object->initialise Create a format object. A format object may be attached to a graphical device object using ‘device→format’ to achieve simple table layout. Arguments:

• ←direction If ‘horizontal’, the table consists of vertical columns and ‘width’ describes the horizontal width or number of columns

• ←width If ‘columns’ is @on, the number of columns to create. Otherwise the with in pixels in which the formatting needs to be done.

• ←columns If @on, make a table, otherwise format as words are formatted in a paragraph.

The ←adjustment variable describes the adjustment of the elements in their column.

6.5.2 Table — Tabular layout of graphical objects

Variable adjustment vector* (↔)

Applicable if ←columns equals @on. When present it should be a vector with the same number of elements as ←width. Each element is one of the names ‘left’, ‘center’ or ‘right’ and determines the placement of the graphical objects in their cell. If ←direction = vertical ‘left’ and ‘right’ should actually be read as ‘top’ and ‘bottom’

The following creates a three column table with the first column aligned to the left, the middle centered and the last to the right:

    ?- new(D, device),
       new(F, format(horizontal, 3, @on)),
       send(F, adjustment, vector(left, center, right)),
       send(D, format, F),
    %  fill the table.
       send_list(D, display,
                 [ '1.1', '1.2', '1.3',
                   '2.1'
                 ]).

Variable column sep int (↔)

Distance between columns. If ←columns = @off this is the distance between ‘words of the paragraph’. See also →row sep.

Variable columns bool (↔)

If @on, the graphical objects of the device are placed in a two dimensional grid. When @off the graphicals are places like words in a paragraph of text.

Variable row sep int (↔)

Distance between rows. With ←direction = vertical this is the distance between columns.

6.5.3 Orientation — Horizontal or vertical orientation

Variable direction {horizontal,vertical} (↔)

When horizontal and ←columns equals @off the ‘words’ are printed as the english do. ‘vertical’ prints as the chinese do.

If ←columns = @on, ‘horizontal’ produces vertical columns.

Class format 205

6.5.4 Dimension — Dimensions of (graphical) objects

Variable width int (↔)

Width in columns/rows or pixels

6.6 Class box — Rectangle with rounded corners and shadow

Inheritance: ⇒ box ⇒ graphical ⇒ visual ⇒ object

Class ‘box’ represents a simple rectangle. It is the simples graphical object of PCE.

Boxes may have rounded corners (see →radius); their line may have some →texture (dash-pattern) and their inside may be file (see →fill pattern).

Instance Variables

appearance

fill pattern  ← image|colour*  Fill pattern for internals
radius  ← int  Rounding radius for corners
shadow  ← int  Shadow at bottom-right of box

Behaviour

6.6.1 Oms — Object management operations

Send Method initialise width=[int], height=[int] Refinement of: graphical->initialise Create a box from W and H. The dimensions may be zero or negative.

6.6.2 Appearance — “Look-and-feel” related aspects

Variable fill pattern image|colour* (←) Send Method fill pattern image|colour*

When a fill pattern is defined, this pattern is repeated over the interior of the box. The box is transparent if the fill pattern equals @nil.

Variable radius int (←)

Send Method radius int=int The radius of the circle-fragments used to round the corners. When larger than half the shortest side, this value is used instead of ↔radius. A value of 0 implies square corners.

Send Method shadow int=int Amount of shadow added to this box in pixels. In the current implementation, shadow is always black and painted below and right-of the object.

Variable shadow int (←)

Amount (pixels) of shadow painted below and right of the box. The default is 0 (zero, no shadow).

6.6.3 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.6.4 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.7 Class ellipse — Ellipse

Inheritance: ⇒ ellipse ⇒ graphical ⇒ visual ⇒ object

Ellipse shape. It is possible to define a →texture for the line and a →fill pattern for the interior. See also class circle.

For consistency with boxes, etc., the →position of an ellipse is the top-left corner. Use →center to define the center.

Instance Variables

appearance

fill pattern  ← image|colour*  Fill pattern for internals
shadow  ← int  Shadow painted below/right

Behaviour

6.7.1 Oms — Object management operations

Send Method initialise width=[int], height=[int] Refinement of: graphical->initialise Create ellipse from width and height

6.7.2 Appearance — “Look-and-feel” related aspects

Variable fill pattern image|colour* (←) Send Method fill pattern image|colour*

When not @nil, the interior is filled with the specified bitmap.

Variable shadow int (←)

Send Method shadow int=int Amount (pixels) of shadow painted below and right of the ellipse. The default is 0 (zero, no shadow).

6.7.3 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.7.4 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.8 Class circle — Circle

Inheritance: ⇒ circle ⇒ graphical ⇒ visual ⇒ object

A circle just an ellipse with equal ←width and ←height. It’s border-line may have a ←texture and ←pen. The circle’s interior may be filled with an image object using →fill pattern.

Instance Variables

appearance

fill pattern  ← image|colour*  Fill pattern for internals

Behaviour

6.8.1 Oms — Object management operations

Send Method initialise diameter=[int] Refinement of: graphical->initialise Create circle from diameter

6.8.2 Appearance — “Look-and-feel” related aspects

Variable fill pattern image|colour* (←) Send Method fill pattern image|colour*

When a fill pattern is defined, this pattern is repeated over the interior of the circle. The circle is transparent if the fill pattern equals @nil.

6.8.3 Rotate — Rotating objects

Send Method rotate int=int Refinement of: graphical->rotate The only PCE class with fully implemented rotation!

6.8.4 Area — Handling size and position

Get Method diameter ⇒int Send Method diameter int=int

Sets ←width and ←height to this value. See also →radius.

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Handle general resizing of the circle. If either ←width or ←height is specified this value is used for both parameters. If both are specified the minimum of the two is used for both.

Get Method radius ⇒int

Send Method radius int=int Half of the ←width. →radius sets ←width and ←height to twice the argument.

6.8.5 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.8.6 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.9 Class text — Draw text on graphical devices

Inheritance: ⇒ text ⇒ graphical ⇒ visual ⇒ object

Delegation: string (char array)

Class text is used to display (short) text fragments on a graphical device object.

The text may be printed in any font. It may span multiple lines (separated by newline-characters (ASCII value 10)), which may be aligned on their left-side, center or right-side. Text objects may be boxed by setting their →pen.

Text objects provide limited editing capabilities which are compatible to the editing capabilities provided by class editor (EMACS oriented). Text objects are edited using the method →typed.

See also class text item (text entry field), class view and class editor.

Instance Variables

appearance

background  ← [colour|pixmap]*  @nil: transparent; @default: cleared
border  ← 0..  Border around actual text
font  ← font  Font used to draw the string
format  ← {left,center,right}  Left, center or right alignment
margin  ← int  Margin for ↔wrap equals wrap
show caret  ← bool|{passive}  If not @off, show the caret

wrap ← {extend,wrap,

wrap fixed width,clip}

How long text is handled

caret

caret ← int Index (0-based) of caret

storage

string ← char array Represented string (may contain newlines)

internal

selection  - int*  Selected text
position  - point  Avoid ‘walking’ with alignment
x caret  - int  X-position of caret
x offset  - int  Horizontal scroll when nonzero length
y caret  - int  Y-position of caret

Behaviour

6.9.1 Oms — Object management operations

Send Method initialise string=[char array], format=[{left,center,right}], font=[font] Refinement of: graphical->initialise Create a text object from the specified string, format and font. The ←string defaults to ”, the ←format to ‘left’ and the ←font to the resource Pce.Text.font

6.9.2 Delegate — Delegation of behaviour

Send Method delegate program object=program object, string=string, unchecked

... Wrapper for the delegate variable object ←string. If the string is modified this will force an update of the graphical representation.

Note that if the ←string is a char array object rather than a string, it cannot be modified:

    ?- new(T, text(hello)),
       send(F, append, ' world').

fails, while

    ?- new(T, text(string(hello))),
       send(F, append, ' world').

gives the intended result.

6.9.3 Selection — Manipulation and query of selections

Send Method copy

Copy selection (\C-c)

Send Method cut

Copy and delete selection

Send Method paste [0..9] Paste value of the numbered X-cut-buffer. See ‘display ←cut buffer’.

Get Method selected ⇒string

Indicates whether or not the graphical is selected. The visual feedback is determined by the resource ‘selection style’.

Get Method selection ⇒point

New point with start and end of selection

Send Method selection from=[int]*, to=[int] Make [from, to) the selection

6.9.4 Appearance — “Look-and-feel” related aspects

Variable background [colour|pixmap]* (←) Send Method background [colour|pixmap]*

@nil: transparent; @default: cleared

Variable border 0.. (←) [Pce.Text.border: 0]

Send Method border 0..

Border around actual text

Variable font font (←) [Pce.Text.font: normal] Send Method font font=font

Font used to draw the text. There are no provisions for multiple fonts in text object. Note that class editor is capable of handing multiple fonts.

Variable format {left,center,right} (←) [Pce.Text.format: left] Send Method format {left,center,right}

The ‘format’ describes how the lines of a text containing multiple lines are aligned and how the area of the text changes if the string or font is changed:

• left The left-sides of the lines are aligned. It the text changes, the top-left corner is maintained.

• center The lines are centered below each other, If the text changes, the center is maintained.

• right The right-sides of the lines are aligned. It the text changes, the top-right corner is maintained.

Send Method format center Send Method format left Send Method format right

Format the text centered, left or right. These methods are defined without arguments for invoking them easily from the keyboard.

Send Method margin int*, [{wrap,wrap fixed width,clip}] Define how the text object handles long string. Text objects may handle long strings in three different ways as described by ←wrap:

• extend (→margin: @nil).

The graphical is as big as needed to display the string

• clip (→margin: width, clip)

The graphical has fixed width. If the string is too long it will be clipped.

• wrap-1 (→margin: width, wrap)

The graphical has a ←margin defined. If the string is too long to fit within the margin it will be wrapped on multiple physical lines. Wrapping only happens at word boundaries.

• wrap-2 (→margin: width, wrap fixed width) Similar to ‘wrap-1’, but the ←width of the graphical equals the margin rather than the width occupied by the displayed characters.

Variable margin int (←)

Together with ←wrap, ←margin controls how long strings are represented by class text. These slots are manipulated by →margin.

Variable show caret bool|{passive} (←) Send Method show caret bool|{passive}

If @on, the caret (insertion-point) is displayed. See also ‘window →keyboard focus’ and →caret.

Variable wrap {extend,wrap,wrap fixed width,clip} (←)

Describes whether long strings are displayed as-is, clipped or wrapped to multiple lines. See →margin.

6.9.5 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Just moves the text object as the size is determined by the ←string, ←font and ←margin.

6.9.6 Area — Handling size and position

Send Method length int=int Sets the ←margin in the ←fonts ‘ex’ units (see ‘font ←ex’). New code should use the more advanced →margin method.

Send Method resize factor x=real, factor y=[real], origin=[point] Refinement of: graphical->resize Realises together with ‘device →resize’ resizing of collections of objects. This method resizes the graphical with specified factor relative to the given origin. The X- and Y-distance of each of the corners to this reference point is multiplies by resp. the Xand Y-resize factor (1st and 2nd argument).

6.9.7 Calculate — Compute properties

Get Method character position index=[int] ⇒point

Convert index to position of character

6.9.8 Caret — Moving the insertion point

Send Method backward char times=[int]

Move caret characters backward (\C-f)

Send Method backward word times=[int]

Move caret words backward (\eb)

Send Method beginning of line times=[int]

Move caret to start of line (\C-a)

Variable caret int (←)

Send Method caret [int]

Location of the caret (= insertion point). Zero indicates before the first character. Setting the →caret to @default places the caret at the end of the text.

Get Method column ⇒int

Current X-location of caret (pixels)

Send Method end of line times=[int] Move caret to end of line (\C-e)

Send Method forward char times=[int]

Move caret characters forwards (\C-f)

Send Method forward word times=[int]

Move caret words forward (\ef)

Send Method next line lines=[int], column=[int] Move caret lines down (\C-n)

Send Method previous line lines=[int], column=[int] Move caret lines up (\C-n)

6.9.9 Insert — Text insertion commands

Send Method insert at=[int], text=char array Insert text at position [←caret]

Send Method insert self times=[int], character=[char] Insert n-times char at caret

Send Method newline times=[int] Insert newlines (RET, LFD)

Send Method open line times=[int] Insert newlines after caret (\C-o)

6.9.10 Delete — Text deletion commands

Send Method backward delete char times=[int]

Delete chars backward from caret (DEL)

Send Method backward kill word times=[int]

Deletes words backward from caret (\e DEL)

Send Method clear

Wipe out all text (\C-u)

Send Method cut or delete char times=[int] Send Method cut or delete char times=[int]

Delete characters forwards (DEL)

Send Method delete char times=[int] Delete characters forwards (\C-d)

Send Method kill line times=[int] Delete lines from caret \C-k)

Send Method kill word times=[int] Deletes words forward from caret (\ed)

6.9.11 Transpose — Transposition of text

Send Method gosmacs transpose

Transpose two char array before caret

Send Method transpose chars

Transpose two char array around caret

6.9.12 Event — Event processing

Send Method event event=event Refinement of: graphical->event The default event-handling for a text manipulates the visibility of the caret on focus events and invokes →typed on itself if the event if a keyboard event and the ←show caret yields @on. See also →keyboard focus.

Get Method pointed at=point ⇒int Returns character index from a pixel-position relative to the top-left corner (origin) of the text. This method may be used to set the caret using the mouse:

    ?- new(T, text('Hello World')),
       send(T, show_caret, @on),
       send(T, recogniser,
            click_gesture(left, '', single,
                          message(T, caret,
                                  ?(T, pointed,
                                    @event?position)))).

Send Method typed event id=event id Send Method typed event id=event id

Handle keyboard event. Class ‘text’ does not provide default event-handling, but editable text objects are easily created by forwarding keyboard-events to this method:

    :- pce_global(@edit_text_recogniser,
                  new(handler(keyboard,
                              message(@receiver,
                                      typed,
                                      @arg1)))).
    text_make_editable(T) :-
        send(T, recogniser, @edit_text_recogniser).

This method uses the key binding object called ‘text’ from @key bindings to map the typed keys on selectors and then invokes methods on class text. With the above, if the user types control-U to the text the following happens:

1. Event arrives at text and is given to →typed using

    @edit_text_recogniser.

1. The ‘event ←id’ is processed by the ‘text’ key binding object and mapped on the selector ‘clear’. →clear does not require arguments and the key binding object just invokes ‘text→clear’.

2. →clear erases all characters from the text.

6.9.13 Binding — Binding the keyboard

Send Method prefix

Multi-key prefix (see class key binding)

6.9.14 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.9.15 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Send Method compute

Refinement of: graphical->compute Recomputes ←area from the ←string, ←font and ←margin.

6.9.16 Compatibility — Methods for backward compatibility

Send Method convert old slot slot=name, value=unchecked Convert ←transparent to ←background

Get Method transparent ⇒bool

Map ←background

Send Method transparent bool=bool

Defines ←background

6.9.17 Storage — Definition of storage details

Variable string char array (←) Send Method string char array=char array

The currently displayed string.

6.9.18 Internal — Private behaviour

Variable selection int* (-)

Selected text

Variable position point (-)

Remember the reference point for resizing the text if it’s contents changes. Recomputing this point each time from the area would cause the text to ‘walk’ due to rounding errors.

Variable x caret int (-)

X-position of the caret in pixels. Used to avoid recomputing when the text has to be redisplayed.

Variable x offset int (-)

When ↔length is specified (i.e. non-zero), this value indicates how many pixels at the left-side are not visible.

Variable y caret int (-)

Y-position of the caret in pixels. Used to avoid recomputing when the text has to be redisplayed.

6.10 Class bitmap — 2-dimensional map of (coloured) pixels

Inheritance: ⇒ bitmap ⇒ graphical ⇒ visual ⇒ object

Delegation: image (image)

A bitmap is a graphical that displays an image. Most of the behaviour to manipulate the pixels of a bitmaps thus can be found with class image.

Bitmaps (images) come in two flavours. If ‘image ←kind’ = bitmap, the elements of the bitmap are regarded as booleans. Boolean true (@on) is displayed in the ←colour of the bitmap and Boolean false (@off) is displayed in the current background or not painted if ←transparent equals @on. If ‘image ←kind’ is pixmap each individual pixel represents a colour.

Instance Variables

appearance

image  ← image  The pixel collection managed
transparent  ← bool  When @on, 0-pixels are not painted

Behaviour

6.10.1 Oms — Object management operations

Send Method initialise image=[image], transparent=[bool] Refinement of: graphical->initialise Create a bitmap for the given image object. The bitmap will be given the same ←width and ←height as the image.

Note that images are automatically converted from names (see ‘image→initialise’).

Thus, the following displays PCE’s icon on a picture window:

         ?- send(new(P, picture), open),
            send(P, display, bitmap('pce.bm'), point(25, 25)).

Send Method unlink

Refinement of: graphical->unlink

Unlink from ←image

6.10.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒bitmap Refinement of: graphical<-convert ‘Bitmap ←convert’ converts text of the form

• @Reference Succeeds if @Reference is an existing named reference to an image object.

• File basename Succeeds if ‘image ←convert’ succeeds and returns a new bitmap from this image.

6.10.3 Copy — Copying instances

Get Method copy ⇒bitmap Make a copy that shares the image

6.10.4 File — Saving and loading files, file operations

Send Method load file=file, path=[char array] Load file in the associated image. PCE searches for the file in the path described by the last argument. Default if the path resource of class image.

Backward compatibility only. New code should manipulate the image directly.

6.10.5 Appearance — “Look-and-feel” related aspects

Send Method image image=image Associate an image with a bitmap. Sets the width and height of the bitmap to the width and height of the image. If the image has ↔access ‘both’ and ↔bitmap @nil, the ↔bitmap variable of the image is filled with the bitmap. Subsequent changes to the image are forwarded to the bitmap.

Variable image image (←)

The image that contains the actual pixels.

Send Method transparent bool=bool

When @on, 0-pixels are not painted. →transparent is only useful for monochrome (‘image →kind’ bitmap) images. See also ‘image →mask’.

Variable transparent bool (←)

When @on, 0-pixels are not painted

6.10.6 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Just moves the bitmap. In the current implementation bitmaps cannot be scaled.

6.10.7 Organisation — Organisation of (graphical) objects

Get Method contains ⇒chain

Refinement of: visual<-contains Return a new chain object holding ←image.

6.10.8 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.10.9 Change — Trapping object modifications

Send Method redraw [area]

Refinement of: graphical->redraw Request the graphical to repaint the specified area. When @default, the entire graphical is repainted. Should not be necessary for the application programmer as PCE takes care of redraw automatically. See also →request compute.

6.10.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.11 Class pixmap — Coloured image

Inheritance: ⇒ pixmap ⇒ image ⇒ visual ⇒ object

A pixmap object is a coloured image: a rectangular area of ←width x ←height ‘pixels’, each of which may have its own colour.

Coloured images are actually supported by class image using ‘image ←kind: pixmap’. This class is introduced to provide type specification for ‘coloured’ images as needed for some graphical operations as well as automatic conversion of monochrome ‘bitmaps’ into colour pixmaps.

This class is often used implicitly: ‘window →background: @grey25 image’ will automatically convert the @grey25 image into a pixmap using ←convert.

Explicit usage is normally done to create a coloured version of some monochrome bitmap:

    ?- new(I, pixmap(image('pce.bm'), red, green)).

Will create a version of the library image pce.bm using a red ←foreground and a green <background. See also →initialise.

Pixmaps are in general reusable objects like normal images. Therefore, the ←convert method ensure reuse of a pixmap create from some monochrome image.

Instance Variables

Behaviour

6.11.1 Oms — Object management operations

Get Method convert source=image ⇒pixmap Refinement of: object<-convert Converts an monochrome image into a coloured pixmap. Basically simply calls new(Pm, pixmap(image)), first trying ←lookup to reuse an older transformation and then →initialise to create a new pixmap object.

Send Method initialise source=[image|file]*, foreground=[colour],

background=[colour], width=[int], height=[int] Refinement of: image->initialise The initialisation of a pixmap can take three forms:

• pixmap(@nil, foreground, background, width, height) Creates a read-write pixmap of specified dimensions with specified colours.

• pixmap(image, [foreground], [background])

Creates a pixmap with specified colours of the same dimensions as the image and copies the image to the pixmap, where each ‘1’ maps to a foreground and each ‘0’ to a background pixel. After doing so, it will establish a hyper object with names ‘pixmap’ and ‘image’ that relates the original image and the new pixmap. See also ←lookup and ←source.

• pixmap(file, [foreground], [background])

Load the pixmap from a file. If the file is an image file, the colour will be used to map the 1’s and 0’s.

Get Method lookup source=image, foreground=[colour], background=[colour]

⇒pixmap Refinement of: image<-lookup Checks whether it can find a pixmap object from the image using ←hypered: pixmap with the same foreground and background.

This method ensures reuse of converted monochrome images. see also ←source.

6.11.2 Edit — Modify object

Send Method fill image|colour, [area] Fill rectangular area of image with pattern

6.11.3 Term — Conversion to (Prolog) term

Get Method source ⇒image|file* Determine source for term representation: if the ←file is not @nil, this value is returned. If ←hypered: image returns an image object, this is returned. Otherwise @nil is returned.

Used for converting a pixmap to its term representation.

6.12 Class line — Line segment

Inheritance: ⇒ line ⇒ joint ⇒ graphical ⇒ visual ⇒ object

Description

Straight line segment connecting two points. A line may have a →pen (thickness) and a →texture (dash-pattern). A line may have →arrows on both sides, see class joint and class arrow for attaching arrows to a line.

Instance Variables

Behaviour

6.12.1 Oms — Object management operations

Send Method initialise start x=[int], start y=[int], end x=[int], end y=[int],

arrows=[{none,first,second,both}] Refinement of: graphical->initialise Create a line from X1,Y1 to X2,Y2 with specified →arrows. A default line has →pen: 1 and →texture: none.

6.12.2 Copy — Copying instances

Send Method copy line=line Copy the attributes from class graphical and the arrows. This method is used by class connection to instantiate itself from the related link.

6.12.3 Tip — End-points of a joint (line, arc, path) or arrow

Get Method end ⇒point

Get Method start ⇒point

Send Method end point=point Send Method start point=point

Unlike normal graphicals, lines are in general not specified using their ←width and ←height but using ←start and ←end.

Get Method end x ⇒int Get Method end y ⇒int

Send Method end x int=int Send Method end y int=int

These methods provide direct access to components of ↔end

Send Method points start x=[int], start y=[int], end x=[int], end y=[int] Set →start from the first X-Y couple and →end from the second. Any default value leaves the corresponding line parameter unchanged. See also ‘graphical →set’.

Get Method start x ⇒int Get Method start y ⇒int

Send Method start x int=int Send Method start y int=int

These methods provide direct access to components of ↔start.

6.12.4 Area — Handling size and position

Send Method normalise

Refinement of: graphical->normalise Succeed without side-effect. Normalising a line could change the direction as a line is defines to go from

    ←x, ←y towards ←x + ←width, ←y + ←height

Send Method orientation {north west,south west,north east,south east} Refinement of: graphical->orientation Some graphical objects may have negative ←width and ←height. The origin is the (X,Y) point of the graphical. (X+W, Y+H) refers to the opposite corner (see ↔corner). This method places the origin at one of the indicated corner. The graphicals location and size on the screen is not affected by this method. The values are:

north west W>=0, H>=0 (→normalise)
north east W < 0, H>=0
south west W>=0, H < 0
south east W < 0, H < 0

Send Method resize factor x=real, factor y=[real], origin=[point] Refinement of: graphical->resize Realises together with ‘device →resize’ resizing of collections of objects. This method resizes the graphical with specified factor relative to the given origin. The X- and Y-distance of each of the corners to this reference point is multiplies by resp. the Xand Y-resize factor (1st and 2nd argument).

6.12.5 Calculate — Compute properties

Get Method angle origin=[point] ⇒real Return the angle of the line with the positive X-axe in degrees counter clockwise.

Get Method distance graphical|point ⇒int Refinement of: graphical<-distance If the argument is a point object, this method computes the distance between the infinitely extended line and the point. If the argument is a graphical objects, it invokes ‘area ←distance: area’ using the areas of both graphicals.

Get Method intersection with=line ⇒point Return a new point object describing the intersection point of both infinitely extended lines. Fails if the lines are parallel.

Get Method length ⇒int

Distance between the points ←start and ←end. See also ‘point ←distance’.

6.12.6 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.12.7 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.13 Class arc — Ellipse part (pie-slice)

Inheritance: ⇒ arc ⇒ joint ⇒ graphical ⇒ visual ⇒ object

An arc object is a graphical object that represents part of an ellipse. An arc is a subclass of class joint and thus may have arrows at either end. Arcs may be used to construct piecharts as well as to display a bounded connection line.

The basic representation of an arc consists of

→position  Position of the center
→size  ΥWidth and height of the ellipse
→start angle Degrees of starting angle
→size angle Degrees of angle (> 0 and < 0)
→close  Describes how the arc is closed

This basic specification is satisfactory for the specification of pie-charts. The method →points is useful for creating bounded lines from one point to another. The method →connect angle is useful to relate two lines with an arc (like in and/or trees).

Instance Variables

pie

size angle  ← real  Size (degrees)
start angle  ← real  Start angle (degrees)

appearance

close  ← {none,pie slice,chord}  How the arc is closed
fill pattern  ← image|colour*  Fill pattern for the slice

area

position  ← point  Position of the arc
size  ← size  Size of the ellipse I’m part of

Behaviour

6.13.1 Oms — Object management operations

Send Method initialise radius=[int], start=[real], size=[real] Refinement of: graphical->initialise Create an arc from its radius (setting →size), →start angle and →size angle. Both angles are in degrees and measured counter-clockwise.

The default radius is determined by the resource radius. The default →start angle is 0 and the default →size angle is 90.

6.13.2 Tip — End-points of a joint (line, arc, path) or arrow

Get Method end ⇒point End-point of the arc.

Send Method points start x=int, start y=int, end x=int, end y=int, curvature=int Create a bounded connection between two points. The first 4 integers describe x1,y1 and x2, y2. The last value specifies the number of pixels the line is bounded.

Get Method start ⇒point

Start position of the arc.

6.13.3 Pie — Angles, pie-slices, etc.

Send Method end angle real=real Set →size angle to argument - ←start angle

Variable size angle real (←) Send Method size angle real=real

Describes the angle in degrees of the ellipse segment. Positive values are counter clockwise.

Variable start angle real (←) Send Method start angle real=real

Describes the starting angle of the arc in degrees. 0 degrees denotes 3 o’clock. Positive values are anti-clockwise.

The position of the starting point may be requested with ←start.

6.13.4 Appearance — “Look-and-feel” related aspects

Variable close {none,pie slice,chord} (←) Send Method close {none,pie slice,chord}

Determines how the arc is closed and filled if →fill pattern does not equal @nil.

• none Only the arc is visible

• chord The arc and a straight line from ←start to ←end are displayed

• pie slice The arc and two start lines from ←start and ←end to ←position are displayed.

Variable fill pattern image|colour* (←) Send Method fill pattern image|colour*

Image used to fill the arc. When @nil, the arc is not filled. The behaviour of this method is dependent of the value of →close:

• none or pie slice Creates a pie slice. If →close is none no line is painted around the straight edges of the slice.

• chord Fills the area between a straight line connecting ←start and ←end and the arc.

6.13.5 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Only the X and Y parameters are used to move the arc.

6.13.6 Area — Handling size and position

Send Method connect angle line=line, line=line Connect two lines with an arc. The →position of the arc will be located are the ‘line ←intersection’ of the two lines. The ←start angle will make the arc start at the first line. The ←size angle will connect it to the second line.

This method may be used to paint ‘and/or trees’.

Variable position point (←)

Send Method position point=point The →position describes the center of the ellipse the arc is part of.

Get Method radius ⇒int

Equivalent to ←width^{1}

Send Method resize real=real, [real], [point] Refinement of: graphical->resize Realises together with ‘device →resize’ resizing of collections of objects. This method resizes the graphical with specified factor relative to the given origin. The X- and Y-distance of each of the corners to this reference point is multiplies by resp. the Xand Y-resize factor (1st and 2nd argument).

Variable size size (←) Send Method size size=size

The →size describes the width and height of the ellipse the arc is part of. Note that (currently) the axes of the ellipse are always horizontal and vertical.

6.13.7 Dimension — Dimensions of (graphical) objects

Send Method radius int=int Specifies both →width and →height.

6.13.8 Update — Update Dependant properties

Send Method compute

Refinement of: graphical->compute Compute the ←area from the principal representation. The ←area is defined to be the bounding box of the arc.

6.13.9 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image

1 Not properly defined if ←width is not equal to ←height and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.13.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.14 Class path — (Smooth) line through chain of points

Inheritance: ⇒ path ⇒ joint ⇒ graphical ⇒ visual ⇒ object

A path is a line going through a set of points. There are two ‘kinds’ of paths:

poly  Straight line segments connect the points
smooth A smooth (curved) line connects the points

The line of a path has a →texture and a →pen (thickness). The first and last point of the path may be connected (closed) and the interior of the path may be filled with a bitmap. Class path is a subclass of class joint and therefore may have →arrows attached.

Instance Variables

points

points ← chain Chain of points

appearance

closed  ← bool  Draw line from last to first point
fill pattern  ← image|colour*  Fill pattern
mark  ← image*  Mark used for points
radius  ← int  Rounding radius for ‘poly’ type

interpolation

interpolation  ← chain*  Derived interpolated points
intervals  ← 0..100  Interpolation intervals between points
kind  ← {poly,smooth}  Whether path is interpolated over points

dimension

offset  ← point  Offset to origin

Behaviour

6.14.1 Oms — Object management operations

Send Method initialise kind=[{poly,smooth}], intervals=[int] Refinement of: graphical->initialise The first argument specifies the ←kind. When ←kind equals smooth, the second argument specifies the ←intervals.

6.14.2 Points — Reference points for a smooth line (path)

Send Method append point=point Append a point at the end of the path. The point is specified in the ←device coordinate system. →insert may be used to insert points in the middle or prepend points.

Send Method clear

Delete all points

Send Method delete point=point Delete a point from the path. To delete points interactively, see also ←point.

Send Method insert point=point, point* Insert a new point after the second argument. If the second argument is @nil, the point is added as the first point of the chain. For interactive editing, ←segment may be used to find the point to insert after.

Variable points chain (←)

Chain of points the line-segments goes through (control-points).

Send Method set point point=point, x=[int], y=[int] Move a member point. The arguments are the X- and Y-coordinates in the ←device’s coordinate system.

6.14.3 Tip — End-points of a joint (line, arc, path) or arrow

Get Method end ⇒point Position (in ←device coordinate system) of the last point of the path.

Get Method start ⇒point

First point of the path (equivalent to Path?points?head).

6.14.4 Appearance — “Look-and-feel” related aspects

Variable closed bool (←) Send Method closed bool=bool

If @on, the first and last points are connected.

Variable fill pattern image|colour* (←) Send Method fill pattern image|colour*

Pattern to fill the interior of the path. To determine the interior, the ‘Even-Odd-Rule’ is used.

Variable mark image* (←) Send Method mark image*

When not @nil, each point of the path is marked using this image. Note that interpolation-points are not marked.

Send Method paint selected

Refinement of: graphical->paint selected Paint the selection attributes if the graphical is ←selected and the ←window defines one of the following ‘window ←selection feedback’ values:

• invert Invert the bounding box.

• handles Request the ←resource value: selection handles and paint the handles accordingly.

• an elevation object Elevate the bounding box.

This method should not be called by the application programmer directly. It is called by → redraw area.

Variable radius int (←)

Send Method radius int=int Rounding radius for the corners of ‘poly’ lines. Not yet implemented.

6.14.5 Interpolation — Interpolation points for smooth lines

Variable interpolation chain* (←)

When kind is ‘smooth’, this is a chain of interpolated points. The interpolation is recomputed each time the path has been modified and needs to be painted. See also →request compute.

Variable intervals 0..100 (←) [Pce.Path.intervals: 10]

Send Method intervals 0..100

The number of interpolation-points between each two successive specified points.

Variable kind {poly,smooth} (←) Send Method kind {poly,smooth}

Determines whether the line is smooth of a collection of line-segments (poly).

6.14.6 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry Moves and resizes the path to fit the requested bounding-box. Paths may also be resized using →resize.

6.14.7 Area — Handling size and position

Send Method reference reference=[point] Refinement of: graphical->reference Move ←offset while retaining points

Send Method resize factor x=real, factor y=[real], origin=[point] Refinement of: graphical->resize Realises together with ‘device →resize’ resizing of collections of objects. This method resizes the graphical with specified factor relative to the given origin. The X- and Y-distance of each of the corners to this reference point is multiplies by resp. the Xand Y-resize factor (1st and 2nd argument).

6.14.8 Dimension — Dimensions of (graphical) objects

Variable offset point (←)

Offset to origin

6.14.9 Update — Update Dependant properties

Send Method compute

Refinement of: graphical->compute Computes ←area from the ←points and ←interpolation from ←points if ←kind = smooth.

6.14.10 Event — Event processing

Get Method point near=point|event, max distance=[int] ⇒point Return (member) point object that is closest to the given position and within the specified maximum distance. When an event is passed, this is translated into the position of the event.

Get Method segment near=point|event ⇒point Return member point that is the start of a line-segment nearest to the indicated position or event ←position. May be used to interactively insert new points:

    send(Path, click_gesture(left, '', single,
                     message(@receiver, insert,
                         ?(@event, position, @receiver?device),
                         ?(@receiver, point, @event)))).

6.14.11 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.14.12 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon

→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.14.13 Term — Conversion to (Prolog) term

Get Method radius or interval ⇒int

Radius (‘poly’) or intervals (‘smooth’)

6.14.14 Compatibility — Methods for backward compatibility

Send Method initialise new slot variable=variable

Refinement of: graphical->initialise new slot Part of saved-object conversion (see ‘file ←object’). Called when -while loading an instance from a file-, the current definition of the class has a new instance variable (compared to when the instance was saved to file using →save in file). The argument is the new variable object from the class. May be used to initialise the new slot to some sensible value.

6.15 Class joint — Various kinds of lines with arrows

Inheritance: ⇒ joint ⇒ graphical ⇒ visual ⇒ object

Class joint is a super-class for all ‘line-like’ graphical classes that may have arrows at either or both ends of the line. Currently it has the following subclasses:

• class line Straight line-segment

• class arc Part of an ellipse (or circle).

• class path Line through a number of control-points. May be smooth (interpolated) or a series of straight line-segments.

Class joint defines all methods that deal with attaching and deleting arrows at the start or end of the line. See →arrows, →first arrow and →second arrow. See also class arrow.

Instance Variables

appearance

first arrow  ← arrow*  Arrow on start-point
second arrow  ← arrow*  Arrow on end-point

Behaviour

6.15.1 Oms — Object management operations

Send Method initialise x=[int], y=[int], width=[int], height=[int],

arrows=[{none,first,second,both}] Refinement of: graphical->initialise For an application programmer it is not useful to make instances of class joint directly. See ‘line →initialise’, ‘arc →initialise’ and ‘path →initialise’.

6.15.2 Appearance — “Look-and-feel” related aspects

Get Method arrows ⇒{none,first,second,both} Send Method arrows arrows={none,first,second,both}

The ↔arrows method provides a simple interface to →first arrow and →second arrow.

If it attaches arrows the new arrow is created using ←default arrow.

Get Method default arrow ⇒arrow

Create a default arrow (new(arrow)), see ‘arrow→initialise’. This method is called by →arrows. Intended to be redefined for making lines with different arrow styles.

Variable first arrow arrow* (←) Send Method first arrow arrow*

Arrow object at the start-point of the joint. If @nil, no arrow is displayed.

Variable second arrow arrow* (←) Send Method second arrow arrow*

Arrow object at the end-point of the joint. If @nil, no arrow is displayed.

6.16 Class arrow — Arrow head (normally for joints)

Inheritance: ⇒ arrow ⇒ graphical ⇒ visual ⇒ object

Class arrow defines an arrow-head. Normally, arrows are connected to subclasses of class joint (class line, class arc and class path), but arrows may also be used as stand-alone graphical objects. An arrow is determined by the following parameters:

• →length Distance between tip and baseline of the triangle

• →wing Width of the baseline

Its orientation and position is determined by:

• →tip Where the arrow-head is

• →reference The arrow points to this imaginary position.

See also ‘joint →arrows’ and ‘joint ←default arrow’.

Instance Variables

appearance

fill pattern  ← image|colour*  How it is filled
style  ← {open,closed}  If ‘closed’, the triangle is closed

area

length  ← int  Distance tip to base
reference  ← point  Where arrow points to
tip  ← point  Tip of the arrow
wing  ← int  Length of base

internal

left  - point  Left-end of base
right  - point  Right-end of base

Behaviour

6.16.1 Oms — Object management operations

Send Method initialise length=[int], wing=[int] Refinement of: graphical->initialise Initialise an arrow object. ‘length’ is the length from the arrow-head to the back of the wing. ‘wing’ is the distance between the two wing-tips. A default arrow reads the following values from associated resources:

←length  Tip to wing length
←wing  Wing-tip distance
←fill pattern How it is filled
←style  {open,closed}

6.16.2 Appearance — “Look-and-feel” related aspects

Variable fill pattern image|colour* (←) [Pce.Arrow.fill pattern: @black image] Send Method fill pattern image|colour*

If not equal to @nil, the triangle is filled with this pattern.

Variable style {open,closed} (←) [Pce.Arrow.style: closed] Send Method style {open,closed}

If ‘open’, the baseline of the triangle is not painted.

6.16.3 Area — Handling size and position

Variable length int (←) [Pce.Arrow.length: 10] Send Method length int=int

Distance in pixels from the ←tip to the baseline of the triangle. See also ←wing.

Send Method points tip x=[int], tip y=[int], reference x=[int], reference y=[int] Set XY of tip and reference

Variable reference point (←)

Send Method reference point=point Imaginary point where the arrow points to. Only the direction from ←tip is considered; not the distance. ←reference and ←tip may not be at the same location.

Get Method reference x ⇒int Get Method reference y ⇒int Send Method reference x int=int Send Method reference y int=int

Directly operate on X- or Y- component of the ↔reference.

Variable tip point (←) Send Method tip point=point

Location of the arrow head. Together with ←reference this determines the direction into which the arrow points.

Get Method tip x ⇒int

X of tip point

Send Method tip x int=int Set X of tip

Get Method tip y ⇒int

Y of tip point

Send Method tip y int=int Set Y of tip

Variable wing int (←) [Pce.Arrow.wing: 7] Send Method wing int=int

Length of the baseline.

6.16.4 Update — Update Dependant properties

Send Method compute

Refinement of: graphical->compute Compute -left, -right and ←area from the ←tip, ←reference, ←length and ←wing to speed up redraw.

6.16.5 Postscript — Generating PostScript for printing

Send Method draw post script

Refinement of: graphical-> draw post script Default (catch all) PostScript generation method for graphical objects that do not redefine the → draw post script to generate proper PostScript.

The method ‘graphical → draw post script’ creates an image object from the graphical using ‘image ←convert’, subsequent it creates a bitmap object from the image and moves the bitmap to the location of the graphical. Finally it invokes ‘bitmap → draw post script’.

The resulting quality of the PostScript is a similar to a screendump.

6.16.6 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

6.16.7 Internal — Private behaviour

Variable left point (-) Variable right point (-)

Computed value to speed up redraw if the parameters of the arrow has not changed.

242 Class arrow XPCE Reference Manual

Chapter 7 Displaying Hierarchies

7.1 Class tree — Hierarchy of graphicals

Inheritance: ⇒ tree ⇒ figure ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: root (node*)

Class ‘tree’ is a subclass of class ‘device’ which displays its graphical objects formatted as a hierarchy. Class ‘tree’ fits well in PCE’s target domain: graphical interfaces for structured representations (models).

The nodes of a PCE tree may be arbitrary graphical objects (yes, even trees, editors, etc.). Trees allow for multiple inheritance, but the automatically generated layout is often not optimal when multiple inheritance is used intensively. The automatically generated layouts for hierarchies are top-to-bottom, left-to-right (default) or ‘indented list’.

Class tree itself is responsible for displaying and formatting the nodes of the hierarchy. The hierarchy is defined by ‘node’ objects. A node object refers to a graphical (using ‘node ↔image’), its parent node(s) and its son nodes.

Event-handling for trees may be done in two ways. The first is to define event-handling for each of the individual graphicals representing the nodes. The second is to associate recognisers with the tree object itself. Class ‘tree’ defines various different recognisers, activation of which depends on the status of the node. See ‘tree →event’.

Instance Variables

nodes

root ← node* Root-node of the tree

relation

parent handle  ← handle  Connection point to parent
son handle  ← handle  Connection point to sons

layout

auto layout  ← bool  Enforce automatic layout?
direction  ← {horizontal,vertical,list}  Layout of the tree
level gap  ← int  Distance between levels
link  ← link  Generic connection between graphicals
link gap  ← int  Distance between line and image
neighbour gap  ← int  Distance between neighbours

scroll

display root ← node* Root of visible subtree

event

collapsed handlers  ← chain  Event handlers for collapsed nodes
leaf handlers  ← chain  Event handlers for leafs
node handlers  ← chain  Event handlers for any type of node
root handlers  ← chain  Event handlers for root

Behaviour

7.1.1 Oms — Object management operations

Send Method initialise root=[node]* Refinement of: figure->initialise Create a tree object and assign it a root. When the root is @nil (default), the tree must be assigned a root using ‘tree →root’ before any other nodes may be attached.

Note that class node defines a convert method for graphicals that creates a node with the specified graphical as ‘node ←image’.

Send Method unlink

Refinement of: device->unlink Removes all the nodes

7.1.2 Nodes — Nodes in a hierarchy (tree)

Variable root node* (←) Send Method root node*

Root node of the tree. Note that the root of the visual part of the tree is represented by ←display root. Class tree delegates messages not understood to its ←root node when present.

If the argument is *nil, all nodes are removed from the tree. If the argument is a new root object, the tree is first cleared using →root: @nil, after which the new root is attached.

See also →zoom and →unzoom.

7.1.3 Relation — Relations, constraints, (graphical) connections

Variable parent handle handle (←)

This handle object is attached to each graphical representing a node. It is the connection-point for a line linking this graphical to its parent.

This handle is automatically updated by ‘tree →direction’..

Variable son handle handle (←)

Similar to ‘tree ←parent handle’, but is the connection-point for the connection towards son-nodes.

7.1.4 Iterate — Run code on each element of a collection

Send Method for all code=code Refinement of: device->for all Invokes the message to the ←root of the tree, iterating over all nodes of the tree. See also ‘node →for all’, ‘node →for some’ and ←contains.

Send Method for some code=code Refinement of: device->for some Run code on all member graphicals that have ←name equal to name. The exit status is ignored and →for some always succeeds. If ‘name’ is @default, code is run on all ←graphicals in the device object.

7.1.5 Layout — Spatial relations between graphical objects

Variable auto layout bool (←) Send Method auto layout bool=bool

When @on (default), the tree will recompute its layout on any change to any of its nodes or change to the tree itself. When @off the tree won’t automatically recompute the layout.

Sometimes, it is desirable to allow the user to move the nodes of a tree by hand. With ←auto layout: @on this is not possible as the tree will immediately move the node back to the original position.

See also →compute and →layout.

Variable direction {horizontal,vertical,list} (←) [Pce.Tree.direction: horizontal] Send Method direction {horizontal,vertical,list}

Defines the layout:

• horizontal Root at the left, the sons are displayed left-to-right.

• vertical The tree is displayed ‘top-to-bottom’.

• list The tree is displayed as an indented list. The line properties of the ←link are used to determine the thickness, texture and colour of the lines. Each node will, if it has sons, draw a line from (x + ←level gap/2, bottom side) down to halfway the last son. If to node is not the root, it will draw a line from halfway its height towards the line from its parent.

Note: the default tree is displayed left-to-right rather than top-to-bottom as the nodes are often much wider than high. Using left-to-right layout allows for displaying much larger hierarchies.

When a large number of items is to be displayed as an indented list, also consider class list browser. The indentation may be realised using ‘list browser →tab stops’.

Variable level gap int (←) [Pce.Tree.level gap: 50]

Send Method level gap int=int

Distance between a node and its parents or sons.

Variable link link (←)

Link used to create connections between parent- and son-nodes. Its attributes may be changed to attach arrows or modify one of the line attributes. For example,

    send(Tree?link, arrows, first).

will attach an arrow pointing to the root to every relation created after this call has been made.

Variable link gap int (←) [Pce.Tree.link gap: 2]

Send Method link gap int=int

Distance between the image and the line. Used to define the X- and Y-positions of the ←son handle and ←parent handle.

Variable neighbour gap int (←) [Pce.Tree.neighbour gap: 0]

Send Method neighbour gap int=int

Distance between two nodes that are at the same level (= distance from the root). The resource defined default (0) satisfies when the nodes are represented by text object. For other graphicals a small positive value gives better results.

7.1.6 Scroll — Controlling the ‘viewport’

Variable display root node* (←)

Root of the visible part of the tree. This variable is managed using →zoom and →unzoom.

Send Method unzoom

Equivalent to:

    send(Tree, zoom, Tree?root).

To unzoom only one level, use

    send(Tree, zoom, Tree?display_root?parents?head).

Note that this method is ambiguous when the display root has multiple parents.

Send Method zoom node=node ‘Zoom’ in for a particular subtree. The visualisation of the tree will behave as if the argument-node of this method is the root. Sets the variable ‘tree ←display root’.

7.1.7 Update — Update Dependant properties

Send Method compute

Refinement of: figure->compute Whenever something changes to the tree that might affect its layout, this is notified using ‘graphical →request compute’. ‘tree →compute’ recomputes the layout of the tree by invoking →layout.

Send Method layout

Refinement of: graphical->layout Recompute the layout of the tree. This method is normally called from →compute and sends the following three messages to ←display root:

‘node →compute level’ Update the ‘node←level’ slots
‘node →compute size’  Compute the sizes of all nodes
‘node →compute layout’ Place the nodes

7.1.8 Event — Event processing

Send Method collapsed handler recogniser=recogniser Attach a recogniser for all nodes that have ‘node ↔collapsed: @on’. See ‘tree →event’ for the interpretation.

Variable collapsed handlers chain (←)

Event handlers for collapsed nodes

Send Method event event=event Refinement of: device->event ‘Tree →event’ allows for centralised event-processing for all nodes displayed on the tree. It performs the following steps.

1. Invoke ‘device →event’. When successful, succeed.

2. Find the node overlapping with the pointer and

        a) If it is collapsed, run ←collapsed_handlers
        b) If it is a leaf, run ←leaf_handlers
        c) If it is the display_root, run ←root_handlers
        d) else, run ←node_handlers

In each of the cases a) to d), ‘run’ means invoke

    `event →post: graphical, recogniser'

on the members of the chain. If this is successful, return from ‘tree →event’ signaling successful completion.

Finding the Context Arguments

The most reliable way to find the various context objects are:

@event?receiver  Graphical receiving the event
@event?receiver?node Node object for this graphical
@event?receiver?device The tree object

Send Method leaf handler recogniser=recogniser Attach a recogniser for all nodes that have no sons (i.e. are leaves). See ‘tree →event’ for the interpretation.

Variable leaf handlers chain (←)

Event handlers for leafs

Send Method node handler recogniser=recogniser Attach a recogniser for all nodes. See ‘tree →event’ for the interpretation.

Variable node handlers chain (←)

Event handlers for any type of node

Send Method root handler recogniser=recogniser Attach a recogniser for the ‘tree ←display root’ node. See ‘tree →event’ for the interpretation.

Variable root handlers chain (←)

Event handlers for root

7.1.9 Organisation — Organisation of (graphical) objects

Get Method contains ⇒chain

Refinement of: device<-contains New chain holding all node objects in the tree.

Its device functionality would be to return the chain of graphicals, holding only the graphicals for the displayed nodes and connections.

The contains-hierarchy for trees is defined as follows:

    tree
    |  node
    |   |  image

Image (being a graphical) may contain any number of sub-visuals.

7.1.10 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: figure-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

7.2 Class node — Node in a tree

Inheritance: ⇒ node ⇒ visual ⇒ object

Delegation: image (graphical)

A ‘node’ represents a node in a tree object. A node is a kind of ‘wrapper’ around an arbitrary graphical representing the image of the node.

A node maintains it’s relations to the tree, it’s parent node(s) and it’s child nodes.

Class node defines the methods to make a tree editable. See →delete, →son, →delete tree, etc. The HierarchyEditor demo may be used as a starting point for manipulating hierarchies.

Instance Variables

appearance

image ← graphical Graphical image of the node

scroll

collapsed  ← bool  Sub nodes are invisible
displayed  ← [bool]  Node is visible (@default used by update)

update

computed  - {level,size,layout}*  Stage of the layout process
my size  - int  Height of myself
sons size  - int  Height of the combined sons

organisation

tree ← tree Tree the node is in

hierarchy

level  ← int  Distance from the root
parents  ← chain  Parent nodes of this node
sons  ← chain  Sub nodes of this node

Behaviour

7.2.1 Oms — Object management operations

Get Method convert graphical=graphical ⇒node Refinement of: object<-convert Create node for graphical object. This method may be used to expand the tree by adding graphical objects rather than nodes. Note however that the actually stored object will be the node:

         ?- new(@t, tree(text(animal))),
         ?- get(@t, root, Root)
         Root = @345263
         ?- get(@345263, class_name, Class)
         Class = node.

Send Method initialise image=graphical Refinement of: object->initialise Create a node from an arbitrary graphical object. Nodes may be created from any graphical object, including devices, dialog items and even trees. A typical way to build a tree is the following:

    ?- new(T, tree(new(Root, node(text(anything))))),
       send(Root, son, new(S0, node(text(living_thing)))),
       ...

Send Method unlink

Refinement of: object->unlink Equivalent to ‘node→delete’: removes node from the tree binding all sons to all parents of this node.

7.2.2 Iterate — Run code on each element of a collection

Get Method find code=code ⇒node Traverses the tree in a depth-first fashion until code can be executed successfully on a node and then returns this node.

Get Method find node graphical=graphical ⇒node Find node (either myself or a node in the subtree of which this node is the root) that has ‘node ←image’ equal to the specified graphical.

Send Method for all code=code Runs code first on this node and then invokes ‘node →for all’ on all its ‘node ←sons’, thus traversing the tree in a depth-first fashion.

Note that multiple-inheritance will cause some nodes to be visited more than once. Argument binding:

@arg1: Node object.

1

Send Method for some code=code Equivalent to ‘node →for all’, but ignores the exit-status of the executed code. Succeeds always.

7.2.3 Appearance — “Look-and-feel” related aspects

Variable image graphical (←) Send Method image graphical=graphical

Graphical object that represents the node. This may be any graphical object. Note that class graphical defines some methods that take care of the fact that they are part of a tree.

7.2.4 Scroll — Controlling the ‘viewport’

1 ‘Node →for all’ is not safe when the executed code manipulates the subtree below this node.

Variable collapsed bool (←) Send Method collapsed bool=bool

When @on, the image related to this node is displayed, but all subnodes will be made invisible. ‘Node →collapsed’ and ‘tree →zoom’ make it possible to visualise only a small part of a large tree. A tree might contain multiple ‘collapsed’ nodes.

Variable displayed [bool] (←)

When @off, the node is invisible either because it is above ‘tree ←display root’ or below a node that has ‘node ←collapsed: @on’.

Send Method unzoom

Invokes ‘tree →unzoom’, unzooming the tree to its root.

Send Method zoom

Invokes ‘tree →zoom’, giving this node as the argument. This will make node the root of the visible part of the hierarchy.

7.2.5 Update — Update Dependant properties

Send Method compute layout int=int, int=int, int=int Recursively place each node (level, x, y)

Get Method compute size int=int ⇒int

Recursively compute the sub-tree-size (level)

Variable computed {level,size,layout}* (-)

Stage of the layout process

Variable my size int (-)

Height (or width if ‘tree ←direction’ equals vertical) or the graphical image represented. Part of the layout system.

Variable sons size int (-)

Combined height (width) of the entire subtree starting at this node. Part of the automatic layout mechanism.

7.2.6 Edit — Modify object

Send Method delete

Deletes node from the tree. Each of the sons of this node will be connected to each of the parents of this node.

The root of the tree may be deleted with this method. If this node has no sons, ‘tree ←root’ will be set to @nil. Otherwise the first son of this node will be made the new root of the tree.

When the ‘tree ←display root’ is deleted, it is set to the first parent of this node.^{2}

2 Deleting the root of a tree that has multiple sons is not well defined.

Send Method delete tree

Deletes the entire subtree starting at this node. Node that if any subnode of this node is still connected to the root through another chain of parents it will not be deleted from the tree.

Send Method move node=node Make the argument node a direct son of this node.

Succeeds without doing anything if the argument is already a son. Fails silently if one of the following is the case:

1. The argument node is in another tree

2. This node is not part of a tree

3. The argument node is this node

4. The argument node is a parent of this node

Send Method move after [node]*

When node and the argument are immediate sons of the same parent, the receiver is placed immediately after the argument node. When the argument node is omitted, the receiver is placed at the end chain of sons (making it the lowest or rightmost node).^{3}

Send Method son node=node Makes the argument node a son of this node. This is the most common way to build a hierarchy. The node is added at the end of the ←sons chain.

Send Method swap node=node Swap the images of the specified nodes.^{4}

Send Method swap tree node=node Swap the subtrees formed by both nodes. It performs the following steps:

1. Identify common parents and swap the positions in the parent ←sons chain.

2. Swaps the ←parents chain between both nodes

3. Destroy and recreate the necessary connections.

Send Method unrelate node=node Delete the direct relation between this node and the argument. Removes all nodes that have no relation to the root of the tree anymore.

7.2.7 Organisation — Organisation of (graphical) objects

Get Method contained in ⇒tree

Refinement of: visual<-contained in Returns the ‘parent’ visualiser. Defined at each of the various subclasses of visualiser to deal with the different implementations. All visualiser classes should define this method, except for class display which is at the root of the visualise consists-of hierarchy.

3 Not well defined when the receiver node has multiple parents. 4 This method manipulates the images rather than the nodes as done by most of the other methods

manipulating the layout of the hierarchy.

Get Method contains ⇒chain

Refinement of: visual<-contains Returns a chain with the visualisers of the next level of the contains hierarchy. Each of the subclasses that defines a ‘compound’ visualiser defines this method to deal with it’s particular implementation.

Variable tree tree (←)

Tree the node is in

7.2.8 Hierarchy — Hierarchical structure

Send Method is parent node=node Succeeds if the argument is an (indirect) parent of this node. Fails silently otherwise.

Send Method is son node=node Succeeds if argument node is an (indirect) son of this node. Fails silently otherwise.

Variable level int (←)

Integer representing the distance from the ‘tree←display root’ node. The node ‘tree←display root’ has level 0. This variable is updated by ‘tree →compute’, which scans the tree depth-first.

Variable parents chain (←)

Chain of parent nodes of this node. For the ‘tree ←root’ node this is the empty chain. Nodes may have multiple parents, but many methods of the classes tree and node are ill-defined for this case.

Variable sons chain (←)

Chain holding all immediate sub-nodes. The nodes are displayed left-to-right or topto-bottom in the order they appear in this chain. This order may be changed using ‘node →move after’.

7.2.9 Internal — Private behaviour

Send Method compute level int=int, [bool] Recursively assign each node a ←level

Chapter 8

Relations Between (Graphical) Objects

The first part of this chapter discusses lines connecting two graphical objects implemented by the classes connection, link, handle and graphical. The second part discusses general PCE maintained binary relations between objects.

Besides the material described in this chapter, the following is relevant for handling relations between objects:

• class graphical The section on relations discusses methods for handling connection objects from the viewpoint of the connected objects.

• class hyper A hyper is a general binary relation object which facilates communication (=passing messages) between the connected objects.

The first cluster (connection/link/handle) describe a line that is automatically updated if either of the connected graphical objects’ geometry or ←device changes. The connection object describes the instance. A link is a generic description for a group of connections, defining both the appearance and the association with handles. A handle object is a named connection-point that may be attached to a graphical or a graphical’s class.

In the second cluster, a constraint is an instantiation of a relation object. A relation describes the properties its individual constraints.

8.1 Class connection — Link between two graphicals

Inheritance: ⇒ connection ⇒ line ⇒ joint ⇒ graphical ⇒ visual ⇒ object

Class connection is a subclass of class line. A connection is a line that connects two graphical objects and is automatically updated if either of them changes. A connection is the instantiation of a link. The link object describes the generic properties of the line: what the line looks like and handle objects it can connect too.

A connection may be created between any two graphical object displayed on the same window object. The connected graphicals may be arbitrary deeply nested on device objects. The connection itself is displayed in the deepest nested device that displays both connected graphicals.

See also class link, class handle, ‘graphical →connect’, ‘graphical ←connected’ and class connect gesture.

The drawing program PceDraw exploits connections.

Instance Variables

relation

fixed from  ← bool  From side is fixed
fixed to  ← bool  To side is fixed
from  ← graphical*  Graphical at ‘from’ side
from handle  ← name*  Name of 1st handle link is connected to
link  ← link  Generic definition of the link
to  ← graphical*  Graphical at ‘to’ side
to handle  ← name*  Name of 2nd handle link is connected to

Behaviour

8.1.1 Oms — Object management operations

Send Method initialise from=graphical, to=graphical, link=[link],

handle from=[name]*, handle to=[name]* Refinement of: line->initialise Create a connection object (automatically updating line) between the two graphicals. The first becomes ‘connection ←from’; the second ‘connection ←to’. ‘Link’ is a link object describing the handles and characteristics of the line (←pen, ←arrows, ...). The two name arguments define the name of the handle to connect to at the ←from resp. ←to side. When omitted and there are multiple matching handles PCE will connect to the ‘best-looking’ one.

Always succeeds, also if the line cannot (yet) been created because there is no common device to display the graphical on.

Send Method unlink

Refinement of: graphical->unlink

Detach from graphicals

8.1.2 Tip — End-points of a joint (line, arc, path) or arrow

Send Method points start x=[int], start y=[int], end x=[int], end y=[int] Refinement of: line->points Define the start and end-point of the connection. This method is called from →compute. →points is the only method to change a connection as all other methods are discarded by a redefined →geometry method.

→points may be used to manage a label for the connection.

8.1.3 Relation — Relations, constraints, (graphical) connections

Variable fixed from bool (←)

Variable fixed to bool (←)

The slots ←fixed from and ←fixed to are used internally to represent that the handles the connection is related to (←from handle and ←to handle) should not be reconsidered if the connection is updated. These values are normally @off and set to @on by →initialise if the corresponding handle is specified.

Variable from graphical* (←) Variable to graphical* (←)

Related graphical and the indicated end of the connection. See also ‘graphical ←connections’, ‘graphical ←connected’, ‘connection ←opposite’.

Variable from handle name* (←) Variable to handle name* (←)

Name of the handle used at the indicated end. Depending on ←fixed from/fixed to, this handle is or is not updated if either of the connected graphicals is moved or changed otherwise.

Variable link link (←)

Generic definition of the link

Get Method opposite graphical=graphical ⇒graphical If the argument graphical is either ←from or ←to, return the other end. Fail silently otherwise.

Send Method relate from=graphical*, to=graphical* Specify the graphicals related

8.1.4 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->geometry No-op. The coordinates of a connection are determined by the graphical objects related. See also →points.

8.1.5 Update — Update Dependant properties

Send Method compute

Refinement of: graphical->compute Performs the following operations:

• if -for either graphical-, ←is displayed yields @off, undisplay the connection.

• Recompute ←from handle and ←to handle if these are not fixed

• Recompute the positions of these handles and update the line using →points if necessary.

Send Method update link attributes

Re-read ←arrows, ←texture and ←pen from the ←link and update accordingly.

8.1.6 Event — Event processing

Send Method event event=event Refinement of: graphical->event Process a (user-) event. This function is normally invoked by class device through ‘event →post’.

If the graphical has recogniser objects associated (see ‘object ←all recognisers’) and ←active equals @on, the recognisers are activated in the order they appear in this chain until one succeeds, after which this method returns successfully.

This method is redefined by many subclasses of class graphical to achieve predefined response to user-events. When programming user-defined (graphical) classes, this method is commonly used to attach predefined user-interface behaviour to the new class.

The following creates a box that may be moved using the middle button:

    ?- new(B, box(100,100)),
       send(B, recogniser, new(move_gesture)).

And the following example defines a class movable box from which all instances can be moved:

    :- pce_begin_class(movable_box, box).
    :- pce_global(@movable_box_gesture,
                  new(move_gesture)).
    event(B, Ev:event) :→
        (   send(B, send_super, event, Ev)
        → true
        ;   send(@movable_box_gesture, event, Ev)
        ).
    :- pce_end_class.

8.2 Class link — Generic part of a connection

Inheritance: ⇒ link ⇒ object

Delegation: line (line)

A link object describes the reusable part of a connection object. A connection is a line object between two graphicals, attached to handle objects defined on those graphicals or on their classes.

The ‘reusable’ link contains the ‘handle←kind’ of the handles required at the start- and endpoint of the line and a prototype for the line (with the appropriate texture, pen, arrows, etc).

See also example ‘Linking Graphicals’, class connection and class handle.

Instance Variables

relation

connection class  ↔ [class]  Class used by ←connection
from  ↔ name  Name of valid handles at ‘from’ side
to  ↔ name  Name of valid handles at ‘to’ side

appearance

line  ← line  Line (with pen, arrows, etc.)

Behaviour

8.2.1 Oms — Object management operations

Send Method initialise handle kind1=[name], handle kind2=[name], line=[line],

connection class=[class] Refinement of: object->initialise Define a link which may connect to a handle with ‘handle ←kind’ is handle kind1 at the ‘connection←from’ end and ‘handle ←kind’ is handle kind2 at the ‘connection←to’ end.

The default handle kind1 is ‘link’. The default handle kind2 is handle kind1. The default line is an instance of class line create with no arguments.

The connection class argument determines the class used by ←connection to instantiate the link. The default is class connection.

8.2.2 Relation — Relations, constraints, (graphical) connections

Get Method connection from=graphical, to=graphical, from handle=[name],

to handle=[name] ⇒connection Creates an instance of the link. An instance of a link object is a connection object. This method is normally called from ‘graphical →connect’.

The default implementation of this method creates an instance of class ←connection class using the arguments passed to this method. See ‘connection →initialise’.

Variable connection class [class] (↔)

Class used by ←connection. This must be a subclass of class connection. If the value is @default, this slot will be set to class(connection) on the first call to ←connection.

Variable from name (↔) Variable to name (↔)

The connection instantiated from this link may connect to any handle that has ‘handle ←kind’ equal to the value of this variable at the indicated end.

8.2.3 Appearance — “Look-and-feel” related aspects

Variable line line (←)

Line (with pen, arrows, etc.)

8.3 Class handle — Connection point on graphical

Inheritance: ⇒ handle ⇒ object

A handle object describes a possible end-point for a connection object between two graphical objects. A handle consists of two expression objects in ‘w’ and ‘h’ of the graphical that determine the X and Y positions of the handle.

The ←kind of handle determines which connections may attach to this handle. It’s value should match ‘link ←from’ or ‘link←to’, depending on which end of the connection is considered.

Finally, a handle also has a name to identify it. Note that the total set of handles associated with any graphical object is the merge of ‘graphical ←handles’ and ‘class ←handles’ of the graphicals’ class.

See also example ‘Linking Graphicals’, class connection, class link, class connect gesture and ‘graphical →connect’.

Instance Variables

name

name ↔ name Logical name of handle

relation

kind ↔ name Kind of valid connection end-point

location

x position  ↔ expression  Expression for X in variable ‘w’
y position  ↔ expression  Expression for Y in variable ‘h’

Behaviour

8.3.1 Oms — Object management operations

Send Method initialise x=expression, y=expression, kind=[name], name=[name] Refinement of: object->initialise The first two arguments are expressions representing the X- and Y-coordinates expressed in the ‘w’ and ‘h’ variable of the area they are attached to. The first name is the ‘Handle ↔kind’ attribute which determines the category the handle belongs to. The second name is the ‘Handle ↔name’ attribute that determines the logical name of the handle.

8.3.2 Name — Naming objects

Variable name name (↔)

This slot determines the logical name of the handle. It’s value is used to communicate about handles.

8.3.3 Relation — Relations, constraints, (graphical) connections

Variable kind name (↔)

The connection object of a link object may attach to this handle if the ‘link←from’ or ‘link←to’ (depending on the side of the connection concerned) matches this name.

8.3.4 Location — Locating points

Get Method position relative to=graphical, coordinate system of =[device] ⇒point Get Method x relative to=graphical, coordinate system of =[device] ⇒int Get Method y relative to=graphical, coordinate system of =[device] ⇒int

Compute the location of the handle relative to the indicated graphical and expressed in the coordinate system of the given device object. If no device is specified, ‘graphical ←device’ is used.

Variable x position expression (↔) Variable y position expression (↔)

This slot determines the position of the handle relative to the graphical. Its value is an expression expressed in ‘w’ and ‘h’ of the graphical object the handle belongs too. Legal expressions are:

• integer, number object or real object

• a function object Actually, ‘w’ and ‘h’ are converted to var objects with this name.

• a binary expression object

Below are some commonly used examples:

30  30 pixels
w/2 half of the ‘graphical ←width’.
h+10 ten more than the ‘graphical ←height’.

8.4 Class constraint — Binary constraint

Inheritance: ⇒ constraint ⇒ object

A constraint is a relation between two objects that must be maintained. A constraint is defined by a relation object. Class relation is a super-class for all predefined relations.

Constraints deal properly with cycles. Contradictory constraints lead to unpredictable results.

Constraints are commonly used to maintain relations between graphicals. They can also be used to maintain a relation between dialog objects and ‘model’ objects. The example below illustrates both usages.

:- pce_global(@center, new(identity(center))).
constraint_demo :-
new(P, picture('Constraint Demo')),
send(new(D, dialog), below, P),
send(P, display, new(B1, box(100,100))),
send(P, display, new(B2, box(50,50))),
send_list([B1, B2], recogniser,
      handler_group(new(resize_gesture),
            new(move_gesture))),
new(_, constraint(B1, B2, @center)),
send(D, append, new(S1, slider(center_x, 0, 500, 200))),
send(D, append, new(S2, slider(center_y, 0, 500, 200))),
send_list([S1, S2], drag, @on),
send(D, append, button(quit, message(D, destroy))),
new(_, constraint(S1, B1,
                  identity(selection, center_x))),
new(_, constraint(S2, B2,
                  identity(selection, center_y))),
send(D, open).

Instance Variables

client

from  ← object  ‘From’ side of the constraint
to  ← object  ‘To’ side of the constraint

relation

relation ← relation Relation that describes the constraint

internal locked - {none,forwards,front, backwards,back}

Avoid looping of propagation

Behaviour

8.4.1 Oms — Object management operations

Send Method initialise from=object, to=object, relation=relation,

propagate=[{forwards,backwards}] Refinement of: object->initialise Create a constraint object from both objects to be constrained (←from and ←to), the ←relation describing the constraint and optionally whether the constraint should propagate changes in both or only one direction. By default a constraint propagates changes either way. With propagate equals ‘forwards’ only changes to ←from are propagated to ←to and with propagate equals ‘backwards’ the other way around.

Send Method unlink

Refinement of: object->unlink Remove from to- and from-object

8.4.2 Client — Controlled object

Variable from object (←) Variable to object (←) Send Method from object=object

Object at the specified side of the constraint. Once the constraint is established it makes no difference which object is at which side. The constraint is established by making ←to consistent with ←from.

The constraint may be found though ‘object ←all constraints’ from either constrained object.

Send Method to object=object ‘To’ side of the constraint

8.4.3 Relation — Relations, constraints, (graphical) connections

Variable relation relation (←) Send Method relation relation=relation

The relation that maintains the constraint. This object will be send the following messages:

‘relation →create: From, To’  Upon establishing.
‘relation →forwards: From, To’ ←from has changed
‘relation →backwards: From, To’ ←to has changed

8.4.4 Internal — Private behaviour

Variable locked {none,forwards,front,backwards,back} (-)

This variable serves two purposes: avoid loops and implement constraints that only propagate in one direction. Its values are:

forwards Only propagate ←from to ←to
backwards Only propagate ←to to ←from
none  Propagate both ways
front  ←from has changed. Avoid loop
back  ←to has changed. Avoid loop

8.5 Class relation — Superclass for all relations

Inheritance: ⇒ relation ⇒ object

A ‘relation’ describes the reusable part of a constraint object. Class relation may be subclassed to define new relations. Subclasses normally redefine →create, →forward and/or →backwards.

The current system contains two types of relations, two of which are strictly between graphicals and one general. They are:

• class spatial Spatial relation between two graphicals

• class identity Identity of attributes.

New relations may be defined as user-defined subclasses of this class. A relation should define the methods:

• →create Called when the relation is established

• →forwards Called if the ‘constraint ←from’ side changes.

• →backwards Called if the ‘constraint ←to’ side changes.

Behaviour

8.5.1 Constraint — Maintaining constraints and relations

Send Method backwards from=object, to=object Called after ‘to’ has changed. Its task is to update ‘from’ accordingly.

Send Method create from=object, to=object Invokes →forwards to itself. This method is activated when the constraint object this relation is referred from is initialised.

Send Method forwards from=object, to=object Called after ‘from’ has changed. Its task is to update ‘to’ accordingly. If →create has not been redefined, this method is also called when the constraint object is established.

8.6 Class identity — Identity between attributes

Inheritance: ⇒ identity ⇒ relation ⇒ object

An ‘identity’ expresses that ‘Attribute A of object O1’ equals ‘Attribute B of object O2’. It is the most basic relation object.

Instance Variables

selector

from  ↔ name  Attribute at the ‘From’ side
to  ↔ name  Attribute at the ‘To’ side

Behaviour

8.6.1 Oms — Object management operations

Send Method initialise selector1=name, selector2=[name] Refinement of: object->initialise Create a relation defining

    ``Attribute selector1 of `constraint ←from' equals
    Attribute selector2 of `constraint ←to'''

If the second selector is not specified is defaults to the first.

8.6.2 Selector — Naming behaviour

Variable from name (↔) Variable to name (↔)

Attribute at the specified side of the constraint object. For normal bi-directional relations, both constrained objects should define both send- and get-behaviour with the specified name.

If a constraint object is used as a propagator (see ‘constraint →initialise’), getbehaviour on one side and send-behaviour on the other suffices.

8.6.3 Constraint — Maintaining constraints and relations

Send Method backwards from=object, to=object Refinement of: relation->backwards Performs a get-operation on ‘to’ using the selector ←to, followed by a send-operation on ‘from’ using the send ←from.

Send Method create from=object*, to=object* Refinement of: relation->create Invokes →forwards to itself. This method is activated when the constraint object this relation is referred from is initialised.

Send Method forwards from=object, to=object Refinement of: relation->forwards Performs a get-operation on ‘from’ using the selector ←from, followed by a sendoperation on ‘to’ using the send ←to.

8.7 Class spatial — Spatial relation between grahicals

Inheritance: ⇒ spatial ⇒ relation ⇒ object

A spatial describes how two rectangular areas are related. In principle, spatials can be attached to any two objects that understand the messages ←area to obtain their area and →set to set their area.

In it’s full glory, a spatial consists of six expressions that are organised in two pairs of two and two singles. One pair describe the relative X-positions, the other pair the relative Y position and the two remaining expressions describe the relation in their width and height.

The first pair is ‘x-from, x to’; both = objects (equations) describe the X-coordinate ‘xref’ of the reference-point of each area. The spatial will attempt to keep the values of ‘xref’ of both equations equal. When evaluated, the variables ‘x’ and ‘w’ are refer to the corresponding attributes of the areas.

The second pair is ‘y from, y to’. It is similar to the previous pair, but these equations describe the Y-coordinate ‘yref’ of the reference point. ‘y’ and ‘h’ are the active variables.

The equations ‘w to’ and ‘h to’ describe the relation between their sizes. The variable ‘w’ refers to the width of the first object, ‘w2’ or the second. Similar, ‘h’ is the height of the first and ‘h2’ of the second object.

Any of these equations may be @default, indicating no relation between the corresponding arguments.

Note that spatials are reusable. Use this feature to reach at readable code:

    :- pce_global(@center, make_center_spatial).
    make_center_spatial(S) :-
        new(S, spatial(xref = x+w/2, yref = y+h/2,
                       xref = x+w/2, yref = y+h/2)).
    ...
    new(_, constraint(Box, Text, @center))
    ...

Or, to put a label-box just above a graphical at the left side, half the width of the graphical.

    :- pce_global(@top_left_label_spatial,
                  new(spatial(xref = x, yref = y,
                              xref = x, yref = y + h,
                              w2 = w/2))).

Hints

• Spatials are useful, but don’t exaggerate. Certainly under the current implementation, complex networks of spatials lead to very slow response. Figure objects (allowing for nested graphicals, similar to grouping in many drawing applications) are often a good alternative.

• When relating many objects to another, of which one generally moves/resizes, relate all other objects to this one object. This makes the result better predictable.

Instance Variables

dimension

h to  ↔ =*  Equation between ‘h’ and ‘h2’
w to  ↔ =*  Equation between ‘w’ and ‘w2’

position

x from  ↔ =*  X of reference at ‘from’ (XYHW → xref)
x to  ↔ =*  X of reference at ‘to’ (XYHW → xref)
y from  ↔ =*  Y of reference at ‘from’ (XYHW → yref)
y to  ↔ =*  Y of reference at ‘to’ (XYHW → yref)

Behaviour

8.7.1 Oms — Object management operations

Send Method initialise x1=[=]*, y1=[=]*, x2=[=]*, y2=[=]*, width=[=]*,

height=[=]* Refinement of: object->initialise Create from equations x1, y1, x2, y2, w, h

8.7.2 Constraint — Maintaining constraints and relations

Send Method backwards from=graphical, to=graphical Refinement of: relation->backwards Called after ‘to’ has changed. Its task is to update ‘from’ accordingly.

Send Method create from=graphical*, to=graphical* Refinement of: relation->create Invokes →forwards to itself. This method is activated when the constraint object this relation is referred from is initialised.

Send Method forwards from=graphical, to=graphical Refinement of: relation->forwards Called after ‘from’ has changed. Its task is to update ‘to’ accordingly. If →create has not been redefined, this method is also called when the constraint object is established.

8.7.3 Dimension — Dimensions of (graphical) objects

Variable h to =* (↔) Variable w to =* (↔)

Equation (= object) relating the following variables:

w ‘area ←width’ of the ‘constraint ←from’ graphical
h ‘area ←height’ of the ‘constraint ←from’ graphical
w2 ‘area ←width’ of the ‘constraint ←to’ graphical
h2 ‘area ←height’ of the ‘constraint ←to’ graphical

Examples:

w = w2  Equally wide
w = w2 + 10 ‘constraint ←to’ is 10 pixels wider

8.7.4 Position — Position of objects

Variable x from =* (↔)

Variable x to =* (↔)

Variable y from =* (↔)

Variable y to =* (↔)

These equations define the reference points on both graphical objects constrained. They should be defaulted or specified in pairs: if ←x from is specified so must ←x to and likewise for ←y from and ←y to.

The reference points of both objects are constrained to be at the same location.

During the evaluation of the = object, the following variables are available:

xref the x coordinate of the reference-point
yef the y coordinate of the reference-point
x  ←x of the graphical’s ‘graphical ←area’
y  ←y
w ←width
h  ←height

270 Class spatial XPCE Reference Manual

Chapter 9

Making Graphicals Sensitive

This chapter deals with classes and behaviour to make graphical objects sensitive to the mouse and keyboard. For most things the user can do with the keyboard, pointer (mouse) or pointerbuttons, X11 generates X-events. These events are converted by XPCE into XPCE event objects and distributed to the appropriate graphical object using the method ‘graphical →event’.

An event object contains information on the location, time and type of the event. Event-types are organised in an is-a hierarchy. See class event tree, event tree and @event hierarchy. The XPCE/Prolog demo program EventHierarchy visualises the hierarchy of event types.

There three basic ways to make a specific graphical sensitive to events:

• Implement →event That is, write a method →event for the class whose instances need to be sensitive to event handling. The method is resposible for analysing the incomming events. This is the basic way of handling events. Various subclasses of class dialog item implement event-handling this way.

• Associate a recogniser object to the graphical A recogniser object may be viewed as a piece of code that translated event(-sequences) into actions. There are various predefined recogniser classes (see below). Instances may be associated using ‘graphical →recogniser’. For example:

        ?- send(new(P, picture), open),
           send(P, display, new(B, box(100,100))),
           send(B, recogniser, new(move_gesture)).

• Associate a recogniser object using →event This the common way for programming events when using user-defined classes:

        :- pce_begin_class(movable_box, box).
        :- pce_global(@movable_box_recogniser,
                  new(move_gesture)).
        event(B, Ev:event) :→
            "Make the box movable"::
            (   send(B, send_super, event, Ev)
            → true
            ;   send(@movable_box_recogniser, event, Ev)
            ).
        :- pce_end_class.

The latter two mechanisms are the common way to program event-handling in XPCE. Eventhandling that is not dealt with by the standard recognisers in this chapter is generally programmed by creating a subclass of one of the predefined recogniser classes.

Overview

The first part of this chapter describes the standard recogniser classes. The general protocol is described with the classes recogniser and gesture. Subclasses thereof are for real event-handling. ‘Gestures’ deal with button-events (clicking, dragging, etc.). Class key binding deals with keyboard events.

Class event describes properties of events and methods for checking event-types, -locations, etc. Class modifier deals with the ‘modifier’ keys (SHIFT, CONTROL and META).

The classes event tree and event node describe the event-type hierarchy.

Class handler maps single events into actions. It’s use should rarely be necessary. Finally, class handler group describes how individual recognisers may be combined.

9.1 Class recogniser — Mapping from event to message (action)

Inheritance: ⇒ recogniser ⇒ object

Class recogniser is an almost empty super-class. It’s main purpose is to serve as a type-check for it’s sub-classes.

A recogniser is an object that maps a user event onto an action. The events origins from the window on which it occurred and is dispatched by the dispatching behaviour defined by ‘device →event’.

A recogniser may be attached to a graphical object using ‘graphical →recogniser’ or it may be used from a redefined ‘graphical →event’ method. Multiple recognisers may be combined to a single entity using class handler group.

Instance Variables

status

active  ↔ bool  Ignore events when @off

Behaviour

9.1.1 Oms — Object management operations

Send Method initialise

Refinement of: object->initialise

Create a recogniser object. Initialises →active to @on. Creating instances of this class is no common use.

9.1.2 Status — Flags indicating current status

Variable active bool (↔)

Recognisers can be made inactive using →active: @off. The method →event fails for inactive recognisers.

9.1.3 Event — Event processing

Send Method event event=event Process an event. The method defined at the level of class recogniser itself simply fails.

9.2 Class gesture — Handler for sequence down ... up

Inheritance: ⇒ gesture ⇒ recogniser ⇒ object

A gesture is a recogniser object for a sequence of events, starting with a (mouse-) button down event up to the corresponding up-event.

Class gesture itself takes care of detecting the appropriate down event that matches the specified modifier object. Next, it sets the event focus using ‘window →focus’ on the window on which the event occurred to itself and maintains this focus until the corresponding up-event is detected. As the execution of a specific gesture is often indicated to the user by using some cursor object, class gesture allows for the specification of a cursor during the execution of the event.

Class gesture itself is intended to act a a super-class over classes that handle particular gestures such as moving, resizing, linking graphicals, clicking, etc. The predefined subclasses are:

• class click gesture Deals with clicking objects. Handles double and triple clicks.

• class move gesture and class move outline gesture Deals with moving graphicals.

• class resize gesture and class resize outline gesture Deals with resizing graphicals

• class connect gesture Deals with connecting graphicals (see ‘graphical →connect’).

• class popup gesture Deals with displaying popup menus. See class popup.

A gesture sends 4 types of messages to itself for which a sub-class of gesture must define appropriate behaviour

• →verify: event Called after a down-event of the appropriate button with the appropriate modifier is detected. It should succeed if the condition to actually start this gesture are satisfied. Normally used to perform checks on the mode of the tool or represented object, etc. Class gesture itself defines a verify behaviour that succeeds without side-effects.

• →initiate: event Called right after the →verify succeeded. It should perform the necessary initialisations for starting the gesture. If the resource ‘cursor’ is not @default, the cursor will be set automatically to the value of the resource.

• →drag: event Called on each mouse-motion event that is received.

• →terminate: event Called on the corresponding up-event. It should terminate the gesture. The cursor is automatically reset to its original value.

Instance Variables

status

status ↔ {active,inactive} Current status

cursor

cursor ↔ [cursor] Cursor while active

event

button  ← button name  Mouse button to initiate on
condition  ↔ code*  Additional conditions
modifier  ↔ modifier  Key modifiers (shift, control and/or meta)

Behaviour

9.2.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier] Refinement of: recogniser->initialise Create a gesture. The arguments are the name of the button to react upon and a modifier object to specify the shift-, control- and meta-keys. When these arguments are omitted, they are read from their related resources.

Specification through the resource mechanism is advised as this allows the user to set his/her own preferences and it will give all similar gestures consistent user-interface.

Creating instances of this class is no common use. Note however that a recogniser for a specific application may be created by creating an instance of class recogniser and attaching the necessary →initiate, →verify, →drag and/or →terminate methods to it using ‘object →send method’.

9.2.2 Status — Flags indicating current status

Variable status {active,inactive} (↔)

Status of the gesture. When ‘active’, the gesture is initiated and processing events.

9.2.3 Cursor — Image of the pointer (mouse) cursor

Variable cursor [cursor] (↔) [Pce.Gesture.cursor: @default] Cursor object displayed during the activation of the gesture. Gestures that may use multiple cursors (for example the built-in resize gesture) may set this variable in their →initiate method or set this variable to @default and invoke ‘graphical →focus cursor’ in →initiate.

9.2.4 Event — Event processing

Variable button button name (←) [Pce.Gesture.button: left] Name of the button for which the gesture is sensitive. The filler is (currently) one of ‘left’, ‘middle’ or ‘right’. Mouse-events associated with any other button are always ignored by the gesture.

Variable condition code* (↔)

When non-nil, this message is executed on a mouse-button-down-event of the appropriate button with the appropriate modifiers. When executed, the following bindings apply:

@receiver: The gesture
@arg1  Equivalent to @event

If this message fails, the gesture is not activated.

Send Method drag event=event This method is send by →event if the ←status attribute is ‘active’ and the event is a drag event (i.e. the mouse is moved with one of the buttons held down).

‘gesture →drag’ just succeeds. Intended to be redefined by gesture’s subclasses.

Send Method event event=event Refinement of: recogniser->event Accepts the following events:

• ms {left,middle,right} down If the position of shift-, control- and meta-keys match the ↔modifier, the button matches ↔button, the ↔condition message is @nil or executed successfully and ‘gesture →verify’ succeeds, the gesture will perform the following steps:

1. invoke →initiate: Event on itself to initiate

2. set ←status to ‘active’

3. invoke ‘window →focus’ to grab the event-focus

• ms {left,middle,right} drag If ←status equals ‘active’, invokes →drag: event to itself

• ms {left,middle,right} up If ←status equals ‘active’ and the button matches the ↔button of the gesture, invoke →terminate on itself and set ↔status to inactive.

Fails when ‘recogniser ↔active’ equals @off.

Send Method initiate event=event Invoked by →event on a button-down event when all conditions are verified. This method should perform necessary initialisation for the gesture.

‘gesture →initiate’ just succeeds. Intended to be redefined by gesture’s subclasses.

Variable modifier modifier (↔) [Pce.Gesture.modifier: ] Modifier object that describes the position of the shift, control and meta keys. The gesture will only be initiated if the setting of these keys match this modifier at the time of the button-down event.

Send Method terminate event=event Invoked by →event when the matching button-up event that terminates the gesture action occurs.

‘gesture →terminate’ just succeeds. Intended to be redefined by gesture’s subclasses.

Send Method verify event=event Invoked by →event on the button-down event after the button, modifier and condition have been verified. This method may do additional verification. It is supposed to succeed or fail without side-effects. Side-effects necessary during initiation of the gesture should be defined at →initiate.

‘gesture →verify’ just succeeds. Intended to be redefined by gesture’s subclasses.

9.2.5 Cancel — Cancel event handling

Send Method cancel event=event Cancel this gesture and try the next one. This method implements the necessary event-focus consequences. It is currently used by class click gesture. See ‘click gesture →cancel’ and ‘click gesture ←max drag distance’.

It performs the following steps:

• Set →active: @off • Set ‘window →focus: @nil’ of the associated window • Resent the original down event to the window

• Resent the current (drag) event to the window

• Set →active: @on

9.3 Class click gesture — Gesture to handle a click

Inheritance: ⇒ click gesture ⇒ gesture ⇒ recogniser ⇒ object

A ‘click gesture’ can be used to make any graphical behave as a button. It allows you the mousebutton that should be recognised; the state of the modifier buttons and the ‘multiclick’ status (single, double, triple clicks).

The above forms the ‘condition’ part. The ‘action’ part consists of three messages. When the mouse goes down, the ←preview message is sent. Next, when the mouse goes up inside the area of the graphical, the ←execute message is activated, otherwise the ←cancel message. For all these messages, the following arguments are forwarded:

@receiver The receiving graphical object
@arg1  The event

Normally, the ←preview message indicates that releasing the button here will start some command. The execute message will execute the command and remove the feedback provided by the preview and the cancel message just removes this feedback.

Instance Variables

modifier

multiclick ↔ [{single,double,triple}] Demand single, double or triple click

action

execute message ↔ code* Message sent on up inside area

feedback

cancel message  ↔ code*  Message sent on up outside area
execute cursor  ↔ cursor*  Cursor displayed while message is executed
preview message  ↔ code*  Message sent on down

cancel

max drag distance ↔ int* Cancel after dragging this far

internal

down position  ← point  Position of the down event

Behaviour

9.3.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier], multiple=[{single,double,triple}], message=[code]*, preview=[code]*, cancel=[code]*

Refinement of: gesture->initialise

Initialises a click gesture from the following arguments:

button  Mouse-button: {left,middle,right}
modifier  Modifier status
multiclick  Multiclick status: {single,double,triple}
execute message Ran when click is finished (up)
preview message Ran when click is started (down)
cancel message Ran on up outside area

9.3.2 Modifier — Test Meta-, Shift- and Control-keys

Variable multiclick [{single,double,triple}] (↔)

The multiclick attribute determines whether the gesture reacts on single, double or triple click.

9.3.3 Action — Associated action

Variable execute message code* (↔)

This message is sent when the user releases the button that initiated this gesture inside the area of the graphical. The argument bindings are:

@receiver The graphical
@arg1  The event

When @nil, no message is sent.

9.3.4 Feedback — Feedback for event-handling

Variable cancel message code* (↔)

The cancel message is executed when the user releases the button that initiated this click gesture outside the area of the graphical this gesture is associated with. When executed, the following arguments are forwarded:

@receiver Graphical on which the gesture was started
@arg1  Event

When @nil, no cancel message is sent.

Variable execute cursor cursor* (↔) [Pce.ClickGesture.execute cursor: watch] Cursor displayed while message is executed

Variable preview message code* (↔)

The preview message is sent when the gesture is initiated (i.e. on the down event). The following arguments are passed:

@receiver The graphical
@arg1  The event

When @nil, no message is sent.

9.3.5 Event — Event processing

Send Method drag event=event Refinement of: gesture->drag If ←max drag distance is not @nil, determine the distance between the original down event and the current event and →cancel if this distance exceeds ←max drag distance pixels.

Send Method initiate event=event Refinement of: gesture->initiate When ←preview message is not @nil, forward this message.

Send Method terminate event=event Refinement of: gesture->terminate Executes ←execute message iff the pointer is not moved outside the area of the graphical for which this gesture was started or the pointer has been moved less than 5 pixels.

Otherwise the ←cancel message is executed when it is not @nil

Send Method verify event=event Refinement of: gesture->verify Invoked by →event on the button-down event after the button, modifier and condition have been verified. This method may do additional verification. It is supposed to succeed or fail without side-effects. Side-effects necessary during initiation of the gesture should be defined at →initiate.

‘gesture →verify’ just succeeds. Intended to be redefined by gesture’s subclasses.

9.3.6 Cancel — Cancel event handling

Send Method cancel event=event Refinement of: gesture->cancel Forward ←cancel message (if any) and cancel the gesture using ‘gesture →cancel’. Called from →drag if the user dragged too far.

Variable max drag distance int* (↔) [Pce.ClickGesture.max drag distance: 5] This variable is used by →drag to cancel the click gesture after the user dragged too far. @nil implies the gesture is never canceled by dragging.

9.3.7 Internal — Private behaviour

Variable down position point (←)

Position of the down event

9.4 Class move gesture — Gesture to move an object by dragging

Inheritance: ⇒ move gesture ⇒ gesture ⇒ recogniser ⇒ object

A ‘move gesture’ defines the behaviour necessary to allow the user dragging a graphical object with the mouse over it’s graphical device.

While dragging, the cursor is changed to a ‘fleur’

By default, the move gesture is associated with the middle mouse-button.

Instance Variables

internal

offset  ← point  Offset of down relative to object

Behaviour

9.4.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier] Refinement of: gesture->initialise Create a move gesture, associated with a button with modifiers. Both the button and the modifiers are resource determined. One should avoid to use explicit binding of a move gesture to some button.

9.4.2 Event — Event processing

Send Method drag event=event Refinement of: gesture->drag Moves the graphical using the →do set behaviour so that the distance between the cursor and the top-left remains the same as when the gesture was initiated.

Send Method initiate event=event Refinement of: gesture->initiate Fills ←offset with the distance of the mouse-down event to the top-left corner of the graphical on which the move is initiated. Sets the cursor to the value of the cursor resource.

Send Method terminate event=event Refinement of: gesture->terminate Equivalent to →drag.

Send Method verify event=event Refinement of: gesture->verify Succeeds if the receiving graphical object has ↔device not equal to @nil.

9.4.3 Internal — Private behaviour

Variable offset point (←)

While active, the distance between the top-left corner of the graphical moved and the cursor. Set by →initiate.

9.5 Class move outline gesture — Gesture to move an object by outline

Inheritance: ⇒ move outline gesture ⇒ move gesture ⇒ gesture ⇒ recogniser ⇒ object

A ‘move outline’ gesture is very similar to a move gesture object, except that it drags a dotted box instead of the object itself and only moves the object when the user releases the button.

The move-outline gesture is to be preferred if the graphical has constraints or connections because the move gesture will force recomputing these constraints and connections on each drag-event, while the move outline gesture will do so only when the user releases the button.

Instance Variables

feedback

outline  ← box  The outline moved

Behaviour

9.5.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier] Refinement of: move gesture->initialise Create from button and modifier

9.5.2 Feedback — Feedback for event-handling

Variable outline box (←)

Box used to paint the outline moved. The attributes ‘box →texture’, ‘box →pen’, etc, may be changed.

9.5.3 Event — Event processing

Send Method drag event=event Refinement of: move gesture->drag Delegates the event to the ←outline using ‘event →post’, thus moving the ←outline rather than the object.

Send Method initiate event=event Refinement of: move gesture->initiate Displays the ←outline on the same device as the graphical moved. Than uses ‘event →post’ to initiate the normal move gesture object associated with the ←outline.

Send Method terminate event=event Refinement of: move gesture->terminate First invoke →drag. Next it invokes →set with the x, y, w and h of the area of the ←outline to ‘event ←receiver’. Finally it invokes ‘graphical →device: @nil’ to the ←outline to remove it from the device.

9.6 Class resize gesture — Gesture to resize by dragging

Inheritance: ⇒ resize gesture ⇒ gesture ⇒ recogniser ⇒ object

A ‘resize gesture’ allows for resizing objects by dragging the corners or sides (for constrained resize) of the objects. While dragging, the direction/constraints are indicated by showing an appropriate cursor.

The resize gesture only responds to events the happen close the the edges/corners of the graphical. The resources margin fraction and margin width determine these areas: the gesture responds if the down event occurs between the edge and 1/margin fraction of the size or margin width (whoever is the least).

Instance Variables

constraint

max size  ↔ size*  Specify maximum size of the graphical
min size  ↔ size*  Specify minimum size of the graphical

mode

h mode  ↔ {left,keep,right}  Horizontal resize mode
v mode  ↔ {top,keep,bottom}  Vertical resize mode

Behaviour

9.6.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier] Refinement of: gesture->initialise Create from button and modifier

9.6.2 Constraint — Maintaining constraints and relations

Variable max size size* (↔)

Size that defines the maximum size the graphical may have. If it depends on the circumstances, it may be set in →verify or →initiate.

If @nil, there is no maximum size.

Variable min size size* (↔) [Pce.ResizeGesture.min size: size(3,3)] Size that defines the minimal size the graphical should have. If it depends on the circumstances, it may be set in →verify or →initiate.

If @nil, there is no minimum size.

9.6.3 Mode — Modes of operation

Variable h mode {left,keep,right} (↔)

How the graphical is resized horizontally. Values are:

left Drag the left edge
keep Change neither edge
right Drag the right edge

This value is set by →verify and used by →initiate and →drag.

Variable v mode {top,keep,bottom} (↔)

How the graphical is resized vertically. Values are:

top  Drag the top edge
keep  Change neither edge
bottom Drag the bottom edge

This value is set by →verify and used by →initiate and →drag.

9.6.4 Event — Event processing

Send Method drag event=event Refinement of: gesture->drag Resize the graphical according the ←v mode and the ←h mode determined upon starting the gesture.

Send Method initiate event=event Refinement of: gesture->initiate Set the cursor to indicate which edges are going to be changed and moves the pointer to be precisely on those sides.

Send Method terminate event=event Refinement of: gesture->terminate Equivalent to →drag.

Send Method verify event=event Refinement of: gesture->verify The →verify method determines the ↔v mode and ↔h mode attributes. The gesture changes those sides where the caret is closer that the maximum of

    {Width/Height} / margin_factor AND margin_width

Both margin factor and margin width are resources. →verify succeeds if at least one of ↔v mode and ↔h mode is not set to ‘keep’.

9.7 Class resize outline gesture — Gesture to resize an object by outline

Inheritance: ⇒ resize outline gesture ⇒ resize gesture ⇒ gesture ⇒ recogniser ⇒ object

Resize a graphical object by resizing an outline first. Outline-based resizing avoids expensive computation for objects that cannot be resized easily, either due to their internal complexity or due to constraints.

Instance Variables

feedback

outline ← box The outline resized

internal

outline gesture  ← resize gesture  The outline resized

Behaviour

9.7.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier] Refinement of: resize gesture->initialise Create from button and modifier

9.7.2 Constraint — Maintaining constraints and relations

Send Method max size size*

Size that defines the maximum size the graphical may have. If it depends on the circumstances, it may be set in →verify or →initiate.

If @nil, there is no maximum size.

Send Method min size size*

Size that defines the minimal size the graphical should have. If it depends on the circumstances, it may be set in →verify or →initiate.

If @nil, there is no minimum size.

9.7.3 Feedback — Feedback for event-handling

Variable outline box (←)

The outline resized

9.7.4 Event — Event processing

Send Method drag event=event Refinement of: resize gesture->drag Resize the graphical according the ←v mode and the ←h mode determined upon starting the gesture.

Send Method initiate event=event Refinement of: resize gesture->initiate Set the cursor to indicate which edges are going to be changed and moves the pointer to be precisely on those sides.

Send Method terminate event=event Refinement of: resize gesture->terminate Equivalent to →drag.

9.7.5 Internal — Private behaviour

Variable outline gesture resize gesture (←)

Instance of class resize gesture used to resize the ←outline.

9.8 Class connect gesture — Gesture to connect two objects by dragging

Inheritance: ⇒ connect gesture ⇒ gesture ⇒ recogniser ⇒ object

A connect gesture is used to create a connection object between two graphical objects by dragging from the first to the second graphical object. The gesture is connected to a graphical that can serve as an origin (starting) point for a connection. Note that the graphical should have handle objects that can connect to the link object associated with the gesture. Thus, if the link is created from the term link(in, out), the graphical from which the connection is started should have at least one handle of ‘handle←kind’ ‘in’ and the graphical at the other end should have at least one handle of ‘handle←kind’ ‘out’.

This class provides a high-level user-interface for creating connections. The following program illustrates the use of PCE’s graphical connection facilities:

    connect_demo :-
        send(new(P, picture('Connect Demo')), open),
        send(P, recogniser,
             click_gesture(left, '', single,
                           message(@prolog,
                                   display_box, P,
                                   @event?position))).
    :- pce_global(@east,  new(handle(0, h/2, any, east))).
    :- pce_global(@north, new(handle(w/2, 0, any, north))).
    :- pce_global(@west,  new(handle(w, h/2, any, west))).
    :- pce_global(@south, new(handle(w/2, h, any, south))).
    :- pce_global(@connect_recogniser,
                  new(handler_group(connect_gesture(left, '',
                                                    link(any)),
                                    new(move_gesture)))).
    display_box(P, Pos) :-
        send(P, display, new(B, box(30,30)), Pos),
        send_list(B, handle,
                  [ @east, @north, @west, @south
                  ]),
        send(B, recogniser, @connect_recogniser).

Unfortunately possible links often rely on semantics too complicated to deal with by the handle and link naming mechanism. For this reason this class defines a large number of methods that may be redefined. The most commonly redefined are:

→verify Additional tests, assign ←device
←pointed Determine graphical to link too
→indicate Find possible connection-points
→connect Creates the actual connection

The default methods allow for connecting objects displayed on the same device. In principle, connect-gestures may be used to connect any two objects displayed on the same window object, arbitrary nested in device objects. To use this feature, the →verify method should be redefined and should set →device to the common device displaying both the origin and target objects (this can be the window). The ←pointed method should be redefined to find graphicals under the pointer that can be used to connect to. The methods ‘device ←find’ and ‘device ←pointed’ are often useful to implement the ←pointed.

See also class handle, class connection, class link, ‘graphical →connect’. The PceDraw demo illustrates the use of connections.

User interface

On a down event (of the appropriate button with the appropriate modifiers), the gesture will indicate the possible connection-points of the graphical with the from-side of the link using small markers. If the down occurs close to one specific handle, the gesture assumes this is the only handle the user wants to connect to. On termination, the from-side of the connection will be fixed to this handle. Otherwise all handles of the appropriate kind are indicated. In this case the connection will not be fixed and moving or resizing one of the objects may reconnect the connection to a visually more attractive handle.

On each subsequent drag event, the gesture will indicate valid ‘to-handles’ if they exist.

When the gesture is terminated after an up event, the appropriate connection is created.

Instance Variables

context

device ↔ device* Device used for feedback

feedback

from indicators  ← chain  Chain of bitmaps to indicate handles
line  ← line  Line for feedback (cf. outline)
mark  ↔ image  Image used to mark handles
to indicators  ← chain  Chain of bitmaps to indicate handles

connection

from handle  ← [name]  Name of handle at from side
link  ↔ link*  Link used to connect the graphicals
to  ← graphical*  Graphical at to side (target)
to handle  ← [name]  Name of handle at to side

Behaviour

9.8.1 Oms — Object management operations

Send Method initialise button=[button name], modifier=[modifier], link=[link] Refinement of: gesture->initialise Create a connect gesture object from the button it should operate on, possible modifier keys and the link object to use for the connection. This link object is used to determine the valid handle objects for the connection object to be created as well as the attributes of the ←line used for feedback.

9.8.2 Context — Context I belong too, I am executed in

Variable device device* (↔)

The ←from indicators and ←to indicators are displayed on this device. Also, the recognisers looks for possible graphicals to connect too on this device. May be changed in a redefined →initiate to any device in the same window that displays the receiving graphical.

9.8.3 Execute — Execution of dialog objects

Send Method connect from=graphical, to=graphical, link=link,

from handle=[name], to handle=[name] This method is called from →terminate. It’s responsibility is to create the actual connection object. The default implementation is to invoke ‘graphical →connect’ with the corresponding arguments. This method may be redefined.

9.8.4 Feedback — Feedback for event-handling

Variable from indicators chain (←) Variable to indicators chain (←)

Chain of bitmaps used to indicate the connection-points at the from-side. Used internally. These bitmaps are copies of the ←mark slot of the gesture.

Send Method indicate at=graphical, near=event, handle kind=name,

indicators=chain, variable={to handle,from handle} If there are any possible handle objects within 10 pixels of the pointer, indicate the closest using →indicate handle.and fill the given variable (←to handle or ←from handle) with the name of the closest handle.

Else if there are any pointer handle objects anywhere on the graphical under the pointer, indicate them. Fill the given variable with @default.

Send Method indicate handle at=graphical, handle=name, indicators=chain Indicate the position of the named handle using a free indicator bitmap from the given list of indicators. Whether or not an indicators is ‘free’ is determined by the ‘bitmap ←name’ of the indicator: ‘unused’ or ‘used’. Used by →indicate.

Variable line line (←)

Line used for feedback during dragging. It is a dotted line with otherwise the same characteristics as the line associated with ↔link of the gesture.

Variable mark image (↔) [Pce.ConnectGesture.mark: @mark handle image] Image object used to mark possible connection-points. This image is used by the bitmaps in the ←from indicators and ←to indicators chains. See also →indicated

9.8.5 Connection — Line connection graphicals

Variable from handle [name] (←)

Name of the handle at the ‘from’ side that has to be used for the connection. @default if there are more valid candidate handles, the name of the only candidate otherwise. Set by →initiate.

Variable link link* (↔)

Link from which the gesture will create a connection on success. If the user wants the gesture to get the link from the current context, the →verify method should be redefined to set the appropriate link value.

Variable to graphical* (←)

Graphical to which the connection is made. Set by →drag and passed to →connect by →terminate.

Variable to handle [name] (←)

Name of the handle at the to-side if there is only one candidate. @default otherwise.

9.8.6 Event — Event processing

Send Method drag event=event Refinement of: gesture->drag Updates the ←end of the ←line. Next searches for graphicals on ←device that overlap with the pointer and have suitable handles. When found, invokes →indicate to provide visual feedback to the user on the matching handles.

Send Method initiate event=event Refinement of: gesture->initiate Set’s up the connect gesture. This consist of the following steps:

1. Prepare the ←line using:

        a) `line →copy' using the line of the ←link.
        b) `line →texture: dotted'
        c) `line →points with the ←x and ←y of the event

2. Display the line on ←device

3. →indicate the handle objects on the receiving graphicals.

Get Method pointed event=event ⇒chain Return a chain object holding candidate graphical objects to connect with. The default method returns all graphicals overlapping with the event object on ←device, computed using ‘device ←pointed objects’. May be redefined.

Send Method terminate event=event Refinement of: gesture->terminate Invokes →drag. Next removes the ←line and the indicator bitmaps from the ←device and finally invokes →connect using the following arguments:

‘@event←receiver’ The ‘from’ graphical
←to  The ‘to’ graphical
←link  The ←link
←from handle  Handle name at the ‘from’ side
←to handle  Handle name at the ‘to’ side

Send Method verify event=event Refinement of: gesture->verify Fails if either the receiving graphical object has no ‘graphical ←device’ or ←link equals @nil.

Otherwise assigns ←device to the ‘graphical ←device’ and succeed.

9.9 Class popup gesture — Gesture to display a popup menu

Inheritance: ⇒ popup gesture ⇒ gesture ⇒ recogniser ⇒ object

A ‘popup gesture’ is used to show a popup object. It ‘event →posts’ all incoming events to the popup-menu and requests the popup to execute the selected command after the user releases the button that caused the gesture to activate the popup.

Many classes define methods for associating popup objects using the method ‘graphical →popup’ or a redefinition thereof. Direct use of instances of this class is often not necessary.

Instance Variables

context

context ↔ any Context to be send with the →execute

popup

current  - popup*  Currently visible popup
popup  ↔ popup|function*  Popup displayed

Behaviour

9.9.1 Oms — Object management operations

Send Method initialise popup=[popup|function], button=[button name],

modifier=[modifier] Refinement of: gesture->initialise Create from popup object, button name and modifier. By default is a popup associated to the right button. Note that the popup argument may be a function. See ←popup.

9.9.2 Context — Context I belong too, I am executed in

Variable context any (↔)

The argument for which the popup is ran. Normally this is the receiving graphical object. However, it is possible to rebind the context in the →initiate method. For example, class list browser sets the ←context to the dict item object under the pointer.

See also →terminate.

9.9.3 Popup — Associating (Popup) menus

Variable current popup* (-)

Currently visible popup

Variable popup popup|function* (↔)

Popup displayed by the gesture. If is a function object, it is evaluated by →verify using the following arguments:

@arg1 ‘event ←master’ (normally receiving graphical)
@arg2 The event (normally @event)

The slot -current is filled with the result.

9.9.4 Event — Event processing

Send Method drag event=event Refinement of: gesture->drag Drag just passes incoming drag-events to the displayed popup menu.

Send Method initiate event=event Refinement of: gesture->initiate Initiate performs the following actions:

• ‘popup →update: Context’ Allow the popup to change it’s menu items before it is shown.

• ‘popup →open: Receiver, Position’ Actually display the popup. The receiver passed is the receiver of the event, the position is the position of the event, relative to the receiver.

• ‘event →post: Popup’ Post the event to the popup

Send Method terminate event=event Refinement of: gesture->terminate The terminate method performs the following:

• Set the ←context and -current variables to @nil

• ‘event →post’ to the -current popup menu

• ‘popup →execute’ the menu, providing the context

Send Method verify event=event Refinement of: gesture->verify Verify tries to find the popup-menu to be displayed and sets the -context attribute of the popup gesture to the event-receiver if it is not set to @nil.

If the ↔popup attribute of the gesture is set, this popup menu is used. If it is a function object, the function is evaluated. See ←popup.

Otherwise, the ‘event ←master’ is requested a popup with ←popup.

After finding a popup object, this object is sent ‘popup →update’ to update its menu items. If, after ‘popup ←active = @off’ or ‘popup ←members’ is empty, →verify fails.

9.9.5 Accelerator — Binding the keyboard

Send Method event event=event Refinement of: gesture->event First runs ‘gesture →event’. When not successful and the event is a keyboard event, ‘popup →key’ will be invoked with the key description. This facility makes keyboard accelerators associated with the popup active.

9.10 Class event — PCE’s notion of a user event

Inheritance: ⇒ event ⇒ object

An event is PCE’s notion of representing some activity from the user. Such an activity may be the user pressing a key on the keyboard, a button of the mouse, changing the mouse’s location, etc.

Events are typed and their types are organised in a hierarchy. See Class event tree. Note that event-types have no relation to PCE data-types as described by class type.

Events are trapped from the X-window environment by class window. This class deals internally with low-level events such as repaint requests. All events that may be of interest to the user are transformed into PCE event objects, which are then dispatched by a graphical device object.

There are several ways to program event handling. The most common way is to use gesture objects. A gesture object parses one or a sequence of events into meaningful actions such as click, move, resize, connect, etc. Gestures may be attached to graphical objects using ‘graphical →recogniser’. When using user-defined classes, events may be parsed by redefining the ‘graphical →event’ method. Gestures are normally used to realise the event-parsing in the redefined method.

Instance Variables

name

id ← event id Id of the event (type of event)

context

receiver  ← graphical|frame  Object receiving event
window  ← window|frame  Window that generated event

position

position  - point*  Last calculated position
x  ← int  X-coordinate, relative to window
y  ← int  Y-coordinate, relative to window

classify

buttons ← int Bitmask with status of buttons

timing

time  - alien:Time  Window System Time stamp

Behaviour

9.10.1 Oms — Object management operations

Get Method convert [any] ⇒event Refinement of: object<-convert Converts the constant @default into the var object @event. This conversion function allow us to omit specifying the event if this is the current event.

Send Method initialise id=event id, origin=[window|frame], x=[int], y=[int],

button mask=[int], time=[int] Refinement of: object->initialise Create an event from the specified parameters. Events are seldom generated explicitly by the application code. All optional arguments default to their value of the last processed event. See also ‘graphical →generate event’.

9.10.2 Name — Naming objects

Variable id event id (←)

Identifier for the event. This is either a name occurring in the event-type hierarchy @event tree or an integer. The latter is used for ASCII-type events and represents the ASCII value. See also ←key.

Whether or not an event is of specified type is normally tested using →is a. Other useful classifications are realised using →is up, →is down, →is drag, →has modifier, ←click time and ←click displacement.

Get Method name ⇒event id Synonym for ←id. Backwards compatibility only.

9.10.3 Context — Context I belong too, I am executed in

Get Method display ⇒display

Display object on which the event occurred. When using only a single display, this will be @display. Computed using ‘window ←display’ on the associated ←window.

Get Method master ⇒any

The ‘master’ of an event is the ‘master’ of its ←receiver. See ‘visual ←master’ for details.

Variable receiver graphical|frame (←)

Object the graphical is currently posted to by ‘event →post’. Note that this graphical is not necessarily the object that initialy received the event. See also ←window.

Variable window window|frame (←)

Window from which the event was generated. See also ‘window →event’.

9.10.4 Forward — Execute code, forwarding context parameters

Send Method post to=graphical, recogniser=[recogniser] Send Method post to=graphical, recogniser=[recogniser]

This method is the central function for delivering events to graphical objects. This method takes care of automatically grabbing the event-focus on mouse-down events. See also class gesture.

It may also be used to forward events to other graphicals. It performs the following steps:

• Bind @event to the receiving event object

• Bind ←receiver to the argument graphical

• If the recogniser is @default, invoke ‘graphical →event’ to the argument graphical. Otherwise invoke ‘recogniser →event’ on the argument recogniser. The latter mechanism is used when a ‘window →event’ posts an event to its focus and ‘window ←focus recogniser’ is not @nil.

• If the event, nor the receiver of the event is freed and the

event is accepted and • The ←window has no ‘window ←focus’ and

• The event is a →is down event and

• graphical is displayed on ‘event ←window’ invoke ‘window →focus: graphical, @nil, @default, ←button’

9.10.5 Position — Position of objects

Get Method area position relative to=[graphical] ⇒point Returns the location of the event relative to the ‘area ←x’ and ‘area ←y’ of the argument graphical.

Note that both ←position and ←area position reuse the point object in the slot - position.

Send Method inside [graphical] Succeeds if event is in the event-sensitive area of the argument graphical (see ‘graphical →in event area’).

Always succeeds if graphical is a window.

Get Method inside sub window [display|frame|window] ⇒frame|window This method may be used to relate an event to an XPCE window. Normally ‘event←window’ refers to the window in which the event occurred. If a window has the event focus however, ‘event←window’ returns the window that has the focus rather than the window where the pointer is.

    get(Event, inside_sub_window, Frame)

will return the XPCE frame in which the event occurred.

    get(Event, inside_sub_window, Frame, Window)

will return the window in which the event occurred, where Frame is the return value of the previous call. This call returns the actual window (not the window decorator object) if the event occurred in a normal window. If the event occurred in a decoration (scroll bar object, window-label) the window decorator is returned.

This method is used by the Prolog defined class drag and drop gesture to locate the target for the drop operation which may be in another window. See $PCEHOME/prolog/lib/pce drag and drop.pl.

Get Method position relative to=[graphical|frame|display] ⇒point Position of the event relative to the given object. The argument may be any graphical object, frame object or the display provided it is displayed on the same display object as where the event occurred.

For device objects (and windows), the returned position is relative to the origin (‘device ←offset’) of the device. For other graphicals it is relative to the ‘area ←x’ and ‘area ←y’ of the graphical’s area. For a display object it is relative to the top-left corner of the display. See also ←area position.

The returned value is also stored in the -position slot.

Variable position point* (-)

This slot is initially @nil. It is filled when the event position is computed through ←position or ←area position. Subsequent calls to one of these methods will update the ‘point ←x’ and ‘point ←y’ values and return the same point object.

Get Method x relative to=[graphical|frame|display] ⇒int Variable x int (←)

X-coordinate of the event relative to ←window. Note that this position is not in the window’s coordinate system, but relative to the top-left corner of the X-widget realising the window.

Get Method y relative to=[graphical|frame|display] ⇒int Variable y int (←)

Y-coordinate of the event relative to ←window. See ←x for details.

9.10.6 Classify — Classify events

Get Method button ⇒button name Returns the name of the button to which the event is associated. The predefined button-names are left, middle and right. Fails with a warning if the event was not associated to a button.

Variable buttons int (←)

Bitmask containing various status information on the event. It is not advised to rely on the contents of the bitmask as this might change in the future.

The status of the modifier keys is normally tested using →has modifier. The type of click (single, double, triple) is requested using ←multiclick and the button for buttonrelated events using ←button.

Current definition of the mask-values

control-key  0x1
shift-key  0x2
meta-key  0x4
left-button  0x8
middle-button 0x10
right-button 0x20
single-click  0x40
double-click  0x80
triple-click  0xC0

Get Method click displacement ⇒int

Number of pixels the pointer has moved since the last down event. See also ←click time, →is up, ←multiclick and class click gesture.

Get Method click time ⇒int

Returns the time in milliseconds of this event object since the last ‘down’ event. See also ←click displacement, ←multiclick, →is up and class click gesture.

Send Method has modifier modifier=modifier Send Method has modifier modifier=modifier

Succeeds if the event satisfies the condition of the argument modifier object.

A modifier may be created by conversion from a name consisting of the letters ’s’ (shift), ’c’ (control) and ’m’ (meta). The empty name demands all modifier keys to be up. See ‘modifier ←convert’ for details.

The following tests whether the shift key of the current event is depressed (and the control- and meta-keys are not depressed).

    send(@event, has_modifier, s).

Send Method is a super=event id Succeed if the event matches the specifier. The event-specifiers are organised in a hierarchy, represented by @event tree. This method succeeds if ←id is at or below the specified node in @event hierarchy.

This test is the common way to test the identity of events. It is used by handler objects. Note that class gesture provides a more advanced mechanism to deal with mouse events.

ASCII events (←id is an integer) are organised as follows:

    ascii
        control
            0..31|127
        printable
            32..126
        meta
            128..255

The demo tool ‘Events’ displays @event-hierarchy.

Send Method is down

Succeeds if the event describes a button-down of any of the existing mouse-buttons.

Send Method is drag

Test if event is a button-drag event. A drag event is a ‘loc move’ event with one of the pointer-buttons depressed.

Send Method is up

Succeeds if the event represents a release of one of the mouse-buttons. See also →is down.

Get Method key ⇒name Key(-binding) description of event. If the event is not a keyboard event, this is the same as ←id. Otherwise it is a symbolic description of the depressed key. The keydescription is described with ‘key binding →function’.

Get Method multiclick ⇒{single,double,triple} Detect multiclick. It yields one of the names single, double or triple. Multiclick detection is based on the time interval between this button-down event and the previous and the distance between these events.

Clicking is normally handled using a click gesture object.

NOTE: When there are both recognisers for single- and double-click, both will be executed on a double click!^{1}

1 These methods should read the corresponding X-resources.

9.10.7 Calculate — Compute properties

Get Method distance to=event ⇒int Rounded integer distance between events. Both events must be in the same ←window.

9.10.8 Timing — Controlling real-time

Get Method time [event] ⇒int Variable time alien:Time (-)

Timestamp of the event in milliseconds since this PCE process was initialised. Used infrequently. See also ←multiclick.

9.11 Class modifier — Condition on shift, control and meta-keys

Inheritance: ⇒ modifier ⇒ object

A modifier object describes a condition on the modifier keys (SHIFT, CONTROL and META). Modifier objects are used to describe the modifier condition of gestures or to validate the modifier condition for some event.

Modifiers are normally not specified as an object, but as a name that is automatically converted. In

?- new(X, move_gesture(middle, c)).

‘c’ is automatically ←convert’ed into a modifier object.

Instance Variables

modifier

control  ↔ [{up,down}]  Condition on control
meta  ↔ [{up,down}]  Condition on meta
shift  ↔ [{up,down}]  Condition on shift

Behaviour

9.11.1 Oms — Object management operations

Send Method initialise shift=[{up,down}], control=[{up,down}],

meta=[{up,down}]

Send Method initialise shift=[{up,down}], control=[{up,down}],

meta=[{up,down}] Refinement of: object->initialise Create from the constraints on the shift-, control- and meta-keys. Usually, modifiers are specified using a string consisting of the characters ’s’, ’c’ and ’m’. See ←convert.

9.11.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒modifier Refinement of: object<-convert Convert a name, consisting of the characters ‘s’ (shift), ‘c’ (control) and ‘m’ (meta) to a modifier object that demands the specified keys to be depressed and the others not to be depressed.

The empty atom (”), transforms into a modifier that demands all keys not to be depressed.

This is the normal way to specify modifiers. For example, the following defines a click gesture for handling shift-click:

    new(G, click_gesture(left, 's', single,
                         message(@event?receiver,
                                 selected, @on)).

Converted modifiers are stored in the hash-table @modifiers for better performance and to exploit reuse. As a consequence, modifiers created this way should by treated read-only.

9.11.3 Modifier — Test Meta-, Shift- and Control-keys

Variable control [{up,down}] (↔) Variable meta [{up,down}] (↔) Variable shift [{up,down}] (↔)

Condition on the key:

• up Key may not be depressed

• down Key must be depressed

• @default State of key is ignored

9.12 Class event tree — Hierarchy of event types

Inheritance: ⇒ event tree ⇒ object

Class event-tree defines the inheritance hierarchy of event-types. Each node of this tree represents a specific event. The event-tree must be capable to do one operation very quick: telling from to event-type names whether the one is below the other in the tree. For this purpose the event-tree contains a has-table to find a node from an event-type.

Do not use this class directly. It’s definition is subject to change. Notably multiple inheritance is studied as a possible extension.

This class has one global predefined object associated to it: @event tree. This object can be used to examine the inheritance hierarchy of events.

See also ‘event →is a’, class event node and the ‘Events’ demo program.

Instance Variables

hierarchy

root ← event node Root node of the hierarchy

hashing

table  - hash table  Hashtable to find nodes by value

Behaviour

9.12.1 Oms — Object management operations

Send Method initialise root=[event node] Send Method initialise root=[event node]

Refinement of: object->initialise

Create from root node

9.12.2 Lookup — (Table) lookup methods

Get Method node event id=event id ⇒event node Find a node from it’s associated value

9.12.3 Hierarchy — Hierarchical structure

Variable root event node (←) Send Method root event node=event node

Root node of the hierarchy

9.12.4 Hashing — Caching information (speed up)

Variable table hash table (-)

Hash table object mapping ‘event←id’s into event node objects.

9.13 Class event node — Node in event-type hierarchy

Inheritance: ⇒ event node ⇒ object

Node in the type inheritance hierarchy. Do not use this class for other purposes as it’s definition is subject to change.

Instance Variables

value

value ← event id Value of the node

hierarchy

parent  ← event node|event tree  Direct parent of the node
sons  ← chain*  Chain of direct sons

Behaviour

9.13.1 Oms — Object management operations

Send Method initialise value=name, parent=[event node]* Send Method initialise value=name, parent=[event node]*

Refinement of: object->initialise Create from value and parent

9.13.2 Value — Related value

Variable value event id (←)

‘event ←id’ associated with this node.

9.13.3 Test — Test object properties

Send Method is a event node=event node Test if node is a subnode of argument

9.13.4 Edit — Modify object

Send Method son event node=event node Send Method son event node=event node

Add a son to the node

9.13.5 Organisation — Organisation of (graphical) objects

Get Method tree ⇒event tree The tree holding this event node

9.13.6 Hierarchy — Hierarchical structure

Variable parent event node|event tree (←)

Parent of the node. The root has the event tree object as a parent.

Variable sons chain* (←)

Chain of event node objects that represent the sons. Ordering is not defined.

9.14 Class handler — Map event to message

Inheritance: ⇒ handler ⇒ recogniser ⇒ object

A handler object is a reusable object that defines how a graphical object should respond when it is sent an event object. A handler maps an ‘event ←id’ onto an action realised .by a code object.

By default, handlers traps events anywhere on an object. Using the ←region, the handler can be active for a subregion of the object.

Instance Variables

condition

event  ← event id  Type of the event
region  ↔ [region]  Region of graphical the event must be in

action

message  ↔ code*  Code executed when event matches

Behaviour

9.14.1 Oms — Object management operations

Send Method initialise event=event id, message=code*, restrict to=[region] Refinement of: recogniser->initialise Create a handler from the event id mapped, the code it is mapped on and optionally a region to which its activation is limited. For semantics, see →event.

9.14.2 Condition — Specifying conditions

Variable event event id (←)

‘event ←id’ of the events this handler is sensitive to. When an event arrives, it is tested using ‘event →is a’, given the value of this variable.

Variable region [region] (↔)

Region of graphical the event must be in. See class region for details. Used infrequently.

9.14.3 Action — Associated action

Variable message code* (↔)

Code executed when the handler ‘fires’. Arguments:

@receiver ‘event ←master’ (normally ‘event ←receiver’).
@arg1  The event.

9.14.4 Event — Event processing

Send Method event event=event Refinement of: recogniser->event Request to process an event. This method is normally invoked from ‘graphical →event’. It will forward ←message iff ‘event →is a’ succeeds for the argument event using ←event and if no ←region is specified or the argument event is inside the ←region.

9.15 Class handler group — Collection of recognisers

Inheritance: ⇒ handler group ⇒ recogniser ⇒ object

A handler group object is a collection of recogniser objects (hence, a better name would be ‘recogniser group’; this might change). It provides a means to combine a set of recognisers, each dealing with some detailed UI behaviour into one object dealing with many UI behaviours. Handler groups may be nested. This process may be repeated to get more complex event-recognisers.

It is common practice to combine recognisers. Suppose the user interface contains a (large) number of icons that should be movable and double-click should ‘open’ the icon.. In this case a recogniser would be declared as:

    :- pce_global(@icon_recogniser, new(handler_group(
            new(move_gesture),
            new(click_gesture(left, '', double,
                              message(@receiver, open)))))).

Instance Variables

list

members  ← chain  Members of the collection

Behaviour

9.15.1 Oms — Object management operations

Send Method initialise member=recogniser ...

Refinement of: recogniser->initialise

Create from given recognisers

9.15.2 List — List operations (add, delete)

Send Method append recogniser=recogniser Append a recogniser

Send Method delete recogniser=recogniser Delete first occurrence of recogniser

Variable members chain (←)

Members of the collection

9.15.3 Event — Event processing

Send Method event event=event Refinement of: recogniser->event Process an event object. Simply invokes →event on each of the ←members until this message succeeds. If no recogniser accepts the event it fails.

9.15.4 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒recogniser Refinement of: object<- arg Return the nth element of ←members. See ‘object ← arg’.

Get Method arity ⇒int

Refinement of: object<- arity Number of elements in ←members. See ‘object ← arity’.

306 Class handler group XPCE Reference Manual

Chapter 10

Animation Primitives

Animation is not a typical application area for XPCE. The development background of the system never demanded much animation and the runtime environment (Unix/X11 with symbolic languages) is not very suitable to realise the real-time demands for animation.

For implementing animations, it is necessary to know a little about XPCE and X11 repaint strategy. In principle changes to PCE graphical objects are not immediately reflected on this display. For example, try to run the following demo:

    ?- send(new(P, picture), open),
       send(P, display, new(B, box(100, 100))),
       forall(between(0, 200, X),
          send(B, x, X)).

After a while a window with a box displayed at (200, 0) will appear on the screen. No animation ... There are two problems with this code. First of all, after ‘send(new(P, picture), open)’, a PCE window will be created and a request will be put in the communication channel to the X11 server. This channal buffers input until PCE flushes all pending output when waiting for the next event. Next PCE displays the box and moves the box in 1 pixel steps to the right. PCE however will only update the X-window when waiting for events. So, PCE will first execute the entire animation and then paint the final result when the idle loop is entered.

The method ‘graphical →flush’ forces XPCE to flush modifications to the X11 server now. So, lets try

    ?- send(new(P, picture), open),
       send(P, display, new(B, box(100, 100))),
       forall(between(0, 200, X),
          (send(B, flush),
           send(B, x, X))).

This still yields the same result as the previous try. Why? PCE now actually requests X11 to create a window after the box has been displayed on it. But the X11 server runs asynchronous from PCE. PCE continues with the animation, while the X server creates the window. When done, it will request PCE to paint the contents of the window. PCE is finished long before the X server has created the window and, PCE won’t notice the repaint request as it is not looking for events. So, we have to wait till the X-server has done its job. In this case the ‘frame ←confirm’/‘frame →return’ mechanism solves our problem:

    ?- send(new(P, picture), open),
       get(P, frame, Frame),
       send(Frame, send_method,
        send_method(mapped, vector(bool),
                if(@arg1 == @on,
                   message(Frame, return, mapped)))),
       get(Frame, confirm, _),
       send(P, display, new(B, box(100, 100))),
       forall(between(0, 200, X),
          (send(B, flush),
           send(B, x, X))).

Now, the ‘frame ←confirm’ will flush output and process events from the X-server until ‘frame →return’ is executed. Class frame calls ‘frame →mapped’ on itself when the frame is actually realised and mapped on the X-screen. This method is redefined to make the ←confirm call return. Thus, ‘frame ←confirm’ will make PCE block and processing events till the frame is opened on this display.

Relevant behaviour

This chapter describes class timer to fire messages at regular intervals. Other relevant behaviour is:

‘graphical →flush’  Repaint the graphical now
‘graphical →synchronise’ →flush and process input
‘frame ←confirm’  Process input until →return.

The ‘Kangaroo’ demo contributed by Anja van der Hulst illustrates animation.

10.1 Class timer — Generate messages at intervals

Inheritance: ⇒ timer ⇒ object

A timer is an object that -when the system is dispatching messages- generates an event at regular intervals. Timers are used to implement simulation, blinking (caret) or to wake-up the user under some (time-based) conditions.

The interval of a timer is specified as a real-number. The actual accuracy depends on the timing capabilities offered by the X-implementation on which PCE has been build.

When executing the message, no arguments are forwarded. @receiver is bound to the timer itself.

NOTE: When multiple objects are ‘animated’ at a similar speed performance will be much better if a single timer is used. The code below provides a skeleton:

    :- pce_global(@stepping, chain).
    start_stepping :-
        send(new(@stepper,
                 timer(1, message(@stepper, for_all,
                                  step))),
             start).
    step(Obj) :-
        send(@stepping, append, Obj).

Instance Variables

status

status ← {idle,repeat,once} Status of timer

action

message ↔ code* Code executed each time

time

interval ← real Interval between messages in seconds

internal

ws ref  ← alien:WsRef  Window System Reference

Behaviour

10.1.1 Oms — Object management operations

Send Method initialise interval=real, message=[code]* Refinement of: object->initialise Create a timer object from its interval and the message to execute. After creation, the timer is idle. Use →start or →status to start the timer.

Send Method unlink

Refinement of: object->unlink

Destroy X-timer

10.1.2 Status — Flags indicating current status

Send Method delay Send Method delay

Delay for ←interval. XPCE processes events while execution is suspended.

Send Method running running=bool Send Method start how=[{repeat,once}]

Send Method stop

Start/stop the timer in repeat mode.

@on, →start is equivalent to →status: repeat
@off, →stop is equivalent to →status: idle.

Variable status {idle,repeat,once} (←) Send Method status {idle,repeat,once}

Status if the timer. Its values:

idle  Timer is not running
once After →execute’ing once it will stop
repeat Timer will repeat →execute’ing

10.1.3 Action — Associated action

Send Method execute

Execute the timers ←message with the following arguments:

@receiver The timer itself.

Variable message code* (↔)

Code executed each time

10.1.4 Time — Controlling real-time

Variable interval real (←)

Send Method interval real=real Interval in seconds. Note that

• The timer is only executing if PCE is in its idle loop (see ‘display →dispatch’).

• Granularity depends on the X11 implementation (which in turn usually depends on the granularity of the timeout argument of the Unix select() call).

The interval may be changed when the timer is running. In this case it will first fire ←interval seconds from the time is was changed.

10.1.5 Internal — Private behaviour

Variable ws ref alien:WsRef (←)

Window System Reference

Chapter 11

Text Processing

This chapter describes class editor and friends. An editor is a programmable text-editor. The basic functionality is based on the widespread GNU-EMACS editor. Key sequences may be attached to methods using the key binding object. Please try the PceEmacs demo to exploit the capabilities of PCE’s text processing primitives.

PCE editors handle multiple fonts (also proportional fonts) and styles (underlined, highlighted, coloured).

Organisation

The central class of this chapter is editor. An editor is a subclass of class device (compound graphical object), consisting of a text image object for displaying the actual text, a scroll bar object for pointer-based scrolling and a text cursor object for displaying the caret. Besides this, an editor references a text buffer object. A text buffer represents a sequence of characters, low-level editing facilities and a mechanism for collecting changes and forwarding them to the related editors (a text buffer may be connected to any number of editors simultanously). Finally, an editor has a key binding object that maps key-strokes onto methods defined on the editor. See ‘editor →event’, ‘editor ←bindings’ and class key binding.

Class fragment describes a range of characters in a text buffer. Such a range may be assigned attributes using a style object. This realises multiple fonts, colours, underlined and highlighted text, etc. See also ‘editor →style’.

11.1 Class view — Window version of an editor

Inheritance: ⇒ view ⇒ window ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: editor (editor), frame (frame*), tile (tile*), decoration (window decorator*)

A view is a window-based version of an editor. It is implemented as a window that displays a single editor object and resizes this object if the window is resized. A view delegates to its editor object.

Inheritance precedes delegation in PCE’s message passing primitives. For many methods both defined on class window and class editor the method defined on class editor describes the desired behaviour. Most of the behaviour explicitly defined on class view overrules methods inherited from window and passes them explicitly to the related editor object.

Instance Variables

delegate

editor  ← editor  Editor displayed

Behaviour

11.1.1 Oms — Object management operations

Send Method initialise label=[name], size=[size], display=[display], editor=[editor] Send Method initialise label=[name], size=[size], display=[display], editor=[editor]

Refinement of: window->initialise

Create a view from the specified parameters. The size is interpreted in character units. The default is determined by the Pce.view.size resource. When no editor is specified, a default editor is created. Using a user-defined editor is useful to create window versions for subclasses of class editor. See also →editor and ←create editor.

Send Method unlink

Refinement of: window->unlink

Explicitly →free’s the related editor object, after which ‘window →unlink’ is invoked.

11.1.2 Delegate — Delegation of behaviour

Variable editor editor (←) Send Method editor editor=editor Send Method editor editor=editor

Editor object displayed by the view. A view delegates to this editor. Also, the view object is the ‘visual ←master’ of the editor. The displayed editor may be changed after the view has been created. Note that an editor may also switch from displayed text using ‘editor →text buffer’.

11.1.3 Create — Realising constraints

Get Method create editor size=[size] ⇒editor Get Method create editor size=[size] ⇒editor

Called by →initialise if no editor argument was specified. May be redefined to create a suitable editor.

11.1.4 Selection — Manipulation and query of selections

Get Method selected ⇒string

Redefines the corresponding window behaviour and calls the selection mechanism of class editor. See

‘editor ←selected’ Get selected string
‘editor ←selection’ Point object with start and end
‘editor →selection’ Specify selection start end end

Get Method selection ⇒point

Refinement of: device<-selection Overrules inheritance in favour of delegation to ‘editor ←selection’.

Send Method selection from=int, to=int Refinement of: device->selection Define the selected part of the text. The implementation on class view invokes immediately the implementation on the associated ←editor. See ‘editor→selection’.

11.1.5 Resize — Controlling and trapping resizes

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Refinement of: window->request geometry Invoked internally from ‘graphical →set’, which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Invokes →geometry to change the ←area. The indirection →request geometry ==> →geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.

11.1.6 Scroll — Controlling the ‘viewport’

Send Method normalise from=int, to=int Refinement of: window->normalise Redefine window behaviour to call:

‘editor →normalise’ Make range of characters visible
‘editor →scroll to’ Scroll to character index

Send Method scroll to int=int

Refinement of: window->scroll to Explicitly delegates to ‘editor →scroll to’.

11.1.7 Format — Formatted write (as C printf())

Send Method format char array=char array, any ...=any ... Send Method format char array=char array, any ...=any ...

Refinement of: device->format Format (as printf()) a string and insert it at the caret in the editor. See ‘editor →format’.

11.1.8 Delete — Text deletion commands

Send Method clear Send Method clear

Refinement of: device->clear

Remove all text from the editor. See ‘editor →clear’.

11.2 Class editor — EMACS look-alike text editor

Inheritance: ⇒ editor ⇒ device ⇒ graphical ⇒ visual ⇒ object

Delegation: text buffer (text buffer), margin (text margin*)

Class editor describes a graphical object that can be used to edit long textual descriptions. PCE editors have similar design and user-interface as GNU-Emacs. New functionality may added by means of class key binding.

Why a pce editor?

Many applications manipulate large text fields. For many applications, editing text is one of the most important activities. Unfortunately, there is not much of a standard as far as editors is concerned. For this reason, the best option would be to allow the user to run an editor of his/her choice. Unfortunately no good interfacing protocol is available that allows us to manage the text in the editor from inside PCE and read a considerable amount of status information from the editor.

Therefore, PCE defines it’s own editor. The basic user interface of the editor is based on the widely accepted GNU-EMACS editor and can be extended and modified to improve compatibility to other editors.

Organisation

Class editor is a subclass of ‘device’ because it is implemented as a compound graphical object, consisting of the following parts.

text image object Graphical that displays the text itself
scroll bar object  Allows you to scroll the text vertically
text cursor object Graphical that displays the caret
text margin object Optional annotation margin
text buffer object Storage and low-level manipulation

Vocabulary

The editor uses the following vocabulary:

• ←caret Current position of the ‘insertion-point’, indicated using a text cursor object. For proportional fonts, this is a triangle with a vertical line-segment. For fixed fonts, this is a static block.

• ←mark Unvisible point that, together with the ←caret, describes the REGION. Many operations work on a REGION of the entire text (deleting, formatting, etc.).

• region All characters between the ←caret and the ←mark.

• argument Many interactive operations accept a numeric argument. The numeric argument is set using one of the sequences

        \C-u digit ...
        M-<digit> ...

and reset after the completion of the next interactive command. The interpretation is command dependent, but most commands interpret the argument as ‘do this command so many times’.

Compatibility

The UI of PCE editors is based on GNU-EMACS. Many of the basic function of GNU-EMACS are available. Like GNU-EMACS, the PCE editors can be programmed. Unlike GNU-EMACS however, this is not done by programming EMACS-LISP, but by adding methods to the editor (or class editor) and linking these methods to key-strokes.

As the basic functionality is rich and can be expanded/redefined, it should not be very difficult to transform the PCE-editor into an editor that is largely compatible to most available editors.

Mouse and keyboard

PCE-editors can be operated both mouse-driven and keyboard-driven, although the latter is the principal way of manipulating a text.

Instance Variables

delegate

text buffer ← text buffer Underlying text

components

image  ← text image  Screen/redisplay management
label text  ← text*  Text object that displays the label
margin  ← text margin*  Margin for annotations
scroll bar  ← scroll bar  Scrollbar for the text
text cursor  ← text cursor  The caret

selection

selected fragment  ← fragment*  The current fragment
selection end  - alien:int  End of selection
selection origin  ← int  Where the selection started
selection start  - alien:int  Start of selection
selection unit  ↔ {character,word,line}  Multiclick processing for the selection

file

file ← file* Associated file

mode

auto newline  ↔ bool  If @on, append newline after →append
editable  ↔ bool  If @on, text may be changed by user
fill mode  ↔ bool  If @on, automatically insert newlines

appearance

font ← font Default font for the text

selected fragment style ← style

Style for the current fragment

selection style  ← [style]  Feedback for the ←selection
styles  ← sheet  Style-name to style-object mapping
tab distance  ← int  Distance between tabs

indentation

indent increment ↔ int Indent/undent amount

area

size ← size Size of editor in character units

caret

caret  ← int  0-based caret index
mark  ↔ int  0-based mark index

case

exact case ↔ bool Search/replace uses exact case

fill

left margin  ↔ int  Auto-indent margin width

right margin  ↔ int  Auto-fill margin

edit continue

focus function ↔ name* Method in focus of keystrokes

accelerator

bindings ↔ key binding key binding table

report

error message  ↔ code*  What to do with feedback/errors
modified message  ↔ code*  Forward changes to ↔modified

cache

fragment cache - alien:FragmentCache Cache to compute fragment attributes

internal

dabbrev origin  - int*  Caret index of start of target
dabbrev pos  - int*  Caret index at start of dabbrev
dabbrev reject  - chain*  Rejected alternatives
dabbrev target  - name*  Dynamic abbreviation target
internal mark  - alien:int  Additional mark for internal use
kill location  - int*  Status for handling kill commands
search base  - int  Index where last change was done
search direction  - {forward,backward}  Current direction of search
search origin  - int  Index where search started
search string  ↔ string*  Current target of search

Behaviour

11.2.1 Oms — Object management operations

Send Method initialise text=[text buffer], width=[int], height=[int], margin=[int] Send Method initialise text=[text buffer], width=[int], height=[int], margin=[int]

Refinement of: device->initialise

Create an editor object from the specified arguments. If no text buffer is specified, a default empty text buffer is used. The width and height arguments are interpreted in terms of character units.

The margin specifies the with of the text margin object attached to the right side used for annotations. The default is 0, attaching no annotation margin. See also →margin.

Send Method unlink

Refinement of: device->unlink Unlink from buffer, margin, etc.

11.2.2 Conversion — Conversion (for type checking)

Get Method convert view=view ⇒editor Refinement of: graphical<-convert Convert a view object into its ‘view ←editor’. Improves the transparency between class editor and class view.

11.2.3 Delegate — Delegation of behaviour

Variable text buffer text buffer (←) Send Method text buffer text buffer=text buffer

The ←text buffer stores the text. Class editor delegates messages not understood to the ←text buffer. A text buffer can have multiple editors operating on it simultaneously. The text buffer object associated to an editor may be changed anytime.

11.2.4 Components — Parts I’m built from

Variable image text image (←)

Text image object used for actually displaying the text. Direct access to this object may be necessary to exploit the following methods:

‘text image →tab stops’ Set vector of tab-stops
‘text image →wrap’  Control line-wrapping

Direct access may also be used to attach event-handling to the editor. For example, if a popup is attached to the editor as a whole it might contradict with the ←scroll bar. Associating the popup with the ←image ensures it only operates in the text area.

Variable label text text* (←)

Text object that displays the label. Initially @nil. A label is associated using →label. See also ↔show label.

Variable margin text margin* (←)

Margin with icons that indicate the position of fragments. See ‘fragment ←style’, and →style. When the →margin width is set to a value > 0 and there is no ←margin, a margin is created.

Variable scroll bar scroll bar (←)

Scroll bar object attached to the editor. In the current implementation it is not possible to remove the scrollbar or place it at the right-side of the editor. However, setting the ‘scroll bar →width’ to 0 before the editor is displayed effectively removes it.

Variable text cursor text cursor (←)

Visualisation of the caret. It may be displayed in various styles. See class text cursor. The default caret is a static inverting block for fixed-width fonts and a line with triangle for proportional fonts.

11.2.5 Label — Visible name of objects

Send Method label name=name Associate a label with the editor and set the string of the label. The label is displayed by ←label text. The font of the label is dictated by the resource Pce.Editor.label font.

See also ↔show label.

11.2.6 Visualisation — Making data visible

Get Method margin width ⇒int Send Method margin width pixels=int

Margin with icons that indicate the position of fragments. See ‘fragment ←style’, and →style. When the →margin width is set to a value > 0 and there is no ←margin, a margin is created.

11.2.7 Sort — Sorting sequences

Send Method sort from=[int], to=[int] Sort the lines between the indicated character indices alphabetically.

11.2.8 Read — Reading text from objects

Reading lines and words from an editor. These methods are useful for interpreting the contents of an editor. Examples may be ‘jump-to-definition’ expoiting ←word to find the name whose definition is requested. Note that class regex (regular expressions) form a much more powerful mechanism to extract content from an editor.

Get Method first line ⇒string

New string with text of first window line

Get Method line index=[int] ⇒string New string with text of the line holding index. When omitted, the line holding the ←caret is returned.

Get Method read line ⇒string

As ←line, moves caret to next line. Fails after reading the last line of text. When reading the whole buffer in this fashion, don’t forget to set →caret: 0 before starting. See also ‘file ←read line’.

Get Method word index=[int] ⇒string New string with text of current word

11.2.9 Selection — Manipulation and query of selections

Send Method copy

Copy selection

Send Method cut

Copy and delete selection

Send Method paste

Paste the clipboard value

Send Method select line line=[int], newline=[bool] Select the line with given number. Numbering lines starts at 1.

Get Method selected ⇒string

Indicates whether or not the graphical is selected. The visual feedback is determined by the resource ‘selection style’.

Variable selected fragment fragment* (←) Send Method selected fragment fragment*

Currently selected fragment. The visual appearance of this fragment is determined by ←selected fragment style. There is no default user-interface for selecting fragments. ‘text buffer ←find fragment’ and ‘text margin ←fragment’ may be useful methods for defining a user-interface.

Get Method selection ⇒point

Refinement of: device<-selection Returns a new point object whose ←x is the start of the selection and ←y is the end of the selection (not including: 50,50 represents a selection holding no characters). See also -selection start and -selection end.

Send Method selection from=[int], to=[int] Refinement of: device->selection Make characters in the range [from,to) the selection and invoke ‘Editor →normalise’ on the same range to make the selection (or as much as possible thereof) visible. If ‘to’ is equal to ‘from’, no selection is visible. See also ←selected, ←selection, ←selection start and ←selection end.

Get Method selection end ⇒int Variable selection end alien:int (-) Get Method selection start ⇒int Variable selection start alien:int (-)

Internal representation for the start/end of the selection. The selection automatically moves is the content of the editor is modified. Note that either of these variables may have the lowest index. The selection is defined to include all characters from the lowest of -selection start and -selection end up to (but not including the highest of this couple). When both variables equal there is no selection.

Send Method selection extend to=int

Extend the selection to include the specified index. This method is used when defining the selection with the pointer. This method respects -selection unit.

Variable selection origin int (←) Send Method selection origin int=int

Where the selection started

Send Method selection to cut buffer buffer=[0..9]

Copy the selection to an X-cut buffer

Variable selection unit {character,word,line} (↔)

Multiclick processing for the selection

11.2.10 Behaviour — Definition of behaviour

Send Method lost text buffer

Invoked by the associated ←text buffer if it is being freed. By default, this method will simply send →free to the editor, or its associated view object.

This method may be redefined, but should either free the editor, or associate another (new) text buffer object with the editor.

See also ‘text buffer →unlink’.

Get Method master ⇒editor|view Return the view object if ←device yields an instance of class view. Otherwise return the editor itself. Used when the editor executes a code object. See ←error message and ←modified message.

See also ‘visual ←master’.

11.2.11 File — Saving and loading files, file operations

Variable file file* (←)

File that is associated with the editor.

Send Method load file=file Load the contents of the specified file object. Performs the following steps:

→clear  Clear the editor
‘text buffer →insert file’  Insert the file contents
→file  Assign the file variable
→caret: 0  Put the caret ‘home’
‘text buffer →modified: @off’ Clear modified
‘text buffer →reset undo’  Clear undo info

Send Method save file=[file] Send Method save file=[file]

Save to ←file or named file. If no file is specified and ←file is @nil, this method fails. If the file to save in exists, a backup is created using ‘file →backup’. Next, the contents of the editor is saved into the named file. If a file was specified, ←file will be filled with the argument file.

Send Method save buffer always=[int] Save the editor to ←file if it is ←modified or the argument is not @default. If the operation succeeds, the ←modified flag is cleared. Diagnostics are reported using →report.

11.2.12 Mode — Modes of operation

Variable fill mode bool (↔) [Pce.Editor.fill mode: @off]

Send Method auto fill mode [int]

If @on, the current paragraph will be automatically reformated if the current line exceeds the ↔right margin while inserting text. →auto fill mode may be used to set ←fill mode interactively:

@default: toggle ←fill mode
> 0  →fill mode: @on
<= 0  →fill mode: @off

Variable auto newline bool (↔)

If @on, a newline is appended automatically after each →append. Backward compatibility only.

Variable editable bool (↔)

Boolean that indicates whether or not the text can be edited. If @off, a warning is generated whenever the user attempts to invoke an interactive command that would change the contents of the associated text buffer.

Non-interactive commands can still be executed.

Send Method switch case mode [int] Send Method switch case mode [int]

Determines whether or not search and replace is case-sensitive. →switch case mode sets ←exact case according to the argument:

@default toggle ←exact case
> 0  →exact case: @on
<= 0  ←exact case: @off

11.2.13 Appearance — “Look-and-feel” related aspects

Variable font font (←) [Pce.Editor.font: fixed] Send Method font font=font

Font used to display the contents of the associated text buffer. Class editor can handle both proportional and non-proportional fonts.

Variable selected fragment style style (←) Send Method selected fragment style style=style

Style for the current fragment

Variable selection style [style] (←) [Pce.Editor.selection style:

when(@colour display, style(background := yellow), style(highlight := @on))] Feedback for the ←selection

Get Method show label ⇒bool

Bool indicating if label is visible

Send Method show label show=bool

Show/unshow the label. If the editor has no ←label text, one is created. Otherwise the ↔displayed attribute of the label text is used to control the visibility of the label. The method →geometry is invoked to realise the proper layout of the components of the editor object.

Variable styles sheet (←) Send Method style fragment=name, style=style Send Method styles sheet=sheet

Mapping from style names as stored in ‘fragment ←style’ onto style objects that determine the actual appearance of a fragment. This separates semantical information represented by the fragment from visualisation as achieved in the editor.

The following skeleton illustrates this. ‘E’ is an editor. The final code fragment creates a fragment to turn the current selection into a title.

    :- pce_global(@title_style,
                  new(style(font :=
                            font(helvetica, bold, 16)))).
        ...
        send(E, style, title, @title_style),
        ...
        ...
        get(E, selection, point(Start, End)),
        Length is End - Start,
        new(F, fragment(E, Start, Length, title)),
        ...

Variable tab distance int (←) [Pce.Editor.tab distance: 8] Send Method tab distance characters=int

Distance between tab-stops in ‘font ←ex’ units of the current ←font. Mainly used for handling source-code. When →tab stops is defined the value of this variable is ignored.

Get Method tab stops ⇒vector* Send Method tab stops vector*

Set/query tab-stops at the indicated (pixel) positions. This method is commonly used to display tabular information.

11.2.14 Layout — Spatial relations between graphical objects

Send Method just one space

Replace all white-space (tab, space, not newline) surrounding the caret by a single space.

11.2.15 Indentation — Create/analyse text indentation

Send Method align column=int, index=[int] Insert/delete spaces and tab characters such that the character at ‘index’ [←caret] will have ←indentation ‘column’. When layout characters are deleted, at least a single space remains.

Useful for realising automatic indentation and alignment of comments in syntax driven editors.

Send Method align line column=[int] Align the line holding the caret such that the first non-layout character is at the indicated column. When columns is omitted, ←left margin is used. See also →align, align region and →indent line.

Send Method align region column=[int] Apply →align line to all lines in the current region (mark, caret).

Variable indent increment int (↔) [Pce.Editor.indent increment: 2] Number of characters with which the indentation is incremented/decremented by the indentation-manipulation commands.

This group of commands is intended for editing source-code.

Send Method indent line [int] Send Method indent region [int] Send Method indent selection [int] Send Method undent line [int] Send Method undent region [int] Send Method undent selection [int]

Increase (undent: decrease) the indentation of the current line by ‘arg’ times ←indent increment. This group of methods is compatible to the Dope editor and allows for manipulating the indentation when editing source-code. See also →align line.

Get Method indentation index=[int], skip=[regex] ⇒int Column for first non-blank character of line holding index. The default index is ←caret. If regex is specified, ‘regex →match’ is executed from the start of the line and the column for the end of the match is returned. If the regex does not match at all, 0 is returned.

This method is commonly used in combination with →align for language dependent automatic indentation and alignment.

Send Method newline and indent [int]

Start a new line and copy the indentation from the previous line. The argument defines the number of lines inserted.

11.2.16 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Send Method geometry x=[int], y=[int], width=[int], height=[int]

Refinement of: device->geometry Handle geometry requests to the editor. Properly resizes and positions the ←scroll bar, ←image and ←margin. The minimum size is defined to be 50x20 pixels.

Send Method request geometry x=[int], y=[int], width=[int], height=[int] Refinement of: graphical->request geometry Invoked internally from ‘graphical →set’, which in turn is invoked by all the methods that manipulate the geometry of graphical objects. The parameters are the requested X-, Y-, W and H values for the graphical. Values that need not be changed are passed as @default.

Invokes →geometry to change the ←area. The indirection →request geometry ==> →geometry may be redefined when a graphical is constrained by some other object. For example, class window exploits this mechanism to let windows communicate with their tile object.

11.2.17 Area — Handling size and position

Send Method size pixels=size Send Method size pixels=size

Set size in pixels (trap window resize)

Get Method height ⇒int

Refinement of: graphical<-height Height in pixels. Note that for some graphicals this value may be negative, indication the top-side is above rather than below the y-position.

Get Method size ⇒size

Variable size size (←) [Pce.Editor.size: size(40,20)]

Get Method width ⇒int

Refinement of: graphical<-size Size management of class editor has been redefined to communicate in character units rather then in pixel units. Width is expressed in ‘font ←ex’ of the current ←font., height in ‘font ←height’.

The methods → size, →area and →set may still be used to handle the pixel size directly.

11.2.18 Scroll — Controlling the ‘viewport’

Send Method bubble scroll bar scroll bar=scroll bar Send Method bubble scroll bar scroll bar=scroll bar

Update bubble of given scroll bar object

Get Method first ⇒int

Line-number (1-based) of the first line on the window

Get Method length ⇒int

Get Method start [int] ⇒int

Get Method view ⇒int

Send Method scroll vertical direction={forwards,backwards,goto},

unit={file,page,line}, amount=int The methods ←length, ←start and ←view are used by the related scroll bar object to determine the visible part of the text. The method →scroll vertical is called from the ←scroll bar.

Send Method line to top of window [int]

Scroll such that the current line is the nth (1 based, default = 1) line of the window. See also →normalise.

Get Method lines visible ⇒point

New point with first and last visible line

Send Method normalise from=[int], to=[int] Refinement of: graphical->normalise Try to make the range [from,to) visible. If this range is too big to fit on a screenful, the line on which ‘from’ resides will be the first line displayed. See also →line to top of window and →recenter.

Send Method recenter [int]

Same as →line to top of window, but centers the current line on the window rather than making it the first line.

Send Method scroll down [int] Send Method scroll one line down [int] Send Method scroll one line up [int] Send Method scroll up [int]

Scroll forwards or backwards by the specified number of lines. For the ‘one line’ versions of this method, the default is to scroll a single line. For →scroll up/→scroll down the default is a screenful minus a line.

Send Method scroll to index=[int] Set start of window to index (character based). Index should be the start of a physical line, though this is not actively enforced. See ‘text buffer ←scan’.

Send Method show scroll bar show=[bool], which=[scroll bar] Send Method show scroll bar show=[bool], which=[scroll bar]

Control visibility of the ←scroll bar

11.2.19 Caret — Moving the insertion point

Send Method backward char [int] Send Method backward paragraph [int] Send Method backward sentence [int] Send Method backward term [int] Send Method backward word [int]

Move the caret the ‘times’ the indicated unit backwards. The definition of words, sentences and paragraphs depends on the syntax table object associate to the ←text buffer. See also ‘text buffer ←scan’.

Send Method beginning of line [int]

Move lines backward, default is to the start of the current line.

Variable caret int (←) Variable mark int (↔) Send Method caret index=[int] Send Method caret index=[int]

The ←caret is the current ‘insertion’ point. In ranges from 0 up to and including ←size. Zero implies ‘insert at the beginning’; ←size implies ‘append at the end’.

The method →caret is invoked explicitly from all internal methods that manipulate the caret and this method may thus be redefined to keep track of the users caret-movements.

The ←mark is a mark that moves with inserts and -together with the ←caret, defines the region.

Get Method column index=[int] ⇒int Send Method column column=int

Determine the column for ‘index’. Interprets ←tab stops. When set, the ←caret is moved as close as possible to the indicated column. See also →align.

Send Method end of line [int]

Move lines forward

Send Method exchange point and mark

Exchange the location of ←mark with ←caret. Note that commands operating on the region (the text between the two) do not care which of the two has the lowest index.

Send Method forward char [int] Send Method forward paragraph [int] Send Method forward sentence [int] Send Method forward term [int] Send Method forward word [int]

Move the caret the ‘times’ the indicated unit forwards. The definition of words, sentences and paragraphs depends on the syntax table object associate to the ←text buffer. See also ‘text buffer ←scan’.

Send Method next line lines=[int], column=[int] Move lines downward; place caret at column. If columns is omitted, ←column is used. Normally the column is maintained by class key binding.

Send Method point to bottom of file [int] Send Method point to bottom of window [int]

Place the caret at the nth-line from the end of the file/window. Without an argument, the caret is placed at the end of the file/window.

Send Method point to mark

Move ←caret to the ←mark. In most cases →exchange point and mark is to be preferred. See also →set mark.

Send Method point to top of file [int] Send Method point to top of window [int]

Move caret to the nth-line from the top of the file/window. Default is the start of the file/window. See also →line number.

Send Method previous line lines=[int], column=[int] Move lines upward; place caret at column

Send Method set mark [int]

Set ←mark at ←caret. Commonly used to start defining a region.

11.2.20 Search — Finding plain text, regex or objects

The methods of this sections are ‘ready-to-go’ methods for interactive usage. Related methods are ‘text buffer ←find’ and ‘regex →search’.

Send Method find cut buffer [int]

Find the value of the indicated ‘display ←cut buffer’ as a plain string. Respects ←exact case. If the string is found it is selected, otherwise a warning is →report’ed.

Send Method isearch backward Send Method isearch forward

Start an incremental search. The editor will search for the typed plain text (respecting ←exact case) and indicate the first ‘hit’ using the selection on each subsequent letter typed by the user. While searching, the following keys have special meaning:

keyboard quit  Abort and revert to where search started

isearch backward

isearch forward  Revert direction or search for next
backward delete char Remove the last character from the target
ESCAPE  Terminate search
\C-w  Extend target to current word

11.2.21 Format — Formatted write (as C printf())

Send Method appendf format=char array, argument=any ...

Formatted append (see ‘string →format’)

Send Method format format=char array, argument=any ...

Refinement of: device->format When not @nil, the positions of the graphicals displayed on the device is computed using the attached format.

If a device has a ←format, graphicals cannot be moved any more. Also, the position argument of →display is simply ignored.

11.2.22 Insert — Text insertion commands

Send Method append text=char array Send Method append text=char array Send Method print text=string

Append the specified text. If ←left margin is not zero, →align the last line to ←left margin. Then append the text. If ←auto newline is @on, append a newline too. Set the →caret at the end of the buffer.

→print →insert’s the text at the ←caret, followed by a newline character if ←auto newline equals @on.^{1}

Send Method insert text=char array Insert the given text at the caret and move the caret to point just after the inserted text.

Send Method insert cut buffer [int]

Insert the text from the ‘display ←cut buffer’. Move caret to the end.

Send Method insert quoted times=[int], character=[char] Insert typed character n times (no fill)

Send Method insert self times=[int], character=[char] Send Method insert self fill times=[int], character=[char]

Insert the argument character ‘times’ times. The →insert self fill version will →fill the remainder of the paragraph if -after the insertion-, the text extends the ←right margin. →insert calls →insert self fill if ←auto fill mode equals @on.

Send Method newline [int] Send Method open line [int]

Insert ‘times’ newline characters. →newline inserts before the caret, →open line after the caret, so the caret remains at the same line.

Send Method typed event id=event id Refinement of: device->typed Normally called from →event to handle typing. Handles ←focus function and/or invokes ‘key binding →typed’ on ←bindings.

Send Method yank [int] Send Method yank [int]

Insert the text from the nth (default 0) ‘vector ←element’ of @text kill ring. Text is inserted in the kill-ring using →kill or →grab.

11.2.23 Delete — Text deletion commands

The editor knows about two types of deletion: if text is just deleted, it may only be recovered using →undo. If it is killed it will be placed in the kill-ring and may be →yank’ed back. All deletion commands that actually kill have the string ‘kill’ in their name.

1 Messy. New code should use the →align and →format methods.

Send Method backward delete char [int] Send Method delete char [int]

Delete characters from the caret. By default deletes a single character.

Send Method backward kill word [int] Send Method kill line [int] Send Method kill paragraph [int] Send Method kill sentence [int] Send Method kill term [int] Send Method kill word [int]

Kill the specified (default 1) number of units in the specified direction. See →kill and →yank for details on killing and yanking (cut/copy) text.

Send Method clear

Refinement of: device->clear Remove all text and fragments using ‘text buffer →clear’. Deletes the selection and sets the ←caret to 0.

Send Method cut or delete char [int]

Cut selection or delete characters forward

Send Method delete from=int, to=int Send Method grab from=int, to=int Send Method kill from=int, to=int

Each of the commands →delete, →grab and →kill operate on characters in the range [from, to) (i.e. ‘to’ minus ‘from’ characters). If ‘to’ < ‘from’, the arguments are first swapped. The commands may or may not delete the range and may or may not add the deleted text to the kill-buffer @text kill ring:

→delete Just deletes the text
→kill  →delete and add the deleted text to the kill ring
→grab Add the text to the kill-ring without deleting it.

See also @text kill ring and →yank.

Send Method delete blank lines

Delete all white lines around ←caret, leaving a single newline. See also →delete horizontal space and →just one space.

Send Method delete horizontal space [int]

Delete all white space (no newlines) around caret and reinsert the specified number of spaces. Default is to insert 0 spaces. See also →just one space.

Send Method delete selection

Delete the selection

Send Method kill or grab region [int]

Without an argument, →kill the current region. Otherwise →grab the region.

11.2.24 Transpose — Transposition of text

Send Method gosmacs transpose

Transpose characters compatible to the GosMacs editor: transposes the character before the caret with the one before that one. The advantage lies in correcting character transposition typos. Using →gosmacs transpose this requires a single keystroke. Using →transpose chars this requires 3 keystrokes.

Send Method transpose chars Send Method transpose lines Send Method transpose terms Send Method transpose word

Transpose the unit before the caret with the one after the caret. The exact definition of the unit depends on the syntax table object associated to the ←text buffer

11.2.25 Case — Case (UPPER/lower) translation

Send Method capitalise previous word [int] Send Method downcase previous word [int] Send Method upcase previous word [int]

Similar to the →capitalise word/→upcase word and →downcase word group, but affects the word before rather than after the ←caret. Saves keystrokes when used to correct typos while entering text.

Send Method capitalise region Send Method downcase region

Map all characters in the region [←mark ... ←caret) to the specified case. →capitalise region will map any first letter of a word to uppercase and any other letter to lowercase.

Send Method capitalise word [int] Send Method downcase word [int] Send Method upcase word [int]

Change the case of the word, starting at the first letter scanning forwards from the ←caret up to the end of this word. →capitalise word maps the first letter to uppercase and the remainder to lowercase.

Variable exact case bool (↔) [Pce.Editor.exact case: @on] Determines whether or not search and replace is case-sensitive. →switch case mode sets ←exact case according to the argument:

@default toggle ←exact case
> 0  →exact case: @on
<= 0  ←exact case: @off

Send Method toggle char case

Toggle case of character before caret

Send Method upcase region

Put region in uppercase

11.2.26 Fill — Breaking (long) text into lines

Send Method fill from=int, to=int, left margin=[int], right margin=[int],

justify=[bool] Fill paragraphs in the range [from, to). The specified margins default to ←left margin and ←right margin. If ‘justify’ equals @on, →fill inserts spaces such that the right margin will be straight.^{2}

Send Method fill paragraph Send Method fill region Send Method fill selection

Frontend methods to →fill the specified text. The margins default to ←left margin and ←right margin.

Send Method justify paragraph Send Method justify region

Front-end to →fill the specified unit of text. The ‘justify’ argument of →fill is set to @on, creating a straight right margin.

Variable left margin int (↔)

Variable right margin int (↔) [Pce.Editor.right margin: 72]

Send Method set fill column [int]

Margins used for filling text. See →fill, →justify paragraph, →fill mode, etc. The method →set fill column may be used to set both methods interactively (Dope compatibility):

@default Report current margins
> 0  Set →right margin
< 0  Set →left margin to the absolute value.

11.2.27 Undo — Undoing (edit) operations

Send Method undo

Undo the last interactively given command. Marking the undo-log is achieved by →event.

11.2.28 EditContinue — Temporary re-binding keys

The methods in this group are the ‘continue’ methods for the methods with the same name except for the leading ‘ ’. See also ←focus function.

Send Method dabbrev expand event id=event id Send Method isearch event id=event id Send Method start isearch event id=event id

Focus function

Variable focus function name* (↔)

The ↔focus function variable is used to process commands that start a kind of ‘submode’, such as entering a numeric argument, doing incremental search, doing a dabbrev expansion, etc.

2 Only works properly with fixed-width fonts, An interactive behaviour that uses such a sub-loop sets this variable to the selector that handles the loop. As a consequence, →typed will invoke this method on each subsequent character typed until

1. The method fails. In this case the character is handled just as if no focus function was defined.

2. The method resets ↔focus function to @nil.

If the method invoked via ↔focus function succeeds, →typed assumes the character is handled.

By convention, the method that is invoked by the focus function has the same name than the method that set the focus preceded by an underscore:

    quoted_insert →
        _quoted_insert

11.2.29 Event — Event processing

Send Method wants keyboard focus

Refinement of: graphical-> wants keyboard focus Test if graphicals wants keyboard events (fail). Used by ‘device →advance’ and redefined by various sub-classes.

Send Method event event=event Refinement of: device->event Process an event:

1. Succeed if ‘device →event’ succeeds. This allows for redefining event-handling on any of the parts of the editor.

2. If the event is a keyboard event, invoke →typed.

3. If the event is an area event, update the ‘text cursor→active’ status.

4. If the recogniser object @editor recogniser exists, invoke ‘recogniser →event’ to this object and return the result thereof.

5. If the event is a button event manipulate the selection and/or the caret. The following resources apply:

Pce.editor.select modifier Modifier for the selection
Pce.editor.caret modifier Modifier for the caret

By default, the selection is manipulated while the shift key is held down and the caret when no modifier-key is down.

11.2.30 Accelerator — Binding the keyboard

Variable bindings key binding (↔)

Key binding object used to map typing onto methods defined on the editor. It is filled with an empty key binding object that has ‘key binding ←defaults’ bound to the built-in key binding object named ‘editor’. This implies that bindings created using →key binding are local to the editor.

Get Method key binding key=name|event id ⇒name|code Send Method key binding key=name, action=name|code

Add a new binding to ←bindings using ‘key binding →function’ to this object. The key binding remains local to the receiving editor. The method ←key binding requests the current binding (local or global) using ‘key binding ←function’.

11.2.31 Line — Line oriented operations

The commands of this section deal with manipulating lines. They originate from the days that a browser was implemented on top of a view (editor). As they may be useful when handling line-numbered reports from compilers, etc. they will be retained.

The first line is always numbered 1.

Send Method delete line line=int

Delete given line number

Get Method line number index=[int] ⇒int Line number point is at

Send Method line number line=int

Position the caret at the start of nth (1-based) line.

Send Method replace line text=char array Replace given line number by string

11.2.32 Complete — Automatic completion of textual constants

Send Method dabbrev expand

Expand the word before the caret. This is achieved by scanning the current buffer backwards for words that start the same way as the partial current word. Successive execution of this method will try alternative completions.

11.2.33 Report — Reporting events, status and errors

Send Method electric caret index=int, seconds=[real] Temporary display the caret at the indicated position. The caret is restored to the insertion-point after the indicated time (in seconds) or after the user has typed in the editor.

This method may be used to indicate a related position. For example if the user types a closing-bracket this method may be used to indicate the matching opening bracket.

Variable error message code* (↔)

When an error is trapped in a method, it is reported to the editor using →report. When defined, →report will execute this message with arguments given below:

@receiver: The editor (or view)
@arg1  idem
@arg2  The type (status/warning/inform/error)
@arg3  String representing the message itself

See ‘visual →report’ for a general discussion on the reporting system.

Variable modified message code* (↔)

When the value of the ↔modified attribute of the associated text buffer changes and this message is not @nil, this message is executed with the following arguments:

@receiver Editor or view
@arg1  New value of ↔modified

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ... Refinement of: visual->report If ←error message is not @nil, execute it using the following arguments:

@receiver The ←master of the editor
@arg1  The editor
@arg2  the ‘kind’
@arg3  The message

See ‘visual →report’ for a discussion on the reporting mechanism.

Send Method show caret at index=[int]

Display the caret at the indicated location without moving the insertion-point. The indicated position must be inside the visible range of the editor (see ←start and ←view). This method is used by →electric caret..

Send Method show matching bracket index=[int]

Indicate the bracket matching the bracket at index (default ←caret) using →electric caret.

Send Method undefined

Warn binding is not defined

11.2.34 Organisation — Organisation of (graphical) objects

Get Method contains ⇒visual

Refinement of: device<-contains Fails (hiding the internal structure of the editor for the visual hierarchy).

11.2.35 DialogItem — Dialog Item placement for graphicals

Send Method reference point=point Refinement of: device->reference Move the reference-point (offset) of the device to be at point, but move the member graphicals the same amount in the other direction, such that they remain displayed at the same position.

The default reference point is the top-left corner of the bounding box of all the member graphicals.

11.2.36 Reset — Aborting execution

Send Method keyboard quit

Cancel current operation

11.2.37 Repaint — Behaviour dealing with repaint

Send Method changed fragment list

Notify change in text buffers fragment list

Send Method changed region int=int, int=int Send Method changed region int=int, int=int

Notify change (start, length)

Send Method insert editor int=int, int=int Send Method insert editor int=int, int=int

Notify insert (start, length)

Send Method redraw area area=area

Refinement of: device-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Send Method compute Send Method compute

Refinement of: device->compute Invoke ‘text image →compute’. Next verifies that the ←caret is in the window and moves the window if necessary. Finally update the ←text cursor, ←margin and ←scroll bar.

11.2.38 Cache — Caching information (speed up)

Variable fragment cache alien:FragmentCache (-)

Cache to compute fragment attributes

11.2.39 Internal — Private behaviour

Get Method fetch function ⇒alien:FetchFunction Get Method fetch function ⇒alien:FetchFunction

Pointer to C-function to fetch char

Get Method margin function ⇒alien:MarginFunction Get Method margin function ⇒alien:MarginFunction

Pointer to C-function to fetch margins

Get Method rewind function ⇒alien:RewindFunction Get Method rewind function ⇒alien:RewindFunction

Pointer to C-function to rewind object

Get Method scan function ⇒alien:ScanFunction Get Method scan function ⇒alien:ScanFunction

Pointer to C-function to scan for char-type

Get Method seek function ⇒alien:SeekFunction Get Method seek function ⇒alien:SeekFunction

Pointer to C-function to seek to position

Variable dabbrev origin int* (-)

Caret index for the beginning of the word on which dynamic expansion was started.

Variable dabbrev pos int* (-)

Caret index at which the dynamic expansion was initiated. The string expanded ranges from ‘dabbrev origin’ to ‘dabbrev pos’.

Variable dabbrev reject chain* (-)

Chain of names of expansion alternatives already rejected by the user.

Variable dabbrev target name* (-)

Name, representing the start of the word to be expanded.

Variable internal mark alien:int (-)

Additional (floating) mark, used by some internal functions.

Variable kill location int* (-)

Status for handling kill commands

Variable search base int (-)

Character index from which the last search was started.

Variable search direction {forward,backward} (-)

Current direction of the search. Set by →isearch forward and →isearch backward to resp. ‘forward’ and ‘backward’.

Variable search origin int (-)

Place where the search was initiated. Set by →isearch forward and →isearch backward. Used to return when the search is canceled.

Variable search string string* (↔)

Current target string for incremental search.

11.3 Class text buffer — Editable text with fragments

Inheritance: ⇒ text buffer ⇒ object

A text buffer forms the storage component of an editor object. It represents a text, possible with fragment objects defined on it.

Class text buffer defines the primitive operations that can be done on text. The more user-oriented behaviour of an editor is defined with class editor. Among the operations are inserting text, deleting text, scanning for units such as words, lines and paragraphs, saving and loading, etc.

A text buffer maintains a changes record that supports the implementation of →undo.

A text buffer can simultaneously be visualised by any number of editor objects.

Instance Variables

cardinality

lines  - alien:int  Number of newlines in the buffer
size  - alien:int  Number of valid characters in buffer

modified

modified  ← bool  Has buffer been modified
undo buffer size  ← int  Size of the undo-buffer in characters

language

syntax ↔ syntax table Description of the used syntax

fragment

first fragment  ← fragment*  First fragment (lowest start index)
last fragment  ← fragment*  Last fragment (highest start index)

organisation

editors ← chain Editors displaying this buffer

repaint

changed end  - alien:int  End of changes since last repaint
changed start  - alien:int  Start of changes since last repaint

storage

allocated  - alien:int  Total size of buffer
buffer  - alien:char *  Actual storage bin
gap end  - alien:int  End of gap in buffer
gap start  - alien:int  Start of gap in buffer
string header  - alien:str h  Encoding description
undo buffer  - alien:UndoBuffer  Record undo information here

Behaviour

11.3.1 Oms — Object management operations

Get Method convert editor=editor ⇒text buffer Refinement of: object<-convert Translate an editor in its corresponding text buffer. Notably useful when dealing with regular expressions (class regex) and class fragment which both define various methods that accept a text buffer argument.

Send Method initialise contents=[char array] Send Method initialise contents=[char array]

Refinement of: object->initialise

Create a text buffer object. The argument defines the initial contents.

Send Method unlink

Refinement of: object->unlink Send ‘editor →lost text buffer’ to all related ←editors and return all alien resources to the system.

11.3.2 Cardinality — Number of elements, characters, ...

Get Method length ⇒int Get Method size ⇒int

Variable size alien:int (-)

Number of valid characters in the text buffer. The method ←length is available to avoid a conflict with ‘editor ↔size’.

Variable lines alien:int (-)

Number of newlines in the buffer

11.3.3 Sort — Sorting sequences

Send Method sort from=[int], to=[int] Send Method sort from=[int], to=[int]

Sort the lines between the indicated character indices alphabetically.^{1}

11.3.4 Read — Reading text from objects

Getting text from a text buffer. Note that class editor defines various other methods for this. Class regex (regular expressions) may also be considered.

Get Method character at=int ⇒char ASCII value of character at index

Get Method contents from=[int], size=[int] ⇒string Get Method sub from=[int], to=[int] ⇒string

New string holding the text in the specified interval. ←contents and ←sub only differ in the interface. ←sub is compatible to ‘string ←sub’ and the preferred interface.

11.3.5 Iterate — Run code on each element of a collection

Send Method for all fragments code=code

Iterate code over all fragments. The code object is allowed to create and/or destroy fragments associated with this text buffer object.

11.3.6 Modified — Modification of dialog and text

Send Method check point undo

Create a ‘no-change’ checkpoint in the undo buffer. If →undo reverts back to this point, ←modified will be reset to @off.

1 Not very flexible and doubtfful, whether this is the right level for implementing this method.

Send Method mark undo

Set a mark on the undo buffer if there is no mark at the ‘head’ of the undo buffer. A subsequent undo will →undo all changes back to this mark. Normally set by ‘editor →event’.

Variable modified bool (←)

Send Method modified bool=bool Indicate that the text buffer has been modified. When the contents of this variable has changed, each associated editor will forwards its ‘editor ←modified message’ with the following arguments:

@receiver ‘editor ←master’
@arg1  New value of ←modified.

Send Method reset undo

Clear the undo-buffer. Actually also deallocates the buffer. On the first modification a new buffer will be created.

Send Method undo

Undo all changes to the text buffer back to the last →undo mark. If this is a →reset undo checkpoint, reset →modified to @off. Changes are stored in a buffer of size ←undo buffer size. Changes that exhaust the resources of this buffer are lost.

Variable undo buffer size int (←) [Pce.TextBuffer.undo buffer size: 10000]

Send Method undo buffer size bytes=int

Size of the undo-buffer in characters. Larger values allow for more undo at the cost of more memory. The value 0 disables recording of undo information.

11.3.7 File — Saving and loading files, file operations

Send Method insert file at=int, data=file, times=[int] Insert the given file at the indicated position. ‘Times’ is the number of times the file is inserted and defaults to 1.

Send Method save in=file, from=[int], size=[int] Save (part-of) the text buffer’s content in the given file. The default ‘from’ is 0 and the ‘size’ will save to the end of the buffer. If both ‘from’ and ‘size’ are omitted, ←modified will be set to @off. See also ‘editor →save’ and ‘editor →save buffer’.

11.3.8 Language — Specialisation for specific languages

The methods from this group are designed first of all to define syntax-driven editors (notably automatic indentation). The demo program PceEmacs exploits these methods to implement automatic indentation for Prolog and C.

Most of these methods exploit the associated syntax table object. See ←syntax.

Send Method in comment index=int, start=[int] Send Method in string index=int, start=[int]

Succeed if the indicated index is in a comment/string statement of the target language. By default it starts scanning from the start of the buffer. If ‘start’ is specified it will start scanning from this index, assuming that the given index is not in a string or comment. See ‘syntax table →syntax’ for defining the comment syntax.

Get Method matching bracket from=int, bracket=[char] ⇒int Find index of a matching bracket. ‘From’ is the index on which to start the scan. Assume ‘from’ holds a ←character ‘bracket’. If no bracket is specified, the ←character at from is used. Specifying the bracket is useful to find the start of the bracketed environment point is in.

    start_of_compound_statement(TB, Here, Start) :-
        get(TB, matching_bracket, Here, '}', Start).

If this method traps -while scanning-, a bracket mismatch (e.g. (hello}) it will generate a mismatched bracket error. See class error and the predicate pce catch error/2.

See class syntax table for defining brackets.

This method deals with string and comment. See →in string and →in comment.

Get Method matching quote from=int, direction={forward,backward} ⇒int Find quote matching the quote at ‘from’, scanning in the indicated direction. Class syntax table defines quotes and escape sequences for quotes.

Get Method scan syntax from=[int], to=[int] ⇒name Find syntactical state of position

Get Method skip comment from=int, to=[int], skip layout=[bool] ⇒int Assume ‘from’ points to a layout character or the start of a comment. Return the first location not in a comment and not whitespace. If ‘skip layout’ is @off, just comment will be skipped. See also →in comment.

Variable syntax syntax table (↔) [Pce.TextBuffer.syntax: default] Description of the syntax. This table describes character categories, brackets, quotes, comment, sentences and paragraphs. See class syntax table and notably ‘syntax table→syntax’ for details.

Initially this slot is filled with the built-in syntax table object named ‘default’.

11.3.9 Parse — Specialisation for specific languages

Get Method scan from=int, unit={character,word,line,sentence,paragraph,term},

times=[int], return=[{start,end}] ⇒int Scan over a number of textual units. This function is used by class editor to determine the range of operations like ‘editor →forward word’, ‘editor →transpose terms’, etc. Arguments:

from Index to start scanning
unit Unit to scan for
times Number of units to skip (<0: backwards)
return start: start of unit, end: end of unit

For example,

    get(TextBuffer, scan, 200, word, 2, start, Index)

will scan two words from index 200 and return the start of the 2nd word.

The definitions of the units is determined by the associated ←syntax.

11.3.10 Edit — Modify object

Send Method append text=char array, times=[int] Append the indicated text n times at the end of the buffer. See also →insert and →format.

Send Method character at=int, character=char Change character at index to ASCII value

Send Method clear

Delete all contents (and fragments)

Send Method contents char array=char array Set the contents (deletes fragments)

Send Method delete at=int, characters=[int] Delete characters forwards from the given (0-based) index. The second argument is the number of characters to be deleted.

Send Method insert at=int, text=char array, times=[int] Insert string at index (n-times)

Send Method transpose from1=int, to1=int, from2=int, to2=int Transpose [from1, to1) with [from2, to2)

11.3.11 Search — Finding plain text, regex or objects

Get Method find from=int, for=string, times=[int], return=[{start,end}],

exact case=[bool], word=[bool] ⇒int Search for a plain string. The arguments are:

from:  Start the search from this index
for:  Search for this string
times [1]:  Return the nth occurrence
return [start]:  ‘start’: first character, ‘end’: last character
exactcase [@on]: @off: case does not matter
wordmode [@off]: @on: find whole words only

Fails silently if the requested string cannot be found.

11.3.12 Format — Formatted write (as C printf())

Send Method format format=char array, argument=any ...

→append formatted text. See ‘string →format’ for the definition of the format string and its arguments.

11.3.13 Case — Case (UPPER/lower) translation

Send Method capitalise from=int, size=int Change the case in the specified region. Each start of a word is changed to uppercase, the remainder of the word to lowercase.

Send Method downcase from=int, size=int Bring (start, length) to lowercase

Send Method upcase from=int, size=int Bring (start, length) to uppercase

11.3.14 Fragment — Text fragments

These methods allow for scanning the associated fragment objects. Fragments are created and modified using methods on class fragment itself.

Get Method find all fragments test=[code] ⇒chain Return a new chain holding all associated fragments for which code could be executed successfully. @arg1 refers to the current fragment. See also ‘chain ←find all’.

This method is commonly used to find fragments with a certain attribute overlapping the caret position:

    ....
    get(TextBuffer, find_all_fragments,
        and(message(@arg1, overlap, Caret),
            @arg1?style == active),
        Fragments),
    ...

Get Method find fragment test=code ⇒fragment First fragment that accepts code

Variable first fragment fragment* (←) Variable last fragment fragment* (←)

First/last fragment in the double-linked list of fragments. Fragments in this list are kept ordered on ‘fragment ←start’. See also ‘fragment ←next’ and ‘fragment ←previous’.

11.3.15 Line — Line oriented operations

Get Method line number index=[int] ⇒int Get line number (1-based) for character index

11.3.16 Stream — Handling objects as Prolog I/O streams

Get Method read as file from=int, size=int ⇒string Implement reading as a file

Get Method size as file ⇒int

Implement seek when using as a file

Send Method truncate as file

Send Method write as file at=[int], text=char array Implements handling a buffer as a file

11.3.17 Report — Reporting events, status and errors

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ... Refinement of: object->report Report to all associated ←editors. See ‘editor →report’ and ‘visual →report’.

11.3.18 Organisation — Organisation of (graphical) objects

Variable editors chain (←) Send Method attach editor=editor Send Method attach editor=editor Send Method detach editor=editor

Chain of editors associated to this text buffer object. Whenever the text buffer is ←modified, the editor objects in ←editors will be informed.

This variable is managed by →attach and →detach, called from ‘editor →initialise’, ‘editor →unlink’ and ‘editor →text buffer’. The methods →attach and →detach may be redefined to monitor attachments/detachments of editors. The redefinition must use →send super and may not fail.

11.3.19 Repaint — Behaviour dealing with repaint

Variable changed end alien:int (-)

End of changes since last repaint

Variable changed start alien:int (-)

Start of changes since last repaint

11.3.20 Storage — Definition of storage details

Variable allocated alien:int (-)

Total size of buffer

Variable buffer alien:char * (-)

Actual storage bin

Variable gap end alien:int (-)

End of gap in buffer

Variable gap start alien:int (-)

Start of gap in buffer Variable string header alien:str h (-)

Encoding description

Variable undo buffer alien:UndoBuffer (-)

Record undo information here

11.4 Class regex — Regular expression for string matching

Inheritance: ⇒ regex ⇒ object

Class regex implements ‘regular-expression’ handling. Regular expressions are commonly used in Unix programs (vi, sed, grep, egrep). A regular expression is a specification of a string with various wildcard mechanisms. PCE uses the GNU-project regular expression routines with GNU-EMACS syntax.

The syntax of regular expressions is described with ↔pattern.

Regular expressions may be used to search to instances of class char array (including names and strings), and class text buffer, dealing with editors.

Example

The following code searched for method references in the PCE documentation style.

    find_method_ref(TextBuffer, Access, Method) :-
        new(R, regex('\(→\|←\|↔\)\(\w+\)')),
        send(R, search, TextBuffer),
        get(R, register_value, 1, ArrowString),
        get(R, register_value, 2, MethodString),
        get(ArrowString, value, Arrow),
        get(MethodString, value, Method),
        map_arrow(Arrow, Access).
    map_arrow(→, send).
    map_arrow(←, get).
    map_arrow(↔, both).

Reusability note

A regex object holds information about the last match. This information will be overwritten on a new →match or →search.

Instance Variables

pattern

pattern ← char array Pattern to search for

registers

registers - alien:struct re registers * Registers for (sub-)matches

compilation compiled - alien:struct re pattern buffer

*

Buffer holding compiled pattern

Behaviour

11.4.1 Oms — Object management operations

Send Method initialise pattern=char array Send Method initialise pattern=char array

Refinement of: object->initialise

Create a regular expression from a pattern string. The regular expression will be →compile’d on the first call to →match or →search. After creation the pattern may be changed using →pattern.

Send Method unlink Send Method unlink

Refinement of: object->unlink Deallocate private storage

11.4.2 Conversion — Conversion (for type checking)

Get Method convert char array=char array ⇒regex Get Method convert char array=char array ⇒regex

Refinement of: object<-convert Converts char array to regex(pattern)

11.4.3 Pattern — Regular expression patterns

Get Method ignore case ⇒bool

@on if case is ignored during match

Send Method ignore case ignore=bool Ignore case differences during →search when @on.

Variable pattern char array (←) Send Method pattern pattern=char array

Pattern (regular expression) to search for. It is →compile’d on the first →search after initialisation of changes to the pattern or other parameters on which the compiled data depends.

The regex pattern is compatible to GNU-Emacs. Below is the GNU documentation of the regex pattern syntax. Note: all characters except for those listed below are taken literally. It is common to use a string as a pattern and exploit the string initialisation escape sequences to specify newline, tab and other special characters:

    ?- new(Re, regex(string('\n\n+\\(.*\n\\)+\n'))).

matches a sequence of an empty line, followed by some filled lines up to the next empty line.

Gnu regex syntax

Regular expressions have a syntax in which a few characters are special constructs and the rest are "ordinary". An ordinary character is a simple regular expression which matches that character and nothing else. The special characters are ‘$’, ‘^’, ‘.’, ‘*’, ‘+’, ‘?’, ‘[’, ‘]’ and ‘\’; no new special characters will be defined. Any other character appearing in a regular expression is ordinary, unless a ‘\’ precedes it.

For example, ‘f’ is not a special character, so it is ordinary, and therefore ‘f’ is a regular expression that matches the string ‘f’ and no other string. (It does not match the string ‘ff’.) Likewise, ‘o’ is a regular expression that matches only ‘o’.

Any two regular expressions A and B can be concatenated. The result is a regular expression which matches a string if A matches some amount of the beginning of that string and B matches the rest of the string.

As a simple example, we can concatenate the regular expressions ‘f’ and ‘o’ to get the regular expression ‘fo’, which matches only the string ‘fo’. Still trivial. To do something nontrivial, you need to use one of the special characters. Here is a list of them.

The following are definitions of character sets.

• ‘.’ (Period) is a special character that matches any single character except a newline. Using concatenation, we can make regular expressions like ‘a.b’ which matches any threecharacter string which begins with ‘a’ and ends with ‘b’.

• ‘[ ... ]’ ‘[’ begins a "character set", which is terminated by a ‘]’. In the simplest case, the characters between the two form the set. Thus, ‘[ad]’ matches either one ‘a’ or one ‘d’, and ‘[ad]*’ matches any string composed of just ‘a’s and ‘d’s (including the empty string), from which it follows that ‘c[ad]*r’ matches ‘cr’, ‘car’, ‘cdr’, ‘caddaar’, etc. Character ranges can also be included in a character set, by writing two characters with a ‘-’ between them. Thus, ‘[a-z]’ matches any lower-case letter. Ranges may be intermixed freely with individual characters, as in ‘[a-z$%.]’, which matches any lower case letter or ‘$’, ‘%’ or period. Note that the usual special characters are not special any more inside a character set. A completely different set of special characters exists inside character sets: ‘]’, ‘-’ and ‘^’. To include a ‘]’ in a character set, you must make it the first character. For example, ‘[]a]’ matches ‘]’ or ‘a’. To include a ‘-’, write ‘—’, which is a range containing only ‘-’. To include ‘^’, make it other than the first character in the set.

• ‘[^... ]’ ‘[^’ begins a "complement character set", which matches any character except the ones specified. Thus, ‘[^a-z0-9A-Z]’ matches all characters except letters and digits. ‘^’ is not special in a character set unless it is the first character. The character following the ‘^’ is treated as if it were first (‘-’ and ‘]’ are not special there). Note that a complement character set can match a newline, unless newline is mentioned as one of the characters not to match.

Constructs dealing with repetition:

• ‘*’ is not a construct by itself; it is a suffix, which means the preceding regular expression is to be repeated as many times as possible. In ‘fo*’, the ‘*’ applies to the ‘o’, so ‘fo*’ matches one ‘f’ followed by any number of ‘o’s. The case of zero ‘o’s is allowed: ‘fo*’ does match ‘f’. ‘*’ always applies to the smallest possible preceding expression. Thus, ‘fo*’ has a repeating ‘o’, not a repeating ‘fo’. The matcher processes a ‘*’ construct by matching, immediately, as many repetitions as can be found. Then it continues with the rest of the pattern. If that fails, backtracking occurs, discarding some of the matches of the ‘*’-modified construct in case that makes it possible to match the rest of the pattern. For example, matching ‘ca*ar’ against the string ‘caaar’, the ‘a*’ first tries to match all three ‘a’s; but the rest of the pattern is ‘ar’ and there is only ‘r’ left to match, so this try fails. The next alternative is for ‘a*’ to match only two ‘a’s. With this choice, the rest of the regexp matches successfully.

• ‘+’ Is a suffix character similar to ‘*’ except that it requires that the preceding expression be matched at least once. So, for example, ‘ca+r’ will match the strings ‘car’ and ‘caaaar’ but not the string ‘cr’, whereas ‘ca*r’ would match all three strings.

• ‘?’ Is a suffix character similar to ‘*’ except that it can match the preceding expression either once or not at all. For example, ‘ca?r’ will match ‘car’ or ‘cr’; nothing else.

Start- and end of line

• ‘^’ is a special character that matches the empty string, but only if at the beginning of a line in the text being matched. Otherwise it fails to match anything. Thus, ‘^foo’ matches a ‘foo’ which occurs at the beginning of a line.

• ‘$’ is similar to ‘^’ but matches only at the end of a line. Thus, ‘xx*$’ matches a string of one ‘x’ or more at the end of a line.

Escapes

• ‘\’ has two functions: it quotes the special characters (including ‘\’), and it introduces additional special constructs. Because ‘\’ quotes special characters, ‘\$’ is a regular expression which matches only ‘$’, and ‘\[’ is a regular expression which matches only ‘[’, and so on.

Note: for historical compatibility, special characters are treated as ordinary ones if they are in contexts where their special meanings make no sense. For example, ‘*foo’ treats ‘*’ as ordinary since there is no preceding expression on which the ‘*’ can act. It is poor practice to depend on this behavior; better to quote the special character anyway, regardless of where is appears.

For the most part, ‘\’ followed by any character matches only that character. However, there are several exceptions: characters which, when preceded by ‘\’, are special constructs. Such characters are always ordinary when encountered on their own. Here is a table of ‘\’ constructs.

• ‘\|’ specifies an alternative. Two regular expressions A and B with ‘\|’ in between form an expression that matches anything that either A or B will match. Thus, ‘foo\|bar’ matches either ‘foo’ or ‘bar’ but no other string. ‘\|’ applies to the largest possible surrounding expressions. Only a surrounding ‘\( ... \)’ grouping can limit the grouping power of ‘\|’. Full backtracking capability exists to handle multiple uses of ‘\|’.

Grouping and registers

• ‘\( ... \)’ is a grouping construct that serves three purposes:

1. To enclose a set of ‘\|’ alternatives for other operations. Thus, ‘\(foo\|bar\)x’ matches either ‘foox’ or ‘barx’.

2. To enclose a complicated expression for the postfix ‘*’ to operate on. Thus, ‘ba\(na\)*’ matches ‘bananana’, etc., with any (zero or more) number of ‘na’ strings.

3. To mark a matched substring for future reference.

This last application is not a consequence of the idea of a parenthetical grouping; it is a separate feature which happens to be assigned as a second meaning to the same ‘\( ... \)’ construct because there is no conflict in practice between the two meanings. Here is an explanation of this feature:

• ‘\DIGIT’ after the end of a ‘\( ... \)’ construct, the matcher remembers the beginning and end of the text matched by that construct. Then, later on in the regular expression, you can use ‘\’ followed by DIGIT to mean "match the same text matched the DIGIT’th time by the ‘\( ... \)’ construct." The strings matching the first nine ‘\( ... \)’ constructs appearing in a regular expression are assigned numbers 1 through 9 in order that the open-parentheses appear in the regular expression. ‘\1’ through ‘\9’ may be used to refer to the text matched by the corresponding ‘\( ... \)’ construct. For example, ‘\(.*\)\1’ matches any newline-free string that is composed of two identical halves. The ‘\(.*\)’ matches the first half, which may be anything, but the ‘\1’ that follows must match the same exact text.

Word boundaries

• ‘\b’ matches the empty string, provided it is at the beginning or end of a word. Thus, ‘\bfoo\b’ matches any occurrence of ‘foo’ as a separate word. ‘\bballs?\b’ matches ‘ball’ or ‘balls’ as a separate word.

• ‘\B’ matches the empty string, provided it is not at the beginning or end of a word.

• ‘\<’ matches the empty string, provided it is at the beginning of a word.

• ‘\>’ matches the empty string, provided it is at the end of a word.

Syntax-table access

• ‘\w’ matches any word-constituent character. The editor syntax table determines which characters these are.

• ‘\W’ matches any character that is not a word-constituent.

• ‘\sCODE’ matches any character whose syntax is CODE. CODE is a character which represents a syntax code: thus, ‘w’ for word constituent, ‘-’ for whitespace, ‘(’ for open-parenthesis, etc. *Ref Syntax::.

• ‘\SCODE’ matches any character whose syntax is not CODE.

Get Method quote pattern=char array ⇒string Given some string that may contain regex special characters, return a string in which all these characters are properly escaped. May be used to build a pattern from a plain text. Example:

    ?- get(regex(''), quote, '^hello*', S),
       get(S, value, T).
    S = @27463123
    T = '\^hello\*'

11.4.4 Iterate — Run code on each element of a collection

Send Method for all in=char array|text buffer|fragment, action=code, from=[int],

to=[int]

Send Method for all in=char array|text buffer|fragment, action=code, from=[int],

to=[int] Run code on each match of this regular expression in the specified text. Forwards the following arguments:

@arg1 The regex object
@arg2 The object searched in

After each successful →search, the argument code object is executed. The next →search is started at ←register end. If the regex matched an empty string and the string is still empty after executing the code object, the search is restarted at ←register end + 1 to avoid a loop.

When ‘from’ and ‘to’ are specified, the for all is ran only in the specified range.

The code executed may invoke →register value, →replace, etc. to modify the text. The following code replaces all ‘foo’ in ‘bar’ in string ‘S’:

    ?- send(regex(foo), for_all, S,
            message(@arg1, replace, @arg2, bar)).

11.4.5 Search — Finding plain text, regex or objects

Get Method match in=char array|text buffer|fragment, start=[int], end=[int] ⇒int Send Method match in=char array|text buffer|fragment, start=[int], end=[int] Send Method match in=char array|text buffer|fragment, start=[int], end=[int]

Match the regular expression’s ←pattern with the given object. The match starts at ‘start’ (default 0) and should not pass ‘end’ (default end of the object matched). The ←match variant returns the number of characters matched. For both methods, ←register start, ←register value, etc. may be used afterwards.

Get Method search in=char array|text buffer|fragment, start=[int], end=[int] ⇒int Send Method search in=char array|text buffer|fragment, start=[int], end=[int]

Search for the expression in a char array (name or string) or a text buffer. The two integers specify the range to search in as [start, end). This method succeeds if a match is found and fails otherwise. After a successful search, ←register start, ←register end and ←register value may be used to get information on the location of the match.

If ‘end’ is smaller than ‘start’, the search is executed backwards. The ←search variant returns the ←register start.

11.4.6 Registers — Regular expression registers

Get Method register end register=[0..9] ⇒int 0-based index of the end of the match or the end of some register. ‘0’ refers to the entire match; the numbers 1 to 9 to register values.

Get Method register size register=[0..9] ⇒int # characters in register or match

Get Method register start register=[0..9] ⇒int 0-based index of the start of the match or the end of some register. ‘0’ refers to the entire match; the numbers 1 to 9 to register values.

Get Method register value in=object, register=[0..9], type=[type] ⇒any Get Method register value in=object, register=[0..9], type=[type] ⇒any

New string holding the text of the entire match or one of the registers 1 to 9.

Send Method register value in=object, value=char array, register=[0..9] Send Method register value in=object, value=char array, register=[0..9] Send Method replace in=object, value=char array Send Method replace in=object, value=char array

Replace the indicated register in the object. All register indices stored in the regular expression are updated accordingly.

→replace is equivalent to →register value: Object, Value, but in addition to this method expands the special construct ’\digit’ with the text of the corresponding register value.

Get Method registers ⇒int

Number of registers in the pattern.

Variable registers alien:struct re registers * (-)

Registers for (sub-)matches

11.4.7 Textual — Textual representation

Get Method print name ⇒char array

Refinement of: object<-print name Same as ←pattern (support text item)

11.4.8 Compilation — Compiling representations

Send Method compile optimise=[bool] Send Method compile optimise=[bool]

Compile ‘↔pattern’ to a compiled representation in ‘-compiled’. Normally invoked automatically by →search when needed.

If the argument is @on, the pattern is compiled ‘optimised’, increasing compilation time, but reducing search time.

Variable compiled alien:struct re pattern buffer * (-)

Internal representation (library format) of the compiled expression.

11.5 Class fragment — Fragment (range) of a text buffer

Inheritance: ⇒ fragment ⇒ visual ⇒ object

A fragment object describes part of a text buffer object. Fragments are maintained by the text buffer they are associated with and move along with edit operations, so they keep pointing to the same text.

Fragments have been implemented to allow for annotation of textual information. Besides defining a range of characters, fragments define their visual appearance when displayed by an editor. The location of fragments in a text can be visualised by a text margin object associated with an editor object. This visualisation is done using icons (image objects).

Fragments may be used to realise multiple fonts, styles and colours in editor objects. Another use for fragments is to make fragments of the text ‘active’, e.g. allow the user to follow a link from the specified fragment (hyper-text). Finally, fragments may be used as text-markers.

The following fragment turns the selection of an editor into bold font:

    demo :-
        send(new(V, view), open),
        send(V, style, bold, style(bold := @on)),
        send(V, key_binding, '\C-b',
             message(@prolog, make_bold, V?editor)).
    make_bold(E) :-
        get(E, selection_start, Start),
        get(E, selection_end, End),
        Len is End - Start,
        new(_, fragment(E, Start, Len, bold)).

Instance Variables

list

next  - fragment*  Next in double-linked chain
previous  - fragment*  Previous in double-linked chain

appearance

style ← [name] Visual feedback: name of style in editor

dimension

length  - alien:long  Length in characters
start  - alien:long  Start index (0-based)

whole

text buffer ← text buffer Text buffer I’m a range of

internal

attributes  - alien:long  Various packed attributes

Behaviour

11.5.1 Oms — Object management operations

Send Method initialise text=text buffer, start=int, length=int, style=[name] Refinement of: object->initialise Create a fragment on the specified text buffer object. The fragment starts are ←start and is ←length (may be 0) characters long. ←style is a logical indicating the category of the fragment (e.g. title, example, glossary, refers to, ...). The visual implication of a style-name is determined using ‘editor →style’ and/or ‘list browser →style’.

Send Method unlink

Refinement of: object->unlink Unlinks the fragment from the ←text buffer and inform the possible related editors of the change.

11.5.2 Contents — Modify/query contents of object

Send Method delete from=int, length=[int] Delete range of characters

Send Method insert [int], char array=char array Insert text in the fragment. The fragment actually invokes ‘text buffer →insert’ with the properly translated arguments. If the index is @default, the text is appended to the fragment. For example, the PceEmacs shell mode uses a fragment to insert the output of the sub-process. See xpce/prolog/lib/emacs/shell mode.pl.

Get Method string ⇒string

New string with contents

Send Method string char array=char array Replace text by argument

Get Method sub start=int, end=[int] ⇒string New string with contents in range

11.5.3 List — List operations (add, delete)

Get Method next condition=[code] ⇒fragment Get Method previous condition=[code] ⇒fragment

Return the next/previous fragment of the double linked fragment list for which code succeeds. If code is omitted, these methods return the next/previous fragment of the list. While executing the condition, @arg1 is bound the candidate fragment. Execution may not alter the fragment list of the associated ←text buffer.

If no fragment can be found in the indicated direction, these methods fail.

Variable next fragment* (-) Variable previous fragment* (-)

These variables together with ‘text buffer ←first fragment’ and ‘text buffer ←last fragment’ define the double linked list of fragments that is sorted on ←start.

These methods are normally not used to analyse the available fragments. See ‘text buffer ←find all fragments’ and ‘text buffer←find fragment’ for locating fragments.

11.5.4 Compare — Comparing objects

Send Method overlap int|fragment|point Succeed if the fragment overlaps the specified index, overlaps with the specified fragment or with a range starting at ‘point ←x’ to ‘point←y’. Often used in combination with ‘text buffer←find’ to find a fragment overlapping the caret.

11.5.5 Appearance — “Look-and-feel” related aspects

Variable style [name] (←) Send Method style [name]

Logical name of the fragment. This logical name expresses the semantics of the text inside it (title, example, ...). Using ‘editor →style’ the user specifies how fragments of this style are visualised.

11.5.6 Dimension — Dimensions of (graphical) objects

Get Method end ⇒int

Send Method end int=int The ←end is defined as ←start + ←length. Modifying the ←end modifies the ←length of the fragment.

Get Method length ⇒int

Variable length alien:long (-) Send Method length int=int

Length in characters

Get Method start ⇒int

Variable start alien:long (-)

Start index (0-based)

Send Method start int=int, move end=[bool] Start index (0-based). If ‘move end’ equals @off, the end-point is not moved. Otherwise the end-point is moved by the same amount (←length is not changed).

11.5.7 Update — Update Dependant properties

Send Method does include what={start,end} Send Method include what=[{start,end,both}], include=[bool]

Define whether start and end are included. If text insertion takes place exactly on the corresponding end of the fragment, the fragment is expanded if include equals @on or left untouched if include equals @off.

‘What’ defaults to ‘both’ (include both start and end). ‘include’ defaults to @on. Initially neither of the ends is included. See also →insert.

11.5.8 Organisation — Organisation of (graphical) objects

Get Method contained in ⇒editor

Refinement of: visual<-contained in Returns the ‘parent’ visualiser. Defined at each of the various subclasses of visualiser to deal with the different implementations. All visualiser classes should define this method, except for class display which is at the root of the visualise consists-of hierarchy.

11.5.9 Whole — Managing object

Variable text buffer text buffer (←)

Text buffer I’m a range of

11.5.10 Virtual — Dummy methods on super-classes

Send Method emptied

Called if text is killed/deleted

11.5.11 Compatibility — Methods for backward compatibility

Send Method convert old slot name=name, any=any Convert start and length slots

11.5.12 Internal — Private behaviour

Variable attributes alien:long (-)

Various packed attributes

11.6 Class style — Definition of character attributes

Inheritance: ⇒ style ⇒ object

A style object describes the visual appearance of a fragment object in an editor object or dict item objects in a list browser object: font, highlighting, underlining, etc. Style objects are associated with editors using the ‘editor →style: name, style’ method. Fragments that have ‘fragment ↔style’ equal to name will be displayed according to the associated style.

The online manual uses various styles. E.g.

title Section titles in helvetica bold font
code code fragments in a fixed-width screen font
active attribute-bold for links to definitions.

An elaborate example of using editors, fragments and styles is the XPCE help browser, whose sources are in the XPCE library file pce helper.pl. A simple example is in the example ‘Multiple Fonts’.

Instance Variables

appearance

attributes  - alien:long  Character attributes
background  ↔ [colour|pixmap|elevation]  Background for the characters
colour  ↔ [colour]  Colour of the characters
font  ↔ [font]  Font of characters
icon  ↔ image*  Image for annotation margin

left margin

↔

int Left margin for wrapping (relative to current)

right margin

↔

int Right margin for wrapping (relative to current)

Behaviour

11.6.1 Oms — Object management operations

Send Method initialise icon=[image]*, font=[font], colour=[colour], highlight=[bool], underline=[bool], bold=[bool], grey=[bool], background=[colour|pixmap|elevation], hidden=[bool], left margin=[int], right margin=[int]

Send Method initialise icon=[image]*, font=[font], colour=[colour], highlight=[bool], underline=[bool], bold=[bool], grey=[bool], background=[colour|pixmap|elevation], hidden=[bool], left margin=[int], right margin=[int] Refinement of: object->initialise Create a style object from its (margin-)image, font and text-attributes. For example:

         send(Editor, style, section_header,
              style(font := @helvetica_bold_18)).

The arguments are:

→icon  Image shown in text margin object
→font  Font used to display characters
→colour  Colour for characters

→highlight  Invert text (monochrome only)
→underline  Underline text
→bold  Print bold using ‘double-strike’
→grey  Print grey (and with @grey25 image)
→background Colour/elevation for background
→hidden  If true, text is invisible
→left margin Left margin (pixels)
→right margin Right margin (pixels from right)

NOTE: this method defines a large number of arguments. It is advised to use the ‘keyword := value’ construct for specifying the arguments. The following two terms define a ‘bold’ style:

style(bold := @on)
style(@default, @default, @default, @default, @default, @on)

See also class := and ‘send method →send’.

11.6.2 Appearance — “Look-and-feel” related aspects

Variable attributes alien:long (-)

Or’ed bits for →underline, →highlight, →grey, →closed and →bold.

Variable background [colour|pixmap|elevation] (↔)

Background for the characters. If it is an instance of class elevation, the characters are placed in an elevated box. See also →colour.

Get Method bold ⇒bool Get Method grey ⇒bool Get Method highlight ⇒bool Get Method underline ⇒bool

Send Method bold bool=bool Send Method grey bool=bool

Send Method highlight bool=bool Send Method underline bool=bool

These methods set/query the appropriate field from the style -attributes slot. The attributes are:

bold  bold-face using double-strike (see also →font)
underlines underlined text.
highlight inverted background and foreground.
grey  greyed-out by and’ing with @grey50 image.
closed  text is not visible.
12

Variable colour [colour] (↔)

Colour of the characters. See also →background.

1 ↔closed is not implemented. Future versions might use this to ‘hide’ the text of a fragment

temporary. 2 Underlining is done at a fixed distance of the base-line with a fixed line thickness (1). These

parameters ought to be read from the (X-)font attributes.

Variable font [font] (↔)

Font used to display the characters of the fragment. When two fragments overlap and they do not agree on the font to be used, the font of the smallest fragment is used.

Get Method hidden ⇒bool

Send Method hidden bool=bool If a style object has →hidden: @on, the text will be made invisible. Currently this attribute is ignored if the style is used for a dict item object.

May be used to implement ‘outline’ editors or to hide control sequences.

See also class fragment and class editor.

Variable icon image* (↔)

When a style object is associated with an editor that has a text margin object attached to it, the start of fragments related to this style object is marked in the margin using this image object. See class text margin and ‘editor →margin width’.

Variable left margin int (↔) Variable right margin int (↔)

Left- and right-margins. Used by class text image (underlying class editor and class view) to control indentation and wrapping.

In combination with ‘text image →wrap: word’, the margins may be used to realise quotations and intended lists in WYSIWYG like editors.

Class text image fetches the new margins whenever it starts a new screen line.

11.7 Class key binding — Parse keyboard events

Inheritance: ⇒ key binding ⇒ recogniser ⇒ object

Class key binding is a subclass of class recogniser. It accepts keyboard events and maps them onto messages.

Class key binding deals with

• Parsing multiple key functions (see ←prefix)

• Parsing universal argument (compatible to GNU-EMACS) (see ←argument).

• Handling column-saving for next line and previous line functions. (see ←saved column).

Key binding objects are used by various classes that are sensitive to keyboard events: editor, text, text item and list browser.

Example

The following example shows how a key binding object may be used to make a graphical object editable using the mouse:

     ?- send(new(P, picture('Graphical editor')), open),
        send(P, display, new(B, box(100,100))),
        send(B, recogniser, new(K, key_binding(@nil, argument))),
        send(K, function, 'TAB',
             message(@receiver, inverted,
                     @receiver?inverted?negate)),
        send(K, function, '\C-d', free),
        send(K, function, '\C-p', pen).

Typing TAB (= control-I), the box is inverted; typing control-d will delete the graphical; typing META-3 control-p will make the pen (thickness) of the line 3. See ←argument on how to specify the universal numeric argument.

Organisation of the class

How a key binding parses a keyboard event is described with →typed; The specification of symbolic key-names is described with →function; Resolution of a binding from a symbolic key is described with←function; Predefined binding tables are described with →initialise. See also @key bindings.

Library keybinding

The PCE/Prolog library file keybinding.pl defines the predicate show key bindings/1, which dumps the key binding of objects or plain tables.

Instance Variables

name

name ← name* Name of this binding-table

default

defaults ↔ chain Chain with key bindings to inherit from

argument

argument  ← [int]  Universal (numerical) argument

caret

saved column ← int* Saved {next line,previous line} column

event

condition  ↔ code*  Activation condition
prefix  ← name  Currently parsed prefix

status - {universal argument, quoted insert}*

Internal flag

binding

bindings  ← sheet  Sheet mappings keys to functions
default function  ↔ name|code*  Default function to perform

Behaviour

11.7.1 Oms — Object management operations

Send Method initialise name=[name]*, super=key binding ... Send Method initialise name=[name]*, super=key binding ...

Refinement of: recogniser->initialise Create a key binding object from its name and default tables (see ←defaults). PCE predefines some names. If a table with a predefined name is created the table will be initialised according to this name. Tables that do not have a predefined name are initially empty.

The predefined table-name are:

• insert Assigns the function ‘insert self’ to all printable characters and the TAB, LFD and RET keys.

• argument Assigns ‘digit argument’ to \e0 ... \e9 and \e-; assigns ‘universal argument’ to \C-u.

• emacs special Assigns ‘prefix’ to \e, \C-c and \C-x; ‘keyboard quit to \C-g

• emacs page Basic emacs paging commands: \C-v; \ev; \C-l

• emacs edit basics Simple emacs editing commands

• emacs basics Simple emacs commands combined.

• emacs view basics Simple emacs commands excluding editing commands

• editor

• text

• text item

• text item view

• list browser Default binding table for the corresponding classes.

Get Method lookup name=name, key binding ... ⇒key binding Get Method lookup name=name, key binding ... ⇒key binding

Lookup existing table in @key bindings.

11.7.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒key binding Get Method convert name=name ⇒key binding

Refinement of: object<-convert Convert the name of a named (reusable) key binding object into the corresponding object. Named key binding objects are stored in the table @key bindings.

If the name cannot be found in @key bindings but it is the name of a predefined table (see ←initialise), ←convert will create a table and initialise it.

11.7.3 Name — Naming objects

Variable name name* (←)

Name of this binding table. Any named binding-table is stored in the global object @key bindings for reuse.

11.7.4 Client — Controlled object

Get Method receiver ⇒graphical Send Method receiver graphical*

Client of the key binding object

11.7.5 Default — Resource default values

Variable defaults chain (↔)

Chain with key bindings to inherit from

11.7.6 Meta — Analysing behaviour and objects

Get Method binding function=name|code ⇒name Find key-binding from function

Get Method function name|event id ⇒name|code Find the function to which the specified key is bound. This function is used by →typed. It performs the following steps:

1. Lookup the key in the table ←bindings. Return the result if found.

2. Lookup in the ←bindings of the ←defaults tables (recursively). If found somewhere return the result.

3. Return ←default function when not @nil.

4. Search for ←default function in the ←defaults tables.

5. Fail silently if all of the above fails.

11.7.7 Argument — Argument processing

Variable argument [int] (←) [Pce.KeyBinding.argument: []] Current setting of the (integer) argument. The following functions set this argument:

• digit argument If \e0 .. \e9 and \e- are bound to the function digit argument the universal argument may be composed by typing its value with the META-key held down.

• universal argument A value may be composed by typing the key bound to the function ‘universal argument’, followed by the digits to construct its value.

The predefined key binding name ‘argument’ binds \e0 .. \e9 and \e- to ‘digit argument’ and \C-u to ‘universal argument’. Using this table, the following sequences are examples for entering a universal argument:

Sequence  Value
======= ====
\e1\e4  14
\C-u56  56

11.7.8 Caret — Moving the insertion point

Variable saved column int* (←)

This variable is used to store the current column for multiple next line and previous line functions. Its value is managed by →event.

11.7.9 Event — Event processing

Variable condition code* (↔)

Activation condition

Send Method event event=event Refinement of: recogniser->event Refinement of the ‘recogniser→event’ method.

If the event is a subtype of event-type ‘keyboard’ this method invokes →typed: ‘event ←id’, ‘event ←receiver’.

Send Method execute receiver=object, selector=name, arguments=any ...

Called by →fill arguments and execute. It simply invokes the method ‘selector’ on ‘receiver’ with the given arguments. This method may be redefined to take action before or after invoking a method on the receiver:

    execute(KB, Rec:object, Sel:name, Args:any ...) :→
        <before-refinement>
        send(KB, send_super_vector, execute, Rec, Sel, Args),
        <after-refinement>.

See also ‘object →send super vector’.

Send Method fill arguments and execute id=event id, receiver=object,

selector=name, arguments=any ... This method is called from →typed. The key binding object should send a message to ‘receiver’ named ‘selector’. ‘arguments’ is a partial argument list. This method collects possible additional arguments:

If an argument of the send-method does not accept @default, and the ←receiver defines the method ←interactive argument, this method will be invoked using the following arguments:

1-st: Behaviour object implementing the method
2-nd: Ordinal number of the argument required

This method should return a value for the argument or fail.

If no argument can be found, the error no argument is raised.

When all arguments are gathered, →execute is activated.

Variable prefix name (←)

Currently parsed prefix for multi-key functions. Its initial value is the empty name (”). If a typed key is bound to the function ‘prefix’ this variable is set to this key.

The predefined table ‘emacs special’ binds \e, \C-c and \C-x to the function prefix.

Variable status {universal argument,quoted insert}* (-)

Internal flag used to parse universal arguments.

Send Method typed id=event id, for=[object] Process the event-id of a keyboard event object arrived on the given graphical. It performs the following steps:

1. If ‘graphical’ is specified and not equal to ←receiver, invoke →reset and set ←receiver to ‘graphical’.

2. Construct the ‘key’ by appending the symbolic name of the typed character to the current ←prefix. Determine the binding of this key using ←function.

3. Handle the predefined bindings:

• prefix Assign ←prefix with the current key.

• keyboard quit Invoke →reset to clear ←prefix and ←argument

• next line, previous line If ←saved column equals @default, set it to the current column by invoking ←column on the receiver.

• digit argument If the key is \e0 ... \e9 or \e-, set the ←argument.

• universal argument Start specification of ←argument. First time: set ←argument to 4; afterwards: multiply ←argument by 4. Typing digits will set the argument to the typed value.

4. If the binding is a name, resolve the method to be invoked using ‘object

←send method’. Next specify the arguments according to their argument-type:

• event id Fill the argument with argument event id

• char Fill the argument with the event id if this is the id of an ASCII event

• int Fill the argument with ←argument when specified

• default Fill the argument with @default.

Finally, →typed invokes →fill arguments and execute to fill additional arguments, which in turn calls →execute to send a message to the ←receiver. If the key-binding is a code object, →forward this code object with the following arguments:

@receiver ←receiver
@arg1  ←argument
@arg2  the argument event-id

11.7.10 Binding — Binding the keyboard

Variable bindings sheet (←)

Sheet mapping key-names to functions. The key-name is a symbolic representation of the key-sequence mapped. These names are described with the method →function. The function is either a name, in which case the key-binding will invoke the named method on the event-receiver, or a code object.

Variable default function name|code* (↔)

Name or code object which is used when neither the ←bindings nor one of the ←defaults key bindings define a binding for the typed key.

A common way to use this facility is to declare ↔default function to ‘alert’. Any unknown keys will then be mapped onto the method ‘graphical →alert’.

Send Method function key=name|event id, action=name|code Send Method function key=name|event id, action=name|code

Append a mapping. The first argument is the symbolic name of the key sequence to be mapped. The second is either the selector of the method to be invoked or a code object to be executed.

When an event id is passed it will be converted into the corresponding symbolic keyname. The symbolic key-names for the characters 0..127 (ASCII value) are.

    =====================================================
    Symbolic name   ASCII   Description
    =====================================================
    \C-@ ... \C-h  0..8    Control-characters
    TAB             9       The tab-key or control-I
    LFD             10      The linefeed-key or control-J
    \C-k .. \C-l    11..12  Control-characters
    RET             13      The return-key or control-M
    \C-n ... \C-z   14..26  Control-characters
    \e              27      The escape-key or control-[
    \C-\ ... \C-_28..31  Control-characters
    SPC             32      The space-bar
    @ ... ~            33..126 Normal printable characters
    DEL             127     The delete-key
    =====================================================

The meta-characters (ASCII 128..255) are mapped onto \e, followed by the 0..127 symbolic name.

11.7.11 Abort — Cleanup after aborting execution

Send Method reset [graphical]* Reset ←receiver to the argument graphical; ←prefix to ” and ←argument to @default.

11.8 Class text image — (Re)display large text fields

Inheritance: ⇒ text image ⇒ graphical ⇒ visual ⇒ object

Class text image takes care of mapping a one-dimensional array of (character,font,colour,attribute) quadruples onto a two-dimensional text image as we normally like to see text displayed. This class is used both by class editor and class list browser to manage the text-part.

Class text image uses dedicated interface techniques to their associated editor or list browser and cannot be used outside this context. This prohibits the use of text image objects outside the context of editor or list browser by the application programmer.

Most behaviour of class text image is just for communication with the associated editor or list browser. Of interesting to the user may be:

↔tab distance Distance between (regular) tab-stops
↔tab stops  Vector of tab-stops
↔wrap  How long lines are handled

Instance Variables

appearance

background  ← [colour|pixmap]  Background colour
tab distance  ← int  Pixel distance between tab stops
tab stops  ← vector*  Vector of tab-stops in pixels
wrap  ← {none,character,word}  Wrap mode for long lines

area

height  - alien:int  Height of the image
width  - alien:int  Width of the image

scroll

end  ← int  Index of last character displayed
start  - int  Index of first character displayed

event

pointed ← graphical* Graphical under the pointer

repaint

change end  - alien:int  End of changes (character index)
change start  - alien:int  Start of changes (character index)
eof in window  ← bool  Is end-of-file inside window?
inserted  - alien:int  How much text was inserted/deleted

cache

map - alien:TextScreen 2-dimensional map of source

storage

text ← object Source of the text

internal

margin function  - alien:MarginFunction  C-function to fetch margins from source
rewind function  - alien:RewindFunction  C-function to rewind input

fetch - alien:FetchFunction C-function to fetch next character from source

scan - alien:ScanFunction C-Function to scan for a syntactical category

seek  - alien:SeekFunction  C-Function to seek to a position

Behaviour

11.8.1 Oms — Object management operations

Send Method initialise text=object, width=int, height=int Send Method initialise text=object, width=int, height=int

Refinement of: graphical->initialise Create from source, width and height

Send Method unlink

Refinement of: graphical->unlink Reclaim private allocated data

11.8.2 Appearance — “Look-and-feel” related aspects

Variable background [colour|pixmap] (←) [Pce.TextImage.background: @default] Background colour

Variable tab distance int (←) [Pce.TextImage.tab distance: 64]

Send Method tab distance int=int

Pixel distance between tab stops

Variable tab stops vector* (←)

Send Method tab stops vector*

Vector of tab-stops in pixels. When defined, this overrules ↔tab distance.

Variable wrap {none,character,word} (←) [Pce.TextImage.wrap: character] Send Method wrap {none,character,word}

Wrap mode for long lines

11.8.3 Resize — Controlling and trapping resizes

Send Method geometry x=[int], y=[int], width=[int], height=[int] Send Method geometry x=[int], y=[int], width=[int], height=[int]

Refinement of: graphical->geometry Change image geometry

11.8.4 Area — Handling size and position

Get Method height ⇒int

Variable height alien:int (-)

Refinement of: graphical<-height Height of the image

Get Method width ⇒int

Variable width alien:int (-)

Refinement of: graphical<-width Width of the image

11.8.5 Scroll — Controlling the ‘viewport’

Send Method center index=int, line=[int] Refinement of: graphical->center Scroll the text such that the character at the given index is on the given physical line (1-based) of the window. When ‘line’ is omitted, index will be placed around the center of the image.

Variable end int (←)

Index of last character displayed

Get Method line int=int ⇒int Window line (row) from character index

Get Method lines ⇒int

Number of lines visible

Get Method start index=[int] ⇒int Variable start int (-) Send Method start start=[int], skip lines=[int]

‘Start’ is normally the start of a line of the underlying text (e.i. the first character after a newline character). It will be made the ←start of the text image. ‘SkipLines’ is the number of screen lines to omit and may be used to start the screen in the middle of a wrapped long line. The default ‘skip lines’ is 0.

←start returns the character index for the first character of the nth (1-based) screenline. By default this is the first visible character.

Get Method view ⇒int

Number of characters visible

11.8.6 Update — Update Dependant properties

Send Method compute Send Method compute

Refinement of: graphical->compute Updates the -map and informs the redrawing system of the part of the image that needs to be updated.

11.8.7 Cursor — Image of the pointer (mouse) cursor

Get Method displayed cursor ⇒cursor*

Refinement of: graphical<-displayed cursor Currently displayed cursor

11.8.8 Event — Event processing

Send Method event event=event Refinement of: graphical->event Process a (user-) event. This function is normally invoked by class device through ‘event →post’.

If the graphical has recogniser objects associated (see ‘object ←all recognisers’) and ←active equals @on, the recognisers are activated in the order they appear in this chain until one succeeds, after which this method returns successfully.

This method is redefined by many subclasses of class graphical to achieve predefined response to user-events. When programming user-defined (graphical) classes, this method is commonly used to attach predefined user-interface behaviour to the new class.

The following creates a box that may be moved using the middle button:

    ?- new(B, box(100,100)),
       send(B, recogniser, new(move_gesture)).

And the following example defines a class movable box from which all instances can be moved:

    :- pce_begin_class(movable_box, box).
    :- pce_global(@movable_box_gesture,
                  new(move_gesture)).
    event(B, Ev:event) :→
        (   send(B, send_super, event, Ev)
        → true
        ;   send(@movable_box_gesture, event, Ev)
        ).
    :- pce_end_class.

Get Method index event=event ⇒int Translate an event into the index of a character. This method is used by class editor and class list browser to implement pointer-associated event-handling. It may be used when connecting specialised event-handling to an editor or list-browser.

Variable pointed graphical* (←)

Graphical under the pointer

11.8.9 Debugging — Debugging PCE programs

Send Method dump map

Dump map of the screen. Used for system maintenance only. See also -map and →compute.

11.8.10 Abort — Cleanup after aborting execution

Send Method reset

Refinement of: visual->reset This method sends →reset to all visual objects it contains (recursively). ‘Visual →reset’ is automatically invoked from the host-language after an abort to the hostlanguage toplevel. Various subclasses of visual implement this method to reset parameters such as status, event-focus, etc.

11.8.11 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Variable change end alien:int (-) Variable change start alien:int (-) Variable inserted alien:int (-)

These variables are used by →compute to determine the range of the text that should be updated and the area of the ←image that is to be repainted.

Variable eof in window bool (←)

Is end-of-file inside window?

11.8.12 Cache — Caching information (speed up)

Variable map alien:TextScreen (-)

Array of line descriptions. Each line describes a screen-line: character index for the start, displayed characters, fonts, colours and attributes. This map is updated by →compute. See also →dump map.

11.8.13 Storage — Definition of storage details

Variable text object (←)

Holder of the text. The text should implement:

← seek function get -seek function
← scan function get -scan function
← fetch function get -fetch function

Besides this, it should notify changes to the text image object using:

→ changed region Indicate text in region has changed
→ insert  Indicate insert/delete

This functionality is currently reserved for the C-programmer.

11.8.14 Internal — Private behaviour

Variable margin function alien:MarginFunction (-) C-function to fetch margins from source

Variable rewind function alien:RewindFunction (-) C-function to rewind input

Variable fetch alien:FetchFunction (-) Variable scan alien:ScanFunction (-) Variable seek alien:SeekFunction (-)

C-function pointers obtained from the ←text to perform the following low-level action:

-fetch Read next character with attributes
-seek Set index for next -fetch operation
-scan Scan for a syntactical category

11.9 Class text margin — Annotation margin for editors

Inheritance: ⇒ text margin ⇒ graphical ⇒ visual ⇒ object

A text margin object may be attached to an editor object using the ‘editor →margin width’ method. The margin displays image objects for fragment objects defined on the text buffer object associated with the editor and thus provides a way for annotating textual information.

Class text margin is not generally usable; it’s functionality is closely related to class editor. The user should not explicitly create instances of this class.

Instance Variables

appearance

background ← [colour|pixmap] Background colour

layout

gap ← size Distance between icons in X and Y

storage

editor  ← editor  Editor I’m part of

Behaviour

11.9.1 Oms — Object management operations

Send Method initialise editor=editor, width=int, height=int Refinement of: graphical->initialise Create from editor and dimensions. The user should create and attach a text margin object using ‘editor →margin width’.

11.9.2 Appearance — “Look-and-feel” related aspects

Variable background [colour|pixmap] (←) [Pce.TextMargin.background: white] Send Method background [colour|pixmap]

Background colour

11.9.3 Layout — Spatial relations between graphical objects

Variable gap size (←) [Pce.TextMargin.gap: size(5,2)] Send Method gap size=size

Distance between icons in X and Y

11.9.4 Fragment — Text fragments

Get Method fragment event=event ⇒fragment Find a fragment (-icon) from an event object. This method may be used to attach eventhandling to the icons displayed on the margin. For example, the following recogniser will select a fragment by clicking on the icon:

         send(Editor?margin, recogniser,
              click_gesture(left, '', single,
                            message(Editor, selected_fragment,
                                    ?(@event?receiver, fragment,
                                      @event)))).

11.9.5 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

11.9.6 Storage — Definition of storage details

Variable editor editor (←)

Editor I’m part of. Should be the same as ↔device.

11.10 Class text cursor — Caret in an editor

Inheritance: ⇒ text cursor ⇒ graphical ⇒ visual ⇒ object

A text cursor is used to visualise the ‘editor ←caret’ in an editor object. Class text cursor is closely linked to class editor and not meant to be used outside the context of editors.

The only interesting behaviour to the application programmer is:

→style Change the ‘look’ of the caret
→image Create custom caret.

Instance Variables

appearance

hot spot  ← point*  The ‘hot-spot’ of the image
image  ← image*  Image when ↔style is image

style ← {arrow,image,block, open look}

How the text cursor object is visualised

Behaviour

11.10.1 Oms — Object management operations

Send Method initialise for=[font] Send Method initialise for=[font]

Refinement of: graphical->initialise

Create a text cursor object from the specified font object. Class text cursor is currently only used by class editor. See also →font and ‘editor ←text cursor’.

11.10.2 Appearance — “Look-and-feel” related aspects

Send Method font font=font Send Method font font=font

Sets the →style according to the font. If the font is a ‘font ←fixed’ font, it will invoke →style with the ←resource value from fixed font style. Otherwise it will use the resource proportional font style.

Variable hot spot point* (←)

When ↔style is ‘image’; this point describes how the image object is positioned relative to the character.

Variable image image* (←) Send Method image image*

When ↔style is ‘image’; this is the image object.

Variable style {arrow,image,block,open look} (←) [Pce.TextCursor.style: open look] Send Method style {arrow,image,block,open look}

Style of the text cursor. Values are:

• arrow A small triangle with a vertical line. Normally used

    with proportional fonts.

• open look Triangle when the cursor is →active, grey diamond otherwise. Used for OpenLook compatibility.

• block Static inverting block, Normally used with fixed-width fonts on monochrome screens.

• bitmap Arbitrary pattern.

The default style used by an editor is determined by the font associated with the editor. See ‘text cursor →font’.

11.10.3 Area — Handling size and position

Send Method set x=int, y=int, width=int, height=int, baseline=int Refinement of: graphical->set Specify all dimension parameters of the text cursor. This method is used by class editor to position the caret. The x, y, width and height parameters describe the character-box. baseline is the depth of the baseline of the current font.

11.10.4 Repaint — Behaviour dealing with repaint

Send Method redraw area area=area

Refinement of: graphical-> redraw area Repaint the graphical. Area specified the area (in the coordinate system of the current device) that needs to be repainted. Area is guaranteed to overlap with ←area, the bounding box of the pixels affected by this graphical.

This method is called by the graphical infra-structure of XPCE and should never be called directly. See also →draw and →compute.

This method may be redefined to create custom graphical objects. It is not obligatory for the redefinition to call the method of the super-class. The definition should not apply paint outside the ←area of the graphical. If there is no simple way to avoid this, use →clip and →unclip to ensure this.

The definition can use →draw to paint other graphical objects or one or more of the primitive drawing operations listed below:

→draw arc  Draw ellipse-part or pie-part
→draw box Draw rectangle
→draw fill  Fill/clear a rectangle
→draw image Draw an image object
→draw line  Draw a line segment
→draw poly Draw a polygon
→draw text Draw a string

The pen, colours, etc. may be manipulated using the following methods:

→save graphics state  Save current settings
→restore graphics state Restore old values
→graphics state  Modify graphics state

The User Guide (Programming in PCE/Prolog) provides further documentation on redefining graphicals.

Another common approach to create custom graphics is by subclassing class device to define compound graphicals.

Chapter 12

Operating System Interaction

This chapter defines classes to interact with the Unix filesystem, Unix process management and Unix networking features. PCE is often advertised for UI development and therefore including classes to interact with the operating system on features that have nothing to do with UI may seems strange. There are various reasons for integrating OS interaction into PCE:

• PCE’s load and save facilities need to operate on files and the most natural solution is to introduce a class file for this purpose.

• Symbolic languages (and especially Prolog) have only very limited OS interaction in the standard. Doing the OS interaction in PCE allows us to write PCE/Prolog libraries that are portable.

• Asynchronous interaction with processes and networking is desired which should properly interact with the X11 interface. Using host-language primitives may conflict with this schema.

• Proper interprocess, networking and sub-process interaction allow for easy incorporation of external functionality. This makes PCE a suitable platform for integrating multiple applications using a single front-end to the end-user.

The classes file and directory allow for all the common operations on the Unix file-system.

The class socket and process handle asynchronous communications. The implementation of the communication details is part of class stream.

12.1 Class file — Unix file

Inheritance: ⇒ file ⇒ object

A file object is a wrapper around a Unix file. Files are used internally for the various disk read and write operations supported by PCE.

File objects can be used to query the status of a Unix file, read/write from/to it, rename it, remove it, etc.

A file is represented by its ←name, which may hold the Unix constructs ‘~’, ‘~loginname’ and $var. A file can be searched in a ‘search-path’ using →find. It may be translated to an absolute filename using →absolute path, which writes the variable ←path after successful translation.

Class file defines the ‘class→has feature’s listed below. These features are defined for the various MS-Windows based versions of XPCE. If XPCE is running on any of the MS-Windows based platforms, case sensitive yields @off. case preserving is @on on -NT and ’95 and @off on win32s. 8plus3names is @on on win32s and @off on the other systems. All Unix versions are case sensitive, case preserving have 8plus3names set to @off.

case sensitive bool
case preserving bool
8plus3names  bool

See also class directory.

Instance Variables

path

name  ← name  Name of the file
path  ↔ [name]  Full path-name of the file

open

status ← {closed,read,write} One of {closed,read,write}

file type

kind ← {text,binary} Text or binary file

filter

filter ↔ name* Name of input/output filter used

internal

fd  - alien:FILE *  Unix file (stream) handle

Behaviour

12.1.1 Oms — Object management operations

Get Method convert path=name ⇒file Refinement of: object<-convert Converts a name into a file with that name. See →initialise.

Send Method initialise path=[name], kind=[{text,binary}] Send Method initialise path=[name], kind=[{text,binary}]

Refinement of: object->initialise

Create a file from a specification. The given ‘path’ is expanded using the following rules:

∼user Expands the the home directory of ‘user’
∼  Expands the the current user’s home ($HOME)

$var Expands to ‘pce ←environment variable: var’

‘pce ←environment variable’ is an interface to Unix getenv, but the variable PCE-HOME is expanded to PCE’s home directory even if it does not exists in the Unix environment.

If path is omitted, a file object with a unique name will be returned that may be used as a temporary file. The user is responsible for deleting this file from the filesystem when done. See ‘file →remove’.

Send Method unlink Send Method unlink

Refinement of: object->unlink Close file

12.1.2 Copy — Copying instances

Send Method backup extension=[name] Send Method backup extension=[name]

If the file →exists, it is copied to a file named ←name concatenated with ‘extension’ (default ‘~’). The file object itself is not affected.

This method may be used in combination with →open: write or ‘object →save in file’.

    save_diagram(Picture, File) :-
        send(File, backup),
        send(Picture?graphicals, save_in_file, File).

Get Method backup file name extension=[char array] ⇒char array Name for storing →backup data

Send Method copy from=file Copy the argument-file to this file. Argument ordering may look strange, but is consistent to all other →copy operations in PCE.^{1}

12.1.3 Path — File/directory path

Get Method absolute path ⇒name

Convert ←name to an absolute path

Send Method absolute path

Determine the absolute-path described by ←name and store the result in ←path. First expands ‘~’ and $var constructs.

Get Method base name ⇒name Get Method base name ⇒name

Returns ←name without the possible directory specification:

1 Does not yet copy the mode attributes.

    ?- new(F, file('/staff/jan/src/xpce/src/unx-file.c')),
       get(F, base_name, Base).
    F = @634787
    Base = 'unx-file.c'

Get Method directory name ⇒name

Returns a name representing the directory name for this file. Computed by deleting all text after the last ’/’ including this ’/’.

Send Method is absolute

Test if ←name specifies an absolute path. First variables and ~ in the name specification is expanded. Next, for Win32 versions the path is considered absolute if it starts with <letter>:. For Unix systems if it starts with ’/’.

Variable name name (←) Send Method name name=name

Name of the (Unix) file. Filled from the first argument of →initialise . When the name is changed and the file already exists, the Unix file is renamed accordingly. →name cannot move files across file-systems.

Variable path [name] (↔)

This variable holds the full path name of the file after →absolute path or →find.

The Unix file opened is the name of this variable when not @default and ←name after expansion of ‘~’ and $var constructs if this variable holds @default

12.1.4 Open — Making objects visible

Send Method close Send Method close

Close file when open. Flushes possible pending output. Succeeds without side-effects if the file is not opened.

Send Method open mode={read,write,append}, filter=[name],

extension=[char array]

Send Method open mode={read,write,append}, filter=[name],

extension=[char array] Open the file for reading or writing. Mode ‘append’ is like ‘write’, but does not truncate the file to zero characters.

If a ‘filter’ is specified, →open will not open the file itself, but read or write the file through the filter. The argument is the Unix command string. Example:

    ?- new(F, file('data.Z')),
       send(F, open, read, uncompress).

This example opens the file data.Z using the Unix command

˘ ‘uncompress < data.Z’

and reads the output of this command.

When extension is specified, →open appends the extension to ←name before passing the name to Unix. This implies the file above could also have been opened using:

    ?- new(F, file(data)),
       send(F, open, read, uncompress, '.Z').

Class process provides another way to interact with Unix processes.

Variable status {closed,read,write} (←)

Current status of the file:

• closed Currently not open (-fd is 0). See →close.

• read Currently open for reading. See →open.

• write Currently open for writing. May be opened ‘write’ or ‘append’. See →open.

12.1.5 Read — Reading text from objects

Get Method character ⇒char

Reads the next character and returns it as an integer between 0 and 255.

Get Method read count=[int] ⇒string Returns a new string object with the next <int> characters or as many as there are left in the file.^{2}

Get Method read line ⇒string Get Method read line ⇒string

Reads the next line of input from the file and returns this in a string object. The string contains the trailing newline character of the line. See ‘string →strip’. If the last line is not closed with a newline, a string without trailing newline is returned.

12.1.6 Write — Writing to files

Send Method append text=char array Append the argument text to the file. The argument text is not interpreted. See also →format.

Send Method flush

Output to a file is normally buffered. The buffer is automatically emptied by →close. If the buffer is to be written to file without closing the file, use →flush.

Send Method format format=char array, argument=any ...

Create a string by formatting the arguments and →append the result to the file. See ‘string →format’ for a specification of the format.^{3}

2 Unlike Unix read(), this function cannot deal with files holding 0 (EOS) characters as strings cannot

represent such characters. 3 If the total output exceeds FORMATSIZE (currently 10000) characters, PCE crashes.

Send Method newline

Equivalent to →format: ’\n’.

12.1.7 Test — Test object properties

Send Method access mode={read,write,append,execute} Send Method access mode={read,write,append,execute}

Test if the file has specified access. Access ‘write’ and ‘append’ have the same meaning, but they allow programmers to test the access with the same argument as passed to →open.

Send Method exists must be file=[bool] Send Method exists must be file=[bool]

Succeeds if the file exists. Note that this does not imply the user has read or write permission for this file. Use →access to obtain this information.

If must be file equals @on or @default this test only succeeds if the file exists and is a regular file or a link to a regular file. If must be file equals @off this test succeeds if there is an entry in the file-system with this name regardless of the type of the object there.

Send Method same file=file Test if two paths refer to the same physical file

12.1.8 File — Saving and loading files, file operations

Send Method check object

Checks whether the represented file contains a PCE instance saved with ‘object →save in file’ and thus can be loaded using ←object.

Get Method object ⇒any|function Get Method object ⇒any|function

Load object from file created with ‘object →save in file’. Whether a file contains a saved object may be tested using ‘file →check object’.

Loading objects from a file is an alternative way of creating objects and thus activates the classes mechanism to keep track of created instances. See ‘class ←created messages’.

The object may have been saved with an older version of PCE with an incompatible data definition (i.e. other classes or classes with different slots). The method ‘object →save in file’ saves -before saving any instances of a class- a description of the class. This description contains the name of the class and the attribute-names stored. When the object-base is reloaded, the following checks are made:

• If the ‘pce ←save version’ does not match the file’s save version, a message will be printed and the system enters a ‘careful’ loading-mode. Careful loading is also enabled if ‘pce ←debugging’ is @on.

• When careful loading is enabled, each loaded slot value is given to the type-checker, which will print a message when it failed to convert the type.

• if a slot cannot be found a diagnostic message is printed. For each instance loaded, the new instance will be sent a message ‘object →convert old slot: name, any’, where ‘name’ is the name of the deleted slot and any is the saved value of the slot.

• If a class cannot be found, a diagnostic message is printed and each instance of this class found will be translated to a sheet object with attributes for the defined slots. The attribute ‘class name’ is added and filled with the name of the disappeared class.

• If the entire object is loaded and careful loading is enabled, the loaded object is

verified:

• First ‘object →convert loaded object: int, int’ is sent to the object where the integers represent the old and new save-version.

• For each slot that has an unsatisfactory value (according to its type declaration), a message ‘object →initialise new slot: variable’ will be send where variable is the variable object from the class.

• Finally the system print a diagnostics message when the object is still not satisfying its class definition.

The verification process may be compared to ‘object → check’.^{4}

12.1.9 FileType — File properties

Variable kind {text,binary} (←) Send Method kind {text,binary}

Text or binary file

12.1.10 Dimension — Dimensions of (graphical) objects

Get Method size ⇒int

Returns the number of characters in the file. The file needs not be opened.

12.1.11 Location — Locating points

Send Method find path=[char array], access=[{read,write,append,execute}] Send Method find path=[char array], access=[{read,write,append,execute}]

Find a file in the specified search-path that has the specified access. The path is a colon (:) separated list of directories.

When ←name does not start with a ’.’ or ’/’, →find will loop through the directories of the path, append the ←name of the file and check whether the resulting file has →access. When successful, it will set →name to the full pathname of the file.

This method is used by ‘image →load’ and ‘bitmap →load’ to locate bitmap files.

The example below is a PCE/Prolog implementation of the Unix utility which for locating executable files.

    which(Name, File) :-
        get(@pce, environment_variable, 'PATH', Path),
        new(F, file(Name)),
        send(F, find, Path, execute),
        get(F, absolute_path, File).

4 When loading old version, the system easily crashes. Various standard operations should be added to the conversion mechanism. For example renamed classes and instance variables.

Get Method index ⇒int

Returns the current value of the read- or write-pointer. Obtained via the Unix call ftell(2). This pointer may be set using →seek.

Send Method seek byte=int, from=[{start,here,end}] Moves the file-pointer to the indicated location. The argument is relative to the start of the file, the current position (←index) or the end of the file. The file must be open and must be a regular file not opened through a ←filter.

12.1.12 Delete — Text deletion commands

Send Method remove

Unlinks the file from the Unix file system. The file is first closed using →close.

12.1.13 Time — Controlling real-time

Get Method time which time=[{modified,access}] ⇒date Returns a new date object holding the last access or modification time. Date objects may be converted to a string (‘date ←string’) or compared.

See also ‘directory →modified’.

12.1.14 Filter — Filtering file I/O

Get Method filter ⇒attribute Variable filter name* (↔)

Name of the filter used as input- or output filter. See →open for details.

12.1.15 Internal — Private behaviour

Variable fd alien:FILE * (-)

Pointer to the C stream associated to this file.

12.2 Class directory — Unix directory

Inheritance: ⇒ directory ⇒ object

A directory object is a wrapper around a Unix directory. PCE defines behaviour to handle files and directories for two reasons. First of all to support some of its own facilities such as saving things to file or loading things from file. Secondly to allow the user to query the Unix file system. Normally the host provides similar facilities, but notably for Prolog, not much of a standard exists. Using PCE’s primitives will make this part of your program better portable.

Instance Variables

name

name  ← name  Name of the directory
path  ← name  Full path name

time

modified  - alien:ulong  Time stamp for →changed

Behaviour

12.2.1 Oms — Object management operations

Send Method initialise path=name Send Method initialise path=name

Refinement of: object->initialise

Create a directory from the named path. A leading ~ or ~<user> is expanded as are shell variables notated as $<name>. ←path is filled with an absolute path to this directory, ←name with the basename of the directory.

12.2.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒directory Refinement of: object<-convert Convert a name to the corresponding directory object. See ‘→initialise’ for details.

12.2.3 Name — Naming objects

Get Method base name ⇒name

Same as ←name, cf. ‘file ←base name’

Variable name name (←)

Name of the directory. This name is just the ‘file ←base name’. ←path contains the full path name.

Variable path name (←)

This variable contains the full path-name to this directory. It is computed from the name argument when the directory is created. See also ‘file ←absolute path’.

12.2.4 Contents — Modify/query contents of object

Get Method directories pattern=[regex], hidden too=[bool] ⇒chain Get Method files pattern=[regex], hidden too=[bool] ⇒chain

Returns a chain with the names of all member-directories or -files of this directory that match the regular expression name (see class regex). If pattern is omitted, all member-directories whose name does not start with a ‘.’ are returned. If hidden too is @on, directories with names starting ‘.’ are considered too.

The names in the chain are alphabetically ordered.

Get Method directory name=name ⇒directory Get Method file name=name ⇒file Get Method file name=name ⇒file

Return a file (or directory) object relative to the specified argument. If ‘name’ starts with a ’/’ or ’~’, these methods just return a new file or directory from ‘name’. Otherwise the new object will be created from ←path, and ‘name’, separated with a ’/’.

Send Method scan files=chain*, directories=chain*, pattern=[regex],

hidden too=[bool] Scans the directory appending all files matching regex to the first chain and all directories to the second. If the last argument is @on, files starting with a ’.’ are considered too.

If the same chain is given for ‘files’ and ‘directories’, →scan will not determine the type. Depending on your Unix version, this may be much faster.^{1}

12.2.5 Test — Test object properties

Send Method access {read,write} Send Method access {read,write}

Test if directory has access {read, write}

Send Method exists Send Method exists

Test if directory exists

12.2.6 Edit — Modify object

Send Method make

Create the OS counterpart

Send Method remove

Delete the OS counterpart

12.2.7 Textual — Textual representation

Get Method print name ⇒char array

Refinement of: object<-print name Equivalent to ←path

1 Changes working directory while running. This will not be undone when execution is aborted while scanning the directory.

12.2.8 Time — Controlling real-time

Send Method modified

Succeed if directory has changed since last call to →modified. The first call just writes the current modification time in -modified and fails. If the directory does not exist any longer, →modified succeeds as well.

This method is intended for periodic changes to the set of members in a visualised directory. See also ‘file ←time’.

Variable modified alien:ulong (-)

Time stamp for →changed

12.2.9 Hierarchy — Hierarchical structure

Get Method parent ⇒directory Returns a new directory object that points to the parent directory. There are two ways to find such a directory. The first is to ‘pwd’ on the entry ‘..’ and the second is to strip of the last part of the path by scanning for a ’/’. XPCE uses the latter approach.

12.2.10 WorkingDirectory — Process’ or PCE working directory

Send Method cd

Changes the working directory of the entire PCE/Prolog process to ←path.

Send Method pop

When @directory stack is not empty this changes the working directory to the head of this chain and deletes the head of the chain. Used in combination with ‘directory →push’ to temporary switch directories.

Send Method push

Changes working directory like →cd. When successful, the old working directory is prepended to the chain @directory stack as a name. The method →pop allows you to go back to the original directory.

12.3 Class stream — (Unix) I/O stream

Inheritance: ⇒ stream ⇒ object

Class stream is a super-class for the class process and class socket and provides methods for sending data to child processes and over sockets as well as handling (asynchronous) input from these objects. The most commonly used functionality of this class is:

• →format:

Format text and send it to the stream

• →input message: Handle input record

• →record separator: Separate input in records (regex object)

Instance Variables

input

input message  ↔ code*  Forwarded on input from the stream
record separator  ← regex|int*  Regex that describes the record separator

internal

input allocated  - alien:int  Allocated size of input buffer
input buffer  - alien:char *  Buffer for collecting input-data
input p  - alien:int  Number of characters in input buffer
rdfd  - alien:int  File-handle to read from stream
rdstream  - alien:FILE *  Stream used for ←read line
wrfd  - alien:int  File-handle to write to stream
ws ref  - alien:WsRef  Window system synchronisation

Behaviour

12.3.1 Oms — Object management operations

Send Method initialise rfd=[int], wfd=[int], input message=[code],

record separator=[regex|int] Refinement of: object->initialise Creates a stream object from the following arguments:

• rfd [int] C-file-descriptor number for input. When left @default, this will be @nil, indicating input should not be monitored.

• wfd [int] C-file-descriptor number for output. When left @default this will be @nil, indicating the stream cannot be written to.

• input message [code object] Code object for handling input. See ←input message.

• record separator [regex object] Regular expression to split input stream into logical records. The default is ’\n’, splitting the input into physical lines. See ←record separator.

Class stream is designed to share code between class socket and class process. It may be used for other interaction, but all such application of this class is as yet unsupported.

Send Method unlink

Refinement of: object->unlink Closes the stream before reclaiming the XPCE resources. See also →close input and →close output.

12.3.2 Open — Making objects visible

Send Method close input Send Method close output

Closes the associated file-descriptor -rdfd/-wrfd and deallocates the input buffering.

Send Method input fd=[int]* Enable input from file-descriptor. Assigns -rdfd and initialises input synchronisation with the Window System.

12.3.3 Input — Handling (process) input

Send Method end of file

Sent by the system when end-of-file is reached on the input. The default implementation just succeeds. May be redefined.

Variable input message code* (↔)

Each time a complete input record (see ←record separator) is available, this code is executed with the following bindings:

@receiver: the stream object
@arg1:  a string object holding the data

Get Method read line [int] ⇒string Dispatches events until the next physical line of data is available from the process. Returns failure if no input is available after the indicated amount of milliseconds. If timeout is @default, this call blocks till input is available.

Asynchronous input handling (using →input message) is the preferred way of handling process data.

Variable record separator regex|int* (←) Send Method record separator regex|int*

Regex that describes the record separator. When not @nil, the system will collect data from the stream until a complete record is available before calling the ←input message. If the data arriving from the stream contains multiple records, the ←input message will be called with each record separately.

The default record separator is ’\n’ (newline), which implies that input is split into physical lines.

If ←record separator is an integer, the input is split into records of the indicated size. This is useful for receiving binary data that is organised in records.

If you just want to collect all data from the process, it is advised to set the ←record separator to @nil, disabling the input filtering.

The →record separator may be changed on an open connection. Changing the record separator will immediately scan the data in the input buffer and dispatch any complete record according to the new definition. Setting the separator to @nil will run the ←input message using the data in the buffer and destroy the buffer.

12.3.4 Output — Handling (process) output

Send Method append data=char array Send data to stream. The current implementation flushes the data automatically. Future releases may provide input buffering. See also →newline, →append line and →format.

Send Method append line data=char array →append and →newline

Send Method format format=char array, argument=any ...

Format arguments and send to stream

Send Method newline

Send a newline to the stream

12.3.5 Control — Control autonomous processes

Send Method wait Send Method wait

Dispatches input events until the input is closed after reading end-of-file.

12.3.6 Internal — Private behaviour

Variable input allocated alien:int (-)

Variable input buffer alien:char * (-) Variable input p alien:int (-)

Buffer to collect data from the stream into records. See ←record separator and ←input message.

Variable rdfd alien:int (-) Variable rdstream alien:FILE * (-) Variable wrfd alien:int (-)

Operating-system file-handles. -rdstream is a buffered handle using with ←read line.

Variable ws ref alien:WsRef (-)

Window system synchronisation handle.

12.4 Class process — Unix process

Inheritance: ⇒ process ⇒ stream ⇒ object

Class process provides an interface to other (Unix) processes. This may be used for various purposes:

• Use processes for certain operations that cannot be done inside PCE itself.

• Build (graphical) interfaces for terminal oriented programs.

Processes may be both ‘synchronous’ and ‘asynchronous’. In the first case the output of the process is explicitly read from the process object (see process ←read line’. In the latter case, a message object is associated with the process that will be invoked asynchronously when output from the process becomes available (see ‘→input message’).

When PCE is killed, it will first terminate all processes. See also ‘Pce →exit message’.

See also class stream and class socket.

Instance Variables

command

arguments  ← vector  Vector with arguments
name  ← char array  Name of command executed

input

terminate message ↔ code* Forwarded when the process terminates

status

code  ← name|int*  Signal name or exit status
pid  ← int*  Process id of child process
status  ← name  Status of the associated process

environment

directory  ← [directory]  Directory to start the child
environment  - sheet*  Environment for the process

tty

tty  ← name*  Pseudo-tty used for communication
use tty  ← bool  Use pseudo-tty (@on) or pipes (@off)

Behaviour

12.4.1 Oms — Object management operations

Send Method initialise command=char array, argument=char array ...

Refinement of: stream->initialise

Create a process object from the command name and arguments. The process is not yet started. The first argument is used to set ←name. A vector created from the remaining arguments is stored in ←arguments.

Note that the command, nor the arguments are interpreted (like the Unix shell does).

The call

         new(P, process('awk -f script.awk')).

will search for a file names ‘awk -f script.awk’, which of course it can’t find. Instead, use

    new(P, process(awk, '-f', 'script.awk')).

or

    new(P, process('/bin/sh', '-c', 'awk -f script.awk')).

Send Method unlink

Refinement of: stream->unlink Closes the output and input channels and →kill’s the process.

12.4.2 Command — Process’ command specification

Variable arguments vector (←)

Vector of char arrays, holding the arguments passed to the process. Set by →initialise and →open. Note that the arguments are not interpreted by a shell.

Variable name char array (←)

Name of the command executed. This command is executed using Unix execvp() and thus uses the executable search-path. Note that this is only the plain name. The arguments are stored in ←arguments.

12.4.3 Input — Handling (process) input

Send Method end of file

Send Method exited status=int Send Method killed signal=name

Refinement of: stream->end of file These methods are invoked by class process on itself when the process has exited, was killed or end of file has been read from the process’ input. These methods may be redefined to realise application specific actions. It is necessary to invoke these methods as part of the redefined implementation. Arguments

→exited exit() status of the process (0=success)
→killed Name of the signal. See →kill.

Send Method stopped signal=name Internally invoked if the process has been stopped by a signal. @receiver refers to the process object, @arg1 is the name of the signal that stopped the process.

Variable terminate message code* (↔)

This message is sent when the message is either killed on a signal or exited by calling exit(). @receiver is bound to the process object. @arg1 gives the name of the signal or the exit status (integer).

Note that input is dealt with through the event mechanism of X-windows, while status changes to the process are dealt with using Unix signals. This implies the process can signal it has terminated, while their is still input available from it.

12.4.4 Output — Handling (process) output

Send Method close

Close the output channel to the process. This will normally make the process terminate.

12.4.5 Status — Flags indicating current status

Variable code name|int* (←)

Signal name or exit status that terminated or stopped the process. If it is filled with a name, this is the name of the signal. If it is filled with an integer, the process exited through calling ‘exit()’ and the value is the argument passed to exit.

Variable pid int* (←)

When the process is running (or stopped), this variable holds the process number of the inferior process.

Variable status name (←)

Status of the process:

• inactive After the process object is created

• running The process has been started and not yet stopped or terminated

• stopped The process has been stopped on a signal

• killed The process has been killed on a signal

• exited The process has terminated by calling exit()

12.4.6 Control — Control autonomous processes

Send Method kill signal=[1..31|name] Send a signal to the process (which must be running). The argument is either the number of the Unix signal (see man sigvec) or the name of the signal (see also man sigvec). To convert the name used in the sigvec manual page, delete the leading ‘SIG’ and convert the remainder to lowercase. Examples:

SIGTERM ==> term
SIGINT  ==> int
SIGHUP ==> hup

Send Method open command=[char array], argument=char array ... Send Method open command=[char array], argument=char array ...

Start the process. When the first argument is given, the command name and argument vector will be set like →initialise. If the process is already running, nothing happens.

When ↔use tty equals @on, a pseudo-tty is allocated, the PCE forks a new process, connecting standard (error) I/O to this pseudo-terminal. If ←environment is given, the environment of the child is manipulated accordingly. If ←directory is given the child will change working directory. Finally the child execvp’s (see man execvp()) using the ←name and ←arguments from the process object.

When ↔use tty equals @off, two pipes are created, after which PCE forks. stdin of the process is associated with one of these pipes, stdout and stderror with the other. The command is started the same way as with ↔use tty @on.

12.4.7 Environment — Handling the process’ environment

Variable directory [directory] (←) Send Method directory [directory]

Working directory for the child. When @default this is the same directory as PCE’s working directory.

Get Method environment ⇒sheet Variable environment sheet* (-)

Send Method environment name=name, value=char array Environment (see also ‘pce ←environment’) for the child process. Either the get- or the send-method will create a sheet mapping environment variable named onto values and fill the slot with this sheet. Send changes the sheet’s content.

If this variable is set on →open, the child will be passed these environment variables. For example, to start ‘tex myfile.tex’ with TEXINPUTS set to ’../TeXmacros:/usr/local/lib/tex/macros’:

    ?- new(P, process(tex, 'myfile.tex')),
       send(P, environment, 'TEXINPUTS',
            '../TeXmacros:/usr/local/lib/tex/macros'),
       send(P, input_message,
            message(@pce, write, @arg1)),
       send(P, open).

12.4.8 Tty — Controlling the terminal

Variable tty name* (←)

Name of the pseudo tty to which the process is connected. @nil if the process is not running (←pid equals @nil) or the process is not connected to a terminal (↔use tty equals @off).

Send Method use tty bool=bool Sets the ←use tty variable. Checks that the process is not currently running.

Variable use tty bool (←)

Connect the process by means of a pseudo-tty (@on) or two pipes (@off). Using a pseudotty is necessary for many interactive processes as they will not flush their output when they are not connected to a terminal. Processes designed to be used by other processes generally may be connected through pipes.

When a process is connected by means of a tty, the tty might perform input and output translations for the process. Notably control-characters send to the process will be translated as usual. Pipes to not do any translations.

12.5 Class socket — Unix socket

Inheritance: ⇒ socket ⇒ stream ⇒ object

Class socket provides an interface to Unix sockets. A Unix socket is a (network) communication end-point. Normally one process creates a socket at a specified address (see below). Other processes may use a socket to →connect to the created socket. After the connection has been established, a two-way text-based communication channel is available.

Below is a first, very simple example:

    ?- new(X, socket('~/xpce-socket')),
       send(X, input_message, message(@pce, write, @arg1)),
       send(X, listen).

In another xpce process running on the same machine we can now do

    ?- new(X, socket('~/xpce-socket')),
       send(X, connect),
       send(X, format, 'Hello There\n'),
       send(X, close).

Sockets addresses may be internet addresses as (allowing for communication between machines) and unix-domain addresses, allowing for communication between processes running on the same machine. See also →initialise.

We distinguish between ‘server’ sockets and ‘client’ sockets. After the connection has been established there is no difference between the two. Below we describe the process to establish a connection:

1. Create a server socket. The address is either a file or a port number. See →initialise. The →input message is called whenever there is input on the socket; the →accept message is called when an attempt is made to →connect to this socket.

2. Invoke →listen. This will make the socket listen to requests from other processes.

3. (In the other process) Create a client socket. The address is either the same file as created by the server or a tuple consisting of an internet node name and a port number.

4. Invoke →connect. Provided the address is right this will cause the server socket to start →accept. →accept will ←clone the server socket and run the →accept message with @receiver bound the the server socket and @arg1 bound to the clone. After this, a communication channel exists between the cloned server and the client socket. Data is sent to the socket using →append or →format. Whenever data is available, →input message is called to handle this data. Class process handles input from its inferior process using the same mechanism.

The Unix program xpce-client(l) may be used to connect to xpce-processes. See also telnet(1). The sources of xpce-client may be found in xpce/src/unx-client.c. They may be used as a starting point for other unix programs that wish to communicate to xpce.

See also class stream.

The library file pce server defines pce server/1 to create a ‘server’ mode.

Instance Variables

address

address  ← file|tuple|int*  Address for the connection end-point
domain  ← {unix,inet}  Domain for the connection

connect

accept message ↔ code* Message to accept new client

status status ← {idle,listen,accepted, connected}

Status of the associated socket

authority

authority ← file* Name of authority-file (if any)

server

clients  ← chain*  Chain with accepted connections
master  ← socket*  Socket I accepted a connection for

Behaviour

12.5.1 Oms — Object management operations

Send Method initialise address=file|tuple|int*, domain=[{unix,inet}] Refinement of: stream->initialise Create a server or client socket. The address argument is either a file object for Unix domain sockets or a port-number of inet-domain sockets.

After a socket has been created and the appropriate attributes (notably →input message) have been specified the socket is activated using →listen for server sockets and →connect for client sockets.

Send Method unlink

Refinement of: stream->unlink Cleanup socket

12.5.2 Address — Address specifications

Variable address file|tuple|int* (←)

Address for the connection end-point. If the socket was created as a server socket on inet address ‘0’ (this machine, port number 0), the →listen call will replace the ←address with the actually used port number.

Variable domain {unix,inet} (←)

Domain for the connection

Get Method peer name ⇒name|tuple Returns the address of the socket at the other side of the connection. The socket must be connected, which implies it has executed a successful →connect (client) or is a cloned socket from a socket in →listen mode (server, see ←clients).

If the socket is in the Unix ←domain, the return value is a name describing the file (which will be the same as the absolute path-name of the file used to create the socket).

If the socket is in the inet ←domain, the return value is a tuple object holding a name describing the internet address of the socket at the other end in decimal numeric notation and an integer describing the port.

12.5.3 Connect — Establish socket connection (IPC)

Variable accept message code* (↔)

Message to accept new client

Send Method connect

Connect with server socket

Send Method listen [code]*, [{1..5}] Prepare the socket to listen for connections. The argument replaces the →accept message when specified. The second argument is the ‘backlog’. It specifies how many pending requests for connections are tolerated. Any new connect request will be denied. The default is 5.

If an inet domain socket was created with its port specified as 0, the system will select an available port. The actually used port can be requested from the socket object using ←address after this method completed successfully.

12.5.4 Input — Handling (process) input

Send Method end of file

Refinement of: stream->end of file Sent by the system when end-of-file is reached on the input. The default implementation just succeeds. May be redefined.

12.5.5 Output — Handling (process) output

Send Method close

Close communication to socket

12.5.6 Status — Flags indicating current status

Variable status {idle,listen,accepted,connected} (←)

Status of the associated socket

12.5.7 Authority — Access rights

Variable authority file* (←)

Name of authority-file (if any)

12.5.8 Textual — Textual representation

Get Method print name ⇒string

Refinement of: object<-print name returns <classname>(<address>)

12.5.9 Server — Unix socket organisation (server)

Variable clients chain* (←)

Chain with accepted connections

Variable master socket* (←)

Socket I accepted a connection for

12.5.10 Control — Control autonomous processes

Send Method broken pipe

Attempt to write on broken connection

Chapter 13

Customising PCE Applications

This chapter describes PCE’s interface to the X11 resource mechanism. X11 resources specify application defaults. They are commonly used for the specification of user preferences on look-and-feel related aspects of an application.

PCE’s resource interface is build around class resource and a number of methods on class object and class class. If a PCE class <class> defines a resource named <resource>, its value may be specified in ~/.Xdefaults using

    Pce.<Class>.<resource>: <value>

If <object> is an instance of <class>, the value of this resource may be requested using:

    get(<object>, resource_value, <resource>, Value).

Value is the <value> converted to the type specified with the resource. For example, class button defines a resource names ‘size’, specifying the minimal size of a button. The type of this resource is ‘size’, defining an instance of the PCE class size. This resource is specified using:

    Pce.Button.size: 100x20

And requested using:

    ?- get_object(button(hello), resource_value, size, Size).
    Size = size(100, 20).

Finally, if (which is often the case) a resource defines the default value of an instance variable and the resource has the same name as the instance variable, all instance variables that have value @default and an associated resource may be filled with their resource value using ‘object →obtain resources’.

Resources are associated to classes using ‘class →resource’ or, when using the Prolog class interface, using the term resource/[4,5].

13.1 Class resource — Access to the X11 resource manager

Inheritance: ⇒ resource ⇒ object

A resource forms an interface to the X-window resource mechanism, which provides a mechanism for users of PCE and PCE-based applications to set their private defaults.

Resources may be attached to PCE classes using ‘Class →resource’. The Prolog class compiler defines the term resource/[3,4] for defining resources.

The X-name for a PCE resource value is

    Pce.<CapitalClassName>.<attribute_name>.

See the file ‘@pce ←home’/Pce for examples.

The available resources for a particular class as well as their defaults may be obtained using the ‘ClassBrowser’. Resources are also annotated in the paper reference manual. See ‘Notation’.

Resource-values for particular objects are obtained using ‘object ←resource value’ or ‘object →obtain resources’.

The method ←convert string converts the textual representation specified in the ←default slot and/or the X11 resource file into a PCE value.

Instance Variables

type

type ← type Type requested

name

name  ← name  Name of the resource
resource class  ← name  Class of the resource

context

context ← object* Object resource is associated with

resource

default ← string Default if no resource defined

manual

summary ↔ string* Summary documentation

cache

value  - any  Value of the resource

Behaviour

13.1.1 Oms — Object management operations

Send Method initialise name=name, class=[name], type=[type], default=string,

context=[object]*, summary=[string]*

Send Method initialise name=name, class=[name], type=[type], default=string,

context=[object]*, summary=[string]* Refinement of: object->initialise Create a resource object from the following arguments:

• name Attribute name of the resource (lowercase)

• class X resource class-name. When not specified, this is the capitalised version of the name (see ‘char array ←capitalise’).

• type Type of the value. The type must define a conversion from a char array object as the value is described as text.

• default Value converted (using ←type) if there is no specification in one of the X resource files.

• context Object this resource is a resource of. In practice this is always an instance of class class.

• Summary Summary documentation string.

The following example associated a size resource to a class. Note that the default is a text rather than an instance of class size.

    send(Class, resource, resource(size, @default, size, '100x50')).

13.1.2 Type — Type definition, test and conversion

Get Method sub class=class ⇒resource Refined resource when redefined by user

Variable type type (←)

Type of the resource’s ←value. Used by ‘resource →convert’ to convert the ←string value to ←value.

13.1.3 Name — Naming objects

Variable name name (←)

Name of the resource. This is the last part of the specification in the resource file.

Variable resource class name (←)

Class of the resource. Different resources that belong to the same class may be specified by the user using a single line in ~/.Xdefaults.

Normally a resource’s ←name is the name of the method it belongs to and a resource’s ←resource class is a capitalised version thereof. This implies all resource-specified defaults for a certain selector may be specified using the resource class mechanism:

    Pce*LabelFont: @times_roman_14

Will display all ←label font resources in this font.

Get Method resource class name ⇒name Get Method resource class name ⇒name

X-Classname for the resource. The resource is named

    Pce.←resource_class_name.←name

The ←resource class name is a capitalised (see ‘char array ←capitalise’) version of the name of the class in ←context. If this cannot be resolved, the name object ’???’ is returned.

13.1.4 Context — Context I belong too, I am executed in

Variable context object* (←) Send Method context object=object

Object the resource is associated with. In the current implementation this is a class.

13.1.5 Value — Related value

Get Method convert string textual=char array ⇒any|function Get Method convert string textual=char array ⇒any|function

This method is called by →obtain to convert the textual value returned by ←string value into a true PCE object that satisfies the ←type of the resource. It performs the following steps:

1. If the requested type is a ‘name’ or subtype thereof, translate it to uppercase if PCE is running in uppercase mode (see ‘@pce →syntax’).

2. If the requested type is a ‘char array’ or subtype thereof, convert the value directly to this type and return the result of this conversion. This conversion is also performed if ‘textual’ is an empty string.

3. Take the result of ‘@resource parser ←parse’ and convert this to the requested type. This basically converts a string of the format <class>(<arg>, ...) into an instance of this class. The remainder of this is for backward compatibility.

4. Hand the string directly to the ‘type ←check’ method of the ←type. When successful old-style syntax is assumed and the error old resource format is raised.

Send Method obtain [object] Compute the value of the resource when not already done. First obtains the value as a string using ←string value and than converts the value using ←convert string.

If it fails to convert the value returned by ←string value, it will print

    "%s.%s: failed to convert %s; using PCE's default"

After which it will try to convert the value from ←default. When not successful it will generate a fatal error as most code in XPCE is not designed to handle a resource returning no value or an illegal value.

Get Method string value context=[object] ⇒char array Get Method string value context=[object] ⇒char array

Obtain the string value for this resource prior to conversion to the indicated PCE ←type. This value is obtained from:

1. ~/.Xdefaults

2. ~/Pce or /usr/lib/X11/app-defaults/Pce 3. ←default.

A PCE resource maps on an X-subresource of the (invisible) applicationShell widget that represents PCE’s main window. The name of this shell is "xpce" and the resource class is defined by ‘display ←resource class’ (default "Pce"). ←string value makes request to XtGetSubResources() with the following parameters:

Widget Pce’s main window ”xpce”/‘display ←resource class’
name ←name
class  ←resource class
type  XtString

Get Method value context=[object] ⇒any Obtain the value of the resource as an XPCE object. Invokes →obtain and then returns the value of the -value variable.

Normally resource values are obtained using ‘object ←resource value’ or ‘object →obtain resources’.^{1}

Send Method value any=any Set the ←value of the resource. Setting a resource value this way overrules the default resource obtaining mechanism described with ←string value by assigning -value with the argument and ←obtained with @on.

Used infrequently.

13.1.6 Resource — Interface to ~/.Xdefault

Variable default string (←)

Default string representation when not specified in one of the X-default files (~/Pce or /usr/lib/X11/app-defaults/Pce, ~/.Xdefaults). See ←string value.

13.1.7 Textual — Textual representation

Get Method print name ⇒name

Refinement of: object<-print name Class.name

13.1.8 Manual — Support for the online reference manual

Get Method group ⇒name

Refinement of: object<-group Same as related variable

Send Method has source

Test if object may have associated sourc

Get Method man attribute name=name ⇒unchecked Refinement of: object<-man attribute Get default value of resourc

1 This method returns the *same* instance on subsequent calls. Returning a copy would be better.

Get Method man card class ⇒class

Manual card type

Get Method man creator ⇒name

Refinement of: object<-man creator ←creator of the ←conte

Get Method man id ⇒name

Refinement of: object<-man id Card Id for resource

Get Method man indicator ⇒name

Refinement of: object<-man indicator Manual type indicator (‘R’)

Get Method man inherited attribute name=name ⇒tuple

Refinement of: object<-man inherited attribute Inherit description from variabl

Get Method man module name ⇒unchecked

Refinement of: object<-man module name Manual module name for metho

Get Method man name ⇒unchecked Refinement of: object<-man name Name for relation browse

Get Method man summary ⇒string

New string with documentation summary

Get Method source ⇒unchecked Find source (same as related cla

Variable summary string* (↔)

Summary documentation string displayed in the online manual summary browsers.

13.1.9 Cache — Caching information (speed up)

Variable value any (-)

Value of the resource. As long as the value has not been requested, this is the constant @not obtained.

Chapter 14 Organisation of Graphics

14.1 Class visual — Superclass of everything that is visible

Inheritance: ⇒ visual ⇒ object

Class ‘visual’ is a superclass of all classes who’s instances normally causes a direct visual effect on the display. Of course this entails the classes graphical and window. In addition it entails classes such as dict item (which is visible in a browser) and display (which represents the entire screen). Class visual serves two purposes:

• Define the consists-of hierarchy of visual objects. The methods ‘Visual ←contained in’ and ‘Visual ←contains’ define a hierarchy of visual objects. This hierarchy allows one to examine the ‘visual world’ of PCE and to determine relations between visual objects. This hierarchy is used by the ‘Visual Hierarchy’ browser of the manual tools.

• Provide a common place for additional methods. For the implementation of some user interface management system on top of PCE, class visual provides one place where central methods operating on visual objects can be defined. Attaching methods to this class will (through normal PCE subclass inheritance) make the method available to any visible object.

The methods ‘Visual ←contained in’ and ‘Visual ←contains’ actually are empty. Each subclass of visual provides the appropriate definitions.

Note that the display manager object @display manager is the root of the consists-of hierarchy.

Behaviour

14.1.1 Oms — Object management operations

Send Method destroy

Invokes →free on the visual and all parts of this visual that are not protected. This method may be used to destroy an entire tree of visual objects.

First, it collects all visuals that are part of it and not protected or part of a protected visual using ‘visual ←contains’. Then it will send free to all collected visuals. This method takes care of the fact that freeing one visual might result in the destruction of others.

14.1.2 Event — Event processing

Get Method master ⇒visual

Returns the ‘stand-alone’ visual of this visual. This definition is vague and its implementation is equally ill defined. The idea is illustrated in the view ↔ editor example:

If the programmer creates a view object, s/he creates a specialised window with an editor displayed inside it. The view delegates to its editor object and the programmer does not have to be aware that the view consists of multiple objects. Class editor however sometimes invokes associated messages (for example ‘editor ↔error message’. We would like to retain the invisibility of the multiple objects by binding @receiver to the view rather than to the editor itself.

The ←master method is a (bad, but we needed something) attempt to solve this problem. It knows about some of these combinations and will return the proper ‘main’ object.^{1}

14.1.3 Report — Reporting events, status and errors

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ...

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ... Refinement of: object->report The method →report provides a general mechanism to present short descriptions of status, warnings or errors to the application user. This method is integrated with the general error reporting mechanism (see ‘object →error’ and class error.

If no visual object is available to send the report to, ‘object →report’ may be used.

The first argument describes the type of the message to be reported. The type is an indication on how ‘serious’ the message is and thus how much attention it should attract from the application user. Its values are:

• status Information on progress, status change of the system, etc. such information should not attract much attention. By default, PCE will format the message at an appropriate location. If no such location can be found the message is ignored

• inform The user requested information and this is the reply. Handled as ‘status’, but if no appropriate location can be found it will invoke ‘display →inform’.

• progress Indicates progress in ongoing computation. Feedback is generally similar to ‘status’, but followed by a ‘graphical →flush’ to take immediate effect.

• done Terminates a (sequence of) →report: progress messages.

• warning The user probably made a minor mistake for which a simple alert such as provided by ‘graphical →alert’ suffices. If there is an appropriate location for the message it will be formatted there.

• error Something serious went wrong and the user needs to be informed of this. For example a file could not be read or written.

The remaining arguments are a format specification and format arguments. See ‘string →format’ for details on PCE’s formatting capabilities.

The method ‘visual →report’ performs the following steps:

1. Ask for a visual that might be able to report the message using ‘visual ←report to’.

2. If such an object exists and @reportee equals @nil, bind @reportee to the receiver of the →report message. @reportee thus points to the original visual object that received the →report message.

3. Invoke →report with the same argument on the object.

1 This method should not be there. As soon as a better solution to this ‘composite object’ problem is found we will replace this.

The method ‘visual →report’ is redefined by various subclasses. The most important are: ‘label→report’, ‘frame →report’ and ‘display →report’.

Get Method report to ⇒visual Get Method report to ⇒visual

Object capable of handling a →report. By default this is the same as ←contained in.

14.1.4 Organisation — Organisation of (graphical) objects

Get Method contained in ⇒visual Get Method contained in ⇒visual

Returns the ‘parent’ visualiser. Defined at each of the various subclasses of visualiser to deal with the different implementations. All visualiser classes should define this method, except for class display which is at the root of the visualise consists-of hierarchy.

Send Method contained in visual=visual Succeeds if I’m contained in the argument visual object. This method walks up the visualisation contained hierarchy using ‘Visual ←contained in’. A visual is defined to be contained in itself.

Get Method container class|code ⇒visual Find the innermost graphical in the consists-of hierarchy defined by class visual and its sub-classes that satisfies the given condition. Arguments:

@arg1 Visual object considered

Providing a class argument is a shorthand for

    message(@arg1, instance_of, <class>).

See also ‘←contains’, ‘←contained in’, ‘graphical ←window’, ‘graphical ←frame’ and ‘graphical ←display’.

Get Method contains ⇒chain Get Method contains ⇒chain

Returns a chain with the visualisers of the next level of the contains hierarchy. Each of the subclasses that defines a ‘compound’ visualiser defines this method to deal with it’s particular implementation.

Get Method frame ⇒frame

Frame I’m part of (when existing). This method uses ←contained in to walk up the consists-of hierarchy of graphical objects until it finds and instance of class frame. Fails silently if no frame can be found, which is the case if the receiver is not displayed, is a display object or @display manager.

See also ‘graphical ←window’ and ‘graphical ←device’

14.1.5 Abort — Cleanup after aborting execution

Send Method reset Send Method reset

This method sends →reset to all visual objects it contains (recursively). ‘Visual →reset’ is automatically invoked from the host-language after an abort to the hostlanguage toplevel. Various subclasses of visual implement this method to reset parameters such as status, event-focus, etc.^{2}

2 Recovery after a crash or abort is not very save. The consistency of the objectbase may be violated, gesture objects often cannot be tracked and reset, etc.

410 Class visual XPCE Reference Manual

Chapter 15

Graphics Support Data

This chapter describes datatypes to support graphics. The datatypes of this chapter are designed to just support graphics. PCE also defines a large collection of generally applicable primitive datatypes.

The graphics support datatypes are organised into two groups: communication about geometry and communication about appearance (colour, font, cursor, etc.).

15.1 Class point — Position in a two-dimensional space

Inheritance: ⇒ point ⇒ object

A ‘point’ describes a discrete position in an infinite two-dimensional plain. Points are used to describe positions when communicating with graphical objects.

Note that the coordinate system used by PCE deals both with negative and positive coordinates.

Instance Variables

dimension

x  ↔ int  x-coordinate of point
y  ↔ int  y-coordinate of point

Behaviour

15.1.1 Oms — Object management operations

Send Method initialise x=[int], y=[int] Send Method initialise x=[int], y=[int]

Refinement of: object->initialise

Create a point object from its ←x and ←y value. When a value is omitted, 0 is used.

15.1.2 Copy — Copying instances

Get Method copy ⇒point New point with same ←x and ←y

Send Method copy from=point Copy x- and y values from the argument

15.1.3 Compare — Comparing objects

Send Method equal to=point Succeeds if ←x and ←y of both points are equal.

15.1.4 Dimension — Dimensions of (graphical) objects

Variable x int (↔) Variable y int (↔)

Coordinate of the point object. Most graphical objects interpret the value in pixel units.

15.1.5 Calculate — Compute properties

Get Method difference to=point ⇒point New point with ←x and ←y obtained by subtracting the receiver’s coordinates from the argument (vector subtraction). See also ←distance and →minus.

Get Method distance to=point ⇒int Rounded integer reflecting the (pixel) distance between both points.

Get Method minus point=point ⇒point New point p1 - p2

Send Method minus point=point Subtract x and y of argument point

Get Method mirror origin=[point] ⇒point New point mirrored over argument

Send Method mirror origin=[point] Mirror point around argument or (0,0)

Send Method offset dx=int, dy=int Add dx to ←x and dy to ←y. See also →plus.

Get Method plus point=point ⇒point New point p1 + p2

Send Method plus point=point Add x- and y-values of argument point

Send Method set x=[int], y=[int] Set x- and y-values

15.1.6 Textual — Textual representation

Get Method convert event|char array ⇒point Refinement of: object<-convert Convert event to its position relative to its receiver using ‘event ←position’ or a text of the form ‘<number>, <number>’. The latter is used to convert resource-values.

Get Method print name ⇒string

Refinement of: object<-print name Printed representation as <x>,<y>

15.2 Class size — Width and Height of a square area

Inheritance: ⇒ size ⇒ object

A size object represents the ←width and ←height of a (rectangular) area. Sizes are often used to communicate about sizes with graphical objects. Most graphical objects interpret sizes in pixel units. Some textual graphical object interpret them in character units.

Both the ←width and the ←height of a size may be negative. See class area for details on using negative width/height.

Instance Variables

dimension

height  ↔ int  Height (H) of the size
width  ↔ int  Width (W) of the size

Behaviour

15.2.1 Oms — Object management operations

Send Method initialise width=[int], height=[int] Send Method initialise width=[int], height=[int]

Refinement of: object->initialise Create size from width and height

15.2.2 Copy — Copying instances

Send Method copy size=size Copy W and H from argument

15.2.3 Compare — Comparing objects

Send Method equal size=size Succeeds if ←width and ←height of both size objects are equal.

15.2.4 Dimension — Dimensions of (graphical) objects

Variable height int (↔)

Height (H) of the size

Variable width int (↔)

Width (W) of the size

15.2.5 Calculate — Compute properties

Send Method offset width=int, height=int Add width to ←width and height to ←height.

Send Method set width=[int], height=[int] Set W and H from arguments Send Method union size=size

set W and H to maximum of the two

15.2.6 Textual — Textual representation

Get Method convert name=name ⇒size Refinement of: object<-convert Convert text ‘WxH’

Get Method print name ⇒string

Refinement of: object<-print name Printed representation as %dx%d

15.3 Class area — Rectangular set of pixels

Inheritance: ⇒ area ⇒ object

An area is a rectangular set of pixels. areas are used by graphical objects and windows to represent their position and size.

An area has an origin, described by the ↔x and ↔y attributes and a size described by the ↔width and ↔height attributes. All parameters are in pixel-units. An area with either ↔width or ↔height equal to 0 (zero) contains no pixels.

The position of the origin with respect to the rectangle is determined by the sign of the width and height attributes. See area →orientation and area →normalise.

Class area supports class graphical to represent the area of the graphical in the coordinate system of its device. Most of the methods defined on class area also exist on class graphical. For area’s, these methods are side-effect free, whereas for graphicals they change the geometry of the graphical. See ‘graphical →set’ and ‘graphical →geometry’.

Instance Variables

dimension

height  ↔ int  Height in pixels (may be negative)
width  ↔ int  Width in pixels (may be negative)

position

x  ↔ int  Origin’s X-value
y  ↔ int  Origin’s Y-value

Behaviour

15.3.1 Oms — Object management operations

Send Method initialise x=[int], y=[int], width=[int], height=[int] Send Method initialise x=[int], y=[int], width=[int], height=[int]

Refinement of: object->initialise

Creates an area with origin at (X,Y) and given width and height.

15.3.2 Copy — Copying instances

Send Method copy area=area Copy X, Y, W and H from argument area

Get Method normalised ⇒area

Return a new area object that describes the same collection of pixels and has ←orientation = north west.

15.3.3 Relation — Relations, constraints, (graphical) connections

Get Method distance area=area ⇒int Yields the length of the shortest line that can connect a point on the outline of the first area with a point on the outline of the second area. Yields 0 if the graphicals overlap.

Get Method distance x area=area ⇒int Yields an integer representing the distance between the areas in X-direction. Yields 0 if both areas overlap in X-direction.

Get Method distance y area=area ⇒int Yields an integer representing the distance between the areas in Y-direction. Yields 0 if both areas overlap in Y-direction.

Send Method in point=point Test if point is in area

Send Method inside area=area Succeeds if the argument area is inside this area. See also →in, ‘graphical →in event area’ and →overlap.

Get Method intersection area=area ⇒area New area object that represents the largest area of the two argument areas. The ←orientation of the new area is the same as that of the receive.

Send Method intersection area=area

Area becomes the intersection with the argument area. The intersection is the largest (rectangular) area that is →inside both area’s. To get the intersection without modifying either of the areas, use ←intersection. Fails without modifying the area if the areas do not →overlap.

Get Method less sides area=area ⇒int Like →same sides, but returns those ‘sides’ for which the value in the receiver is closer to the origin (i.e. ‘less’) then for the argument area.

Get Method near sides area=area, int=int ⇒int Same as ←same sides, but accepts sides to be the same when they are within the specified distance. With distance 0, exactly the same as ←same sides.

Send Method overlap area=area Succeeds if both areas describe common pixels. If this message succeeds, ←distance returns 0 and →intersection computes the common pixels.

Get Method same sides area=area ⇒int Returns a bitmask for sides that have the same value on both arguments. Implemented in the darkness of time for handling automatic layout. The values of the mask are:

    Receiver    Argument    Value (octal)
    ======      =======     ====
    top         top         01
    top         center      02
    top         bottom      04
    center      top         010
    bottom      top         020
    bottom      center      040

bottom      bottom      0100
left        left        0200
left        middle      0400
left        right       01000
middle      left        02000
middle      middle      04000
middle      right       010000
right       left        020000
right       middle      040000
right       right       0100000

The PCE/Prolog library file ‘area.pl’ defines these bitmasks.

15.3.4 Equality — Comparing objects

Send Method equal area=area Succeed if the normalised representation of both areas is the same. See →normalise.

15.3.5 Orientation — Horizontal or vertical orientation

Send Method normalise

Places the origin at the top-left corner. Equivalent to →orientation: north west.

Get Method orientation ⇒{north west,south west,north east,south east} Current orientation. See →orientation for details.

Send Method orientation {north west,south west,north east,south east} An area object is described by its ←x, ←y, ←width and ←height. The point (←x, ←y) is called the origin or ←position. Either or both ←width and ←height (together representing ←size) may be negative. This method manipulates one or both of the pairs ←x/←width or ←y/←height such that the origin becomes the indicated corner.

The call →orientation: north west is equivalent to →normalise.

→orientation →width →height
================================
north_west      >= 0    >= 0
south_west      >= 0     < 0
north_east       < 0    >= 0
south_east       < 0     < 0

15.3.6 Resize — Controlling and trapping resizes

Send Method clear

Equivalent to →set: 0, 0, 0, 0. Note that an area with ←width or ←height equal contain no pixels and →union with such an area is a no-op.

Send Method corner point=point Manipulate ←width and ←height such that ←corner matches the argument point. Its ‘graphical →corner’ counterpart is sometimes used to implement resizing.

Send Method decrease int=int

Makes the area from all sides smaller by the specified amount. For normalised areas (see →normalise), this implies:

    ←width := ←width - 2*<arg>
    ←x     := ←x + <arg>

and similar for ←y and ←height. Deals properly with non-normalised areas.

Send Method increase int=int

Move all sides outward. This is the opposite operation of →decrease.

Send Method set x=[int], y=[int], width=[int], height=[int] Sets ←x, ←y, ←width and ←height from the 4 integer arguments. Any argument that is @default will not cause the corresponding parameter to be changed.

Send Method size size=size Sets →width and →height from the corresponding size parameters.

Get Method union area=area ⇒area New area from union

Send Method union area=area Enlarge the area such that it represents the smallest area containing both area objects. ←union computes the same without changing either of the area objects.

15.3.7 Dimension — Dimensions of (graphical) objects

Variable height int (↔)

Height of area in pixels. Zero height implies the area contains no pixels. With a positive value, the origin is at the top, with a negative value it is at the bottom.

Get Method measure ⇒int

‘Area’ of the area

Get Method size ⇒size

New size object from the ←width and ←height of the area. Note that either or both may be negative. See →orientation.

Variable width int (↔)

Width of area in pixels. Zero width implies the area contains no pixels. With a positive value, the origin is at the left, with a negative value it is at the right.

15.3.8 Position — Position of objects

Get Method center ⇒point

New point from center position Send Method center point=point

Move the ←x and ←y of the area such that the ←center of the area matches the argument point.

Get Method corner ⇒point

New point at ←x + ←width, ←y + ←height

Get Method position ⇒point

New point object from ←x and ←y.

Send Method position point=point Copy ←x and ←y from the corresponding values of the point object.

Send Method relative move point=point

Executes ←x := ←x + ‘point ←x’ and ←y := ←y + ‘point ←y’.

Variable x int (↔)

X-coordinate of the area. The value may both be positive and negative, indicating the origin of the area to be at the right, resp. left of the origin of the coordinate system.

Variable y int (↔)

Y-coordinate of the area. The value may both be positive and negative, indicating the origin of the area to be at below/above of the origin of the coordinate system.

15.3.9 Side — Edges of graphicals

Get Method bottom side ⇒int Get Method left side ⇒int Get Method right side ⇒int Get Method top side ⇒int

Return the pixel position of the specified edge. Deals properly with areas in any ←orientation.

15.4 Class region — Region of an area

Inheritance: ⇒ region ⇒ object

A region object defines a sub-area of an area, expressed using function objects to denote the X, Y, W and H of the sub-area in terms of the dimensions of the main area.

Regions are used by handler objects to denote the handler should only respond when an event object occurred in some sub-area of a graphical. As handler objects have become old-fashioned since the introduction of class gesture this class too is seldomly used.

For example, the region

    region(x, y, w/10, h/10)

Denotes a region with the same origin as the area it is related to, extending to 10% in both directions.

Instance Variables

dimension

height  ↔ expression  H of area expressed in XYWH of area
width  ↔ expression  W of area expressed in XYWH of area
x  ↔ expression  X of area expressed in XYWH of area
y  ↔ expression  Y of area expressed in XYWH of area

Behaviour

15.4.1 Oms — Object management operations

Send Method initialise x=expression, y=expression, width=expression,

height=expression Refinement of: object->initialise Create region from XYWH-expressions

15.4.2 Compare — Comparing objects

Send Method inside area=area, point=point Test if point is inside region of area

15.4.3 Dimension — Dimensions of (graphical) objects

Variable height expression (↔) Variable width expression (↔) Variable x expression (↔) Variable y expression (↔)

Expresses the named dimension of the region in terms of the dimensions of the area (see →inside). The expression is passed the variables ‘x’, ‘y’, ‘w’ and ‘h’ denoting the dimensions of the area. See also class binary expression.

15.4.4 Calculate — Compute properties

Get Method area area=area ⇒area New area describing region of argument

Get Method area height area=area ⇒int Get Method area width area=area ⇒int Get Method area x area=area ⇒int Get Method area y area=area ⇒int

Dimension of the described region for the specified area. Example:

         ?- get(region(x+w/2, y+h/2, w/2, h/2), area_height,
                area(100, 100, 200, 200), H),
         H = 100

15.5 Class colour — Colour (RGB) definition

Inheritance: ⇒ colour ⇒ object

A ‘colour’ object represents a RGB (red-green-blue) colour value. Colours may be associated with graphical objects:

    ?- send(new(P, picture), open),
       send(P, display, new(B, box(100, 100))),
       send(B, colour, red).

Like fonts and cursors, colour objects are reusable (that is, they can be attached to multiple graphicals). PCE will not recreate the same colour object twice. Instead, it will just return an identical existing colour object. Unless user-defined colours are used, colours are normally just specified by name and converted by PCE’s type conversion mechanism.

The type conversion system converts names of colours as defined by the X-window system to colour objects. All created colours are in the table @colours.

Instance Variables

name

name ← name|int Name of the colour

kind

kind - {named,rgb} From X-colour database or user-defined

colour

blue  - [0..65535]  Blue value
green  - [0..65535]  Green value
red  - [0..65535]  Red value

Behaviour

15.5.1 Oms — Object management operations

Send Method initialise name=[name], red=[0..65535], green=[0..65535],

blue=[0..65535]

Send Method initialise name=[name], red=[0..65535], green=[0..65535],

blue=[0..65535] Refinement of: object->initialise Create a colour object from its name and optional RGB-triple. If no RGB values are specified the system will scan the X11 colour database.

Colours are most often just specified by their name. PCE’s type conversion mechanism (see ‘colour ←convert’) will convert the name into an appropriate colour object.

Get Method lookup [name|int], red=[0..65535], green=[0..65535], blue=[0..65535]

⇒colour

Get Method lookup [name|int], red=[0..65535], green=[0..65535], blue=[0..65535]

⇒colour Lookup in @colours table

Send Method unlink Send Method unlink

Refinement of: object->unlink Deallocate the colour object

15.5.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒colour Get Method convert name=name ⇒colour

Refinement of: object<-convert First performs a ←lookup in @colours (the already created colour objects). If this fails it will create a colour object from the name and RGB values from the X11 RGB database.

A name with format ‘#’ followed by 6 or 12 hexadecimal digits will be interpreted as a ‘RBG’ triple:

• c0453f

is translated to a colour named ‘#c0453f’ with ←red: 192*256, ←green: 69*256 and ←blue: 63*256. If there are 12 hexadecimal digits the values are not multiplied by 256.

This conversion is compatible with the X11 colour specification.

15.5.3 Name — Naming objects

Variable name name|int (←)

Name of the colour. Normally this is a name from the X11 colour database situated in /usr/lib/X11/rgb.txt (depending on your installation). If it is another name, the user must specify the RGB triple for the colour.

15.5.4 Kind — Category of the instance

Variable kind {named,rgb} (-)

When ‘named’, the colour was →initialise’d using only the name argument. The ←name must be a valid X11 colour-name. When ‘rgb’, the colour was created using an RGB-triple.

15.5.5 X — X-window interaction

Send Method xclose display=display Destroy window-system counterpart

Send Method xopen display=display Send Method xopen display=display

Create the X-counterpart for the specified display and register it in the internal Xreference table. The X-counterpart for a colour is not created before it is needed.

15.5.6 File — Saving and loading files, file operations

Get Method storage reference ⇒name

If the colour is of ←kind: named, return the ←name of the colour. Otherwise return ‘#<r><g><b>’, where <r>, <g> and <b> are two-digit hexadecimal numbers describing the colour components.

The return value of this method should be valid input for the ←convert method of the class.

See also ‘object ←storage reference’, ‘object →save in file’ and ‘file ←object’.

15.5.7 Colour — Defining and managing colours

Get Method blue ⇒[0..65535] Variable blue [0..65535] (-) Variable green [0..65535] (-) Variable red [0..65535] (-)

Colour component. Its value ranges from ‘0’ (off) to ‘65535’ (bright). Colours may also be used for grey-scale screens. Most hardware uses the ←green component of the colour for the grey-value.

Get Method green ⇒[0..65535] Green value

Get Method red ⇒[0..65535] Red value

15.5.8 3d — 3-D effect related methods

Get Method hilite ⇒colour Get Method reduce ⇒colour

Return a darker/light version of this colour. This method is together with ←hilite by class elevation to determine colours of the lighted and shadow sides of the elevated area.

If the colour object has the ←attribute ‘reduce/hilite’, return the value of this attribute. Otherwise fetch the ←resource value ‘reduce factor/hilite factor’, multiply ←red, ←green and ←blue with this factor and make a new colour from this. The new colour object is named ‘reduced /hilited <old colour name>’ and is registered as the ‘reduce/hilite’ ←attribute.

15.5.9 Grey — Colour to greylevel transformation

Get Method intensity ⇒0..65535

Returns the corresponding grey-value of a colour. This value is computed as:

    0.5 ←green + 0.32 ←red + 0.18 ←blue

15.6 Class elevation — Description of an elevation

Inheritance: ⇒ elevation ⇒ object

General description of an elevated area. Elevations are mainly used to describe the edges of dialog item objects. Elevations area reusable named objects. In its most simple form, an elevation object is simply created from its ←height:

    new(X, elevation(1))

describes a ←kind: 3d elevation suitable for a colour environment.

Elevations come in two flavours: ←kind: 3d will paint a hilited edge on the top and left sides of the object and a reduced edge on the bottom and right sides. By default these colours are computed from the context background colour using ‘colour ←hilite’ and ‘colour ←reduce’.

A ←kind: shadow elevation is designed for monochrome displays. It will paint a shadow at the bottom and right side of the objects to simulate the object elevated above the surface.

Instance Variables

name

name ← name|int* Name for reuse

appearance background

← [{hilited,

reduced}|colour|pixmap]

Colour/pixmap when area is lowered

colour

← [{hilited,

reduced}|colour|pixmap]

Colour/pixmap to paint the ‘top’

height  ← int  Height above the surface
kind  ← {3d,shadow}  How the elevation is realised
relief  ← [colour|pixmap]  Colour/pixmap used at ‘light’ side
shadow  ← [colour|pixmap]  Colour/pixmap used at ‘dark’ side

Behaviour

15.6.1 Oms — Object management operations

Get Method convert name|int ⇒elevation Get Method convert name|int ⇒elevation

Refinement of: object<-convert

The ←convert and ←lookup methods realise reuse of elevation objects from the @elevations table.

Send Method initialise name=[name|int]*, height=[int], colour=[{hilited}|colour|pixmap], relief =[colour|pixmap], shadow=[colour|pixmap], kind=[{3d,shadow}], background=[{reduced}|colour|pixmap]

Send Method initialise name=[name|int]*, height=[int], colour=[{hilited}|colour|pixmap], relief =[colour|pixmap], shadow=[colour|pixmap], kind=[{3d,shadow}], background=[{reduced}|colour|pixmap]

Refinement of: object->initialise

Create from ←name and description parameters. In most cases the user will create an elevation object simply from its ←height:

    ?- new(X, elevation(1)).

This will create a default elevation object. See the various attributes for the interpretation of the default values.

Send Method unlink

Refinement of: object->unlink If the ←name is not @nil, delete this elevation from the reuse table @elevations.

15.6.2 Name — Naming objects

Variable name name|int* (←)

Identifier for reuse. All elevation objects created with a non @nil ←name are stored in the table @elevations. ←convert will convert elevation identifiers to elevation objects.

15.6.3 Behaviour — Definition of behaviour

Get Method lookup name=[name|int]*, height=[int], colour=[{hilited}|colour|pixmap], relief =[colour|pixmap], shadow=[colour|pixmap], kind=[{3d,shadow}], background=[{reduced}|colour|pixmap] ⇒elevation

Get Method lookup name=[name|int]*, height=[int], colour=[{hilited}|colour|pixmap], relief =[colour|pixmap], shadow=[colour|pixmap], kind=[{3d,shadow}], background=[{reduced}|colour|pixmap] ⇒elevation

The ←convert and ←lookup methods realise reuse of elevation objects from the @elevations table.

15.6.4 Appearance — “Look-and-feel” related aspects

Variable background [{hilited,reduced}|colour|pixmap] (←) Send Method background [{hilited,reduced}|colour|pixmap]

Colour/pixmap when area is lowered

Variable colour [{hilited,reduced}|colour|pixmap] (←) [Pce.Elevation.colour:

@default]

Send Method colour [{hilited,reduced}|colour|pixmap] Colour or pixmap object used to fill the top of the elevated area. When @default, only the edges will be painted.

Variable height int (←) [Pce.Elevation.height: 2] Send Method height int=int

Height above the surface. Actually this is the with of the edges painted with ←relief and ←shadow.

Variable kind {3d,shadow} (←) [Pce.Elevation.kind: 3d] Send Method kind {3d,shadow}

How the elevation is realised. The default is ‘3d’, which implies the top- and leftedges are painted using the ←relief colour and the bottom- and right sides using the ←shadow colour. ←kind ‘shadow’ will paint a shadow image at the bottom-right side of the object.

Get Method modify attribute={height,colour,relief,shadow,kind,background},

value=any ⇒elevation As elevation objects are reusable if they are named (see →initialise), attributes of named elevation objects cannot be modified. This method returns a new elevation object with the requested attribute modified if the ←name is not @nil and just modifies the attribute otherwise.

Variable relief [colour|pixmap] (←) [Pce.Elevation.relief: @default] Send Method relief [colour|pixmap]

Colour/pixmap used at ‘light’ side. When @default, the elevation object will invoke ‘colour ←hilite’ using the current background. See also ←shadow.

Variable shadow [colour|pixmap] (←) [Pce.Elevation.shadow: @default] Send Method shadow [colour|pixmap]

Colour used to paint the right and bottom edges of the object. When @default, the elevation object will invoke ‘colour ←reduce’ on the current background colour.

15.7 Class cursor — Cursor for the pointer

Inheritance: ⇒ cursor ⇒ object

Class cursor provides access to the available X-cursors and allows the user to define new cursors from two image objects.

Cursors are assigned at the level of graphicals. Given some position of the pointer, the displayed cursor is determined to be first graphical that will receive pointer-events from this position and that has a ‘graphical ↔cursor’ attribute not equal to @nil or @default. Normally, this is a graphical that overlaps with the pointer position and is exposed (i.e. above the other graphicals). When the event-focus is set for some device, the cursor is set to the cursor attribute of the graphical in focus, provided it’s value is a cursor (and not @default or @nil).

Like fonts and colours, cursors are reusable objects and are automatically shared. If the ←name of the cursor is @nil, the cursor will not be shared and may be →free’ed just like any other object.

The type conversion conventions will automatically transform an X-cursor name to a cursor object.

Instance Variables

name

name ← name* Name of the cursor

appearance

background  ← [colour]*  Background colour of the cursor
font id  ← [int]*  Id in X-cursor font
foreground  ← [colour]*  Foreground colour of the cursor
hot spot  ← point*  User-defined hot spot
image  ← image*  User-defined image
mask  ← image*  User-defined mask

Behaviour

15.7.1 Oms — Object management operations

Send Method initialise name=name*, image=[image], mask=[image],

hot spot=[point], foreground=[colour], background=[colour]

Send Method initialise name=name*, image=[image], mask=[image],

hot spot=[point], foreground=[colour], background=[colour] Refinement of: object->initialise This method takes two forms. If only a name is specified, this should be a name of a cursor that is predefined in @cursor names. This provides access to the X11 predefined cursors. See the demo program ‘Cursors’ for the available predefined cursors. A typical usage is:

         send(DebugIcon, cursor, spider).

In its second form it allows the user the define a cursor. Such a cursor consists of:

←name  Name for reference (see ←lookup).
←image  Image object describing the image.
←mask  Image object describing the shape.
←hot spot  Position of the pointer in the image.
←foreground Colour for the ‘1’-s in ←image
←background Colour for the ‘0’-s in ←image

←image must be specified. ←mask defaults to ‘image←mask’ of ←image, and then to ←image itself. If provided, it should be a copy of ←image with the interior and 1 pixel around the image set to ‘@on’. ←hot spot defaults to ‘image ←hot spot’, or otherwise to point(0,0). Both colours default to the fore- and background colours of the display on which the cursor is opened and often need not be specified.

We advice user-defined cursors to use an image specified in the XPM format (see ‘image →load)’. This format allows for the specification of both the image, the mask and the host-spot in a portable and easy fashion. The Unix pixmap program is a good tool for creating cursors.

The following example creates a hand cursor from the XPCE library images ‘hand.bm’ and ‘hand.mask’:

    ?- new(X, cursor(hand, 'hand.bm', 'hand.mask',
                     point(5, 1))).
    X = @hand_cursor

If the cursor has a ←name, it is locked using →protect. Otherwise the livetime of the cursor object and its related window-system resources follows the normal rules.

Get Method lookup name=name ⇒cursor Get Method lookup name=name ⇒cursor

Lookup from @cursors table

Send Method unlink

Refinement of: object->unlink Destroy the cursor

15.7.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒cursor Get Method convert name=name ⇒cursor

Refinement of: object<-convert Convert cursor-name to cursor

15.7.3 Name — Naming objects

Variable name name* (←)

Name of the cursor. All cursors (predefined or user-defined) are stored in the table @cursors. Note that the names of the predefined cursors are in @cursor names.

When @nil, the name does not appear in @cursors. The cursor is not reusable and may be destroyed using →free.

15.7.4 X — X-window interaction

Send Method xclose display=display Destroy X-cursor on display

Send Method xopen display=display Send Method xopen display=display

Create X-cursor on display

15.7.5 Appearance — “Look-and-feel” related aspects

Variable background [colour]* (←) Variable foreground [colour]* (←)

For user-defined cursors, the ←foreground and ←background define the colours for the ‘1’ and ‘0’ bits of the ←image. Only the pixels for which ←mask has a ‘1’ are affected.

Variable font id [int]* (←)

Predefined X11-cursors are defined as an X-font. This integer defines the index into the font for this cursor. It’s value is @default for named cursors that have not yet been opened and @nil for image defined cursors.

Variable hot spot point* (←)

If the cursor is user-defined, this describes the offset from the top-left of the image to the location of the pointer-device.

Variable image image* (←)

If the cursor is user-defined, this image of ‘image ←kind: image’ defines the cursor.

Variable mask image* (←)

When the cursor is user-defined, this image of ‘image ←kind: bitmap’ defines the pixels affected by ←image.

15.8 Class font — Text font

Inheritance: ⇒ font ⇒ object

A ‘font’ defines the appearance of a set of characters. In PCE, a font is determined by three characteristics:

• The ←family indicates the a group of fonts that belong to one-another. Examples are ‘helvetica’ and ‘times’

• Within a font family, each individual font has a ←style. The style indicates the role fulfilled by the text. Examples are ‘roman’ and ‘bold’.

• Finally, the ←points determines how height the characters are.

PCE uses the fonts from the X font library. The initially available fonts are determined by the resource Pce.Display.font families. The currently defined fonts may be found in the global table @fonts, At runtime, additional PCE-fonts can be created from X-fonts. The PCE demo programs include a font viewer to examine the currently loaded fonts.

All PCE text manipulation can deal both with fixed-width as with proportional fonts.

Many classes have one or more resources attached to them that define the default fonts.

Instance Variables

name

family  ← name  Family the font belongs to (times, etc.)
points  - [int]  Point-size of the font
style  ← name  Style of the font (bold, italic, etc.)

x

x name ← [name] Window-system name for the font

property

b16  - [bool]  If @on, font is a 16-bit font
fixed width  - [bool]  If @off, font is proportional

dimension

ex - int* Width of the letter ‘x’ in this font

postscript

postscript font  ↔ name  PostScript-name of the font
postscript size  ↔ int  PostScript point-size of the font

Behaviour

15.8.1 Oms — Object management operations

Send Method initialise family=name, style=name, points=[int], x name=[name] Send Method initialise family=name, style=name, points=[int], x name=[name]

Refinement of: object->initialise

Create a font object from its ←family, ←style, ←points and optionally ←x name.

Note that fonts are reusable objects. A send attempt to create a font with the same ←family, ←style and ←points will return the same font object (see ←lookup).

When a font object is created, there are not yet X-resources associated with it. The method →x open is called to create the X-counterpart when the font is needed for drawing text or for computation of one of its parameters.

The PostScript description parameters ↔postscript font and ↔postscript points are filled from the ←family, ←style and ←point.

Font objects will automatically be associated with the a named reference. This reference is of the form:

    @<family>_<style>_<points>

See ←convert and ‘object →name reference’.

Get Method lookup name=name, name=name, [int] ⇒font Get Method lookup name=name, name=name, [int] ⇒font

Lookup in @fonts table

15.8.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒font Get Method convert name=name ⇒font

Refinement of: object<-convert Converts:

• name of the form ‘@<family> <style> <points>’ This is used for backward compatibility only.

• Logical name

Convert a logical font-name into a font object using ‘display ←font alias’.

1

15.8.3 Name — Naming objects

Variable family name (←)

Family the font belongs to (times, etc.)

Get Method points ⇒int

Specified point-size or ←height

Variable points [int] (-)

Point-size of the font

Variable style name (←)

Style of the font (bold, italic, etc.)

15.8.4 Set — Set operations (no duplicates)

Send Method member char=char Test if font defines character

1 The logical naming service is only a temporary solution to a more general problem.

15.8.5 X — X-window interaction

Send Method xclose display=display Destroy associated X-resources

Send Method xopen display=display Send Method xopen display=display

Open the associated X-resources

Variable x name [name] (←)

Name of the font in the X-window system. See the X-program xlsfonts(1) for possible values.

15.8.6 Property — Font properties

Variable b16 [bool] (-)

If @on, font is a 16-bit font

Get Method default character ⇒char

Character painted for non-existing entries

Get Method domain [{x,y}] ⇒tuple Range of valid characters

Get Method fixed width ⇒bool Variable fixed width [bool] (-)

If @off, the font is proportional. If @on, it is a fixed width font. It’s value is computed by ←fixed width by comparing the width of the letter ‘i’ with the letter ‘w’. When equal, PCE assumes it is a fixed-width font.

15.8.7 Dimension — Dimensions of (graphical) objects

Get Method ascent ⇒int

Highest point above baseline

Get Method descent ⇒int

Lowest point below baseline

Get Method ex ⇒int Variable ex int* (-)

Width of the letter ‘x’. This value is normally used to compute the pixel width of objects from the number of character and the font. See class editor and class text item. See also ←width.

Get Method height ⇒int

Height of highest character in font

Get Method size ⇒size

New size from ←width and ←height Get Method width [char array] ⇒int

Width of the specified text in pixels when printed in this font. See also ←ex;

15.8.8 Encoding — Character-set related behaviour

Get Method b16 ⇒bool Boolean to indicate font is 16-bits

15.8.9 Postscript — Generating PostScript for printing

Variable postscript font name (↔)

When PostScript is created from a text object printed in the font, this is the name of the PostScript font to mount. Its default value is computed by →initialise. See also ↔postscript size.

Variable postscript size int (↔)

PostScript point-size of the font

15.9 Class image — 2-dimensional map of (coloured) pixels

Inheritance: ⇒ image ⇒ visual ⇒ object An image is a two-dimensional array of pixels. Images are used for various purposes:

• fill-patterns for graphicals

• ‘Image’ for frame-icons, cursors and other X-objects

• ‘Image’ for PCE bitmap objects

• ‘Image’ for various PCE objects: markers in menu’s, etc.

• Scratch area’s to for background graphical operations.

The most common usages for application programmers are fill-patterns and bitmaps to be used as icons. In both forms, the pixels of the image are normally never changed and the image may thus be reused. For this reason, images are normally created from a file argument. They are created as read-only images (see ‘Image ↔access’). See ‘Image →initialise’ for details.

Instance Variables

name

name ← name* Name of the image

file

file ← file* File from which to load

colour

background  ↔ [colour|pixmap]  Colour of background (pixmap)
depth  ← [int]  Number of bits/pixel
foreground  ↔ [colour|pixmap]  Colour of foreground (pixmap)
kind  ← {bitmap,pixmap}  ‘bitmap’ (0 and 1’s) or ‘pixmap’ (coloured)

area

mask ← image* Image for masked painting

dimension

hot spot  ↔ point*  Hot-spot position
size  ← size  Size of the image in pixels

permission

access ← {read,both} One of {read, both}

organisation

bitmap  ← bitmap*  Access both and displayed on this bitmap
display  ← display*  X-Display this image belongs to

storage

ws ref  - alien:WsRef  Window System Reference

Behaviour

15.9.1 Oms — Object management operations

Get Method convert bitmap|name|graphical ⇒image Refinement of: object<-convert Converts either of:

• Name of the form ’@<reference>’ (see ‘object ←convert’)

• A bitmap object to its ‘bitmap ←image’

• Member name of @images

• Name of a file that appears in the resource Pce.Image.path The first is to support the specification of predefined images from resources. The latter two support fast and simple loading of shared images from a file.

Send Method initialise name=[name]*, width=[int], height=[int],

kind=[{bitmap,pixmap}]

Send Method initialise name=[name]*, width=[int], height=[int],

kind=[{bitmap,pixmap}] Refinement of: object->initialise There are two common forms to create an image:

• Read-only images from a file These are created using new(I, image(Name)). In this form, the initialise method does a lookup on the table of reusable images @images. If ‘Name’ is found there, the reusable image is returned. Otherwise a new image is created and it is loaded with the named file (see ‘Image →load’).

• Read-write images Normally created as new(I, image(@nil, Width, Height)). These images are not reused.

Get Method lookup name=name ⇒image Get Method lookup name=name ⇒image

Lookup in @images table

Send Method unlink

Refinement of: object->unlink Destroy private memory and X-resources

15.9.2 Copy — Copying instances

Get Method clip [area] ⇒image Return a new read/write image with the pixels of the specified area of the receiver. Area defaults to 0, 0, ←width, ←height.

Send Method copy from=image Copy contents of argument in image

Send Method draw in graphical=graphical, at=[point] Paint graphical in image [at point]

Get Method monochrome ⇒image

Get monochrome version of pixmap image

Get Method rotate degrees=int ⇒image Creates a copy of the image object that is rotated by the given number of degrees. Positive angles are interpreted as anti-clockwise rotation. The resulting image is generally larger as it is still a strictly horizontal/vertical rectangle. For images of ←kind: bitmap, the new area is filled with @off pixels. For colour images (←kind: pixmap), the new area is filled with the ←background of the image, or the ‘display←background’ of the ←background of the image is @default.

The ←rotate method is notably useful to print rotated (vertical for example) text. The following example explains this:

    draw_vertical(String, Dev, X, Y, Font) :-
        new(T, text(String, left, Font)),
        new(I, image(@nil, T?width, T?height, bitmap)),
        get(I, rotate, 90, I2),
        send(Dev, display, bitmap(I2), point(X, Y)).

The result should be perfect if the rotation is a multiple of 90 degrees. Otherwise the result may vary. The X11 version uses an algorithm that is loosely based upon xvertext 5.0 by Alan Richardson. The Win32 version uses the world-transformation matrix API. This API is NOT supported in Win32s (Windows 3.1), so rotation only works using Windows 95 or NT.

The ←mask and ←hot spot attributes are updated automatically.

See also ←scale.

Get Method scale size=size ⇒image Creates a copy of the receiver scaled to the specified dimensions. The Win32 version uses the Windows API function StretchBlt(), while the X11 version uses a very simple algorithm based on the zoom code of xloadimage written by Jim Frost.

Notably the X11 version should be regarded as a ‘Quick and Dirty’ solution. If quality scaling is required, use an external image-manipulation package, for example, ‘xv’, (shareware for X11) or the netpbm package distributed as freeware for X11. The latter consist of a number of simple Unix filters, that can easily be called from XPCE/Prolog.

The specification of the scaling is in terms of the size of the destination rectangle rather then a factor to avoid rounding problems. To magnify a bitmap by a factor use:

    magnify(Im, Factor, Magnified) :-
        get(Im, size, size(W, H)),
        NW is round(W * Factor),
        NH is round(H * Factor),
        get(Im, scale, size(NW, NH), Magnified).

See also →resize and →rotate.

15.9.3 Name — Naming objects

Variable name name* (←)

Name of the image. Used for the lookup of reusable images. See @images and ‘Image →initialise’.

15.9.4 Pixel — Pixel manipulations

Send Method clear pixel x=int, y=int Clear pixel at x-y (to 0 or background)

Send Method invert pixel x=int, y=int

Invert the pixel at X,Y. Note that this operation is ill defined for images with ←depth > 1.

Get Method pixel x=int, y=int ⇒bool|colour Get 0-1 (image) or colour for x-y Send Method pixel x=int, y=int, value=bool|colour

Set pixel at x-y to bool or colour

Send Method set pixel x=int, y=int Set pixel at x-y (to 1 or foreground)

15.9.5 X — X-window interaction

Send Method xclose display=display Called internally to destroy the associated Window System resources. See also → xopen.

Send Method xopen display=display Send Method xopen display=display

Open X-image

15.9.6 File — Saving and loading files, file operations

Variable file file* (←)

File from which the image was loaded. @nil for images that are not connected to a file.

Send Method load from=[file], path=[char array] Send Method load from=[file], path=[char array]

Load the image from the named file or ←file. First, the file is located using ‘file →find’ in either ‘path’ or the resource Pce.Image.path. When successful, the image is loaded. This method automatically recognises the following formats:

• Standard X11 bitmap (XBM) and pixmap (XPM) formats

• PNM (Portable Any Map)

• Windows .BMP, .ICO and .CRS formats (Windows version only).

• JPEG and GIF for compressed real-life images.

When loading an XPM (colour) image, the ←hot spot and ←mask attributes are filled automatically. XPM is the recommended format for colour icons that are to be used with XPCE. XPM files may be created using the X11 pixmap utility.

On Windows systems, icons and cursors may be used in the native .ICO or .CRS formats. If portability to the Unix version is required, the images should be loaded in XPCE and saved as .XPM files using →save.

See also pce image directory/1.

Send Method save in=[file], format=[{xbm,xpm,pnm,pbm,pgm,ppm}] Saves the data of the image for later use or use by external applications. The format argument describes the format in which the data is written:

• xbm (default)

The X11 bitmap format. All versions of XPCE can read this format, only the X11 implementation can write them as yet. The xbm format can only represent ←kind bitmap images.

• xpm The X11 pixmap format. Only the X11 version can read and write this format, provided it is configured on a system holding the -lXpm library. On other systems, the error no image format will be raised.

• pnm (Portable aNy Map) Selects either or pbm, pgm or ppm, depending on the characteristic of the image. ←kind: bitmap are stored as pbm. ←kind: pixmap is stored as pgm if for all pixels, the red, green and blue values are equal and as ppm otherwise.

• pbm (Portable BitMap) Rawbit version of this format. pbm files can only represent ←kind: bitmap images.

• pgm (Portable GreyMap) Represents the data as a two-dimensional intensity map.

• ppm (Portable PixMap) Represents the data as a two-dimensional map of RGB triples.

The PNM/PBM/PGM/PPM format is the central format of a set of public tools for the transformation of images. This toolkit is known as pbmplus. The sources for this toolkit are available from:

ftp://swi.psy.uva.nl/pub/xpce/util/pbmplus10dec91.tar.gz
ftp://swi.psy.uva.nl/pub/xpce/util/netpbm-1mar1994.tar.gz

There are many copies of this toolkit on anonymous ftp sites.

15.9.7 Colour — Defining and managing colours

Variable background [colour|pixmap] (↔)

Colour used to clear area’s for images of ←kind pixmap.

Get Method colour map ⇒colour map

New colour map for best display of image

Variable depth [int] (←)

Number of bits storage used per pixel. 1 if ←kind equals bitmap. The depth of the display otherwise.

Variable foreground [colour|pixmap] (↔)

Default colour used for drawing graphicals on images of ←kind pixmap.

Variable kind {bitmap,pixmap} (←)

‘Image ←kind’ determines the meaning of a pixel-value:

• bitmap A pixel value is either @on or @off. When displayed as a graphical object, @on pixels are painted in the colour of the graphical and @off pixels in the background colour.

• pixmap A pixel value is a colour. When displayed as a graphical object, these are the true colour used. Within some limits dictated by the colour organisation of the hardware, each pixel may have a different colour.

Coloured bitmaps cannot yet be saved to file or loaded from file. PCE encourages the use of →kind bitmap as this format may be interchanged between various different screen types.

15.9.8 Area — Handling size and position

Variable mask image* (←) Send Method mask image*

Image for masked painting. The argument image must be ot ←kind: bitmap. Paint will be applied on all places where the mask image has pixels @on. All other places are left untouched.

Note that, for monochrome bitmaps (kind: bitmap), ‘bitmap →transparent’ does the same as making the image a mask of itself.

When loading XPM files that have an associated shape extension, (expressed as pixels of colour ‘None’), the shape image will be associated with the loaded image as the ←mask. See also →load.

15.9.9 Dimension — Dimensions of (graphical) objects

Variable hot spot point* (↔)

Hot-spot position. Its value may be set manually, or loaded from a file in XPM format. See →load for details.

Send Method resize width=int, height=int Resize the image to the given width and height. The data is retained (as far as applicable). ‘New’ areas are filled with the ←background or @off. See also ←scale.

Variable size size (←)

Size of the two-dimensional array of pixels (in pixel-units).

15.9.10 Permission — Access rights

Variable access {read,both} (←)

Either ‘read’ or ‘both’. The first is used for reusable images loaded from a file. The latter is used for read-write images. In this case the image may be associated with only one bitmap. Changes to the image are forwarded to the bitmap.

15.9.11 Edit — Modify object

Send Method and image=image, at=[point] Edit operation: bitwise and operation with the argument image.

Send Method clear

Clear all pixels to 0 or ←background

Send Method fill image=image, [area] Send Method fill image=image, [area]

Fill rectangular area of image with pattern

Send Method invert

Invert all pixels in image

Send Method or image=image, at=[point] Bitwise or with argument

Send Method xor image=image, at=[point] Bitwise xor with argument

15.9.12 Organisation — Organisation of (graphical) objects

Variable bitmap bitmap* (←)

Bitmap associated with the image. Only used when ←access equals both. Only one bitmap may be associated with an image that have access both.

Get Method contained in ⇒bitmap

Refinement of: visual<-contained in Returns the ‘parent’ visualiser. Defined at each of the various subclasses of visualiser to deal with the different implementations. All visualiser classes should define this method, except for class display which is at the root of the visualise consists-of hierarchy.

Variable display display* (←)

Display on which the image is located. This value is @nil for reusable images. Readwrite images can only exist on one display.

15.9.13 Postscript — Generating PostScript for printing

Send Method draw post script

Create PostScript

Get Method bounding box ⇒area

BoundingBox for PostScript generation

Get Method postscript landscape=[bool], maximum area=[area] ⇒string New string holding PostScript description

Get Method postscript depth ⇒int

Depth for PostScript image to be generated

15.9.14 Storage — Definition of storage details

Variable ws ref alien:WsRef (-)

Window System Reference

Chapter 16

Data Organisation Classes

This chapter describes the XPCE classes that deal with the organisation of arbitrary data objects and tables. These classes are:

chain  Single-linked list.
vector  Array of elements. Dynamic allocation.
sheet  Mapping, normally name/value pairs.
hash table Mapping, fast lookup.
chain table Mapping 1 to N. fast lookup.
table  Multicolumn table with key-fields.
tuple  Pair of objects.

Note that their are two other chapters dealing with data: primitive data objects (strings, identifiers, numbers, booleans, etc.) and datatypes to support graphical objects (points, cursors, fonts, etc.).

16.1 Class chain — Single linked list of objects

Inheritance: ⇒ chain ⇒ object

A chain is a linear single-linked list of objects. Chains form the common way to represent collections of objects in PCE. Chains are also used to represent multiple-valued slots. Examples are ‘device ←graphicals’, ‘class ←sub classes’, etc.

PCE chains form the natural counterpart of Prolog lists. For this reason the PCE/Prolog interface defines predicates to transform Prolog lists to PCE chains and visa-versa. Note however that in many cases it is not necessary to convert a PCE chain to a Prolog list; PCE defines many operations on chains. Before you consider converting a PCE chain to a Prolog list, first check whether it is not easier to do the job inside PCE. Notably look at →member, →empty,. →for all, →for some, ←find, ←find all and ←map.

Instance Variables

cardinality

size ← int Number of elements

internal

current  - alien:Cell  Pointer to current cell
head  - alien:Cell  Pointer to first cell
tail  - alien:Cell  Pointer to last cell

Behaviour

16.1.1 Oms — Object management operations

Send Method initialise member=any ... Send Method initialise member=any ...

Refinement of: object->initialise

Create a chain from an initial list of elements.

Send Method unlink Send Method unlink

Refinement of: object->unlink

First invokes →clear to remove the cells.

16.1.2 Copy — Copying instances

Get Method copy ⇒chain Creates a copy of the chain holding the same elements in the same order.

When the receiver is a subclass of chain, the resulting chain will be an instance of the same (sub)class: an instance of this subclass is created with no arguments, after which the append behaviour of class chain is used to append the elements.^{1}

16.1.3 Cardinality — Number of elements, characters, ...

Send Method empty Send Method empty

Succeeds if the chain has no elements. Intended as a test method.

1 Creating copies of subclasses is ill-defined.

Variable size int (←)

Number of elements in the chain. Maintained by the various methods manipulating chains.

16.1.4 List — List operations (add, delete)

Send Method append value=any|function Append that allows for appending function objects (@arg1, @event, @receiver, class ?) to a chain without evaluating them.

Send Method append value=any Send Method append value=any

Append argument at the end of the chain. Although chains are represented as single linked lists, append is efficient because chains maintain a pointer to the last cell.

Note that chains may contain duplicates.

Send Method clear

Remove all elements from the chain. Note that this implies that elements that have no further references are destroyed. The other elements are not affected.

Send Method delete value=any Delete the first occurrence of ‘object’ from the chain. Fails if there is no such object. Note that objects are compared by their object identity; not by their contents. Hence, the following fails because the second point is a different instance.

    ?- new(@ch, chain(point(6,6))).
    Yes
    ?- send(@ch, delete, point(6,6)).
    No

Send Method delete all value=any

Delete all elements of the chain that are equal to the argument. Always succeeds.

Get Method delete head ⇒any

First element and delete it

Send Method delete head

Delete the first element of the chain.

Send Method delete tail

Delete the last element of the chain. Note that chains are single linked lists and thus deleting the last implies traversing the entire list.

Get Method head ⇒any Get Method head ⇒any

First cell of the chain. When the chain is empty, its value is @nil.

Send Method insert after value=any, after=any* Insert first after second object (@nil: prepend)

Send Method insert before value=any, before=any Insert first before second object

Get Method merge chain=chain ⇒chain New chain holding concatenation

Send Method merge chain=chain Send Method merge chain=chain

Append all elements from argument

Send Method prepend value=any Add argument as first element

Send Method replace old=any, new=any Replace all occurrences

Get Method tail ⇒any Get Method tail ⇒any

Last cell of the chain. When the chain is empty, the slot has value is @nil and the method fails.

16.1.5 Set — Set operations (no duplicates)

Send Method add value=any Send Method add value=any

→append object to chain if it is not already a member of it.

Get Method intersection chain=chain ⇒chain New chain holding common elements

Send Method intersection chain=chain

Delete elements not in argument

Send Method intersects chain=chain Test if both chains have a common member

Send Method member value=any Send Method member value=any

Test if argument is an element

Send Method subtract chain=chain Send Method subtract chain=chain

Delete all elements in argument

Get Method union chain=chain ⇒chain New chain with union of elements Send Method union chain=chain Send Method union chain=chain

Append only new elements from argument

Send Method unique Send Method unique

Remove all duplicates from chain

16.1.6 Index — Position in a sequence

Get Method index value=any ⇒int Index (1-based) at which argument is

Get Method next [any] ⇒any Returns the element right after the given argument. If the argument is not in the chain or the argument is the last member of the chain, this method fails. If the argument occurs multiple times in the chain, the next of the first appearance is returned.

For backward compatibility only, if no argument is provided, ←current is returned and ←current is moved to the next element.

See also ←previous, ←nth1, ←head and ←tail.

Get Method nth0 index=int ⇒any Element at 0-based index

Send Method nth0 index=int, value=any Change content of nth (0-based) cell

Get Method nth1 index=int ⇒any Get Method nth1 index=int ⇒any

Element at 1-based index

Send Method nth1 index=int, value=any Change content of nth (1-based) cell

Get Method previous [any] ⇒any

Returns the element right before the given argument. If the argument is not in the chain or the argument is the last member of the chain, this method fails. If the argument occurs multiple times in the chain, the next of the first appearance is returned. See also ←next, ←nth1, ←head and ←tail.

16.1.7 Order — Sorting sequences

Send Method after first=any, second=any Succeeds if the first occurrence of the first argument is after the first occurrence of the second argument. Example:

    ?- new(@ch, chain(aap, noot, mies)).
    ?- send(@ch, after, noot, aap)     -→ yes
    ?- send(@ch, after, aap, mies)     -→ no

Fails if one of the arguments is not in the chain.

Send Method before first=any, second=any Send Method before first=any, second=any

Succeeds if the first occurrence of the first argument is before the first occurrence of the second argument. See ‘chain →after’.

Send Method move after value=any, after=[any] Move 1st object just after second. If the second object is omitted, the ‘value’ is made the ←head of the chain.

See also →move before.

Send Method move before value=any, before=any Move the first member of the chain to be just before the second. Fails if either of the elements is not a →member or they are equal. To move an element to the start of the chain, you may use either of:

    ?- ignore(send(Ch, move_before, Element, Ch?head)).
    ?- send(Ch, move_after, Element).

See also →move after, →before and →after.

Send Method sort compare=[code|function] Send Method sort compare=[code|function]

Sort the elements in the chain. Two elements are compared by examining the return status of the code object. Both @arg1 and @arg2 are bound to some element of the chain. Execution of the code is supposed to succeed if @arg1 must be before @arg2 in the sorted chain. If ‘code’ is an obtainer, the return status is interpreted as follows:

• integer smaller then 0 or the atom ‘smaller’ @arg1 must be before @arg2

• 0 or the atom ‘equal’ Both elements are equal (neither is deleted, but their order is undefined).

• anything else @arg1 must be after @arg2

Common code objects to use are the arithmetic comparison objects and messages invoking a string comparison method. Examples:

Sort a chain of integers, lowest first:

    send(Chain, sort, @arg1 < @arg2).

Sort a chain of char array objects, alphabetically lowest first:

    send(Chain, sort, ?(@arg1, compare, @arg2)).

NOTE: When sorting with a non-function, the result of comparing two element is a boolean and cannot express ‘equal’. →sort yields an undefined result if the chain contains two or more element for which ‘code →forward: A, B’ and ‘code →forward: B, A’ yield the same result. This undefined behaviour can include a fatal error.

Send Method swap value 1=any, value 2=any Swap position of arguments

16.1.8 Compare — Comparing objects

Send Method equal [chain]* Succeeds if both chains have the same elements. For convenience reasons, the type is defined the include @default and @nil and thus this method fails silently when a chain is compared to one of these constants and fails with a type-error if the argument is neither one of these constants, nor an instance of class chain or a subclass thereof.

16.1.9 Iterate — Run code on each element of a collection

Get Method find test=code ⇒any Get Method find test=code ⇒any

Successively executes code on the elements. Returns the first element for which code succeeds or fails. Arguments:

@arg1 Element tested

Get Method find all test=code ⇒chain Returns a new chain holding all elements for which the execution of code succeeds. Arguments:

@arg1 Element tested

The following example finds all inverted graphicals on the graphical device ‘Dev’:

    ?- get(Dev?graphicals, find_all,
           @arg1?inverted == @on, Inverted).

See also ‘chain →for all’.

Send Method for all action=code, safe=[bool] Send Method for all action=code, safe=[bool]

This method invokes its argument code object on all elements of the chain. During the execution the following argument is bound:

@arg1 Current element.

The iteration stops with failure if the execution of ‘code’ fails for some element of the chain.

In the example below we print the elements of a chain on the terminal:

    ?- new(@ch, chain(hello, world)).
    ?- send(@ch, for_all, message(@pce, write_ln, @arg1)).
    hello
    world.

If the ‘safe’ argument is @on, the elements of the chain are first copied to a local array and existence of the objects in the elements is tested prior to executing the code object. This implies that the chain may be modified by the execution of the method and new elements will not be seen. If this argument is @off this method iterates over the chain itself. In this case it is not allowed to modify the chain.

Send Method for some action=code, safe=[bool] Send Method for some action=code, safe=[bool]

Similar to ‘chain →for all’, but continues the iteration even if code fails to execute for some element. Always succeeds.

Get Method map function=function ⇒chain Get Method map function=function ⇒chain

Executes obtainer or block for each element of the chain. Returns a new chain holding the resulting values of executing the code. All elements for which the execution fails are omitted.

The example below returns a chain with names holding the names of all graphical objects on the graphical device.

    graphical_names(Device, Names)  :-
        get(Device, graphicals, Chain),
        get(Chain, map, @arg1?name, Names).

16.1.10 Completion — Automatic completion of textual constants

Get Method complete name prefix=char array, extract name=[function]*,

ignore case=[bool] ⇒tuple Support the implementation of automatic completion as found with class text item. The chain is a chain of elements from which one has to be chosen by means of completion. ‘Prefix’ is the string typed so far. ‘Extract name’ is a function to extract the name from the each element. Its values are:

@nil  Use default conversion to text.
@default Use ‘object ←print name’.
Function Use this function, @arg1 is the element.

The return value is a tuple object. The ‘tuple ←first’ contains a new chain holding all elements of the receiving string whose name start with the given ‘prefix’. The ‘tuple ←second’ contains a new string object holding the largest common prefix of all matches. If no element of the chain matches prefix, this method fails. Example:

    ?- get(chain(gnu, foo, gnats, bar), complete_name, 'g',
           tuple(Matches, string(Common))),
       object(Matches, Chain).
    Common = gn
    Chain = chain(gnu, gnats)
    Matches = @854357/chain

See also ‘text item →complete’.

16.1.11 Current — Operations on ‘current’ object

This section describe operations that exploit or modify the ‘current’ cell. This mechanism is obsolete. The relavant methods are retained for backward compatibility only.

Get Method current ⇒any

Get the value of the current cell.

Send Method current value=any* Replace the value of the ‘current’ cell with the argument.

Get Method current no ⇒int

Get index of the current cell.

Send Method current no index=int

Make the nth (1-based) cell current. When the argument is 0, there is no current cell.

Send Method delete current

Delete the current cell.

Send Method find test=code Successively executes code on all elements of the chain. Succeeds, setting ‘←current’ if code is executed with success. Fails otherwise. Arguments:

@arg1 The (current) element

Send Method insert value=any Insert argument before current

16.1.12 Cell — Direct operations on chain cells

This section describes methods that operate directly on the cells of the linked list. Cells are no true objects and their reference is therefore passes as an integer.

These methods are not intended for general usage.

Get Method cell value cell reference=int ⇒any Value associated with a cell. Use with care.

Send Method cell value cell reference=int, value=any Set the value of specified cell. The first argument is the reference returned by ‘chain ←head cell’ or ‘chain ←next cell’.

One should try to avoid using this function.

Get Method head cell ⇒int

Reference (int) to first cell

Get Method next cell cell reference=int ⇒int Reference to next cell at reference

16.1.13 Term — Conversion to (Prolog) term

Get Method arg index=int ⇒any Refinement of: object<- arg Nth-1 argument for object description

Get Method arity ⇒int

Refinement of: object<- arity Number of arguments for object description

16.1.14 Internal — Private behaviour

Variable current alien:Cell (-)

Alien reference to ‘current cell’ of the chain. The notion of ‘current’ was introduced a long time ago in PCE, while methods only had one argument. Methods needing a second often used ‘current’ for this purpose.

Now that PCE methods may have any number of arguments there is little use for ‘current’. It is advised not to use ‘current’.

Variable head alien:Cell (-)

First cell of the chain. When the chain is empty, its value is @nil.

Variable tail alien:Cell (-)

Last cell of the chain. When the chain is empty, the slot has value is @nil and the method fails.

16.2 Class vector — Dynamic array of objects

Inheritance: ⇒ vector ⇒ object

A ‘vector’ is a one-dimensional array. Vectors act as dynamic arrays: values can be stored at any index. The initial arguments are stored from index 1.

The amount of memory used to store a vector is determined by the difference between the lowest index and the highest index. In many applications, sparse arrays are better realised using class hash table.

Instance Variables

range

offset  ← int  Offset relative to 1-based
size  ← int  Number of elements

storage

elements  - alien:Any *  The elements themselves

Behaviour

16.2.1 Oms — Object management operations

Send Method initialise element=any ... Send Method initialise element=any ...

Refinement of: object->initialise

Create a vector from the initial arguments. The first argument is placed at index 1, the second at 2, etc.^{1}

Send Method unlink Send Method unlink

Refinement of: object->unlink

Unreferences the -elements. All elements that have no further references will be destroyed by PCE’s incremental garbage collector.

16.2.2 Copy — Copying instances

Get Method copy ⇒vector Creates a copy of the vector with the same elements and ↔offset. The copy also is of the same class as the original, which implies that the →initialise method of this subclass must accept the same arguments as class vector.

16.2.3 Range — Range of a vector

Get Method high index ⇒int

The highest index for which ←element succeeds. This is ←offset + ←size.

1 It would be useful to be able to create a vector with a specified low and high index. To create a vector [5...20] do:

new(V, vector), send(V, fill, @nil, 5, 20).

Get Method low index ⇒int

Lowest index for which ←element succeeds. This is ←offset + 1.

Variable offset int (←)

Offset of the vector relative to a 1-based vector. E.g. if offset equals 2, the first element is at index 3.

Send Method shift places=int Shift the elements by <n> places. The ‘freed’ places are filled with @nil:

    ?- new(V, vector(gnu, gnats)),
       send(V, shift, 1),
       object(V, Term).
    Term = vector(@nil, gnu)

Variable size int (←)

Total number of elements in the vector.

16.2.4 List — List operations (add, delete)

Send Method append value=any ...

Append element at ←high index+1

16.2.5 Element — Vector elements

Get Method element index=int ⇒any Get Method element index=int ⇒any

Get the nth (1-based) element of the vector. Fails silently when outside the defined range.

Send Method element index=int, value=any Set element N (1-based) to the specified value. N is outside the array, the array is automatically enlarged. The ‘skipped’ elements are filled with @default.

Send Method fill value=any, from=[int], to=[int] Fill range of elements with the specified value. ‘from’ and ‘to’ default to ←low index resp. ←high index. This is a common way to create a vector with a specific range.

Get Method head ⇒any

First element (as class chain)

Get Method tail ⇒any

Last element (as class chain)

16.2.6 Order — Sorting sequences

Send Method sort compare=code Send Method sort compare=code

Sort the elements in the vector. Argument passing is equivalent to ‘chain →sort’.

Send Method swap index 1=int, index 2=int Swap two elements

16.2.7 Iterate — Run code on each element of a collection

Send Method for all action=code Send Method for all action=code

Run’s code on all elements of the vector. Fails if code fails for some element. Succeeds after all elements have been processed. Arguments:

@arg1 The current element
@arg2 Index of this element

Its behaviour is undefined if the size of the vector is changed by code.

Send Method for some action=code Run’s code on all elements of the vector. Ignores the exit status of code and always succeeds. Arguments:

@arg1 The current element
@arg2ffl Index of this element

Its behaviour is undefined if the size of the vector is changed by code.

16.2.8 Search — Finding plain text, regex or objects

Get Method find code=code ⇒unchecked Run code on each element of the vector until it succeeds. Return the element for which it succeeded. Arguments:

@arg1 The current element
@arg2 Index of the element

Get Method find all code=code ⇒unchecked Return a new chain holding all elements for which code could be successfully executed. Arguments:

@arg1 The current element
@arg2 The index

Get Method index any=any ⇒int Searches the vector from ←low index, returning the first index that holds the argument object.

Get Method rindex any=any ⇒int Scan the vector starting at ←high index working downwards and return the highest index that contains the argument object.

16.2.9 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒any Get Method arg int=int ⇒any

Refinement of: object<- arg Get the n-th argument of the term description. Argument 1 is the argument at the lowest defined index.

Get Method arity ⇒int Get Method arity ⇒int

Refinement of: object<- arity Get the number of arguments of the term-description. This is the total number of elements in the vector.

16.2.10 Storage — Definition of storage details

Variable elements alien:Any * (-)

Alien array of elements. Note that this may be moved if number of elements of the vector is changed.

16.3 Class sheet — Collection of attributes

Inheritance: ⇒ sheet ⇒ object

A sheet object is a list of name/value pairs. Sheets are similar to records in Pascal, structures in C or frames in knowledge representation formalisms. Unlike records and structures however, sheets can be given new attributes and attributes can be deleted dynamically..

Sheets are generally used to create a single handle to a number of objects. In previous versions of PCE they where also commonly used to represent application data. The current version allows for user-defined classes, which form a much more efficient implementation of name/value pairs than sheets.

Note also that adding an attribute to an object using ‘Object →attribute’ is often a good alternative for using sheets. Finally, if the collection of attribute is large and lookup is more often than changing the data, class hash table should be considered.

Instance Variables

storage

members  ← chain  Attributes of the sheet

Behaviour

16.3.1 Oms — Object management operations

Send Method initialise member=attribute ... Send Method initialise member=attribute ...

Refinement of: object->initialise

Create a sheet from a list of attributes:

         ?- new(Sheet, sheet(attribute(name, gnu),
                             attribute(age, 100))).

16.3.2 Attributes — Object- and sheet attributes

Send Method append attribute=attribute Send Method append attribute=attribute

Append an attribute. If the sheet already has an attribute with the same name, the value of the existing attribute is replaced by the value of the argument attribute.

Note that ‘attribute ←convert’ convert an attribute name into an attribute object with value @nil.

Send Method delete name=any Delete attribute with the given name. Fails silently if no such attribute exists.

16.3.3 Value — Related value

Get Method catch all key=name ⇒any Get Method catch all key=name ⇒any Send Method catch all key=name, value=any

The methods ↔catch all are called by PCE’s message-passing system if there is no other definition for a method. Class sheet uses these methods to store and fetch attributes:

    ?- new(@s, sheet(name, age, address)),
       send(@s, name, gnu).
    ?- get(@s, name, X).
       X = gnu

This approach has, besides its definite charm, one drawbacks: Attributes whose name collide with a method name cannot be accessed this way. Code that handles unknown attribute names should use ↔value to avoid this problem.

Get Method value any=any ⇒any Get Method value any=any ⇒any

Get value associated with name

Send Method value key=any, value=any Send Method value key=any, value=any

Associate ‘name’ with ‘object’. If the sheet already has an attribute with this name, the value of the attribute is changed. Otherwise a new attribute with the given name and value is appended to the sheet.

16.3.4 Meta — Analysing behaviour and objects

Get Method attribute names ⇒chain

New chain with attribute names

Send Method is attribute name=any Send Method is attribute name=any

Test if object is name of an attribute

Get Method member key=any ⇒attribute Attribute object with name

16.3.5 Iterate — Run code on each element of a collection

Send Method for all action=code Send Method for all action=code Send Method for some action=code

Run code on all ←members. Arguments:

@arg1 attribute object

16.3.6 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒attribute Refinement of: object<- arg Nth-1 attribute object. Used for conversion to a host-language term.

Get Method arity ⇒int

Refinement of: object<- arity Arity of term

16.3.7 Storage — Definition of storage details

Variable members chain (←)

Chain object holding the attributes of the sheet. It is allowed to analyse and modify this chain directly.

16.4 Class hash table — One-way association table

Inheritance: ⇒ hash table ⇒ object

The PCE class hash table implements a fast associative table. Hash-tables are commonly used to map symbols on values. For example, PCE itself uses the hash table @classes to map class names onto class objects.

PCE hash tables are implemented as ‘closed’ hash tables. The number of ‘buckets’ in enlarged automatically as the number of symbols in the table grows.

Note that hash tables implement the standard set operations →for all, →for some, ←find key and ←find value.

See also class chain table (mapping a key onto multiple values), class sheet and class table (multicolumn indexed table).

Instance Variables

oms refer - {none,name,value,both} Determines which fields create references (internal)

cardinality

buckets  - alien:int  Number of buckets in the table
size  ← int  Number of symbols in table

storage

symbols  - alien:Symbol  Array of symbols

Behaviour

16.4.1 Oms — Object management operations

Send Method initialise buckets=[int] Send Method initialise buckets=[int]

Refinement of: object->initialise

Create a hash table. The argument is the number of buckets. Note that this will be automatically increased if necessary. Normally it is not specified.

Variable refer {none,name,value,both} (-)

Hash tables are used internally by PCE in algorithms where the table should not give a reference count to the objects in it. Internal use only.

Send Method unlink

Refinement of: object->unlink

Clears the table and deallocates the alien symbol array.

16.4.2 Cardinality — Number of elements, characters, ...

Variable buckets alien:int (-)

Number of buckets in the table. Automatically doubled if the table is filled over 2/3-th.

NOTE: The number of buckets is a power of 2. Hash-table literature claims prime numbers to provide a better distribution. Timing on the SUN-SPARC station suggests this does ot compensate for the difference between a division and a masking operation.

Variable size int (←)

Number of symbols in the table.

16.4.3 Add — Adding elements to a list

Send Method append key=any, value=any Send Method append key=any, value=any

Append a new association to the table. The first argument is the ‘key’; the second is the associated value. If the key was already in the table, associated value is changed.

16.4.4 Lookup — (Table) lookup methods

Get Method member key=any ⇒any Get Method member key=any ⇒any

Get value associated with some key. This method fails if there is no value associated.

16.4.5 Test — Test object properties

Send Method empty

Test if ←size equals 0.

16.4.6 Iterate — Run code on each element of a collection

Send Method for all action=code, safe=[bool] Send Method for all action=code, safe=[bool]

Run code on all elements of the table. If code fails for some symbol, this method immediately exists with failure. Arguments:

@arg1: Key of the symbol
@arg2: Value of the symbol

Note that the order in which the symbols are presented to the code is not specified.

Send Method for some action=code, safe=[bool] Run code on all elements of the table. The return status of code is ignored.

@arg1: Key of the symbol
@arg2: Value of the symbol

Note that the order in which the symbols are presented to the code is not specified.

16.4.7 Search — Finding plain text, regex or objects

Get Method find key test=code ⇒any Run code on all elements of the table until it succeeds. Then return the key of the symbol for which code succeeded. Arguments:

@arg1: Key of the symbol
@arg2: Value of the symbol

Fails if there is no symbol for which code succeeds. Note that the order in which the symbols are presented to the keys is not specified.

Get Method find value test=code ⇒any Run code on all elements of the table until it succeeds. Then return the value of the symbol for which code succeeded. Arguments:

@arg1: Key of the symbol
@arg2: Value of the symbol

Fails if there is no symbol for which code succeeds. Note that the order in which the symbols are presented to the keys is not specified.

16.4.8 Delete — Text deletion commands

Send Method clear

Delete all entries from the table. After →clear, ←size equals 0. The number of buckets is not changed.

Send Method delete key=any Delete association with given key. If there is no such association, →delete fails.

16.4.9 Statistics — Timing, memory usage, etc.

Send Method info

Check consistency and print statistics

16.4.10 Compatibility — Methods for backward compatibility

Send Method convert old slot name=name, any=any File ←object conversion

16.4.11 Storage — Definition of storage details

Get Method buckets ⇒int

Value of the alien variable -buckets, indicating the current number of buckets in the table. A power of 2.

Send Method buckets int=int

Set the number of buckets in the table. This method might be useful for two purposes:

• When the number of elements in known in advance, setting the number of buckets avoids rehashing.

• The number of buckets is not minimised if members are deleted or the table is cleared. The →buckets method may be used to make the table smaller.

The next legal value (large enough and a power of 2) is used.

Variable symbols alien:Symbol (-)

Alien pointer to the symbols.

16.5 Class chain table — Association with multiple values

Inheritance: ⇒ chain table ⇒ hash table ⇒ object

A chain table is similar to a hash-table, but allows multiple values to be associated with the same key. Each symbol-value is a chain holding all objects associated with the symbol-key.

NOTE: In earlier versions, class hash table supported the option ‘unique’. The interface to nonunique hash-tables however was clumsy, while the performance of normal hash-tables was harmed by this option. Chain tables are a much cleaner solution to the same problem.

Instance Variables

Behaviour

16.5.1 Add — Adding elements to a list

Send Method add key=any, value=any Add association to table

Send Method append key=any, value=any Refinement of: hash table->append Append association to the table. If this is a new key, associate a new chain holding the value with this key. Otherwise append the value to the chain associated to key.

Send Method prepend key=any, value=any As →append but, if there is already a chain associated to ‘key’, the value is added to the start of the chain rather than to the end.

16.5.2 Delete — Text deletion commands

Send Method delete key=any, value=[any] Refinement of: hash table->delete Delete all associations with the given key. If ‘value’ is specified, the first occurrence is deleted from the associated chain. If the chain then becomes empty the entire association is deleted.

Fails is key is not in the table, or a value is specified and not in the table.

16.6 Class table — Table of association vectors

Inheritance: ⇒ table ⇒ object

Class table defines a multi-column table with various indexing mechanisms. Each row of the table is formed by a vector object. The rows are not ordered and rows (vectors) may be selected quickly using index tables. Each column may be declared in three modes:

unique-key Indexed and no duplicates
key  Indexed, possible duplicates
otherwise Not indexed (may have duplicates)

The following example defines a ‘1 to n’ mapping between ‘persistent’ objects (called ‘p’) and their visualisations (called ‘v’):

    ?- new(T, table(vector(p, v),
                    vector(unique, key)).

Instance Variables

name

names ← vector Vector to determine column names

hashing

keys ← vector Vector to determine key columns

storage

tables  ← vector  Hashtables for key entries

Behaviour

16.6.1 Oms — Object management operations

Send Method initialise names=vector, keys=vector Refinement of: object->initialise Create a multi-column table. The first vector defines the names of the columns. The second defines the lookup capabilities for the columns. Both vectors should start at index 1 and have the same number of elements. See also ←keys.

Send Method unlink

Refinement of: object->unlink

Clear the tables

16.6.2 Name — Naming objects

Variable names vector (←)

Names of the columns. Documentation purpose and used by ←vectors.

16.6.3 Add — Adding elements to a list

Send Method append association=vector Add a row to the table. The argument should be a vector object with the first element at index 1 and the same number of elements as the width of the table. The vector will be recorded in the ←tables as defines by ←keys.

16.6.4 Lookup — (Table) lookup methods

Get Method match pattern=vector ⇒chain Return a new chain with rows (vector objects) matching the argument vector. A row is supposed to match iff

1. The vectors have the same range of elements

2. All elements are pairwise equal or the argument vector has @default for each index they are not pairwise equal.

This method exploits the available indexing ←tables. See also ←vectors.

Get Method members ⇒chain

New chain holding all rows (vector objects). Note that the order of these rows is not defined.

Get Method vectors column=name, value=any ⇒chain|vector If ‘name’ is the name of an indexed column, return the row (vector object) with the specified ‘value’ in the given column. If the columns is ‘unique’ a single vector will be returned. Otherwise a chain with matching vectors will be returned. Fails silently if no match can be found.

16.6.5 Delete — Text deletion commands

Send Method clear

Remove all vectors from the table

Send Method delete association=vector Delete the argument row. Succeeds always, even if the vector is not a row of the table.

16.6.6 Hashing — Caching information (speed up)

Variable keys vector (←)

Vector that describes the column properties. Each element of this vector is one of the names ‘key’, ‘unique’ or ‘data’:

• key The column is used to find association vectors (rows), but may have multiple rows with the same value for this column. The table created a chain table object for fast access to all rows with some specified key value.

• unique Each row in the table has a different value in this column and this column is used for indexing. The table creates a hash table object for fast access.

• data This column just holds associated data. No (fast) lookup is provided.

16.6.7 Storage — Definition of storage details

Variable tables vector (←)

The hash table objects or chain table objects for fast access on the specified column. See ←keys.

16.7 Class tuple — Pair of objects

Inheritance: ⇒ tuple ⇒ object

Pair of arbitrary objects. Tuples are most commonly used by methods to return two values (PCE methods can only return a single value). Methods that have to return more than two values may return a chain object, vector object or sheet object.

Instance Variables

storage

first  ↔ any  First of the tuple
second  ↔ any  Second of the tuple

Behaviour

16.7.1 Oms — Object management operations

Send Method initialise first=any, second=any Send Method initialise first=any, second=any

Refinement of: object->initialise

Create a tuple from its ←first and ←second element.

16.7.2 Storage — Definition of storage details

Variable first any (↔)

First of the tuple

Variable second any (↔)

Second of the tuple

Chapter 17

Primitive Data

This chapter describes the elementary datatypes of XPCE:

constant Constants (@nil, @default, ...)
bool  @on, @off
char array String of characters (superclass)
name  Constant char array (identifier)
string  Editable char array
number  Integer value
real  Floating point value
date  Point in time

The data type int

Besides these, XPCE offers data of type ‘int’. Int is the only datum not represented as a true object, mainly for efficiency and storage reasons. A PCE int is a 30 bits signed integer ranging from ‘@pce ←min integer’ to ‘@pce ←max integer’ (-536870912 .. 536870911).

NOTE: Many symbolic languages use more tag bits than PCE and thus ?- get(@pce, min integer, I) will not produce the required result. get(real(@pce?min integer), value, I) will on most systems return the requested value (be aware of rounding problems though).

When a message is sent to an ‘int’ datum, PCE’s message passing mechanism will create a number object with the same value and invoke the method on this object. Thus:

    ?- send(3, larger, 2).

will succeed. The following succeeds, but is a useless call (why?):

    ?- send(3, plus, 2).

17.1 Class constant — Constant value

Inheritance: ⇒ constant ⇒ object

Instances of class constant represent unique values. This uniqueness is represented and guaranteed by the object-reference.

Class constant defines the instance variables ←name and ←summary for documentation purposes.

The system defines the following constants:

@nil  ‘Nothing, not-filled’
@default ‘Use default value’

The user may create constants for a specific application. Constants may not be deleted as they are automatically protected using →protect. See also class bool.

Instance Variables

name

name ↔ name Name of the constant

manual

summary  ↔ string*  Short description

Behaviour

17.1.1 Oms — Object management operations

Send Method initialise name=name, summary=string Refinement of: object->initialise Create a constant from its name and summary. The corresponding slots are filled and the created instance is →protect’ed against the garbage collector. It is very uncommon for application programmers to define new constants.

17.1.2 Name — Naming objects

Variable name name (↔)

Name of the constant. Note that ←print name (used by class text item) returns ←name by default.

17.1.3 Manual — Support for the online reference manual

Variable summary string* (↔)

Short description for documentation purposes. Similar to ‘class ←summary’, etc.

17.2 Class bool — Boolean constant

Inheritance: ⇒ bool ⇒ constant ⇒ object

Class bool defines represents PCE’s two boolean constants: @on and @off. These objects are protected (see →protect). No other boolean constants can be created.

Instance Variables

Behaviour

17.2.1 Oms — Object management operations

Get Method convert any=any ⇒bool Refinement of: object<-convert The following values are converted to booleans:

0  @off
any other integer  @on
’@on’  @on
’@off’  @off
true, yes, ‘@on ←name’ @on
false, no, ‘@off ←name’ @off

Send Method initialise

Refinement of: constant->initialise Generates the error ‘cannot create instances’.

Send Method unlink

Refinement of: object->unlink Destroy boolean (cannot be done)

17.2.2 Calculate — Compute properties

Get Method negate ⇒bool

Maps @on to @off and visa versa. The recogniser object below will toggle the ‘graphical →inverted’:

    ?- new(@toggle_inverted,
           click_gesture(left, '', single,
                         message(@receiver, inverted,
                                 @receiver?inverted?negate))).

17.3 Class char array — Array of characters

Inheritance: ⇒ char array ⇒ object

Class char array is the superclass of both class name (for unique textual constants) and class string for editable text. Class char array defines common behaviour and avoids type-conversions if the receiving method is just interested in the text represented. It is not common for the user to create instances of the class directly.

See also class text buffer for handling large amounts of text, and class regex for searching in text.

Instance Variables

internal

header  - alien:str h  Header info (packed)
text  - alien:wchar *  Text represented (8- or 16-bits chars)

Behaviour

17.3.1 Oms — Object management operations

Send Method initialise text=char array Send Method initialise text=char array

Refinement of: object->initialise

Create from the argument text. Internally this loop is broken by creating char array objects from host-language textual constants:

         ?- new(X, char_array(hello)).

Creates a char array object from a Prolog atom.

Send Method unlink Send Method unlink

Refinement of: object->unlink

Free the char *

17.3.2 Conversion — Conversion (for type checking)

Get Method convert any=any ⇒char array Get Method convert any=any ⇒char array

Refinement of: object<-convert

Converts the following:

subclasses of char array The text
int, number  Decimal representation of the value
real  ‘%f’ representation of the value

Get Method value ⇒name Get Method value ⇒name

Return the text of the char array as a name object. On most host-languages this name will be mapped on the language’s identifier type (atom for Prolog, keyword for Lisp):

         ?- get(string("hello"), value, V).
            V = hello

17.3.3 Copy — Copying instances

Get Method copy ⇒char array Returns an instance of the same class holding the same text. Equivalent to:

         get(CA?class, instance, CA).

A subclass for which this behaviour does not produce the desired result should redefine this method. See for example ‘string ←copy’.

17.3.4 Cardinality — Number of elements, characters, ...

Get Method size ⇒int

Number of characters in the text

17.3.5 Content — String content

The manipulation methods of this section are designed to return an instance of the same class as the receiver of the method. This is wired in for the class name and class string. For any other class, ←modify is invoked on the receiver. The argument is a char array object holding the text to be returned. See ←modify for the default definition.

Get Method append char array ... ⇒char array Get Method append char array ... ⇒char array

New char array representing the concatenation of the receiver and the argument.

Get Method character int=int ⇒char Returns the ASCII value of the nth (0-based) character of the string. Fails silently if the index is out of range.

Get Method delete prefix prefix=char array ⇒char array If the receiver starts with the argument (see also →prefix), return a new char array object holding the remaining text. See also ←delete suffix and →prefix.

Get Method delete suffix suffix=char array ⇒char array Get Method delete suffix suffix=char array ⇒char array

If the receiving char array ends with suffix, a copy is returned with this suffix deleted. Otherwise this call fails. See also →suffix, ←delete prefix, ←ensure suffix and ‘string →ensure suffix’. Example:

         ?- get('hello.pl', delete_suffix, '.pl', V).
         V = hello

Get Method ensure suffix suffix=char array ⇒char array Get Method ensure suffix suffix=char array ⇒char array

If the receiving char array object already has suffix, just return it, otherwise return a copy with the suffix ←append’ed. Examples:

         ?- get(hello, ensure_suffix, '.pl', X).
         ?- get('hello.pl', ensure_suffix, '.pl', X).

both yield ‘hello.pl’.

Get Method sub start=int, end=[int] ⇒char array Get Method sub start=int, end=[int] ⇒char array

Return a copy containing the characters [start ... end). If end is omitted, the end of the char array is used.

17.3.6 Compare — Comparing objects

Get Method compare char array=char array, ignore case=[bool]

⇒{smaller,equal,larger}

Get Method compare char array=char array, ignore case=[bool]

⇒{smaller,equal,larger} Alphabetically compares the receiver with the argument and returns:

• smaller if the receiver is alphabetically before the argument

• equal If both represented texts are identical

• larger if the receiver is alphabetically after the argument

Intended to be used together with ‘chain →sort’ and ‘vector →sort’.

Send Method equal char array=char array Send Method equal char array=char array

Succeeds if both char arrays represent the same text.

Send Method larger than=char array Test if I’m alphabetically after arg

Send Method smaller than=char array Test if I’m alphabetically before arg

17.3.7 Test — Test object properties

Send Method prefix prefix=char array Test if receiver starts with the given argument string. See also →suffix.

Send Method sub text=char array, ignore case=[bool] Send Method sub text=char array, ignore case=[bool]

Test if argument is a substring, If the boolean is @off, the test is ignores possible case differences. See also ‘regex →search’.

Send Method suffix text=char array, ignore case=[bool] Send Method suffix text=char array, ignore case=[bool]

Test if receiver ends with the given string. See also →prefix, ‘←ensure suffix’ and ←delete suffix.

17.3.8 Parse — Specialisation for specific languages

Get Method index of =char, from=[int] ⇒int Get Method rindex of =char, from=[int] ⇒int

Return the index of the given character. When ‘from’ is given, the search (forwards for ←index, backwards for ←rindex) starts at the given index. Fails silently if the character cannot be located.

Get Method scan format=char array ⇒vector Get Method scan format=char array ⇒vector

Parse text according to format. Converted values are returned in the result vector object. This method provides an interface to the C-library function sscanf(3). For details consult your C-library documentation. On most Unix systems this is done using the command ‘man sscanf’.

Below is a description of the format string as taken from the SunOs manual.

The control string usually contains conversion specifications, which are used to direct interpretation of input sequences. The control string may contain:

• White-space characters (SPACE, TAB, or NEWLINE) which, except in two cases described below, cause input to be read up to the next non-white-space character.

• An ordinary character (not ‘%’), which must match the next character of the input stream.

• Conversion specifications, consisting of the character ‘%’ or the character sequence %digit$, an optional assignment suppressing character ‘*’, an optional numerical maximum field width, an optional l (ell) or h indicating the size of the receiving variable, and a conversion code.

Conversion specifications are introduced by the character % or the character sequence %digit$. A conversion specification directs the conversion of the next input field; the result is placed in the variable pointed to by the corresponding argument, unless assignment suppression was indicated by ‘*’. The suppression of assignment provides a way of describing an input field which is to be skipped. An input field is defined as a string of non-space characters; it extends to the next inappropriate character or until the field width, if specified, is exhausted. For all descriptors except “[” and “c”, white space leading an input field is ignored.

The conversion character indicates the interpretation of the input field; the corresponding pointer argument must usually be of a restricted type. For a suppressed field, no pointer argument is given. The following conversion characters are legal:

• % A single % is expected in the input at this point; no assignment is done.

The various integer formats (the result is always returned as a PCE int).

• d A decimal integer is expected; the corresponding argument should be an integer pointer.

• u An unsigned decimal integer is expected; the corresponding argument should be an unsigned integer pointer.

• o An octal integer is expected; the corresponding argument should be an integer pointer.

• x A hexadecimal integer is expected; the corresponding argument should be an integer pointer.

• i An integer is expected; the corresponding argument should be an integer pointer. It will store the value of the next input item interpreted according to C conventions: a leading “0” implies octal; a leading “0x” implies hexadecimal; otherwise, decimal.

• n Stores in an integer argument the total number of characters (including white space) that have been scanned so far since the function call. No input is consumed.

The various floating point formats. The result is passed as an instance of class real.

• e,f,g A floating point number is expected; the next field is converted accordingly and stored through the corresponding argument, which should be a pointer to a float. The input format for floating point numbers is as described for string to decimal(3), with fortran conventions zero.

A character. The result is returned as the ASCII (PCE int).

• c A character is expected; the corresponding argument should be a character pointer. The normal skip over white space is suppressed in this case; to read the next nonspace character, use %1s. If a field width is given, the corresponding argument should refer to a character array, and the indicated number of characters is read.

The string formats. The result is a PCE string object.

• s A character string is expected; the corresponding argument should be a character pointer pointing to an array of characters large enough to accept the string and a terminating \0, which will be added automatically. The input field is terminated by a white space character.

• [ Indicates string data; the normal skip over leading white space is suppressed. The left bracket is followed by a set of characters, which we will call the scanset, and a right bracket; the input field is the maximal sequence of input characters consisting entirely of characters in the scanset. The circumflex (^), when it appears as the first character in the scanset, serves as a complement operator and redefines the scanset as the set of all characters not contained in the remainder of the scanset string. There are some conventions used in the construction of the scanset. A range of characters may be represented by the construct first-last, thus [0123456789] may be expressed [0-9]. Using this convention, first must be lexically less than or equal to last, or else the dash will stand for itself. The dash will also stand for itself whenever it is the first or the last character in the scanset. To include the right square bracket as an element of the scanset, it must appear as the first character (possibly pre- ceded by a circumflex) of the scanset, and in this case it will not be syntactically interpreted as the closing bracket. The corresponding argument must point to a character array large enough to hold the data field and the terminating \0, which will be added automatically. At least one character must match for this conversion to be considered successful.

See also class regex.

17.3.9 Case — Case (UPPER/lower) translation

Get Method capitalise ⇒char array Get Method capitalise ⇒char array

Capitalised version of name. The first character is mapped to its uppercase equivalent. All other letters are mapped to their lowercase equivalent. The letter after a word separator character (default (’ ’)) is mapped to uppercase, while the separator is deleted. Examples:

name  ’Name’
label name ’LabelName’
’label name’ ’Label name’

See also ←label name.

Get Method downcase ⇒char array Map all uppercase letters to lowercase

Get Method label name ⇒char array

This method is used by ‘menu item ←default label’ to compute a nice looking label from a nice looking identifier in the host language. It performs the following transformations:

1. Any word-separator character (default ’ ’, for LISP often ’-’ (see ‘pce →syntax’) is transformed into a space.

2. If the string is single-case (either entirely upper or entirely lower each word will be made to start with an uppercase letter and all remaining letters will be made lowercase. See also ‘char array ←capitalise’

Get Method upcase ⇒char array Map all lowercase letters to uppercase

17.3.10 Line — Line oriented operations

Get Method line no index=[int] ⇒int Get 1-based line number at which index is

17.3.11 Textual — Textual representation

Get Method print name ⇒char array

Refinement of: object<-print name Equivalent to ←self

17.3.12 Internal — Private behaviour

Variable header alien:str h (-)

Header info (packed)

Get Method modify char array=char array ⇒char array Called internally by the various get methods that return a modified copy of the char array (←append, etc.). The version defined for class char array is defined as:

    modify(CA, To:char_array, Value:char_array) :←
        get(CA, class, Class),
        get(Class, instance, To, Value).

Redefinition may be necessary for subclasses of class char array. Examples are the PCE/Lisp predefined class lisp symbol.

Variable text alien:wchar * (-)

C char * pointer to a ’\0’ terminated array of characters.

17.4 Class name — Atom (unique representation of a string)

Inheritance: ⇒ name ⇒ char array ⇒ object

Class name defines atomic text in PCE. That is, each instance of this class represents a unique text or, in other words, two name objects represent the same text if-and-only-if they have the same object reference (hence are the same objects).

Names, like atoms in Prolog and keywords in Lisp, are used as identifiers: class names, method names, etc. The ‘uniqueness’ feature guarantees fast mapping from names to the named objects (see class hash table).

PCE does not garbage collect names. Names should thus only be used for constants and not for handling text that is continuously modified. Class string is designed for handling temporary and changing textual information.

Instance Variables

Behaviour

17.4.1 Oms — Object management operations

Send Method initialise text=char array Send Method initialise text=char array

Refinement of: char array->initialise

Create a name from the argument text. Note that this method will only be called by the PCE object creation system if ←lookup fails (i.e. if this is a new name). This method copies the text and then invokes →register on itself to insert itself into the symbol table.

Get Method lookup char array=char array ⇒name Get Method lookup char array=char array ⇒name

Send Method register Send Method register

The methods →register and ←lookup form a pair that guarantee the uniqueness of name objects. If a string (char array) is to be converted into a name object, the PCE object creation system will first call ←lookup, which attempts a lookup in the nametable. On failure, the object creation system will call →initialise to create a name. →initialise calls →register which registers the new name in the name-table.

Send Method unlink

Refinement of: char array->unlink

Trap error

17.4.2 Conversion — Conversion (for type checking)

Get Method convert any=any ⇒name Get Method convert any=any ⇒name

Refinement of: char array<-convert

Convert ‘text-convertable’

17.4.3 Copy — Copying instances

Get Method copy ⇒name

Refinement of: char array<-copy Equivalent to ←self.

17.4.4 Compare — Comparing objects

Send Method equal name=name Refinement of: char array->equal Succeeds if the argument name is the same name as the receiver. See notes on uniqueness with class name and →initialise.

17.4.5 Statistics — Timing, memory usage, etc.

Get Method bench int=int ⇒int Calls the internal function to look-up the text of itself <n> times and returns the number of failing comparisons in the symbol-table.

Get Method buckets ⇒int

Returns the number of buckets in the name-table. Should return the same value for each (defined) name.

Get Method bucket value 0.. ⇒name

Name at indicated bucket

Get Method hash value ⇒int

Its hash-value

17.4.6 Internal — Private behaviour

Send Method value char array=char array Modify the contents of the name, preserving its identity. This method supports →syntax and should only be used at boot time to solve specific host-language binding problems.

Get Method modify char array=char array ⇒name Refinement of: char array<-modify Returns a name object from the given argument text. See ‘char array ←modify’ for details.

Send Method syntax {uppercase}, char=char If the word is strictly lowercase, all characters are mapped to uppercase and the nametable is updated accordingly.

The second argument is the word-separator character. All occurrences of the current word-separator will be mapped on this character.

This method is exclusively to support ‘pce →syntax’.

17.5 Class string — Modifyable version of char array

Inheritance: ⇒ string ⇒ char array ⇒ object

A string object is a sequence of ASCII characters. Strings do not pose any limits on their size. They can contain any ASCII value, which the exception of the EOS character (‘\0’).

PCE various ways to represent text. See class char array, class name and class text buffer.

Instance Variables

Behaviour

17.5.1 Oms — Object management operations

Send Method initialise format=[char array], argument=any ... Send Method initialise format=[char array], argument=any ...

Refinement of: char array->initialise Create a string, initialise as →format

17.5.2 Conversion — Conversion (for type checking)

Get Method convert any=any ⇒string Get Method convert any=any ⇒string

Refinement of: char array<-convert

Convert name, int, real, etc.

17.5.3 Copy — Copying instances

Get Method copy ⇒string Get Method copy ⇒string

Refinement of: char array<-copy

Returns a new instance of the same class with the same text. Equivalent to:

         get(S?class, instance, '%s', S).

See also ‘char array ←copy’.

Send Method value text=char array Set the contents of the string

17.5.4 Content — String content

Send Method append text=char array Send Method append text=char array

Append to the string

Send Method character at=int, char=char Change character at 0-based index. See also →insert character.

Send Method delete from=int, length=[int] Send Method delete from=int, length=[int]

Delete ‘length’ characters starting at ‘from’. If ‘length’ is omitted it deletes all characters starting at ‘from’ to the end of the string.

Send Method ensure nl [char array] Send Method ensure nl [char array]

If the last character of the string is not a newline (ASCII 10) a newline is appended. If additional text is provides this is appended too.

Send Method ensure suffix text=char array, ignore case=[bool] If string does not have →suffix, →append the suffix. Notably useful for handling file suffixes.

Send Method insert at=[int], text=char array Send Method insert at=[int], text=char array

Insert text at the given 0-based index. If index is @default this is equivalent to →append. If index is 0 this is equivalent to →prepend.

Send Method insert character char=char, at=[0..], times=[0..] Insert the given character ‘times’ times at the given location. If ‘at’ is @default, the character(s) is/are appended at the end of the string.

If a string is to be created from a list of character codes, it is advised to create a string of the necessary length first using this method. The following illustrates this making a string with all characters between 0 and 255:

    new(S, string),
    send(S, insert_character, 0, 0, 256),
    forall(between(0, 255, I),
           send(S, character, I, I)).

See also ‘string →character’.

Send Method newline times=[0..] Append ‘times’ newlines (default 1). This is equivalent to:

    send(String, append, string('\n')).

Send Method prepend char array=char array Send Method prepend char array=char array

Add argument at the beginning

Send Method strip [{leading,trailing}] Send Method strip [{leading,trailing}]

Strip all layout characters (see ‘pce ←syntax’) from the start and/or and of the string. When the argument is ‘leading’, only the layout characters at the start are removed. When ‘trailing’, the layout characters at the end are removed. Otherwise (@default) they are removed from both ends.

Send Method translate from=char, into=char* Map all occurrences of ‘from’ into ‘to’. If ‘to’ is @nil, delete all ‘from’ characters. The following translates a string holding a list of words line-by-line into a string where the words are separated by spaces:

    send(String, translate, '\n', ' ').

Send Method truncate int=int

Truncate the string to the specified number of characters. The following two calls are equivalent:

    send(String, truncate, 4)
    send(String, delete, 4)

17.5.5 Indentation — Create/analyse text indentation

Send Method untabify tabs=[int|vector] Send Method untabify tabs=[int|vector]

Replaces all tab characters (ASCII 9) by spaces, preserving the layout. The argument specifies the positions of the tab-stops. If this is an integer it specifies infinitely tabstops at the specified intervals. If it is a vector it should be a vector of integers. If ‘tabs’ is omitted ‘8’ is used as a default value.

The main application area is handling of plain (Unix) ASCII text.

17.5.6 Format — Formatted write (as C printf())

Send Method format format=[char array], argument=any ... Send Method format format=[char array], argument=any ...

Format (like printf) in string

17.5.7 Case — Case (UPPER/lower) translation

Send Method downcase

Change all letters in string to lower case

Send Method upcase

Change all letters in string to upper case

17.5.8 Encoding — Character-set related behaviour

Send Method bits per character int=int

8- or 16-bits per character

17.5.9 Internal — Private behaviour

Get Method modify char array=char array ⇒string Refinement of: char array<-modify Create a new string from the argument text. Defined as:

         modify(S, To:char_array, Result:string) :←
             get(S, class, Class),
             get(Class, instance, '%s', To, Result).

See ‘char array ←modify’ for details.

17.6 Class number — Object version of integer

Inheritance: ⇒ number ⇒ object

A number object represents an integer just like the primitive type ‘int’. Numbers are more costly, but allow for some operations such as comparison or addition.

Instances of class number are commonly used to implement counters:

    count_instances(Device, Class, Instances) :-
        new(I, number(0)),
        send(Device, for_all, @default,
             if(message(@arg1, instance_of, Class),
                message(I, plus, 1))),
        get(I, value, Instances),
        send(I, done).

See also class real.

Instance Variables

storage

value  - alien:long  Value of number object

Behaviour

17.6.1 Oms — Object management operations

Get Method convert any=any ⇒number Refinement of: object<-convert Converts int, real and char array

Send Method initialise value=int|number Refinement of: object->initialise Create from integer

17.6.2 Copy — Copying instances

Get Method catch all selector=name, argument=unchecked ... ⇒number Makes all ‘send’ operations available as get operations so that the receiving number is not modified:

         ?- new(N, number(2)),
            get(N, plus, 3, N2),
            get(N2, value, V2).
         V2 = 5
         N2 = @1687003/number
         N = @1686999/number

First creates a new number object with the same ←value, invokes the method as a send method and, if the send succeeds, returns the copy.

17.6.3 Value — Related value

Get Method value ⇒int|number Represented value. This is an ‘int’ and thus limited to the range

         `@pce ←min_integer' .. `@pce ←min_integer'

17.6.4 Compare — Comparing objects

Get Method compare int=int ⇒{smaller,equal,larger} Compare to the argument. The result ‘smaller’ implies the receiver is smaller than the argument. Intended to support ‘chain →sort’ and friends. To sort a chain of integers by value:

         send(Chain, sort, ?(@arg1, compare, @arg2)).

Send Method equal int|number Succeeds if the argument represents the same value. Note that PCE type conversion converts real objects, number objects and text to ints and thus all the following succeed:

         ?- send(number(1), equal, 1).
         ?- send(number(1), equal, 1.0).
         ?- send(number(1), equal, number(1)).
         ?- send(number(1), equal, '1').

Send Method larger int|number

Send Method larger equal int|number

Send Method less equal int|number Send Method not equal int|number Send Method smaller int|number

Compare the receiver to the argument by value. The receiver is tested to be {→larger, →smaller, ...} than the argument.

17.6.5 File — Saving and loading files, file operations

Send Method convert old slot slot=name, value=unchecked Convert old value slot to new representation

17.6.6 Calculate — Compute properties

Send Method divide int|number Send Method minus int|number Send Method plus int|number Send Method times int|number

Basic arithmetic operations. Note that arithmetic may also be performed by the function classes /, +, - and *. Numbers are useful as ‘accumulators’ (see the various examples in this class). Functions are more convenient in expressions.

Send Method maximum int|number Send Method minimum int|number

Set ←value to the {→maximum, →minimum} of the current ←value and the argument. Useful in may computations. Suppose ‘Chain’ is a chain holding string and we which to know the widest string given the font ‘Font’:

    width_of_strings(Chain, Font, Width) :-
        new(W, number(0)),
        send(Chain, for_all,
             message(W, maximum, ?(Font, width, @arg1))),
        get(W, value, Width),
        send(W, done).

17.6.7 Textual — Textual representation

Get Method print name ⇒string

Refinement of: object<-print name Formatted version (%d) of value

17.6.8 Storage — Definition of storage details

Variable value alien:long (-) Send Method value int|number

Represented value. This is an ‘int’ and thus limited to the range

    `@pce ←min_integer' .. `@pce ←min_integer'

17.7 Class real — Floating point number

Inheritance: ⇒ real ⇒ object

A real object represents a floating point number in PCE. As PCE is designed first of all for developing user interfaces, reals are rarely used and therefore represented as true objects. The behaviour of reals is very similar to the behaviour of class number.

The value of a real object is represented as a double-precision float using the native floating point format of the machine.

Instance Variables

storage

value1  - alien:double1  1-st part of double-value
value2  - alien:double2  2-nd part of double-value

Behaviour

17.7.1 Oms — Object management operations

Get Method convert any=any ⇒real Refinement of: object<-convert Converts int, number and char array

Send Method initialise value=any

Refinement of: object->initialise Create real by converting argument

17.7.2 Copy — Copying instances

Get Method catch all selector=name, argument=unchecked ... ⇒real Non-destructive arithmetic. Create a new real object with the same ←value, execute the operation and, if the operation succeeds, return the new real. See also ‘number ←catch all’.

17.7.3 Value — Related value

Get Method value ⇒real

Equivalent to ←self.^{1}

Send Method value real=real Copy the ←value from the ←value of the argument.

17.7.4 Compare — Comparing objects

Get Method compare real=real ⇒{smaller,equal,larger} Compare with argument

1 It might be better to return a copy.

Send Method equal real=real Refinement of: object->equal Succeeds if the argument has the same reference. Note that this method is redefined by various classes. Equality may also be tested using class ==.

Send Method larger real=real

Send Method larger equal real=real Send Method less equal real=real

Send Method not equal real=real Send Method smaller real=real

Compare the receiver’s ←value to the ←value of the argument. It →larger succeeds, the receiver is larger than the argument. Note that type conversion allows for the comparison of integers and numbers too.

17.7.5 Calculate — Compute properties

Send Method divide real=real Send Method minus real=real Send Method plus real=real Send Method times real=real

Basic arithmetic operations. Note that possible resulting floating point exceptions are not handled gracefully in the current implementation.

17.7.6 Textual — Textual representation

Get Method print name ⇒string

Refinement of: object<-print name Formatted version (%g) of value

17.7.7 Storage — Definition of storage details

Variable value1 alien:double1 (-)

1-st part of double-value

Variable value2 alien:double2 (-)

2-nd part of double-value

17.8 Class date — Represent point in time

Inheritance: ⇒ date ⇒ object

Class date is a wrapper around Unix’s notion of time. It is intended to communicate over creation, last-modification dates, etc. Dates might also be useful for agenda systems and systems that represent some kind of database. For example, this manual tool uses date objects to keep track of the last-modification time of cards.

Unix time is measured in seconds from the Unix epoch: Jan 1, 1970. Therefore, the granularity of a date object is a second. The first date that can be represented is Jan 1, 1970 and the latest date somewhere in the year 2105 (2 to-the-power 32 - 1 seconds from the epoch).

The most important methods are:

• ←print name and ←string which returns a textual representation of the date

• ←convert Convert a textual representation into a date object.

• →current Update date object to reflect the current time.

• →before, →after, →equal Comparison of dates

• ←compare Comparison of dates compatible with ‘chain →sort’.

Instance Variables

storage

date  - alien:long  Unix’s notion of date

Behaviour

17.8.1 Oms — Object management operations

Send Method initialise seconds=[0..59], minutes=[0..59], hours=[0..23], day=[1..31],

month=[1..12], year=[1970..2050] Refinement of: object->initialise Create a date object from its components. Any defaulted value defaults to the current value. Thus

         ?- new(D, date(0, 35, 14)).

Represents 14.35h today.

17.8.2 DateComponent — Manipulate/query components of a date

Get Method day ⇒1..31 Day in the month

Send Method day 1..31 Set day Get Method day name short=[bool] ⇒name

Name of day in the week

Get Method hour ⇒0..23 Hour in the day

Send Method hour 0..23 Set hour

Get Method minute ⇒0..59

Minute in the hour

Send Method minute 0..59

Set minute

Get Method month ⇒1..12

Month in the year

Send Method month 1..12

Set month

Get Method month name short=[bool] ⇒name Name of the month

Get Method second ⇒0..59

Second in the minute

Send Method second 0..59

Set seconds

Get Method week day ⇒0..6

Day in the week

Get Method year ⇒1970..2050 Year of the date

Send Method year 1970..2050 Set year

17.8.3 Set — Set operations (no duplicates)

Send Method copy date=date Copy time from argment date object

Send Method current

Change date to be ‘now’

Send Method set seconds=[0..59], minutes=[0..59], hours=[0..23], day=[1..31],

month=[1..12], year=[1970..2050] Set all non-default components.

17.8.4 Compare — Comparing objects

Send Method after date=date Test if date is after argument

Send Method before date=date Test if date is before argument

Get Method compare date=date ⇒{smaller,equal,larger} Compare to date objects and return one of smaller (before), equal (same time) or larger (after). May be used by ‘chain →sort’. The following example sorts a chain of file objects according to their last modification time:

    send(Files, sort,
         ?(@arg1?time, compare, @arg2?time))

Send Method equal date=date Refinement of: object->equal Succeeds if both date objects represent the same point in time.

17.8.5 Calculate — Compute properties

Get Method difference to=[date], unit=[{second,minute,hour,day,week,year}] ⇒int Difference relative to the argument date in the specified unit. The value is always rounded downwards. ‘to’ defaults to the epoch. units defaults to seconds. Note that the result is returned as a PCE integer and the maximum value of a PCE integer is not sufficient to represent all time differences in second units. An error (int range) is generated on overflow.

17.8.6 Textual — Textual representation

Get Method convert string=string ⇒date Refinement of: object<-convert Convert Day/Month/Year to date

Send Method convert description=char array Conversion of a textual representation of a date into a date object. These methods exploit the GNU-project get date() library and convert various commonly used representations of a date. Unfortunately this library is undocumented ...

Get Method print name ⇒string

Refinement of: object<-print name Equivalent to ←string. The methods ←print name and ←convert are used by class text item to represent and modify objects.

Get Method string ⇒string

New string object representing date. This method uses the C-library function ctime(). It’s format is:

         `Mon Sep 14 17:23:18 1992'

1

17.8.7 Storage — Definition of storage details

Variable date alien:long (-)

Unix’s notion of date

1 There is no way to manipulate the printed representations of a date apart from redefining this method from scratch.

492 Class date XPCE Reference Manual

Chapter 18

Objects, Relations and Attributes

This chapter deals with general object management: creation of objects, destruction, programming individual objects (PCE offers both programming at the object level and at the class level), etc. The classes discussed are:

object  The root of the inheritance tree.
attribute Object-level attribute (cf. instance variable)
hyper  Binary relation between two objects.

18.1 Class object — Root of inheritance tree

Inheritance: ⇒ object

Class object is the root of the class hierarchy. If defines common behaviour, mainly to do with object management:

Creating objects  →initialise
Destroying objects  →free, →done
Cloning objects  ←clone
Saving objects on file →save in file
Adding attributes  →attribute
Programming  →send method, →get method

Any class in PCE must be a sub-class of class object and therefore any object listens to the methods defined on this class.

It is allowed to create instances of class object and extend the instance using object-level programming to realise a single object meeting some specification. See:

→attribute  Define object-level attributes
→send method Add object-level ‘send’ method
→get method Add object-level ‘get’ method

Behaviour

18.1.1 Oms — Object management operations

Get Method convert char array=char array ⇒object Get Method convert char array=char array ⇒object

The method ←convert is called by ‘type ←translate’, part of the generic type-checking and type conversion system. It is not a normal method not the receiver, but the result is an instance of the class on which the method is defined. The receiver is normally the class.

The task of the ←convert method is to translate the argument into an instance of the requested type.

For class object itself no translation is necessary as anything in PCE already is an instance of class object. This method will therefore never be called directly by the PCE type conversion system. This method translates a text (char array object) of the form ‘@<name>’ into an object if <name> is a valid object reference. This method is useful for defining other conversion functions.

Send Method done Send Method done

This method is used to help the PCE garbage collector and should normally be invoked after the program is done with the answer of a get operation and wants to be sure that the returned object is deleted when no longer referenced:

    .....
    get(Area, size, Size),
    ....
    send(Size, done).

The receiving object will be deleted from the object base as with →free if the receiver has no ←references, ←lock object is @off and ←protect is @off.

In the example above →done is equivalent to →free as the size object returned by ‘area ←size’ is created by this method (provided the .... computation does not lock, protect or make the size an attribute of some other object. In the example below, using →free will corrupt PCE’s database:

    ....
    get(Graphical, area, Area),
    ....
    free(Area).     % ==> ERROR!!!

The area object will be deleted and the slot ‘graphical ←area’ will be pointing in the dark (checkpce/0 will find such problems).

Using →done is often not necessary. After a user-event has been processed all unreferenced and unlocked objects will be deleted from the object base automatically. Unreferenced objects created during the execution of a user-defined method for a PCE class are also deleted automatically. →done is useful when a lot of garbage objects are created in a loop.

Send Method free

Remove an object from the PCE object base. This behaviour is the normal way to get rid of existing objects. →free performs the following steps:

• Invoke ‘object →unlink’. This allows a class to unlink the object from the environment.

• Removes all attribute references by setting all slot values that contain an object to @nil.

• Removes the global name association if this existed.

• Reclaim the memory if the object has no ←references. Otherwise reclaim is delayed. See ‘@pce ←deferred unalloced’.

‘Object →unlink’ is often defined on objects that need to inform some other object that they are destroyed. For example, graphical objects inform their device to allow the device to remove the object from the display and update their book-keeping.

The method ‘object →unlinking’ is provided as a test whether or not →free is in progress on the receiver.

See also ‘visual →destroy’ to destroy entire hierarchies of (visual) objects.^{1}

Send Method initialise unchecked ... Send Method initialise unchecked ...

No-operation (just succeeds). Implemented to allow any class perform a

    send(Self, send_super, initialise).

Any class should have a method →initialise. This method is invoked from PCE’s virtual machine to initialise an object from the parameters given to the object creation operation (new/2; @vmi new, class create).

1 Window →free should just delete the window from it’s ←frame. In new code, please delete frames using ‘frame →free’.

The creation of objects is discussed with ‘class ←instance’.

Get Method lock object ⇒bool Send Method lock object bool=bool Send Method lock object bool=bool

When @on, PCE’s garbage collector will not remove this object, even if it has no references. Globally named objects are by default locked, as are most reusable objects for which the class maintains a table: types, names, modifiers, etc.

A locked object is destroyed by →free. To protect an object against →free, use →protect.

Get Method protect ⇒bool Send Method protect

Protect an object against destruction with →free or one of the other objects destruction methods. The global PCE objects @pce, @prolog, etc. are protected this way.

There is no way to unprotect protected objects or to destroy them.

Get Method self ⇒object Get Method self ⇒object

Returns the object itself. Hardly ever necessary within the architecture of PCE.

Send Method unlink Send Method unlink

The method →unlink is called by ‘object →free’. Its task is to unlink the instance from its environment. The →unlink method may not be called directly by the user. The user should provide an unlink method when writing a user-defined class that requires specialised unlink behaviour.

Some examples:

• Graphicals notify their device when they are destroyed, so the device can delete them from ‘device ←graphicals’ and update the display.

• A window will destroy the associated Xt-widget realising the window in X.

• A char array will unalloc the associated C-data-structure representing the text.

NOTE: Unlink should never be called directly by the user. Any user-defined →unlink method should invoke the method of the super-class (see ‘object →send super’).

See also →free, →done, ‘visual →destroy’ and →unlinking

Send Method unlinking

Succeeds if the object is in currently being →unlink’ed. Intended as a test in →unlink methods to avoid unnecessary computation.

18.1.2 Type — Type definition, test and conversion

Get Method class ⇒class

Instance of class class to which this object belongs. The normal way to test that an object is of some particular class is either →instance of or ←class name. In most situations the first is to be preferred.

Get Method class name ⇒name Get Method class name ⇒name

Name of the class the object belongs to. Shorthand for:

    get(Object?class, name, ClassName).

Send Method instance of class=class Send Method instance of class=class

Succeeds if the object is an instance of the argument class or one of its subclasses. Note that ‘class ←convert’ converts class-names to class objects:

    send(Obj, instance_of, graphical)

is the advised way to verify that ‘Obj’ is a graphical.

The method ‘pce ←convert’ may be used to combine testing with possible type conversion. See also ‘type →validate’ and ‘type ←check’. If one wants to test whether an object is a graphical object, a node object or @nil, the following two test are equivalent:

    (   send(Obj, instance_of, graphical)
    ;   send(Obj, instance_of, node)
    ;   Obj == @nil
    )

or

    send(type('graphical|node*'), validate, Obj)

Send Method same class object=object Test if two objects belong to the same class. The following two executable objects are the same:

    Obj1?class == Obj2?class.

and

    message(Obj1, same_class, Obj2)

18.1.3 Copy — Copying instances

Get Method clone ⇒object Get Method clone ⇒object

Object ←clone creates a clone of an object. The semantics of cloning objects in general are difficult to define. Which related objects are to be cloned and which are to be shared between the clone and the original object?

The approach taken by PCE is not particularly neat. We do not recommend heavy use of this facility.

Object are cloned ‘recursively’. This implies all objects that can be reached from this object are cloned as well. The algorithm deals correctly with cyclic structures.

While executing a recursive clone, two flags may influence the result:

‘variable ←clone style’ Defines the type of relation
‘class ←clone style’  Defines the type of object

Please consult the documentation of these for details.^{2}

18.1.4 Relation — Relations, constraints, (graphical) connections

Send Method attach hyper hyper=hyper, object=object

Send Method delete hyper hyper=hyper

Called from class hyper as part of ‘hyper →initialise’ and ‘hyper →unlink’. These methods should never be called directly by the user. It is however possible to redefine these methods to intercept the creation and destruction of hyper-links. A redefinition should always call this method.

Send Method delete hypers name=[name], condition=[code] Delete all hypers matching the name and condition. See ←find hyper for the interpretation of the name and condition arguments.

Get Method find hyper hyper name=[name], test=[code] ⇒hyper Find hyper-object from specifications. ‘hyper name’ is the name of the hyper, seen from the receiver of this message. If hyper name is @default, all hypers are considered. ‘test’ is a code object. If it is not @default, it is executed using the following arguments:

@arg1: Receiver of this message
@arg2: Hyper object
@arg3: Object at other end of the hyper.

See also ←hypered.

Get Method get hyper hyper name=[name], selector=name, argument=unchecked

... ⇒unchecked Perform a ‘broadcast’ get operation on objects ←hypered to this object. If a hyper name is given only hypers with this name are considered. Otherwise all hypers are considered. As soon as one of the hypered objects returns a value, this method returns with this value. Otherwise the method fails. Example:

    ?- new(@o, object),
       new(_, hyper(@o, bitmap('pce.bm'), bitmap)),
       new(_, hyper(@o, text(hello), text)).
    ?- pce_catch_error(no_behaviour,
                       get(@o, get_hyper,
                           @default, string, S).
    S = hello
    ?- pce_catch_error(no_behaviour,
                       get(@o, get_hyper,
                           @default, pixel, 3, 5, P).

2 The semantics are ill defined. Be *very* carefull with ‘plain’ cloning and study this description carefully before going ahead. When in doubt, use the ‘inspector’ tool from the main menu to find out about the result.

    P = @off

The first query is answered by the text object, while the latter is answered by the bitmap object (delegated to the ‘bitmap ←image’). Note the use of pce catch error/2 to avoid an error while broadcasting to objects that do not understand the method.

Get Method hypered hyper name=[name], test=[code] ⇒object Find a hyper-related object. Name is the name of the hyper (seen from the side of the receiver). Test is an optionally additional test. If present, this test is executed using the following arguments:

@arg1 This object
@arg2 The hyper object
@arg3 The object at the other end of the hyper

The first matching object is returned. See also ←all hypers.

Send Method send hyper hyper name=[name], selector=name,

argument=unchecked ... Perform a broadcast send-operation to all (named) ←hypered objects. Similar to ←get hyper, but does not stop if the method is received successfully. Succeeds if there was at least one hypered object accepting the message, fails otherwise.

18.1.5 Compare — Comparing objects

Send Method equal to=any Send Method equal to=any

Succeeds if the argument has the same reference. Note that this method is redefined by various classes. Equality may also be tested using class ==.^{3}

Send Method same reference to=any

Test if i’m the same object as the argument

18.1.6 Test — Test object properties

Send Method has value name=name, any=any Send Method is off name=name Send Method is on name=name Send Method not has value name=name, any=any

Execute the get operation ←Name and compare the result to the argument. Succeed if they are equal (have same reference), fail otherwise.

This method is intended to test on attribute values. Similar and more powerful results can be obtained using class ==.. It’s usage is to be preferred. The following code objects and Prolog fragments all test whether the ‘point ←x’ of the point object @p equals 3:

Prolog:

    get(@p, x, 3)              % Uses Prolog unification
    send(@p, has_value, x, 3)

Code fragments:

3 The notion of equality is not very clear in PCE.

    message(@p, has_value, x, 3)
    @p?x == 3

→not has value is equivalent to →has value, but returns the inverse result. →is on is equivalent to →has value: @on and →is off is equivalent to →has value: @off.

18.1.7 Behaviour — Definition of behaviour

Get Method group ⇒name

Classes are of the group cla

Get Method man description ⇒char array Get Method man header ⇒unchecked

Get Method man description source ⇒object

Object that provided the description

Get Method texi description ⇒unchecked

Cached description slot for texinfo generation

18.1.8 Meta — Analysing behaviour and objects

Get Method all attributes create=[bool] ⇒chain Get Method all attributes create=[bool] ⇒chain Get Method all constraints create=[bool] ⇒chain Get Method all get methods create=[bool] ⇒chain Get Method all hypers create=[bool] ⇒chain Get Method all send methods create=[bool] ⇒chain

Return a chain holding all the object-level extensions to the object of the given type. If ‘create’ equals @on, this call will always succeed, possibly returning an empty chain. Otherwise the call might fail.

The following extensions are defined:

→attribute  Object-level ‘instance variable’
constraint  Binary constraint between two objects
hyper  Binary relation (two-way attribute)
→recogniser  Handler for event objects (class graphical)
→send method Object-level method (send)
→get method Object-level method (get)

See also class constraint and class hyper.

Get Method find all send methods condition=[code] ⇒chain Compute a chain with all behaviour objects that may be used to invoke send behaviour on this object. It will analyse:

• Attributes

• Class’ variables and send methods

• Delegation

Overruled behaviour is automatically deleted from the chain. The additional conditions is executed binding @arg1 to the implementation object.

Get Method get method name=name ⇒tuple Get Method send method name=name ⇒tuple

This method locates the implementation for the specified selector for the specified (send/get) type of operation. It will try (in this order):

• attribute objects (see ‘object →attribute’).

• ‘Class ←send method’

• Delegation. See ‘class ←delegate’

The ‘tuple ←first’ contains the receiver, which is either the object itself or the object the message will be delegated to. The ‘tuple ←second’ contains the behaviour object that implements the method.

Examples:

    ?- new(@p, point),
       get(@p, send_method, mirror, tuple(Object, Impl)).
    Object = @p/point
    Impl = @632241/send_method
    ?- new(@v, view),
       get(@v, send_method, append, tuple(Object, Impl)).
    Object = @833889/editor
    Impl = @749374/send_method

The second example indicates that, when a message →append is sent to @v it will be delegated to the editor @833889.

See also →has get method, →has send method and ←all send methods.

Send Method has get method selector=name Send Method has get method selector=name

Send Method has send method selector=name Send Method has send method selector=name

Test whether object implements the specified send/get behaviour. This test is equivalent to testing whether {←get method, ←send method} returns a value but avoids the creation of a tuple.

18.1.9 File — Saving and loading files, file operations

Send Method convert loaded object old version=int, current version=int Send Method convert loaded object old version=int, current version=int

Called by ‘file ←object’ if the current save version is not the same as save version when the file was loaded. The two arguments are the old and the new save versions. See ‘pce ←save version’.

Send Method initialise new slot new=variable Send Method initialise new slot new=variable

Part of saved-object conversion (see ‘file ←object’). Called when -while loading an instance from a file-, the current definition of the class has a new instance variable (compared to when the instance was saved to file using →save in file). The argument is the new variable object from the class. May be used to initialise the new slot to some sensible value.

Send Method save in file file=file

Save an object and all objects that can be reached from it to a file. This method takes care of cyclic structures. The save-format is binary. The object may be reloaded in this or in another PCE process using ‘file ←object’. When the object is reloaded in this PCE process, the combined functionality is similar to ‘object ←clone’.

When the data, manipulated by the application is stored in PCE, the normal way is to attach all this information to a single object (normally a hash table, sheet or chain) and save this object to a file. All attached objects (i.e. all data needed by the application to save its ‘persistent’ data) are then saved in the file.

PCE’s save and load functionality has a limited way to deal with versions. The conversion activities are described with ‘file ←object’.^{4}

Get Method storage reference ⇒any

This method is used by ‘object →save in file’ to handle shared object resources (colours, fonts, etc.). If this method is executed successfully, →save in file stores the classname of the the object and the returned object.

‘file ←object’ loads the classname, converts the classname to a type object, loads the returned ‘reference object’ and attempts ‘type ←check’ to produce an object of the requested type.

See ‘colour ←storage reference’ for an example.

18.1.10 Resource — Interface to ~/.Xdefault

Send Method obtain resources Send Method obtain resources

Scans the slots of the object. For each slot that is filled with @default and who’s type indicates this is invalid, it will call ←resource value and fill the slot with the returned value.

The following example shows part of the definition of a user-defined class ‘mailtool’, which defines a resource ‘Pce.mailtool.spool directory’:

    :- pce_begin_class(mailtool, frame, "Unix mail reader").

resource(spool directory, directory, ’/usr/spool/mail’).

    ...

variable(spool directory, directory, get).

4 •User-defined classes currently cannot define private save and load behaviour.

...

initialise(MT) :→
"Create the mailtool"::
send(MT, send_super, initialise, 'MailTool'),
send(MT, slot, directory, @default),   % resource
...
send(MT, obtain_resources),
...

See also ←resource value and class resource.

Get Method resource value name=name ⇒any Get Method resource value name=name ⇒any

Request the value of a named resource for this object. The following fragment is from the hypothetical user-defined class ‘desktop icon’ and defines the image object to be used for a directory:

:- pce_begin_class(desktop_icon, device,
               "Icon on the desktop").

resource(directory image, image, ’desktop directory.bm’).

...

initialise(I, Path:name) :→
send(I, send_super, initialise),
(   send(directory(Path), exists)   % test for dir
→ get(I, resource_value, directory_image, IM),
    send(I, display, bitmap(IM)),
    ...
;   ...
),
...

See also →obtain resources and class resource.

18.1.11 Textual — Textual representation

Get Method print name ⇒char array Get Method print name ⇒char array

The method ←print name is intended to convert an object into a textual representation. It serves two purposes:

• Implement the %N special sequence in ‘string →format’

• Realise ‘text item ←print name of value’.

This method is redefined by various subclasses. ‘Object ←print name’ itself performs the following steps:

• If the object accepts ←name and the return value can be converted into a char array object, return this converted value.

• Otherwise return a new string holding the internal debugger representation of objects.

18.1.12 Report — Reporting events, status and errors

Send Method error error=error, context=any ...

Raise an error (exception) on this object. Error (normally specified by its ‘error ←id’ and converted by ‘error ←convert’) is the error to be raised. The remaining context arguments provide context information about this error. Performs the following steps:

• if ‘error ←kind’ equals ‘ignored’, silently fail.

• assigns ‘@pce ←last error’.

• If the error is not catched (‘@pce →catched’), it invokes ‘error →display’ on the error object.

See also class error and →report.

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ...

Send Method report kind={status,inform,progress,done,warning,error},

format=[char array], argument=any ... Report a message related to the specified object. This method locates the visual object from which the user invoked the current command using ‘@event ←receiver’ and invokes ‘visual →report’ on this object.

If @event is unbound the error is caused by a query from the host-language interaction window and PCE thus prints the message using ‘@pce →format’.

Some classes redefine this method because they know they are related to some visual object. See also ←report to.

Get Method report to ⇒object

Object for →report. The default for non-visual objects is the receiver of the current event (@event). See also ‘visual ←report to’.

18.1.13 Debugging — Debugging PCE programs

Send Method check recursive=[bool] Validate the type of the instance variables. If the argument is @on or @default, validation continues recursively over instance variables that contain objects. This method is protected against loops in the data-structures.

Normally invoked through the Prolog predicate checkpce/0.

Get Method flags ⇒name

Returns a name with the three characters indicating the status of the object with regard to the object manager. The flags are:

‘P’ Indicate object is protected
‘L’ Indicate object is locked
’A’ Indicate OMS has not yet decided on the status of the

        object.

This method is used by the ‘Inspector’ to generate the indicators at the top-right of the cards.

Get Method code references ⇒int

Number of code-references to this object

Send Method for slot reference action=code, recursive=[bool] This method is intended to help writing analysis programs for the database. It scans all slot-references of the receiving object. When the argument is @on or @default, it will continue recursively over the slot-fillers.

For each slot-reference, code is executed with the following bindings:

@arg1 The instance
@arg2 Type of slot reference
@arg3 The slot
@arg4 The value of the slot

The ‘Type of slot reference’ is one of:

• slot For normal objects. @arg3 is bound to the name of this variable

• cell For chains. @arg3 is bound to the 1-based index of the cell

• element For vectors. @arg3 is bound to the index

• key For hash tables. @arg3 is bound to the key; @arg4 to the related value.

Get Method inspect ⇒bool

Send Method inspect bool=bool If @on and the class of the object has one of the change trapping messages attached to it, changes to the object are forwarded (to the application) via these change messages. If @off, these messages have no effect.

Get Method references ⇒int

PCE uses reference counts for the incremental garbage collector. The number of references is the number of slot relations towards this object.

Note that PCE does not know which objects have references to an object; slot-relations are uni-directional.

18.1.14 Programming — Methods to write methods

Get Method get class selector=name, argument=unchecked ... ⇒unchecked Invoke get method on object, bypassing possible object-level get methods associated with →get method. This method serves a similar purpose as →get super when using class-level programming.

Send Method get method get method|chain Add a get-method to this individual object. Object-level defined get-methods overrule Class-defined get-methods. An object level method may refer to its corresponding class level method using →get class.

Get Method get sub selector=name, argument=unchecked ... ⇒unchecked Get Method get sub selector=name, argument=unchecked ... ⇒unchecked

Invoke message on @receiver, using the definition from the object’s own class instead of the current class. See ‘class →get method’ for further details.^{5}

Get Method get super selector=name, argument=unchecked ... ⇒unchecked Invoke behaviour of the super-class. This behaviour is intended to be used only for using behaviour of the superclass when defining new classes. This method is only valid in the context of class-defined methods. The receiver should be the same object as the receiver of the executing method (i.e. ←get super is always to ‘it self’).

See also ←slot.

Get Method get vector unchecked ... ⇒unchecked Invokes a get-method on the object itself. The first element of the vector is used as a selector, the subsequent ones are used as arguments to the behaviour. E.g.

    get(@prolog, get_vector, vector(plus, 1, 1), X).

Is a very complicated way to add 1 and 1.

This behaviour is intended to deal with delegating messages trapped via the →get catch all behaviour.

Send Method send class selector=name, argument=unchecked ...

Invoke send behaviour of the class, bypassing object-level send method objects attached to this object. See ←get class for details..

Send Method send method send method|chain Send Method send method send method|chain

Add a send-method to this individual object. Object-level defined send-methods overrule Class-defined send-methods. An object level method may refer to its corresponding class level method using →send class.

Send Method send sub selector=name, argument=unchecked ...

Send to @receiver, using behaviour at the level of the class @receiver is an instance of. See also ←get sub.

Send Method send super selector=name, argument=unchecked ... Send Method send super selector=name, argument=unchecked ...

Invoke behaviour of the super-class. This behaviour is intended to be used only for using behaviour of the super-class when defining new classes.

5 Actually, a normal get operation executed in a method already performs a ←get sub. Reserved fro future extension.

Send Method send super vector unchecked ...

Combines →send super and →send vector, creating an argument vector from the leading arguments and vector and invoking behaviour defined at the super-class. See →send super and →send vector for details.

Send Method send vector unchecked ...

‘Object →send vector’ supports the implementation of methods with variable argument list. Its format is:

    unchecked..., Vector, [shift]

First, a list is created containing the following arguments:

• The objects from ‘unchecked...’

• The elements of the vector, with the first [shift] elements skipped.

Next, the first element of this list is used as the selector and the remaining arguments as the arguments to the message. Examples:

• send(@prolog, send vector, vector(write ln, ’Hello World’)).

• send(@prolog, send vector, write ln, vector(’Hello World’)).

Get Method slot name|int ⇒unchecked Get Method slot name|int ⇒unchecked

Get the value of the named slot, bypassing protection. When given an integer, get the value of the nth-slot (counting from 1).

This method is used in the implementation of get method objects if the get method wants to access a slot with the same name without interaction from the method. See also ‘class →get method’.

Send Method slot name|int, unchecked=unchecked Send Method slot name|int, unchecked=unchecked

Set the value of a (class-defined) slot without activating the corresponding method.

The slot specification (first argument) is either the slot-name, or the offset in the object (1-based). The latter possibility is for very specific (internal) use.

This method should only be used from a send-method that has the same name (selector) as the slot and serves as a ‘wrapper’ around the slot to deal with side-effects:

    :- pce_begin_class(person, object).

variable(date of birth, date, get, ”When person was born”).

...

    date_of_birth(Person, Date:date) :→
        (   send(Date, after, new(date))
        → send(Person, report, error,
                 'Cannot be born in the future!'),
            fail
        ;   send(Person, slot, date_of_birth, Date)
        ).

6

18.1.15 Function — Object management for functions

Get Method class ⇒class Get Method class name ⇒name Get Method inspect ⇒bool Get Method man id ⇒name Get Method references ⇒int

Get Method slot name|int ⇒unchecked

Send Method free

Send Method inspect bool=bool Send Method instance of class=class Send Method instance of class=class

These methods starting with an ’ ’ (underscore) are defined both on class function and class object. Their behaviour is equivalent to the counterpart with the leading underscore deleted for normal objects. As these methods are explicitly defined on class function however, invoking one of these methods to a function will cause the function itself to handle the message instead of the evaluation. Example:

    ?- new(O, @display?size),
       get(O, '_class_name', C1),
       get(O, class_name, C2).
    C1 = ?
    C2 = size

7

Send Method same reference to=any|function Equivalent to →same reference

18.1.16 Reference — Object reference manipulation

Send Method name reference name* Send Method name reference name*

Give/change the global named reference associated with the object.^{8}

6 This message should also apply to object-level defined attributes (see ‘object →attribute’. 7 It is probably more elegant to introduce a separate send- and get- operation that does not evaluate

the receiver. 8 Unlike with the predicate new/2, no exception is raised if the object already exists.

Get Method object reference ⇒name|int

Reference name of the object (see →name reference) or integer reference for objects that have no named reference. See also ‘@pce ←object from reference’.

18.1.17 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒unchecked Get Method arg int=int ⇒unchecked

The nth argument (1-based) of the term description. Unless overruled at the object level, this is equivalent to:

    get(Obj, ?(Obj?class?term_names, element, N), Arg).

This behaviour is intended to remain reserved for system usage. Do not rely on its definition.

Get Method arity ⇒int Get Method arity ⇒int

Number or arguments to the term description. Unless overruled, this is the size of the term names vector of the associated class.

Get Method functor ⇒name Get Method functor ⇒name

Functor of the term description of the object. Unless overruled, this is equivalent to ←class name.

18.1.18 Manual — Support for the online reference manual

Get Method man attribute name=name ⇒unchecked Fetch a manual attribute

Send Method man attribute name=name, string* Store a slot of the manual c

Get Method man card [bool] ⇒unchecked Manual card for obje

Get Method man create card ⇒unchecked

Create manual card for objec

Get Method man creator ⇒unchecked

Global defau

Send Method man documented

Test if object is documented

Get Method man id ⇒name Get Method man id ⇒name

Card Id for global object

Get Method man indicator ⇒name Get Method man indicator ⇒name

Manual type indicator (‘O’)

Get Method man inherit object name=name ⇒object

Object from which to inherit attribu

Get Method man inherited attribute name=name ⇒tuple

Default inherited va

Get Method man module [bool] ⇒unchecked Module for global object

Get Method man module name ⇒unchecked

Module name for global objec

Get Method man name ⇒unchecked Name for relation browse

Send Method man relate name=name, object=object Send Method man related name=name, object=object

Create a manual relation

Get Method man related name=name ⇒unchecked New chain with related objec

Send Method man unrelate name=name, object=object Destroy a manual relatio

18.1.19 Storage — Definition of storage details

Get Method attribute name=name ⇒unchecked Get Method attribute name=name ⇒unchecked

Get the value of an attribute associated to the object using ‘object →attribute’. The attribute may also me requested using a plain get operation:

    ?- new(@o, object),
       send(@o, attribute, gnus, 4).
    ?- get(@o, attribute, gnus, G).
    ?- get(@o, gnus, G).

The two are equivalent, except that the latter gives an error if no such attribute is defined.

Send Method attribute attribute|name, value=[any] Send Method attribute attribute|name, value=[any]

Attach an instance variable to an object rather than to a class. If an attribute with this name is already present, the value of the original attribute is replaced.

An error is raised if the class already defines an instance variable with the same name.

Send Method delete attribute name|attribute

Delete (named) attribute that has previously be attached using →attribute.

18.2 Class attribute — Name-value pair for sheet or object

Inheritance: ⇒ attribute ⇒ program object ⇒ object

An attribute object is a mapping from a ←name to an ←value. Attributes are used by class sheet to form a list of attribute-value pairs and by class object to associate ‘object →attribute’s to objects (object-level programming).

An attribute is a subclass of class program object, allowing the programmer to spy attribute assignment and attribute fetch operations. See ‘program object →trace’ and friends.

Instance Variables

storage

name  ↔ any  Name of the attribute
value  ↔ any  Value of the attribute

Behaviour

18.2.1 Oms — Object management operations

Get Method convert any=any ⇒attribute Refinement of: object<-convert Convert a name into an attribute with this name and ←value @nil. Used to associate attributes without giving them a value:

         send(Object, attribute, age).
         send(Sheet, append, age).

Send Method initialise name=any, value=any Send Method initialise name=any, value=any

Refinement of: program object->initialise

Create an attribute object from its ←name and ←value. Attributes are normally used only in the context of sheet objects or ‘object →attribute’.

18.2.2 Meta — Analysing behaviour and objects

Get Method argument type index=[int] ⇒type Type of the 1-based argument. For compatibility with methods and variables. Returns type(any) if index equals 1 or @default.

18.2.3 Execute — Execution of dialog objects

Get Method get context=object, argument=unchecked ... ⇒unchecked Get Method get context=object, argument=unchecked ... ⇒unchecked

Fetch the value of the attribute. No arguments may be supplied. Compatibility with ‘get method ←get’.

Send Method send context=object, argument=unchecked ...

Set the value of the attribute (takes 1 argument). Compatibility to ‘send method →send’.

18.2.4 Storage — Definition of storage details

Variable name any (↔)

Name of the attribute. When used as attribute to an object, this may be any name that is not already the name of an instance variable defined at the class level for this object. It is advised to use a name that is not defined as a get- or send-method at the class level. For a sheet any name is valid, but it is advised not to use a name that conflicts with a get- or send-method defined at class sheet. See also ‘sheet →value’.

Variable value any (↔)

The value of an attribute has type ‘any’. This implies that any PCE object may be used to fill the attribute, but an attempt to fill it with a function object such as @receiver, @arg1, ... or an obtainer will evaluate the special object or obtainer:

    send(Attribute, value, @arg1)

Will fill ‘Attribute’ with the value @arg1 refers to.

18.3 Class hyper — Named binary association (hyper link)

Inheritance: ⇒ hyper ⇒ program object ⇒ object

A hyper object is a named binary link between two objects. Where slot-references and attribute relations are uni-directed, a hyper may be regarded a two-way ‘object →attribute’. Hypers are used for two purposes:

• The creation of hyper-text networks

• An attribute is a useful instrument to register a ‘slave’ object. Because the value of the attribute does not know about the ‘main’ object, hypers are a suitable solution for circumstances where this knowledge is required.

As an example of the second case, consider an application that creates a secondary window to allow for editing some object of the main window. If the user is allowed to work in both window and destroy both windows separately, a hyper is a suitable way to maintain the relation between both windows.

The most important behaviour dealing with hypers is defined on class object:

‘object →send hyper’ Broadcast a message over hypers
‘object ←get hyper’ Idem to get information
‘object ←hypered’  Find hyperlinks from object

Instance Variables

name

backward name  ↔ name  Name as visible from ←to
forward name  ↔ name  Name as visible from ←from

client

from  ← object  From side of hyper link
to  ← object  To side of hyper link

Behaviour

18.3.1 Oms — Object management operations

Send Method initialise from=object, to=object, forward=name, backward=[name] Refinement of: program object->initialise Create a hyper-link from ←from to ←to. Seen from ←from, the link is named ←forward name, seen from ←to it is called ←backward name.

This method will invoke ‘object →attach hyper’ on both objects to register the hyper.

Send Method unlink

Refinement of: object->unlink

Destroy the hyper object and disconnect it from the related objects using ‘object →delete hyper’. See also →unlink from and →unlink to.

18.3.2 Name — Naming objects

Variable backward name name (↔)

Hyper-name seen from the ←to object. By default the name is the same in both directions. See ←forward name.

Variable forward name name (↔)

Name of the hyper as seen from object ←from.

18.3.3 Client — Controlled object

Variable from object (←) Variable to object (←)

The variables ←from and ←to define the two objects related by the hyper-link. ‘object ←hypered’ may be used to find hyper-links from the related objects.

18.3.4 File — Saving and loading files, file operations

Send Method save relation file=file

Consider saving relation (→save in file). A hyper is saved only if both ←from and ←to are saved.

18.3.5 Internal — Private behaviour

Send Method unlink from Send Method unlink to

Called from the object-management system if the ←from (→unlink from) or the ←to (→unlink to) side of the hyper is being destroyed. Both methods simply destroy the hyper object.

These methods may be redefined, but always should destroy the hyper by calling free/1. The example below defines a subclass between a ‘whole’ and a ‘part’, where destruction of the whole automatically destroys the part.

    :- pce_begin_class(part_hyper, hyper).
    unlink_from(H) :→
        get(H, to, Part),
        free(Part),
        free(H).
    :- pce_end_class.

A simple example using the code above:

    ?- send(new(V1, view(hello)), open),
       send(new(P1, picture(world)), open),
       new(_, part_hyper(V1, P1, part, whole)).
    V1 = @435643
    P1 = @465732

Now the following call will delete both windows:

    ?- send(@435643, free).

516 Class hyper XPCE Reference Manual

Chapter 19

Executable Objects

This chapter deals with objects that can be executed. As XPCE defines both send-operations and get-operations, code is divided into two major groups: procedures, as represented by class code and various subclasses, succeed or fail when executed and functions as represented by class function which yield a value. Functions may be used as procedures.

The table below gives a brief overview of the classes in this chapter:

code  Superclass. General aspects of code objects.
message  Send operation
if  Branches
while  Loops
and  Compound procedure and logical operator
or, not  logical operator
=, <, >, =<, >= Arithmetic comparison operators
block  Compound procedure
==, \==  Equality test
@=  Assignment of references (‘object →name reference’)
function  General aspects of functions
quote function  As the LISP ’ operator
?  Get operation
create  Create new objects (‘class ←instance’)
progn  Compound function
when  Conditional function
+, -, *, /  Arithmetic operators
var  Variables (chapter Variables)

19.1 Class code — Activation of code objects

Inheritance: ⇒ code ⇒ program object ⇒ object

Executable code in PCE is represented by PCE objects. This approach allows us to define new executable code for the PCE system from the host language (Prolog) without extending the interface between PCE and Prolog.

The super-class ‘code’ is a super-class of everything that is executable in PCE. Code objects are normally attached to method objects, or to objects to define the behaviour for handling some events. For example, a button object has a code object attached to it that determines the behaviour of the button when it is depressed. Finally, code objects are used as conditions to the iteration and finding methods ‘chain→for all’, ‘chain ←find all’, etc. Examples:

Attaching a code object as an action to an interface object:

    ?- new(D, dialog('Hello World')),
       send(D, append,
            button(quit, message(D, destroy))),
       send(D, open).

Using a code object to sort a chain of objects by name:

    send(Chain, sort,
         ?(@arg1?name, compare, @arg2?name)).

Using a code object to define a method:

    send(class(person), send_method,
         send_method(print, vector('on=object',
                     message(@arg1, format,
                             'Name:\t%s\nAge:\t%s\n',
                             @receiver?name,
                             @receiver?age))))

This example defines a method on a hypothetical class person called ‘print’ that formats the name and age of the person to a specified object. Note that XPCE/Prolog as well as XPCE/Lisp define an interface which allows for defining methods in a programmer-friendly fashion. See pce begin class/3.

Code objects are normally activated from the object they are attached to. There are two ways to activate a code object. One that pushes an variable frame (→forward) and one that uses the current variable frame →execute.

Code objects normally return either success or failure, with the exception of the subclasses of class function, which -like get()- returns a true value.

Instance Variables

Behaviour

19.1.1 Execute — Execution of dialog objects

Send Method execute

Execute the code object. This method is redefined by all ‘procedure’ type code object (returning success or failure). The method at this level invokes ←execute if the code object is an instance of a subclass of class function and returns success if the function executes successfully. This makes functions available as procedures too.

Send Method forward any ...=any ... Send Method forward any ...=any ...

This is the common way to activate code objects. It binds the predefined var objects @arg1 ... @arg10 to the arguments provided to this message and then invokes →execute on itself. Example:

    new(@m, message(@pce, write_ln, @arg1, @arg2)),
    send(@m, forward, hello, world).

will print

    hello world

→forward pushes a ‘variable-binding’ frame, thus limiting the scope of local assignments to var objects (see class assign and ‘var →assign’.

Send Method forward vars assign ...

Makes the assignments from the given list and then →execute’s the code object. The scope of the assignments is limited to the execution of the code object. Suppose @client is defined as a global var object reflecting a notion of ‘current client’. The following example executes the code object while binding @client to the value of the Prolog variable Client:

    send(Code, forward_vars, assign(@client, Client)).

This interface should be considered experimental and equivalent to the following (recall that ‘code →forward’ limits the scope of local assignments to var objects):

    send(and(assign(@client, Client), Code), forward)

See also class assign and class var.

Send Method forward vector any ...=any ...

The actual argument syntax is:

    code →forward_vector: any ..., vector, [int]

Bind @arg1 ... from the concatenation of the leading arguments and the vector with the first [int] elements skipped and then invokes →execute. See ‘object →send vector’

19.1.2 Internal — Private behaviour

Get Method execute ⇒unchecked Execute the function object (error)

Send Method execute Send Method execute

This method is redefined by the various subclasses of class code and does the actual execution of the code object.^{1}

1 Its implementation *must* be in the C-language, which makes it impossible for the application programmer to create new code classes.

19.2 Class message — Invoke a send method

Inheritance: ⇒ message ⇒ code ⇒ program object ⇒ object

A message object is a template for the execution of a send virtual machine operation: messages represent behaviour to be invoked.

Messages are the most commonly used code objects. The code below creates a small dialog window with buttons to quit the window and to start PceDraw (the XPCE drawing demo):

    ?- new(D, dialog('Start PceDraw')),
       send(D, append,
            button(start_draw,
                   message(@prolog, pcedraw))),
       send(D, append,
            button(quit,
                   message(D, destroy))),
       send(D, open).

It illustrates how a message can be used to activate a host language function (in this case a Prolog predicate) as well as how a message can be used to start an internal XPCE operation. The following example shows how a message may be used to change the ‘graphical →pen’ of all graphical objects on a device object. It exploits ‘chain →for all’.

    send(Device?graphicals, for_all,
         message(@arg1, pen, 3)).

Instance Variables

storage

arg count  ← 0..  Argument-count
arguments  ← code vector|any|function*  Vector of arguments
receiver  ↔ object|function  Receiver of the operation
selector  ↔ name|function  Name of the operation

Behaviour

19.2.1 Oms — Object management operations

Send Method initialise receiver=object|function, selector=name|function,

argument=any|function ...

Send Method initialise receiver=object|function, selector=name|function,

argument=any|function ... Refinement of: program object->initialise Create a send-template from its receiver, selector and argument list. Note that all arguments may be function objects. If the message is executed it will first evaluate all functions. Example:

    ?- new(D, dialog),
       send(D, append,
            button(show_display_size,
                   message(@display, inform,
                           'The display is %dx%d pixels',
                           @display?size?width,
                           @display?size?height))),
       send(D, open).

See also class ?.

19.2.2 Argument — Argument processing

Get Method argument index=int ⇒any|function Send Method argument index=int, value=any|function

Set the nth (1-based) argument of the send-operation. When necessary, the ←arguments code vector object is created or enlarged.

19.2.3 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒any|function Refinement of: object<- arg Nth-1 argument for term description

Get Method arity ⇒int

Refinement of: object<- arity Arity for term description

19.2.4 Storage — Definition of storage details

Variable arg count 0.. (←)

Argument-count

Variable arguments code vector|any|function* (←)

Vector of arguments to pass to the send-operation. When @nil, no arguments are passed. It is a code vector object because it should allow the elements to be function objects. See also →initialise and ↔argument.

Variable receiver object|function (↔)

Receiver of the operation

Variable selector name|function (↔)

Name of the operation

19.2.5 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute Start the XPCE virtual machine operation Class message 523

    send(←receiver, ←selector, ←arguments ...)

Any function object appearing in the ←receiver, ←selector or ←arguments are first evaluated.

19.3 Class if — Conditional branch

Inheritance: ⇒ if ⇒ code ⇒ program object ⇒ object

An if object is a conditional statement. When executed, it will execute the ←condition. On success, it will execute the ←then branch, otherwise it will execute the ←else branch. An empty ←then or ←else (@nil) simply succeeds.

A special trick is to use ‘if(<Statement>)’. This will succeed regardless of the success or failure of <Statement>.

The following example exploits the if object to remove all graphicals with ‘area ←measure: 0’ from ‘Device’:

    send(Device?graphicals, for_all,
         if(@arg1?area?measure == 0,
            message(@arg1, free)))

Class when implements the function equivalent of class if.

Instance Variables

statement

condition  ↔ code  Condition to be tested
else  ↔ code*  Executed if condition is false
then  ↔ code*  Executed if condition is true

Behaviour

19.3.1 Oms — Object management operations

Send Method initialise condition=code, then=[code]*, else=[code]* Send Method initialise condition=code, then=[code]*, else=[code]*

Refinement of: program object->initialise

Create from condition, if- and else

19.3.2 Statement — Argument code object

Variable condition code (↔)

Condition to be tested. Note that, if this is a function object, it tests whether the function returns a value. See also ‘code →execute’.

Variable else code* (↔) Variable then code* (↔)

Branch of the conditional statement. ←then is executed on successful execution of ←condition, ←else otherwise. If the statement is @nil, it executes successfully without side-effects. If the statement is a function, it will be executed as defined by ‘code →execute’.

19.3.3 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute Test condition and branch

19.4 Class while — While-loop control structure

Inheritance: ⇒ while ⇒ code ⇒ program object ⇒ object

An instance of class while executes it’s body until it’s condition fails, similar to the Pascal or C while statement.

While loops are rarely used in PCE. Most loops in PCE entails enumerating the elements of a collection. For this purpose the methods ‘chain →for all’, ‘vector →for all’, etc. are more appropriate. The following two examples both print all elements of Chain to the standard output:

    new(N, number(0)),
    get(Chain, size, Max),
    send(while(N < Max,
               and(message(@pce, format, '%N\n',
                           ?(Chain, nth0, N)),
                   message(N, plus, 1))),
         forward)

Or

    send(Chain, for_all,
         message(@pce, format, '%N\n', @arg1))

Instance Variables

statement

body  ↔ code*  Statement to execute
condition  ↔ code  Condition to be tested

Behaviour

19.4.1 Oms — Object management operations

Send Method initialise condition=code, statement=[code]* Refinement of: program object->initialise Create from condition and statement

19.4.2 Statement — Argument code object

Variable body code* (↔)

Statement to execute

Variable condition code (↔)

Condition to be tested

19.4.3 Internal — Private behaviour

Send Method execute

Refinement of: code-> execute Execute body until test fails

19.5 Class and — Logical connective: and

Inheritance: ⇒ and ⇒ code ⇒ program object ⇒ object

Delegation: members (chain)

Class and defines a logical ‘and’ for its associated statements. An and object is not just binary but can have any number of arguments, so one may state

    and(Statement1, Statement2, Statement3)

rather then

    and(Statement1, and(Statement2, Statement3))

When executed, the and will execute its argument code objects starting from the first. It stops with failure as soon as one of the arguments fails or returns success if all arguments succeed. And objects are both used as a logical connective for conditions (see class if) and as a sequence of statements.

An and object without arguments simply succeeds and is the fastest succeeding code object.

See also class block, class or and class not. Class progn defines a function equivalent of an and.

Instance Variables

statement

members  ← chain  Tests that must succeed

Behaviour

19.5.1 Oms — Object management operations

Send Method initialise test=code ... Send Method initialise test=code ...

Refinement of: program object->initialise Create and from tests

19.5.2 Statement — Argument code object

Variable members chain (←)

Tests that must succeed

19.5.3 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒code Refinement of: object<- arg Nth-1 argument for term description

Get Method arity ⇒int

Refinement of: object<- arity Arity for term description

19.5.4 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute Execute the statements of ←members until one fails or the end of the chain is reached. Only in the latter case the and executes successfully.

19.6 Class or — Logical connective: or

Inheritance: ⇒ or ⇒ code ⇒ program object ⇒ object

Delegation: members (chain)

Class or defines a logical ‘or’ for its associated statements. An ‘or’ is not just binary but can have any number of arguments.

When executed, ‘or’ will execute its argument code objects starting from the first. It stops with success as soon as one of the arguments succeeds or returns failure if no argument succeed. An or without arguments simply fails.

See also class if, class and and class not.

Instance Variables

statement

members  ← chain  One of these must succeed

Behaviour

19.6.1 Oms — Object management operations

Send Method initialise test=code ... Send Method initialise test=code ...

Refinement of: program object->initialise

Create an or object from a series of statements. Or objects are almost exclusively used to realise disjunction in conditions for if objects or while objects.

19.6.2 Statement — Argument code object

Variable members chain (←)

List of disjunctive statements. Note that class or delegates to this chain, so all methods applicable to chains may be used to manipulate the set of statements in the or.

19.6.3 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒code Refinement of: object<- arg Nth-1 argument for term description

Get Method arity ⇒int

Refinement of: object<- arity Arity for term description

19.6.4 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute

Execute the code objects from ←members until one succeeds or the end of the chain is reached. Succeeds in the first case and fails in the second.

19.7 Class not — Logical connective: negation

Inheritance: ⇒ not ⇒ code ⇒ program object ⇒ object

Class not defines negation of conditional statements. When executed, it executes its argument and fails if the argument is executed with success. See class code for more general information on executable objects.

Instance Variables

statement

argument  ↔ code  Test to negate

Behaviour

19.7.1 Oms — Object management operations

Send Method initialise test=code Send Method initialise test=code

Refinement of: program object->initialise Create from test

19.7.2 Statement — Argument code object

Variable argument code (↔)

Test to negate

19.7.3 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute

Evaluate argument test and negate result

19.8 Class binary condition — Arithmetic binary conditional expression

Inheritance: ⇒ binary condition ⇒ code ⇒ program object ⇒ object

Class binary condition is a super class for the various arithmetic condition statements:

< Test ←left to be less than ←right
=< Test ←left to be less than or equal to ←right
= Test ←left to be equal to ←right
>= Test ←left to be greater than or equal to ←right
> Test ←left to be greater than ←right

These code objects are almost exclusively used in conditions for if objects and friends. When executed, the subclasses of binary condition evaluates ←left and ←right to a numeric value and compares the two according to the class.

The type-check of a binary condition is ‘expression’. Type expression is a disjunction of the following types:

int  XPCE integers
number number object
real  real object
function function object (including @arg1 and class ?)

The following example defines that the pointer should be in the positive part of the coordinate system of the receiving graphical:

    and(@event?x > 0, @event?y > 0).

Instance Variables

operant

left  ↔ expression  Left-hand side of conditional expression
right  ↔ expression  Right-hand side of conditional expression

Behaviour

19.8.1 Oms — Object management operations

Send Method initialise left=expression, right=expression Send Method initialise left=expression, right=expression

Refinement of: program object->initialise

Create the condition from two expressions. There is no use in creating instances of this class as there is no execution defined for it.

19.8.2 Operant — Operant of expression

Variable left expression (↔) Variable right expression (↔)

Both operants of the condition.

19.9 Class = — Identity between two expressions

Inheritance: ⇒ = ⇒ binary condition ⇒ code ⇒ program object ⇒ object

Binary condition object that succeeds if ←left and ←right evaluate to the same numeric value. See class binary condition for details.

Besides acting as a simple test, it can also solve equations with a single variable. See ←var.

Instance Variables

Behaviour

19.9.1 Calculate — Compute properties

Get Method var variable=var, bindings== ... ⇒int|number|real Regards the = object as an equation to be solved. It can determine the value of a variable occuring only once in the equation if all other variables are given. This facility is used by class spatial to express spatial relations between graphical objects. Below are some examples:

?- get(4+x=7, var, x, X)  ==> X = 3
?- get(5*x=y, var, y, x=3, Y) ==> Y = 15

Note that ‘x’, ‘y’, ‘w’, ‘h’ and some more are the names of predefined var objects and thus ‘x’ is translated to this var object by PCE’s type-checking system. The binding of the var objects in an = object are not affected by this method.

See also class var and class spatial.

19.9.2 Internal — Private behaviour

Send Method execute

Refinement of: code-> execute Evaluate both expressions to a numeric value and succeed if they evaluate to the same value.

19.10 Class < — Compare expressions on less-then

Inheritance: ⇒ < ⇒ binary condition ⇒ code ⇒ program object ⇒ object

Conditional expression. Evaluates both ←left and ←right sides and compare the result. See class binary expression for details.

Instance Variables

Behaviour

19.10.1 Internal — Private behaviour

Send Method execute

Refinement of: code-> execute

Evaluate ←left and ←right to a numeric value and succeed if ←left is less then ←right.

19.11 Class > — Test equivalence of arguments

Inheritance: ⇒ > ⇒ binary condition ⇒ code ⇒ program object ⇒ object

Conditional expression. Evaluates both ←left and ←right sides and compare the result. See class binary expression for details.

Instance Variables

Behaviour

19.11.1 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute

Evaluate ←left and ←right to a numeric value and succeed if ←right is less than ←left.

19.12 Class =< — Compare expressions on less-or-equal

Inheritance: ⇒ =< ⇒ binary condition ⇒ code ⇒ program object ⇒ object

Conditional expression. Evaluates both left and right sides and compare the result. See class binary condition for details.

Instance Variables

Behaviour

19.12.1 Internal — Private behaviour

Send Method execute

Refinement of: code-> execute

Evaluate ←left and ←right to a numeric value and succeed of ←left is less then or equal to ←right.

19.13 Class >= — Compare expressions on greater-or-equal

Inheritance: ⇒ >= ⇒ binary condition ⇒ code ⇒ program object ⇒ object

Conditional expression. Evaluates both left and right sides and compare the result. See class binary condition for details.

Instance Variables

Behaviour

19.13.1 Internal — Private behaviour

Send Method execute

Refinement of: code-> execute

Evaluates ←left and ←right to a numeric value and succeed if ←left evaluates to a larger than or equal value than ←right.

19.14 Class block — Sequence with local variables

Inheritance: ⇒ block ⇒ and ⇒ code ⇒ program object ⇒ object

Delegation: members (chain)

A block object defines a sequence of code objects with a formal parameter list.

On →forward, the var objects in ←parameters will be bound to the forwarded arguments (exceeding arguments are bound to @arg1 ...) and the ←members statements of the block are executed just as with the super-class and.

Example:

    ?- send(block(new(X, var),
                  message(@pce, write_ln, X)),
            forward,
            'Hello World').
    Hello World.

Instance Variables

argument

parameters  ↔ code vector*  Vector with formal parameters

Behaviour

19.14.1 Oms — Object management operations

Send Method initialise var|code ...

Refinement of: and->initialise

Create from parameters and statements

19.14.2 Execute — Execution of dialog objects

Send Method forward any ...=any ...

Refinement of: code->forward

When a block object is forwarded, it will bind the arguments to the var objects in ←parameters by position. Possible exceeding arguments are bound to @arg1 ... for compatibility reasons. Next the block is →execute’d just like the and object.

Example:

         ?- send(chain(chain(a,b), chain(c,d)), for_all,
                 block(new(Sub, var),
                       message(Sub, for_all,
                       message(@pce, write_ln, Sub, @arg1)))).

19.14.3 Argument — Argument processing

Variable parameters code vector* (↔)

Vector with formal parameters. Assigned (see ‘var→assign’) by →forward.

19.14.4 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒code Refinement of: and<- arg Nth-1 argument for term description

Get Method arity ⇒int

Refinement of: and<- arity Arity for term description

19.15 Class == — Test equivalence of arguments

Inheritance: ⇒ == ⇒ code ⇒ program object ⇒ object

Test for equality. Succeeds if both ←left and ←right are equal (compared by reference). The following example returns the first object called gnu in Chain:

    get(Chain, find, @arg1?name == gnu, Gnu)

See also class \== and ‘object →equal’.

Instance Variables

operant

left  ↔ any|function  Left-hand side
right  ↔ any|function  Right-hand side

Behaviour

19.15.1 Oms — Object management operations

Send Method initialise left=any|function, right=any|function Send Method initialise left=any|function, right=any|function

Refinement of: program object->initialise

Create from ←left and ←right operant. Either or both may be a function, which is evaluated by → execute.

19.15.2 Operant — Operant of expression

Variable left any|function (↔) Variable right any|function (↔)

Operant. If it is a function object, it will be evaluated by → execute.

19.15.3 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute

If either or both operant is a function, evaluate it. Next succeed if the references of both operants is the same.

19.16 Class \== — Test non-equivalence of arguments

Inheritance: ⇒ \== ⇒ code ⇒ program object ⇒ object

Test non equivalence of objects. X \== Y is equivalent to not(X == Y). See also class ==, class not and ‘object →equal’.

Instance Variables

operant

left  ↔ any|function  Left-hand side
right  ↔ any|function  Right-hand side

Behaviour

19.16.1 Oms — Object management operations

Send Method initialise left=any|function, right=any|function Refinement of: program object->initialise Create from left- and right-hand

19.16.2 Operant — Operant of expression

Variable left any|function (↔) Variable right any|function (↔)

Operant. If it is a function object it will be evaluated bu → execute.

19.16.3 Internal — Private behaviour

Send Method execute

Refinement of: code-> execute

Evaluate both sides and test on non-equal

19.17 Class @= — Assign named reference to object

Inheritance: ⇒ @= ⇒ code ⇒ program object ⇒ object

The code class @= assigns a global named reference to an object. It is introduced to provide for a better syntax to create global objects from the resource file (notably Pce.Display.initialise).

@= is defined as an infix operator (xfx, priority 990) by the resource parser. The following example defines a global object:

    _window_pen @= number(1)

After this the global object @ window pen refers to a number object with value 1. See also the Pce resource file, normally located in /usr/lib/X11/app-defaults/Pce.

The construct

    name @= object

is equivalent to

    message(object, name_reference, name).

Except that –if object is a function object– the function is assigned the reference instead of the object the function evaluates to.

See also ‘object →name reference’, pce global/2, class var and class assign.

NOTE: Application programmers should not use this class right now. it is introduced to allow for parsing the @= construct by the resource parser (@resource parser). Later releases of the parser may use an alternative implementation (i.e. some form of active macro-expansion instead of executable objects).

Instance Variables

reference

object  ↔ object|function  Object to assign reference
reference  ↔ name  Reference to give to the object

Behaviour

19.17.1 Oms — Object management operations

Send Method initialise reference=name, object=object|function Send Method initialise reference=name, object=object|function

Refinement of: program object->initialise

Simply fills ←reference and ←object from the arguments.

19.17.2 Reference — Object reference manipulation

Variable object object|function (↔)

Object or function that should be assigned a reference name on →execute’ing.

Variable reference name (↔)

Reference name given to ←object on →execute.

19.17.3 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute

Invoke send(←object, name reference, ←reference). See also ‘object →name reference’.

19.18 Class function — Activation of function objects

Inheritance: ⇒ function ⇒ code ⇒ program object ⇒ object

A function object is a code object that, when ←execute’d, returns a PCE data object as the virtual machine instruction get(). Functions are evaluated iff:

• They appear as part of a code object that is executed

• They are passed to the type-checker (see ‘type ←check’) and the type does not allow for functions to be passed.

Explicit evaluation is achieved using ←execute and ←forward. Quoting (e.i. delaying evaluation) is achieved using a quote function object.

PCE currently provides the following functions:

• Class ? (obtainer)

An obtainer represents a get() operation. It evaluates to the return value of the get operation represented.

• Class binary expression Super-class for the common arithmetic functions: +, -, *, /

• Class var A var represents a PCE variable. Among these are the predefined variables @arg1 ..., @receiver, @event, etc.

• Class when A when is a conditional function. It may be compared to Lisp’s ‘if’ or C’s ‘Cond ? Expr1 : Expr2’.

• Class progn Sequence of statements closed with a function.

NOTE: Many methods defined on class object reappear on this class. The message passing system will, when the receiver is a subclass of class function, not evaluate the function if the method is defined at the level of class function or lower in the class hierarchy.

Instance Variables

Behaviour

19.18.1 Oms — Object management operations

Get Method convert quote=quote function ⇒function Refinement of: object<-convert Converts an instance of class quote function into the function quoted. See class quote function for details.

Send Method initialise

Refinement of: program object->initialise

Initialise function

19.18.2 Execute — Execution of dialog objects

Get Method execute ⇒unchecked Refinement of: code<- execute Objects of class function itself cannot be executed. Yields an error message and fails. Redefined by all subclasses of class function.

Get Method forward any ...=any ... ⇒unchecked Get Method forward any ...=any ... ⇒unchecked

Bind @arg1, ... from the arguments and ←execute the function. Note that @arg1 is a function itself, thus

?- get(@arg1, forward, 4, X). ==> X = 4

Get Method execute ⇒unchecked Explicitly evaluate the function. See class function itself for the default evaluation rules. Class quote function avoids evaluation of function objects.

Calls ← execute to perform the real job.

19.18.3 File — Saving and loading files, file operations

Send Method convert loaded object int=int, int=int

Refinement of: object->convert loaded object Called by ‘file ←object’ if the current save version is not the same as save version when the file was loaded. The two arguments are the old and the new save versions. See ‘pce ←save version’.

Send Method initialise new slot variable=variable

Refinement of: program object->initialise new slot Initialises -dflags when loading program objects created before the introduction of this class. See ‘file ←object’.

Get Method storage reference ⇒any

Refinement of: object<-storage reference This method is used by ‘object →save in file’ to handle shared object resources (colours, fonts, etc.). If this method is executed successfully, →save in file stores the classname of the the object and the returned object.

‘file ←object’ loads the classname, converts the classname to a type object, loads the returned ‘reference object’ and attempts ‘type ←check’ to produce an object of the requested type.

See ‘colour ←storage reference’ for an example.

19.18.4 Report — Reporting events, status and errors

Send Method error error=error, context=any ... Initiate an error

19.18.5 Debugging — Debugging PCE programs

Send Method check [bool] Refinement of: object-> check Validate the type of the instance variables. If the argument is @on or @default, validation continues recursively over instance variables that contain objects. This method is protected against loops in the data-structures.

Normally invoked through the Prolog predicate checkpce/0.

Get Method flags ⇒name

Refinement of: object<- flags Returns a name with the three characters indicating the status of the object with regard to the object manager. The flags are:

‘P’ Indicate object is protected
‘L’ Indicate object is locked
’A’ Indicate OMS has not yet decided on the status of the

        object.

This method is used by the ‘Inspector’ to generate the indicators at the top-right of the cards.

19.18.6 Programming — Methods to write methods

Send Method send super selector=name, argument=unchecked ...

Refinement of: object->send super Invoke behaviour of the super-class. This behaviour is intended to be used only for using behaviour of the super-class when defining new classes.

19.18.7 Function — Object management for functions

Get Method class ⇒class

Refinement of: object<- class These methods starting with an ’ ’ (underscore) are defined both on class function and class object. Their behaviour is equivalent to the counterpart with the leading underscore deleted for normal objects. As these methods are explicitly defined on class function however, invoking one of these methods to a function will cause the function itself to handle the message instead of the evaluation. Example:

    ?- new(O, @display?size),
       get(O, '_class_name', C1),
       get(O, class_name, C2).
    C1 = ?
    C2 = size

Get Method class name ⇒name

Refinement of: object<- class name Class name instead of result’s

Send Method free

Refinement of: object-> free Free obtainer instead of result

Get Method inspect ⇒bool

Refinement of: object<- inspect Inspect instead of result’s

Send Method inspect bool=bool Refinement of: object-> inspect Inspect obtainer instead of result

Send Method instance of class=class Refinement of: object-> instance of Test class of obtainer instead of result

Get Method man id ⇒name

Refinement of: object<- man id Manual identifier instead of result’s

Get Method references ⇒int

Refinement of: object<- references Reference count instead of result’s

Send Method same reference to=any|function Refinement of: object-> same reference Test equivalence instead of result

Get Method slot name|int ⇒any Refinement of: object<- slot Slot value instead of result’s

19.18.8 Reference — Object reference manipulation

Send Method name reference name*

Change named (atomic) reference

19.18.9 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒unchecked Refinement of: object<- arg Nth-1 argument of term instead of result’s

Get Method arity ⇒int

Refinement of: object<- arity Arity of term instead of result’s

Get Method functor ⇒name

Refinement of: object<-functor Functor of the term description of the object. Unless overruled, this is equivalent to ←class name.

19.19 Class quote function — Quote functions

Inheritance: ⇒ quote function ⇒ object

Delegation: function (function)

A quote function object may be used to avoid evaluation of a function object, notably to pass function objects over methods that would cause the function to be evaluated. Two mechanisms make quote function objects almost transparent to functions objects:

• Class quote function delegates to its ←function.

• ‘function ←convert’ translates a quote function into the ←function.

In the following example, Chain is a chain of chains. The task is to sort the elements of the sub-chains by name.

    send(Chain, for_all,
         message(@arg1, sort,
                 quote_function(?(@arg1?name, compare,
                                  @arg2?name))))

Without the quote function, the function will be evaluated by the message object, while evaluation by ‘chain →sort’ is the intended behaviour.

Instance Variables

storage

function  ↔ function  Quoted function

Behaviour

19.19.1 Oms — Object management operations

Send Method initialise function=function Send Method initialise function=function

Refinement of: object->initialise

Create a quote function from the function quoted.

19.19.2 Storage — Definition of storage details

Variable function function (↔)

The function object quoted. Methods are delegated to this object.

19.20 Class ? — Invoke a get method

Inheritance: ⇒ ? ⇒ function ⇒ code ⇒ program object ⇒ object

Class ? is (pronounced as ‘obtainer’) is a template for the virtual machine instruction get in the same fashion as a message object is a template to the send operation. Obtainers are the most commonly used function objects.

Obtainers add a very powerful mechanism to PCE. Understanding them is critical for writing readable and fast PCE programs. Please study the examples. In the example below, an obtainer is used to combine dialog item selections to create a single call to the application:

    ?- new(D, dialog),
       send(D, append, new(label)),     % for feedback
       send(D, append, new(Name, text_item(name, ''))),
       send(D, append, new(Age, text_item(age, ''))),
       send(D, append,
            button(create, message(@prolog, create_person,
                                   Name?selection,
                                   Age?selection))),
       send(D, open).

Of course, the application must define the predicate create person.

Instance Variables

storage

arguments  - code vector*  Vector of arguments
receiver  - object|function  Receiver of the operation
selector  - name|function  Name of the operation

Behaviour

19.20.1 Oms — Object management operations

Send Method initialise receiver=object|function, selector=name|function,

argument=any|function ... Refinement of: function->initialise Create from receiver, selector and args

19.20.2 Execute — Execution of dialog objects

Get Method execute ⇒unchecked Refinement of: function<- execute Execute the get-operation

19.20.3 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒unchecked Refinement of: function<- arg Nth-1 argument of term instead of result’s

Get Method arity ⇒int

Refinement of: function<- arity Arity of term instead of result’s

19.20.4 Storage — Definition of storage details

Variable arguments code vector* (-)

Vector of arguments

Variable receiver object|function (-)

Receiver of the operation

Variable selector name|function (-)

Name of the operation

19.21 Class progn — Sequence (as function)

Inheritance: ⇒ progn ⇒ function ⇒ code ⇒ program object ⇒ object

A progn object describes a sequence of statements (code objects) from which the last must be a function object. The return value of the progn (as a function) is the return value of the last function object.

The execution of the progn fails immediately when one of the statements or the terminating function fails.

Progn (including its name) is inspired by LISP. See also class and, class block and class when.

Instance Variables

statement

members  ← chain  Statements and return function

Behaviour

19.21.1 Oms — Object management operations

Send Method initialise statement=code|any ...

Refinement of: function->initialise

Create a progn object from its statements. All but the last statement should be code objects. The last may be a function object as well as a value. Class progn is used most commonly to define the implementation of get method objects.

19.21.2 Statement — Argument code object

Variable members chain (←)

Chain of statements. Class progn delegates to this chain object, making the chain methods available to manipulate the contents of the progn. The user must ensure the types of the chain elements is consistent.

19.21.3 List — List operations (add, delete)

Send Method append code|any Append a statement

19.21.4 Execute — Execution of dialog objects

Get Method execute ⇒unchecked Refinement of: function<- execute If ←members is empty, fail with the error last is no function. Otherwise push a variable frame to limit the scope of a local ‘var →assign’, and execute the statements. Stop with failure if a statement fails. Finally evaluate the last element if it is a function and return either the last element or the result of the evaluation.

19.21.5 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒code Refinement of: function<- arg Nth-1 argument for term description

Get Method arity ⇒int

Refinement of: function<- arity Arity for term description

19.22 Class when — Conditional function

Inheritance: ⇒ when ⇒ function ⇒ code ⇒ program object ⇒ object

When executed, a when object tests the condition and then evaluates either the then- or elsefunction, returning its result.

The example below illustrates how a method ‘number ←absolute’ could be attached to class number to return its absolute value:

    ?- send(class(number), get_method,
            get_method(absolute, int, new(vector),
                       when(@receiver < 0,
                            -(@receiver),
                            @receiver?value))).
    ?- new(N, number(-4)),
       get(N, absolute, V).     ==> V = 4.

Instance Variables

statement

condition  ↔ code  Condition to be tested
else  ↔ any|function  Executed if condition is false
then  ↔ any|function  Executed if condition is true

Behaviour

19.22.1 Oms — Object management operations

Send Method initialise condition=code, then=any|function, else=any|function Refinement of: function->initialise Create from condition, when- and else

Send Method unlink

Refinement of: object->unlink

temp; just to trap

19.22.2 Statement — Argument code object

Variable condition code (↔)

Condition to be tested

Variable else any|function (↔) Variable then any|function (↔)

Either of ←then or ←else is evaluated depending on the result of testing ←condition. If this slot contains a function, this function is evaluated and the result returned. Otherwise the plain value is returned.

19.22.3 Execute — Execution of dialog objects

Get Method execute ⇒unchecked Refinement of: function<- execute Test condition and evaluate ←then or ←else

19.23 Class create — Create instance of a class

Inheritance: ⇒ create ⇒ function ⇒ code ⇒ program object ⇒ object

Class create defines a function that creates new instances like the interface predicate new/2. The first argument is either the name of the class to create instances from or a class object. The remaining arguments are packed into the code vector object ←arguments.

Instances may also be created using class ?:

    ?- new(CreatePoint, ?(@pce, instance, point)).
    ?- new(CreatePoint, class(point)? instance).

Class create is more comfortable to write, is faster and does not require the class to exist when the create instance is created.

See ← execute for a description of the creation process. See also ‘@pce ←instance’, ‘class ←instance’, @vmi new and new/2.

Instance Variables

argument

argument ↔ code vector* Arguments used to create instance

class

class  ↔ name|class  Class (name) to create instance of

Behaviour

19.23.1 Oms — Object management operations

Send Method initialise class=name|class, argument=any|function ...

Refinement of: function->initialise

The first argument is either the name of a class or a class object. The remaining arguments are packed in the code vector object ←arguments. See ← execute for the evaluation of create objects.

19.23.2 Execute — Execution of dialog objects

Get Method execute ⇒unchecked Refinement of: function<- execute Create an instance of ←class using ←arguments. If ←class is a name, it is converted into a class object and the slot is replaced with the class object to speed up subsequent execution of this create object.

Function objects in ←arguments are expanded (as with message objects and ? objects)

and finally the VMI new() is activated to create the new instance.

19.23.3 Argument — Argument processing

Get Method argument index=int ⇒any|function Variable argument code vector* (↔)

Arguments used to create instance. @nil is interpreted as an empty argument vector.

Send Method argument index=int, value=any|function Access the nth (1-based) argument in the argument vector used to create new instances.

19.23.4 Class — Defining classes

Variable class name|class (↔)

Class (name) to create instance of. If it is a name, it will be dereferenced to a class object on the first ← execute call.

19.23.5 Term — Conversion to (Prolog) term

Get Method arg int=int ⇒any|function Refinement of: function<- arg Nth-1 argument for term description

Get Method arity ⇒int

Refinement of: function<- arity Arity for term description

19.24 Class binary expression — Binary arithmetic expression

Inheritance: ⇒ binary expression ⇒ function ⇒ code ⇒ program object ⇒ object

Binary arithmetic expression with ←left and ←right operants. Class binary expression has the subclasses

+ Addition
- Subtraction and negation
* Multiplication
/ Division

PCE expression objects are first of all designed for supporting graphics calculations. The intermediate results are calculated in fixed-point arithmetic (1/1024 resolution). The result is rounded to the nearest integer value.

Binary expressions are used by class = for the definition of equations used by class spatial. The are also used by class handle and class region to express locations in terms of the dimensions of a related graphical object. Finally, they may be used as function objects in methods.

Note that type conversion converts function objects (and thus also binary expressions) into the value they evaluate too. This implies that

    send(Box, size, size(W+2, H+2))

Is a comfortable way to do (graphics) calculations in PCE/Prolog. It must be noted that

    W1 is W + 2,
    H1 is H + 2,
    send(Box. size, size(W1, H1))

is, in generally faster as the first example creates two PCE expressions evaluates then and then destroys them again.

Instance Variables

operant

left  ↔ expression  Left-hand side of expression
right  ↔ expression  Right-hand side of expression

Behaviour

19.24.1 Oms — Object management operations

Send Method initialise left=expression, right=expression Refinement of: function->initialise Create the expression from its ←left and ←right operator. As class binary expression itself does not define evaluation there is little use in creating instances of this class.

19.24.2 Operant — Operant of expression

Variable left expression (↔) Variable right expression (↔)

Operants of the expression. See class binary condition for a description of the type expression.

19.24.3 Meta — Analysing behaviour and objects

Get Method var in variable=var ⇒int Count the number of occurrences of the var object in the expression. Used by ‘= ←var’.

19.24.4 Execute — Execution of dialog objects

Get Method execute ⇒int|number|real Refinement of: function<- execute Evaluate, given variable bindings

19.24.5 Calculate — Compute properties

Get Method value binding== ... ⇒int|number|real Determine the value of the expression given the values for the var objects appearing in it. Used by class handle and class region. Example:

    ?- get(x + 5, value, x=3, X).       ==> X = 8

Note: in this example we can simply write ‘x’ instead of new(X, var(x)) as x is the name of a predefined var object. See class var.

See also ‘=←var’.

558 Class +

19.25 Class + — Addition expression

Inheritance: ⇒ + ⇒ binary expression ⇒ function ⇒ code ⇒ program object ⇒ object Arithmetic expression. ‘+’ will evaluate both its left-hand and right-hand side and return the sum of them.

Instance Variables Behaviour

19.26 Class - — Subtraction expression

Inheritance: ⇒ - ⇒ binary expression ⇒ function ⇒ code ⇒ program object ⇒ object

Arithmetic expression. ‘-’ will evaluate both its left-hand and right-hand side and return the difference between them.

Instance Variables

Behaviour

19.26.1 Oms — Object management operations

Send Method initialise left=expression, right=[expression] Refinement of: binary expression->initialise If only 1 argument is given, this is translated into -(0, X) to achieve a unary minus.

560 Class *

19.27 Class * — Multiplication expression

Inheritance: ⇒ * ⇒ binary expression ⇒ function ⇒ code ⇒ program object ⇒ object Arithmetic expression. ‘*’ will evaluate both its left-hand and right-hand side and return the multiplication.

Instance Variables Behaviour

Class / 561

19.28 Class / — Division expression

Inheritance: ⇒ / ⇒ binary expression ⇒ function ⇒ code ⇒ program object ⇒ object Division expression

Instance Variables Behaviour

562 Class / XPCE Reference Manual

Chapter 20

Variables and Assigment

This chapter discusses PCE dynamically bound variable objects and assignments to them. Before arriving at this chapter you are very likely to have used these objects without noticing. Most applications builders will never manipulate these objects explicitely.

The normal application programmer will use the predefined var objects @receiver, @event, @arg1, @arg2, etc. Reading this chapter may be useful for a better understanding of these ‘magic’ object references. Explicit creation and assignment to variables is sometimes necessary when creating complicated code objects.

Class var defines variables as functions (see class function). Class assign is an excutable object that may be used to assign to a var.

20.1 Class var — Variable (as a function)

Inheritance: ⇒ var ⇒ function ⇒ code ⇒ program object ⇒ object

Class var describes a global variable. It is a subclass of class function, which implies that a variable is expanded to its value for all methods that do not explicitly accept type function or var.

PCE global variables have global existence, but may have local binding. The most well known var objects are @receiver, @event and @arg1 ... @arg10.

A variable has a ← type to define legal values, a ← name to identify them (named var objects are used by class handle and class spatial) and a ← value. Note that these names start with an underscore. Thus,

    get(Var, '_name', Name)

yields the name of the var object, while

    get(Var, name, Name)

yields the name of the ← value of the var object.

Values are assigned using →assign. Class assign defines an executable object to assign variables.

Using var objects explicitly

There are some common ways to exploit var objects in applications:

• As global changeable constants For example, consider an application that wants to log progress and events of its computation. It might be desirable to send the log info sometimes to a file, sometimes to a view object or to the main window. In this case one could declare a global var object @log output and rebind it if the destination of the output has to be (temporary) changed.

• As context parameters A good example is @event, which provides access to the currently executing events.

• As local variables in code fragments In the two applications mentioned above, the var object with normally have a global (named) object reference. When used as a local variable, the object reference is normally anonymous. In the following example, ‘Chain’ is a chain of chains of graphical objects. The task is to display the graphicals of each chain on a separate device and display all these devices on a (common) device.

        new(Dev, device),
        send(Chain, for_all,
             and(assign(new(SubDev, var),
                        ?(@pce, instance, device)),
                 message(@arg1, for_all,
                         message(SubDev, display, @arg1)),
                 message(Dev, display, SubDev)))

Instance Variables

type

type ↔ type Type of the ← value

name

name  ← name*  Name of the var

value

value - alien:Any Value of the var

abort

global value  ← any  Global value of the var

Behaviour

20.1.1 Oms — Object management operations

Send Method initialise type=[type], name=[name], value=[any] Send Method initialise type=[type], name=[name], value=[any]

Refinement of: function->initialise Create a var object that may contain objects of the specified type. A var object may have an optional name and initial value.

Send Method unlink

Refinement of: object->unlink Release code reference of value

20.1.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒var Refinement of: function<-convert Converts name to var from @variables.

In older versions of PCE @arg1, etc. where special objects. The ‘x’, ‘y’, etc. variables appearing in formulas for class handle and class spatial where other special features. In the current implementation class var takes care of all these cases. To keep the ‘nameas-variable’ as used in formulas compatible we had to introduce the name conversion mechanism.

20.1.3 Type — Type definition, test and conversion

Variable type type (↔)

Allowed type for the current ← value. Actually not verified in the current implementation.

20.1.4 Name — Naming objects

Variable name name* (←) Name of the var object. All named variables are stored in the hash table @variables. ←convert uses this to convert names to var objects.

20.1.5 Value — Related value

Get Method value ⇒unchecked Variable value alien:Any (-)

Current value of the variable.

Send Method assign value=any, scope=[{local,outer,global}] Assign a ← value to the variable. The scope of this assignment is determined by the scope argument:

• local Only assign in the current ‘frame’. A variable frame is pushed by ‘code →forward’, ‘send method →send’ and ‘get method ←get’ if the implementation of the method is a code object (user-defined class).

• outer Assign in this and the environment above the current one.

• global Assign in all environments as well as to the ← global value.

20.1.6 Execute — Execution of dialog objects

Get Method execute ⇒unchecked Refinement of: function<- execute Current value of the variable

20.1.7 Abort — Cleanup after aborting execution

Variable global value any (←)

Initial and global value of the var object. The value is restored to this value on recovery from a fatal error.

20.2 Class assign — Assignment statement for a var

Inheritance: ⇒ assign ⇒ code ⇒ program object ⇒ object

Class assign defines an assignment statement for a var object. An assign is an executable object that, when executed, evaluates its ←value and assigns its ←var with this value. See class var for a discussion on variables and assignments (‘var →assign’).

Class assign is first of all introduced for syntactical cosmetical reasons. The following two code objects perform the same function:

    assign(Var, Value).
    message(Var, assign, Value).

An assign object demands its first argument to be an instance of class var. This implies that named variables can be referred to much more elegant. Executing

    assign(x, 10)

Will assign 10 to the variable named ‘x’, while the message variant would be:

    message(?(@variables, member, x), assign, 10)

See also ←convert.

Instance Variables

scope

scope ↔ {local,outer,global} Scope of assignment

storage

value  ↔ any|function  Value to give to the assignment
var  ↔ var  Variable to be bound

Behaviour

20.2.1 Oms — Object management operations

Send Method initialise variable=var, value=any|function,

scope=[{local,outer,global}]

Send Method initialise variable=var, value=any|function,

scope=[{local,outer,global}] Refinement of: program object->initialise Create a var object from the ←var, ←value and ←scope.

20.2.2 Scope — Scope of variable assignments

Variable scope {local,outer,global} (↔)

Scope of the assignment. See ‘var →assign’ for the interpretation of the scope names. The default is ‘local’.

20.2.3 Storage — Definition of storage details

Variable value any|function (↔)

Value to assign to the variable. In many cases this will be a function object, which is executed by the assign object when it is → execute’d.

Variable var var (↔)

Var object to assign. See also ←value and ‘var →assign’.

20.2.4 Internal — Private behaviour

Send Method execute Send Method execute

Refinement of: code-> execute The execution of an assign object implies

1. Evaluate ←value if this is a function object.

2. ‘var →assign’ the ←var with the result of 1).

Chapter 21

Message Passing, Types and Arguments

This chapter defines classes that support argument passing, argument specification and type checking. Classes:

type  Type specification, validation and conversion
:=  Specifying argument by name instead of position
code vector Pack multiple arguments

More information about message passing may be found with the classes class, method, send method, get method and variable.

21.1 Class type — Argument-type specifier

Inheritance: ⇒ type ⇒ program object ⇒ object

A type object defines which data entities are accepted as filler for an instance variable or arguments to a method. Type objects are part of the definition of both methods and variables.

Types are normally specified using a name. The ←convert method translates type-names into (reusable) type objects. See ←convert for the type syntax.

If a type is used to specify the arguments to a method, it can also specify the name of the argument. See ←argument name. Argument names are used for documentation purposes as well as to allow for the specification of arguments by name rather than by position. See class := for details.

Instance Variables

check

context  ← any  Context for check- and convert functions
kind  ← name  Type of type

components

supers ← chain* Super-types

name

fullname ← name Symbolic name for this type

argument

argument name  ← name*  Name of the argument
vector  ← bool  Methods: variable number of arguments

internal

translate function  - alien:Func  C-function to convert to this
validate function  - alien:SendFunc  C-function to check this type

Behaviour

21.1.1 Oms — Object management operations

Send Method initialise name=name, kind=[name], context=[any], supers=[chain*] Send Method initialise name=name, kind=[name], context=[any], supers=[chain*]

Refinement of: program object->initialise

Create a new type object. Name is the name of the type and should not already exist (see also ←lookup). After creation, the type is →protect’ed and a mapping from the type ←fullname to the type object is added to the hash table object @types. The arguments are:

• name ←fullname of the new type. This name will be added to the type name-table and must be unique.

• ←kind Determines the validate and translate behaviour (the interpretation of the context).

• ←context The context value. See →kind for details

• ←supers Alternative types of datums accepted

Types are normally created by converting names (see ‘Type ←convert’) or ←copy to create synonym names for a complex type.

Get Method lookup name=name ⇒type Get Method lookup name=name ⇒type Get Method lookup name=name ⇒type

Lookup type in type-database @types.

21.1.2 Check — Type definition and checking

Get Method check value=unchecked, context=[object]* ⇒unchecked Get Method check value=unchecked, context=[object]* ⇒unchecked

The ←check method is the normal way to activate a type. The first argument is the object to be checked. The second is the receiver that requests the conversion. The latter is currently used only for the ↔kind member.

Types are normally referred to by their ←name rather than by their reference. For this reason type checking and conversion is also accessible through ‘@pce ←convert’. The following two lines are identical:

    ?- get(@pce, convert, '34', int, Int).
    ?- get(type(int), check, '34', Int).

First, →validate is activated. If this fails, ←translate is activated and the result thereof is returned.

Variable context any (←)

The context field is provided with the C-functions ←translate function and ←validate function. The contents of this field is determined by these functions, and therefore by the ↔kind attribute.

Get Method convert name=name ⇒type Get Method convert name=name ⇒type

Refinement of: object<-convert Convert a name into a type. This is the normal way to define or use a type. The conversion syntax is (informally) defined below:

    <Type>      ::= <KindType>
                  | <SingleType> '...'      % Methods: Varargs
    <KindType>  ::= 'alien:'<C-type>        % Alien (C) types
                  | 'member:'<Single>       % Members
    <Single>    ::= <PrimType>
                  | <Single>'|'<Single>     % Disjunction
                  | '['Single']'            % May be @default
                  | <Single>'*'             % May be @nil
    <PrimType>  ::= <PredefinedType>        % any defined type
                  | {<Name>',' ...}           % name_of
                  | <int>'..'<int>          % integer range
                  | <real>'..'<real>        % real range
                  | <ClassName>

Below are some examples:

point  Instance of class point or a subclass

int  integer
[name]  A name or @default
graphical*  A graphical object or @nil
int|point  integer or point
{left,right}  either the name ’left’ or ’right’
0..100  integer in the range 0 ... 100 (including)
name|function Accepts a name or a function object.

Variable kind name (←) Send Method kind name=name

The ←kind attribute determines the -validate function and -translate function pointers and thus interpretation of the context attribute. Its values are (between brackets the the syntax construct; see also ←convert).

Objects (instances of classes):

• class [<name of the class>] Context: An instance of class class. Validate: Accepts instances of this class or a super-class. Convert: Activates the ←convert method of the class.

• class object [object] Context: @object class. Validate: Any objects, except instances of class function. Convert: See ‘Object ←convert’.

Special types:

• unchecked [unchecked] Validate: Accepts anything.

• any [any] Validate: ’object|int’ (i.e. no function objects). Translate: Evaluates functions.

Numeric values:

• int [int] Convert: Name, string, number, real.

• char [char] Validate: Integer 0..255. Convert: char array with the following syntax.

        * one character
        * \n, \t, \r, \f, \b with their usual meaning
        * ^<char> for control characters
        * \C-<char> for control characters
        * M- followed by any of above to form meta characters.

• int range [<low>..<high>] Context: tuple(low, high). Validate: Checks range (including low and high). Translate: Translates to ‘int’ and validates range,

• real range [<low>..<high>] Context: tuple(low, high). Validate: Checks range (including low and high). Translate: Translates to ‘real’ and validates range.

Events:

• event id [event id] Validate: char or node in @event tree. Convert: ‘char’ or event-name (see @event tree).

‘Set’ types:

• value Context: value accepted. Validate: only the equivalent of the context.

• name of [{<name1>,<name2>, ...}] Context: Chain with accepted names. Validate: Accepts members of the chain. Translate: To a name, then checks for membership.

• member [member:<type name>] Context: Requested type. Validate: Validate requested type. Translate: Invoke ‘Context ←member: value’.

• value set [no syntax] Context: Chain of element or function Validate: Expand functions Because ←context does not allow for a function, functions should be passed embedded in a quote function object. The function must evaluate to a chain.

Type disjunction:

• compound [<type name 1>|<type name 2>|...] Validate: Just validates the super-types. Translate: According to the super-types.

Type-name alias and argument names:

• alias Context: aliases type. Validate: as ←context. Translate: as ←context.

Internal use:

• alien [alien:<name of C-type] Context: Name of C-type. Validate: Accepts anything.

Get Method translate value=unchecked, context=[object]* ⇒unchecked Convert the first argument into a datum that satisfies the type. The second argument is optional context information. Both variables and methods pass the receiver through this argument. The pseudo code of this method is:

translate(Type type, Any value, Object context)
{ Activate translate_function.
  IF successful, return the translated value;
  ELSE try super-types until one succeeds and return the value
}

NOTE: Normally not activated directly, but through ‘type ←check’ because the argument may not be of the requested type.

Send Method validate unchecked=unchecked, [object]* Validate that the argument can be accepted as satisfying this type. First activates the ←validate function. When this fails, it requests the super-types to validate the argument.

21.1.3 Copy — Copying instances

Get Method copy name=name ⇒type Create a copy of a type with a new name. This may be used to create synonym types or extend types in ways not supported by the default conversion from a name to a type. Example:

    ?- get(@pce, convert, '{left,center,right}', type, X),
    ?- get(X, copy, format_name, _).

Creates a type ‘format name’ that accepts the names ’left’, ’center’ or ’right’.

21.1.4 Components — Parts I’m built from

Variable supers chain* (←)

Chain of type objects that act as alternatives. Used by →validate and ←translate after its own validation or translation fails.

21.1.5 Name — Naming objects

Variable fullname name (←)

The name used to define this type. See ←convert.

Get Method name ⇒name Get Method name ⇒name

Name without argument specification

21.1.6 Meta — Analysing behaviour and objects

The methods in this group have been implemented with a specific application in mind. Better thought on the semantics of types is needed to provide a balanced set of methods to reason about relations between type objects. Donot rely on the definitions of these methods.

Send Method includes type=type Type includes its argument

Send Method specialised type=type

Test if argument is a specialised type

Get Method value set [object]* ⇒chain Chain with values that satisfy the type object. This method is exploited by ‘text item ←completions’ to perform automatic completion.

Currently this method takes care of:

• ←kind = name of types ({name1,name2})

• ←kind = int range if the range entails at most 10 integers

• ←kind = value

• ←supers

21.1.7 Argument — Argument processing

Variable argument name name* (←)

Name of the argument specified. If @nil, no argument name is associated. Types used to specify an argument name have ←kind: alias. ←context contains the real type specification.

Variable vector bool (←)

Indicates the type should be interpreted as a ‘varargs’ type by a method. This implies any number of datums of this type is allowed.

21.1.8 Internal — Private behaviour

Variable translate function alien:Func (-)

C-function to convert to this

Variable validate function alien:SendFunc (-)

C-function to check this type

21.2 Class := — Name-value pair for argument-list

Inheritance: ⇒ := ⇒ object

Name/Value pair to pass named arguments to methods. Binding of message arguments to formal method arguments is described with ‘send method →send’.

The following example generates a default menu item object with name ‘help’ which is the last element of a group.

    ?- new(X, menu_item(help, end_group := @on)).

A description of the argument binding process may be found with ‘send method →send’.

Instance Variables

value

value ↔ any|function Value of the binding

argument

name  ↔ name  Name of the binding

Behaviour

21.2.1 Oms — Object management operations

Send Method initialise name=name, value=any|function Send Method initialise name=name, value=any|function

Refinement of: object->initialise Create binding from name and value

21.2.2 Value — Related value

Variable value any|function (↔)

Value of the binding

21.2.3 Argument — Argument processing

Variable name name (↔)

Name of the binding

21.3 Class code vector — Argument vector

Inheritance: ⇒ code vector ⇒ vector ⇒ object

Class code vector is a subclass of class vector that does not expand functions. It is used for:

• Storing the argument vector of class message and class ?.

• Packing multiple arguments into a single (type ‘any ...’, etc.).

• Passing arguments using ‘object →send vector’ and friends.

The difference between vector and code vector is the type-checking performed on the elements. Vector declares its elements of type object forcing functions to evaluate. A code vector object does not force evaluation of these arguments.

Instance Variables

Behaviour

21.3.1 Oms — Object management operations

Send Method initialise element=any|function ... Send Method initialise element=any|function ...

Refinement of: vector->initialise Create vector with elements at 1, ...

Send Method unlink Send Method unlink

Refinement of: vector->unlink Deallocates -elements

21.3.2 List — List operations (add, delete)

Send Method append value=any|function ...

Refinement of: vector->append Append element at ←high index+1

21.3.3 Element — Vector elements

Send Method element index=int, value=any|function Refinement of: vector->element Set element N (1-based) to the specified value. N is outside the array, the array is automatically enlarged. The ‘skipped’ elements are filled with @default.

Send Method fill value=any|function, from=[int], to=[int] Refinement of: vector->fill Fill range of elements with the specified value. ‘from’ and ‘to’ default to ←low index resp. ←high index. This is a common way to create a vector with a specific range.

578 Class code vector XPCE Reference Manual Class code vector 579

Chapter 22 Interaction with the Host System

This chapter deals with the interaction with the host language. Class ‘c’ implements the interface to the C and C++ languages.

22.1 Class host — Host language (for communication)

Inheritance: ⇒ host ⇒ object

Class host normally has only one instance representing the programming environment XPCE is connected to. When connected to Prolog, this object is called @prolog and when connected to Lisp it is called @lisp. Other and multiple languages are possible too, but the interfaces have not yet been defined. As the reference manual is geared towards prolog, we will call the instance of class host @prolog.

The object @prolog/@lisp makes the Prolog/Lisp environment available from XPCE code objects.. It allows PCE to pass control to a Prolog predicate by mapping a send operation onto a call to a Prolog predicate with the same name as the selector of the message.

Thus,

    ?- send(@prolog, format, 'Hello World~n').

Invokes ‘format(’Hello World~n’)’ and thus prints ‘Hello World’.

Similar, the get operation asks Prolog to compute a value. Suppose the predicate plus(+A, +B, -C) exists that adds two numbers. Then

    ?- get(@prolog, plus, 1, 2, X).

responds with ‘3’ as expected. Sending messages to @prolog is the common way to link UI objects, existing in PCE to the application, running in Prolog:

    new(B, button(help, message(@prolog, give_help)))

will invoke the Prolog predicate ‘give help/0’ if the user presses the ‘Help’ button.

The communication between PCE and the host language may be synchronous or asynchronous. See →call back and ←messages.

Instance Variables

host

language  ↔ {prolog,lisp,c}  Host language pce is connected to
system  ↔ name  Identifier name of host language

callback

call back  ↔ bool  Queue messages or invoke asynchronously
messages  ← chain*  Message queue

Behaviour

22.1.1 Oms — Object management operations

Send Method initialise name=name Send Method initialise name=name

Refinement of: object->initialise

Create an interface to the host language. This is allowed, but very uncommon. It might be useful to use mixed synchronous and asynchronous interfaces or multiple message channels.

22.1.2 Host — Communication with the host language

Variable language {prolog,lisp,c} (↔)

Language this host is talking too. Currently documentation purposes only.

Variable system name (↔)

Identifier name for the host language implementation PCE is connected too. Used by ‘pce →banner’ that prints the banner message when PCE is started. May be useful to solve incompatibility problems between, for example, two different Prolog versions.

All supported languages should be assigned a unique identifier name.

22.1.3 Callback — Calling the host-language

Get Method call name=name, unchecked ... ⇒unchecked Send Method call name=name, unchecked ... Send Method call name=name, unchecked ...

‘Host ↔call: FunctorName, ...Args...’ is used to implement PCE send/get methods in the host language.

It attempts to convert the first argument into a name. This argument is used to find the function in the host language. For all other arguments, the special arguments @receiver, @arg1, ... @arg10 are expanded to their current bindings. No further typechecking is done as this is already done by the send method that normally invokes this method.

Variable call back bool (↔)

When @on, a message sent to the host object (@prolog) will immediately be executed. Otherwise it will be stored in the chain ←messages for later retrieval by the host language.

Using call back is the default. Synchronous interfacing (no call back) harms the functionality as PCE code and host-language code will not be intercallable. Sometimes necessary when PCE is connected to a host language that is not capable of handling callback.

Get Method catch all name=name, any ...=any ... ⇒any Get Method catch all name=name, any ...=any ... ⇒any Send Method catch all name=name, any ...=any ... Send Method catch all name=name, any ...=any ...

Call function in the host-language. As requested by the argument types, functions will be evaluated by this method. The method ↔catch all is invoked by the message passing system if there is no method defined, thus

    ?- message(@prolog, my_nice_little_predicate).

calls my nice little predicate/0, but

    ?- message(@prolog, protect).

Invokes ‘object →protect’. See also ↔call.

Get Method message ⇒message

Return the head of the message chain when available. Otherwise process user-events using ‘display →dispatch’ until there is a message in ←messages and then return the head.

Variable messages chain* (←)

Queue of message for the hostlanguage. When a message reaches the host object (@prolog) and ←call back is @off, a message object is created from the receiver and arguments and this is appended to this chain for later retrieval by ←message.

22.2 Class c — C language (for communication)

Inheritance: ⇒ c ⇒ host ⇒ object

C language (for communication)

Instance Variables

Behaviour

22.2.1 Oms — Object management operations

Send Method initialise

Refinement of: host->initialise Create C interface

22.2.2 Callback — Calling the host-language

Get Method call c pointer=c pointer, unchecked ... ⇒unchecked Refinement of: host<-call Invoke a C-function get method

Send Method call c pointer=c pointer, unchecked ...

Refinement of: host->call ‘Host ↔call: FunctorName, ...Args...’ is used to implement PCE send/get methods in the host language.

It attempts to convert the first argument into a name. This argument is used to find the function in the host language. For all other arguments, the special arguments @receiver, @arg1, ... @arg10 are expanded to their current bindings. No further typechecking is done as this is already done by the send method that normally invokes this method.

Get Method call c plus plus c pointer=c pointer, unchecked ... ⇒unchecked Send Method call c plus plus c pointer=c pointer, unchecked ...

Invoke a C++-function

Get Method call c plus plus method c pointer=c pointer, c pointer=c pointer,

unchecked ... ⇒unchecked

Send Method call c plus plus method c pointer=c pointer, c pointer=c pointer,

unchecked ... Invoke C++ method on C++ object 584 Class c XPCE Reference Manual

Chapter 23 The PCE object

23.1 Class pce — Environment control

Inheritance: ⇒ pce ⇒ object

Class pce has one predefined instance, called ‘@pce’. The object @pce provides operations to control the overall environment of PCE as well as operations that are not a clear action on some object.

@pce is also used to control the debugger/tracer; handle exceptions, etc.

Instance Variables

exception

catched errors  ← chain  Errors are expected by code
exception handlers  ← sheet  Exception-name → handler mapping
last error  ↔ name*  Id of last occurred error

debugging

catch error signals  ← bool  Trap Unix signals to deal with errors
debugging  ← bool  Add consistency checks
trace  ← {never,error,user,always}  Trace message passing
trap errors  ← bool  Trap tracer on errors

environment

home → [name] PCE’s home directory

quit

exit messages ← chain Executed when the process terminates

version

features  ← chain  List of installed features
machine  ← name  Name of this machine/architecture
operating system  ← name  Name of operating system
version  - name  Version indication
window system  ← {X,windows}  Basic window system used

window system revision← int

Revision of Xt library used to compile xpce

window system version ← int

Version of Xt library used to compile xpce

Behaviour

23.1.1 Oms — Object management operations

Send Method initialise Send Method initialise

Refinement of: object->initialise

Called at boot time to create the one-and-only instance called @pce. No more instances may be created.

Get Method instance class=class, argument=unchecked ... ⇒object|function Get Method instance class=class, argument=unchecked ... ⇒object|function

Create an object (as Prolog new/2 or Lisp pce-new()). @pce ←instance converts the first argument into a class. This process deals with handling class-names rather then class objects and invokes the autoloader if the class does not yet exist (see pce autoload/2 and ←exception handlers). Next, the method ‘Class ←instance’ is called to create the new instance.

The following function creates a new point object each time it is evaluated:

    ?(@pce, instance, point, 4, 5)

See also class create, ‘class ←instance’ and @vmi new.

Get Method object from reference reference=int|name ⇒unchecked Get Method object from reference reference=int|name ⇒unchecked

Converts an object name or integer object-reference into an true object:

    ?- get(@pce, object_from_reference, prolog, Obj)
    Obj = @prolog

This is the inverse of ‘object ←object reference’. See also ‘object ←convert’. These methods are used seldomly by application programmers.

23.1.2 Conversion — Conversion (for type checking)

Get Method convert object=unchecked, type=type ⇒unchecked Get Method convert object=unchecked, type=type ⇒unchecked

Refinement of: object<-convert The method ‘pce ←convert’ provides access to ‘type ←check’, the PCE type checking and conversion system. The first argument is the object to be checked/converted. The second is the type that should be met.

Equivalent to ‘type ←check’, but generally more comfortable as this method will automatically translate a type specification into a type object.

The following example converts anything convertible to an integer to an integer:

    convert_to_int(Any, Int) :-
        get(@pce, convert, Any, int, Int).

After which

convert to int(’78’, X)  ==> 78
convert to int(string(’1992’), X) ==> 1992
convert to int(hello, X)  fails
convert to int(100, X)  ==> 100

23.1.3 Name — Naming objects

Send Method for name message=code Executes the code object on all instances of class name. @arg1 is bound the the successive name objects.

This method is safe: the name-base may be manipulated during its execution. Tbe code will not be executed for named added during the execution of ‘pce →for name’.

23.1.4 Initialise — Realising constraints

Send Method banner Send Method banner

Writes a standard banner message for PCE, indicating version, hardware, operating system, the hostlanguage to which PCE is connected and a copyright notice.

23.1.5 Limit — Query PCE limits

Get Method max integer ⇒int Get Method min integer ⇒int

Highest/lowest integer value that may be represented using PCE’s data-type ‘int’ or ‘number’. Current range:

    -2^29 ... 2^29 - 1 (-536870912 ... 536870911)

23.1.6 File — Saving and loading files, file operations

Get Method fd ⇒int Number of remaining unused Unix file-descriptors. When PCE was based on the Sun-View windowing environment, each window used a file descriptor and an ungraceful error was generated when no more filedescriptors were available.

23.1.7 Host — Communication with the host language

Send Method syntax syntax={uppercase}, word separator=[char] Send Method syntax syntax={uppercase}, word separator=[char]

Some languages (notably LISP) use case-insensitive keywords, internally represented in upper-case. Host-language keywords are most naturally mapped on PCE-names. This method, which is normally send by the LISP interface right after PCE has been initialised performs the following actions:

• Map names to uppercase All predefined names of PCE that are strictly lowercase are mapped onto uppercase. This implies the lowercase equivalents disappear: classes, methods, variables and all other constants referred to in this manual will have uppercase names.

• Change the word-separator. The default word separator of

PCE,the ’ ’ is replaced by the given character in all name objects.

1

23.1.8 Report — Reporting events, status and errors

Send Method confirm format=char array, argument=any ...

If pce is connected to an open display, invokes ‘display →confirm’ on @display. Otherwise the text is formatted on the terminal and PCE requests the user to type ‘y’ or ‘n’. Used infrequently.

Send Method format format=char array, argument=any ...

Write formatted output to the main window. Normally only used for reporting debugging information. For example, the following query dumps the mapping represented by the hash table object @classes to the terminal:

1 To get compatible resource-handling, resources defined as type ‘name’ will be mapped to uppercase (and have their word-separator changed) when converted. Also, generated object-identifiers (for fonts, classes, etc.) will be mapped to upper-case. The run-time generated keywords may lead to unexpected behaviour.

Finally, when converting of a bitmap- or image-name to a filename, the name is downcased. This makes it implossible to use automatic conversion when the file-name consists of uppercase characters.

    ?- send(@classes, for_all,
            message(@pce, format, '%s\t%s\n',
                    @arg1, @arg2)).

See ‘string →format’ for a description of the format specification.

Send Method inform format=char array, argument=any ...

If there is an open display, run ‘display →inform’. Otherwise →format the information on the terminal.

Get Method os error ⇒name

Name indicating the last operating-system generated error. That is, the text that would normally be printed by the Unix utility perror(2). Its use is not encouraged.

Send Method write argument=any ...

Write the arguments using PCE’s internal pretty-printing routine. The arguments are separated by spaces. Note that output is generally not flushed.

Send Method write ln argument=any ...

Writes the arguments as ‘pce→write’ and terminates the line with a newline. Useful for dumping information to the terminal:

    send(@images, for_all, message(@pce, write_ln, @arg1, @arg2)).

Dumps a map of all named image objects (which is initially empty).

23.1.9 Time — Controlling real-time

Get Method date ⇒string Requests the system time using the C-library function ctime(3) and returns the result as a string object. The returned string has no trailing newline (as its Unix counterpart). Its format is:

     Sun Sep 16 01:03:52 1973

See also class date.

Get Method mclock ⇒int

#Elapsed milliseconds since XPCE was started

23.1.10 Exception — Trapping and generation exceptions

Send Method catch error identifier=name|chain Inform PCE’s error recovery mechanism that the application takes care of the indicated error or one of the indicated errors. If such an error occurs the method normally fails silently, setting ←last error.

The method ‘pce →catch pop’ restores the catched errors to the state before invoking →catch error.

The prolog predicate pce catch error(+Error(s), +Goal) provides an interface:

    ?- send(@pce, hello, pce).
    [PCE error: send: No implementation for: @pce/pce →hello
        in: send(@pce/pce, hello, pce)]
    PCE:  1 fail: send(@pce/pce, hello, pce) ?

While

    ?- pce_catch_error(no_behaviour,
                       send(@pce, hello, pce)).
    No

After which

    ?- get(@pce, last_error, E).    ==> E = no_behaviour

Send Method catch pop

Restores the catched errors to the state before the latest ‘pce →catch error’.

Send Method catched identifier=name Test if the indicated error id is currently catched. If this method succeeds, raising the indicated error will make the method fail rather than printing an error-message.

Variable catched errors chain (←)

Chain holding all errors currently catched. Each element is either an error id or a chain with error id’.

Send Method exception identifier=name, context=any ...

Raise an exception. The first argument is the name of the exception. The remaining arguments are passed as context parameters to the code dealing with the exception. The exception handlers are defined in the sheet ‘Pce ←exception handlers’.^{2}

Variable exception handlers sheet (←)

Sheet with exception handlers used by ‘Pce →exception’. Each entry of this sheet maps an exception-name onto a code object which is executed when the corresponding exception occurs. The argument bindings for @arg1, ... are the second, ... argument passed to ‘Pce →exception’. The following exceptions are currently defined:

• undefined class An attempt is made to reference an non-existing class while doing one of the following:

• Create an object

• Load an object from file using ‘File ←object’

• Create a subclass

Parameters:

@arg1: class name

2 The exception mechanism is rudimentaly.

• undefined assoc An attempt is made to resolve a symbolic reference (i.e. @pce), but the reference is unknown. Parameters:

@arg1: reference name

• redefined assoc An attempt is made to create an object with the same symbolic reference as an already existing object. Parameters:

@arg1: The existing reference name

• initialisation failed The →initialisation method for some instance failed. Parameters:

@arg1: The (partial) instance
@arg2 ... The arguments given to →initialise

Variable last error name* (↔)

Last error catched by the application. See also →catch error and →catch pop.

23.1.11 Debugging — Debugging PCE programs

Get Method c function name address=int ⇒name Translates the address of a function into its name. Used by →print c stack and the online manual to locate the C-sources of a C-defined method.

On the first call, it uses ←c symbol file to obtain the symbol file. Then it calls the Unix command ‘nm -n file’ and parses the output to create a symbol table of the running PCE process. Finally it uses binary search to locate the address in the symboltable and returns the result.^{3}

Get Method c symbol file ⇒name

Name of the symbol file of the running XPCE process.

Variable catch error signals bool (←) Send Method catch error signals bool=bool

Determines PCE’s response to (normally) fatal error situations reported by the operating system. When such an error occurs, a [PCE SYSTEM ERROR] is generated. The following signals are considered fatal:

SIGQUIT So, ˆ \ can be used to generate an error
SIGILL  Illegal instruction
SIGEMT Emulator trap
SIGBUS Bus error (illegal aligned pointer)
SIGSEGV Segmentation fault (out-of-range pointer)
SIGSYS Bad argument to system call
SIGPIPE Broken pipe
SIGFPE Floating point exception

See your Unix manual for details on these signals.

3 Requires Unix nm to accept the ‘-n’ switch and produce output in a BSD unix nm compatible format.

Send Method debug subject subject=name Send Method nodebug subject subject=name

Prints messages to the terminal to debug certain aspects of the system. The debug id’s supported change quickly from release to release. Below is a tentative list.

absolute position Translation of relative coordinates
allocate  memory allocation
compute  Graphicals →request compute and →compute
cursor  Determining visual cursor
dialog  Dialog layout
editor  Various editor happenings
event  Various things with events
fill  Filling text (editor)
flash  Flashing graphicals
float  Floating point conversions
focus  Event focusing
fragment  Fragment handling
frame  Various frame events
gc  Incremental garbage collection
get xref  Maintenance of X id database
image  Some image functions
clone  Cloning objects
menu  Menu repaint
message  Execution of message objects
obtain  Failing obtainers
path  Smoothing paths
popup  Popup menu’s
post  Event posting (event →post)
postscript  PostScript generation
process  Actions on handling subprocesses
redraw  Repaint management
save  ‘Object →save in file’
scan  ‘char array ←scan’
scroll  Scrollbar handling
shift  text image shifting of lines
spatial  execution of spatial constraints
text  Updating of text images
undo  Undo in text buffers
xref  X window references database

→nodebug subject removes an item from this list.

Variable debugging bool (←) Send Method debugging bool=bool

Variable to indicate debugging-status of PCE. Set by ‘pce →trace’ and ‘method→trace’.

Send Method info

Write statistics/info to terminal

Send Method list wasted core list content=[bool] Dumps a map of wasted-core cells. Wasted core is core allocated, freed and not yet reused. With list content @on, PCE tries to identify the object deleted. This might lead to crashes. See also ←core wasted.

Get Method max goal depth ⇒int*

Maximum recursion level

Send Method max goal depth [int]*

Set maximum recursion level

Send Method print stack depth=[int], always=[bool] Print PCE message stack to host-window

Variable trace {never,error,user,always} (←) Send Method trace level=[{never,error,user,always}]

Current tracing level of pce. When set without an argument, ‘user’ level is chosen. ‘notrace’ is →trace: never.

• never All trace- and break-points are ignored. Errors do not trap the tracer (see →trap errors).

• error All trace- and break-points are ignored. Runtime errors trap the tracer and switch it to ‘user’ mode.

• user Trace- and break-points entered in user-mode are printed. Those entered in system-mode are ignored. Calls issued directly from the host-language or a code object created by the user are executed in user-mode. All others are executed in system-mode.

• always All trace- and break-points are printed.

See also ‘program object →trace’ and ‘program object →break’.

Variable trap errors bool (←) Send Method trap errors bool=bool

This flag, which is only available in the development version, controls XPCE’s behaviour if a runtime error is trapped in an application. When @on (default), the system will normally enter the tracer, allowing the user to inspect the context of the error. If @off, the system will use the ‘object→report’ mechanism to report the error and the tracer will not be trapped. The latter behaviour is the only behaviour supported by the runtime system. See also →trace.

Get Method unresolved types ⇒chain

Scans @types for types that are of ‘type ←kind: class’, but have no initialised class associated with them. A name that is not the name of an existing class will be converted into a type of kind ‘class’. This type is only useful after the class is actually created. This mechanism allows the programmer to refer to classes as a type before defining them.

The most likely cause of this trouble is a misspelled type-name or a forgotten class definition.

23.1.12 Control — Control autonomous processes

Send Method fail Send Method fail

Fails immediately without side-effects.

Send Method succeed Send Method succeed

Succeeds without side effects. Maybe used if a code objects that always yields success is needed:

    new(@succeed, message(@pce, succeed)).

Note that the following is faster:

    new(@succeed, new(and)).

23.1.13 Environment — Handling the process’ environment

Get Method environment variable name=name ⇒name Get Method environment variable name=name ⇒name

Read named Unix environment variable which’ value is returned as a name.

If ‘name’ is ‘PCEHOME’ and this is not defined as a Unix environment variable, the value of ‘@pce ←home’ is returned.

Get Method home ⇒name Get Method home ⇒name

Variable home [name] (→)

Home directory of the pce system. Its value is used to find

* PostScript header file  <HOME>/postscript/pce.ps
* Standard bitmaps  <HOME>/bitmaps
* The sources  <HOME>/src
* The online manual material <HOME>/man/reference

The Prolog interface also adds the library directory

    <HOME>/prolog/lib

containing the PCE libraries (manual, demo programs, pcedraw, utilities).

Get Method hostname ⇒name

Name of host on which PCE runs

Get Method user ⇒name

Login name of user

Get Method user info field={name,password,user id,group id,gecos,home,shell},

user=[name] ⇒name|int Get information on user (from the passwd file)

23.1.14 Runtime — Runtime version relate methods

Get Method is runtime system ⇒bool Get Method is runtime system ⇒bool

@on if this is the runtime library

23.1.15 Quit — Exiting from PCE

Send Method die status=[int] Send Method die status=[int]

Exit from the combined PCE/{Prolog,Lisp,...} process indicating status. It performs the following steps:

• Request the host language to exit. This is done using the C-interface call hostAction(HOST HALT). With a completely implemented interface, this in return will call PCE’s cleanup functions registered with hostAction(HOST ONHALT) and terminate the process.

• If the host refuses to kill the process, PCE itself will call its registered cleanup functions and call exit() with the argument status.

With a proper implemented interface, the normal termination will execute the ‘@pce ←exit messages’, kill possible subprocesses and terminate the process. The termination process is the same regardless of whether the host-language terminate functions is called or ‘pce→die’ is invoked.

Send Method exit message message=code Send Method exit message message=code

Prepends code object to ‘pce ←exit messages’. That is: the last exit message registered will be executed the first.

Variable exit messages chain (←)

Chain of code objects. When the PCE process is killed, each of these messages is executed in turn with the following argument:

@arg1 Exit status of the process

Filled by ‘pce →exit message’.

23.1.16 Console — Controlling the host-language console

Send Method console label char array=char array Set the label of the console-window from which XCE was started. Currently only implemented for the MS-Windows version of XPCE, and XPCE started from a Unix xterm(1) application. The latter is verified by checking the environment variable TERM for the value ‘xterm’. See also →show console.

Send Method expose console

Backward compatibility equivalent of →show console: open.

Expose the console window of XPCE. Only implemented for the MS-Windows version. See also →console label.

Send Method iconify console

Backward compatibility equivalent of →show console: iconic.

Send Method show console {open,iconic,hidden} Control visibility of the console window, if accessible. This call only works in the Windows version of XPCE, and only if the host interface honours the hostQuery(HOST CONSOLE) request. The meaning of the argument:

• open The console is opened normally. This is the normal situation for program development.

• iconic The console is displayed as an icon. This is useful for testing applications. If the applications behaves strange, the console may be opened to check it for error messages.

• hidden The console windows is removed from the display. This is the normal situation for finished applications. Make sure that the application terminates if the last windows disappears (see library(pce main) for some standard predicates to realise the toplevel control loop).

23.1.17 Statistics — Timing, memory usage, etc.

Get Method answer stack size ⇒int Get Method answer stack size ⇒int

Statistics on the incremental garbage collection system. Objects created that are not related to any other object are pushed on the ‘answer’ stack. They are deleted from this stack iff

• They are related to another object

• They are ‘object →lock object’ed (or given a named reference)

• The answer-stack is rewinded to a point before the creation of the object.

Both event-call-back and the execution of a PCE method mark and rewind this stack. Thus

?- new(X, point).

Creates a point and leaves it on the answer-stack, while

?- [user].
create_point :- new(X, point).
^D
?- send(@prolog, create_point).

Creates a point, pushes it on the answer-stack. Then rewinds this stack on exit of the ‘@prolog →create point’, garbage collection the point object. Thus

?- pceusage(send(@prolog, create_point)).
0.00 seconds, 0 bytes, 1 created - 1 freed = 0 objects

NOTE: pceusage/1 should often be called twice to get the intended result. The first call may create cells in the XPCE/Prolog interface cache.

Send Method bench message=message, times=int,

how={forward,execute,qad,send,invoke}

Send Method bench message=message, times=int,

how={forward,execute,qad,send,invoke} Sends messages in a tight loop for benchmarking purposed. First argument is the message that is executed repeatedly. Second argument is the number of iterations. Last argument indicates which part of the message invocation is placed in the loop. The rest is moved out of the loop. Its values are:

• forward Invoke the full ‘message →forward’ behaviour

• execute As →forward, put pushing and popping the argument stack outside the loop.

• send Invokes the full send() virtual machine operation

• invoke Move method-resolution outside the loop. Typechecking the arguments and starting the implementing code is all which is left inside the loop.

Get Method core usage ⇒int

Number of bytes core allocated by PCE. Notes:

1. Memory requested by the X-window libraries or the host-language is not included 2. Memory requested by PCE is never returned to the process.

Get Method core wasted ⇒int

Memory allocated by PCE, but currently not in use.

Get Method cpu time kind=[{user,system}] ⇒real Get Method cpu time kind=[{user,system}] ⇒real

CPU time used by the process PCE belongs to. When the argument is @default, this is the combined user and system time, otherwise it is the time specified.

Note that the host language is normally part of the same process.

Get Method deferred unalloced ⇒int

Number of objects that has been →free’d by the user, but are still referenced. To avoid crashes, the memory belonging to such objects is not freed as long as there are references to the object.

Get Method method calls ⇒int

Number of methods called

Get Method objects allocated ⇒int

Total number of objects created. Equivalent to the sum of ‘class ←no created’ over all classes. To find the number of ‘living’ objects, ←objects freed should be subtracted from this value.

Get Method objects freed ⇒int

Total number of objects freed

23.1.18 Class — Defining classes

Send Method define class name=name, super=name, summary=[string],

realise=code Declare a class without details. The system will run ‘code’ when an action is performed that requires details of the class (such as creating an instance).

All, except for some vital kernel classes of XPCE itself have been declared this way to delay/avoid building the class-definitions.

See also ‘class →realise’.

23.1.19 Reference — Object reference manipulation

Send Method for name reference message=code

Executes code for each defined global name reference (e.g. @pce, @arg1). The exit status of the code is ignored. Arguments:

@arg1 Name of the global object (e.g. ‘pce’, ‘arg1’).

This method passes the reference-names rather than the objects themselves. As various of them are functions, good understanding of the expansion-rules for functions is necessary.

Send Method rename reference old=name, new=name Change the name of a global reference. This method may be used to rename functions. Its use is strongly discouraged for normal application programmers. See also ‘object →name reference’.

23.1.20 Process — Process identifier

Get Method pid ⇒int Get Method pid ⇒int

Unix process identifier for this process. May be used to create unique system-wide names. Note that file objects with a proper temporary name may be created using

    ?- new(TmpFile, file).

See ‘file →initialise’.

23.1.21 Postscript — Generating PostScript for printing

Get Method postscript header ⇒name

Returns the name of a file used as a header for the PostScript output generated by ‘graphical ←postscript’ and other postscript generating methods. Its value is

    <@pce?home>/postscript/pce.ps

23.1.22 Version — Versions of XPCE, OS, X, ...

Send Method feature any=any

Define new feature

Variable features chain (←)

List of installed features

Send Method has feature any=any

Test if feature is defined

Variable machine name (←)

Identifier name for the hardware architecture used.

Variable operating system name (←)

Identifier for the operating system running on your system:

Get Method version how=[{string,name,number}] ⇒name|int Get Method version how=[{string,name,number}] ⇒name|int

Variable version name (-)

Current version number of XPCE. When documenting this method:

    '4.4.3, September 1992'

Its format:

• First digit (4) Current major release. Generally indicates major revisions and a large number of incompatible changes: version 4 is based on X-windows whereas version 3 was using SunView. Version 4 adds user-defined classes, type inferencing, completely reorganised graphics and many more. Version 5 is not (yet) foreseen.

• Second digit (4) Indicates minor releases with limited compatibility issues.

• Third digit (3) Patch number. No incompatibilities except for minor one’s for which we do not expect any normal application to be sensitive.

These fields are followed by an indication of the time of release.

If the ←version is requested with the argument ‘name’, the time of the release is omitted (i.e. 4.4.3). Finally, if the version is requested as a number, the value 10000 * major + 100 + minor + patch is returned.

Variable window system {X,windows} (←)

Basic window system used

Variable window system revision int (←)

Revision of Xt library used to compile xpce

Variable window system version int (←)

Version of Xt library used to compile xpce 600 Class pce XPCE Reference Manual

Chapter 24

Meta Objects — Classes, Behaviour, etc.

This chapter describes PCE’s meta-layer. Each object in PCE is an instance of class class. Class class is an instance of itself:

    ?- get(@class_class, class, Class)
    Class = @class_class

Behaviour (methods, instance variables) are stored in classes.

24.1 Class class — Represent classes

Inheritance: ⇒ class ⇒ class stub ⇒ program object ⇒ object

Class class describes a PCE class. All classes (including class class itself) are an instance of this class. The classes are organised in a single-inheritance hierarchy. Class object is the root of the PCE class hierarchy. A class can be regarded meta-data describing (among others) the following properties of its instances:

• Instance variables (slots, attributes) The instance variables define the data-structure (types and access permissions) of the instances of the class.

• Send methods A collection of methods that can be activated by the ‘send’ virtual machine operation.

• Get methods A collection of methods that can be activated by the ‘get’ virtual machine operation.

• Resources A collection of defaults that are obtained via the X-windows defaulting mechanism.

The user may create and modify classes to extend the PCE system. Classes are created just like any other PCE object:

    ?- new(X, class(person, object)).

Creates a class named person below class object. Initially class person only differs from class object by its name.

Instance Variables

oms

instance size  ← int  Size of an instance in bytes
slots  ← int  Total number of instance variables
un answer  ↔ bool  Incremental garbage collection hint

copy

clone style ↔ {recursive,none,relation} How to clone instances

relation

handles ↔ chain* Graphicals: connection points for links

selection selection style ↔ {none,invert,

corner handles,side handles, corner and side handles, line handles,path handles}*

Graphicals: visual feedback of selected

behaviour

delegate  ← chain  Instance variables for delegation
get methods  - chain  Get methods not inherited
instance variables  ← vector  Vector object holding all instance variables
send methods  - chain  Send methods not inherited

file

save style ↔ {normal,external,nil} How to save instances to file

resource

resources ← chain User setable resources (via Xdefaults)

debugging

instances ← hash table* Hash table holding existing instances

statistics Class class 603

no created  ← int  Number of instances created
no freed  ← int  Number of instances freed

change

changed messages  ↔ chain*  Report (forward) changes to instances
created messages  ↔ chain*  Report (forward) created instances
freed messages  ↔ chain*  Report (forward) freed instances

repaint

solid - bool Graphicals: image affects ALL pixels

term

term names ↔ vector* Selectors to obtain term arguments

manual

source ↔ source location* Location in the sources

cache

convert method  - [get method]*  Type conversion
get catch all  - [get method]*  Handle not-yet-handled get messages
get table  ← hash table  Hash table for all get methods
has init functions  ← bool  @on if one or more variables use functions
initialise method  - [send method]  Used to initialise a new instance
local table  ← hash table  Hash table for all instance variables
lookup method  - [get method]*  Type conversion
neighbour index  - alien:int  Index of neighbour in hierarchy
proto  - alien:InstanceProto  Prototype instance + info for fast creation

resolve method message

↔

[code|c pointer]*

Hook for lazy attachment of methods

resource table  ← hash table*  Hash table for all resources
send catch all  - [send method]*  Handle not-yet-handled send messages
send table  ← hash table  Hash table for all send methods
tree index  - alien:int  Index in depth-first numbering of hierarchy

realise

make class method  ← code*  Code object to →realise the class
realised  ← bool  @on if class is realised

version

features  - sheet*  Defined features on this class
rcs revision  ← name*  RCS revision of sourcefile

internal

boot  - alien:int  #PCE slots when booting; 0 otherwise
c declarations  - alien:classdecl*  Description left by C-compiler
changed function  - alien:SendFunc  C function to trap slot changes
clone function  - alien:SendFunc  C function to clone alien data
get function  - alien:GetFunc  Execute function-objects
in event area  - alien:SendFunc  Graphicals: test if event in area
load function  - alien:SendFunc  C-function to reload alien data
make class function  - alien:VoidFunc  C-function that created the class
redraw function  - alien:SendFunc  C function to repaint graphicals
save function  - alien:SendFunc  C-function to save alien data
send function  - alien:SendFunc  Execute code-objects
trace function  - alien:VoidFunc  C-function to handle trace message

Behaviour 24.1.1 Oms — Object management operations

Chapter 24: Meta Objects — Classes, Behaviour, etc.

Get Method convert any=any ⇒class Refinement of: object<-convert Converts a class-name or type object of ‘type ←kind: class’ into a class object. If a class does not exist and the argument is a name, the ‘@pce →exception: undefined class’ with context argument the name of the required class is generated. This mechanism is used by the autoloader (pce autoload/2).

Send Method initialise name=name, super=[class]* Refinement of: program object->initialise Initialise a class specified name. The new class is (initially) a copy of the provided super-class. After creation of a new class the following methods are commonly used to refine it:

• →instance variable

• →delegate

• →send method

• →get method

Get Method instance argument=unchecked ... ⇒object Create an instance of this class. Creating an instance entails the following steps:

• Memory is allocated for the instance. All PCE-typed slots are filled with @nil and all alien slots with (C) NULL. Actually, the slots are filled from the ‘variable -initial value’ of their associated instance variable.

• If it concerns a global object, a named reference is created.

• The PCE virtual machine invokes ‘object →initialise’ to the new object with the arguments given to this method.

• If ‘object →initialise’ fails, the exception ‘initialise failed’ is raised using ‘@pce →exception’. The context parameter is the (incomplete) object reference.

• If →initialise succeeds, ‘Class ←instance’ returns the new object.

NOTE: ‘@pce ←instance: Class, any ...’ is an alternative for creating objects. This gate has two advantages: type conversion allows you to specify the class-name rather than the class, and -if the class does not yet exist-, an exception is raised allowing the class autoloading to create it. See also class create and new/2

Variable instance size int (←)

Size of an instance in bytes. Note that this does not include the size of ‘parts’ of the instance.

Get Method lookup name=name, super=[class] ⇒class Lookup the name of the class in the hash table object @classes. If ‘super’ is specified, ←lookup verifies the super and generates an error message on a mismatch. This method ensures that

    ?- get(class(point), instance, 4, 5, P).

Actually returns an instance of the existing class point instead of returning an instance of a new class named point.

Variable slots int (←)

Total number of instance variables Get Method sub class name=name ⇒class

Create a class below this one (or return existing)

Variable un answer bool (↔)

Hint for the incremental garbage collector. By default, fresh created instances (either by new/2 or some get method that generates an instance) are stored in a special table. As these instances are ‘answers’ to methods, this table is called the ‘answer’ table internally.

If an object is made an attribute of another object, it will be removed from the answer table and reclaimed by the garbage collector it its reference count drops to zero. Object remaining in the answer table are reclaimed if the ‘context’ in which they where created is ended. The main event-loop starts/ends such a context and likewise do all method executions.

Now consider the code below, which produces an alphabetically ordered list of classnames:

    ?- new(Chain, chain),
       send(@classes, for_all,
            message(Chain, append, @arg1)),
       send(Chain, sort).

With the above schema, Chain will be an ‘answer object’ after creation. It will be made a slot of the message object, thus loosing its answer status. After the ‘chain →for all’, PCE will garbage collect the message. The reference count of the chain drops to zero and thus the chain is reclaimed too.

This situation is common and therefore class code sets the ←un answer flags to @off. This tells ‘variable →send’ not to remove the chain from the answer table.

Send Method unlink

Refinement of: object->unlink Remove from tables

24.1.2 Type — Type definition, test and conversion

Send Method is a class=class Succeeds if the receiver is the same class of the argument or an (indirect) sibling of the argument. See also ‘object →instance of’.

Get Method super class name ⇒name

The variables ←sub classes and ←super class define the class hierarchy. The class hierarchy is visualised using the ‘Class Hierarchy’ tool from the online manual tools. The ←super class of class object is @nil.

The method ←super class name is used to create the appropriate term description (see ‘object ← arg’).

24.1.3 Copy — Copying instances

Variable clone style {recursive,none,relation} (↔)

Determines how an instance of this class is cloned. Possible values:

• recursive Clone this instance and all its parts recursively.

• none The instance itself is returned. Used for reusable objects.

• nil ‘Object ←clone’ returns @nil.

See also ‘object ←clone’ and ‘variable ←clone style’.

Send Method clone style variable variable=name|int,

style={recursive,reference,reference chain,value,alien,nil} Set ‘variable ←clone style’ of named variable. Equivalent to

    get(Class, instance_variable, Name, Var),
    send(Var, clone_style, Style)

See also ‘object ←clone’.

24.1.4 Relation — Relations, constraints, (graphical) connections

Variable handles chain* (↔) Send Method handle handle=handle

Graphical classes only. This chain contains handles that are available to each instance of the class. Note that handles can be defined simultaneous at the class and the instance level.

Handles at the class level are normally declared using the handle/4 construct expanded by the Prolog defined class compiler.

24.1.5 Selection — Manipulation and query of selections

Variable selection style

{none,invert,corner handles,side handles,corner and side handles,line handles,path handles}* (↔)

If class is a subclass of class graphical, the selection style determines the visual feedback of graphical objects that have ‘graphical ↔selected: @on’. See also Pce.graphical.selection style. This resource is redefined for each subclass of graphical.

24.1.6 Behaviour — Definition of behaviour

Variable delegate chain (←)

Send Method delegate variable=name|int Send Method prepend delegate variable=name|int

The chain ←delegate consists of instance variable objects that should be used for delegation. The PCE message passing system will try to forward an incoming message to the values of these instance variables after it failed to locate an implementation at the object or class level. The elements of this chain are tried in the order they appear in the chain.

→delegate  Adds a variable at the end
→prepend delegate Adds a variable at the start

See also ‘class ←send method’ and ‘class ←get method’.

Send Method get method get method=get method Send Method instance variable variable=variable

Refinement of: object->get method The methods →get method, →send method and →instance variable are used to expand or redefine the behaviour of a class. They are normally used right after the class has been created. The following restrictions apply:

• Instance variables cannot be redefined or extended after instances of subclasses of the class have been created.

• The name of a instance variable may not already appear as an instance variable in one of the super-classes.

• Behaviour of each type (send/get) may be defined both using variables and methods. If a variable has ‘send’ access there should not be a send method and if a variable has ‘get’ access there should not be a get method with the same name. If both exist, the method is used instead of the variable.

Note that both the Prolog and Lisp language interfaces provide an interface for defining methods. See their resp. manual.

The methods ‘object →slot’, ‘object →send super’, ‘object ←get super’ and friends are designed to support the definition of method implementations. See also class code.

Get Method get methods ⇒chain Variable get methods chain (-) Variable send methods chain (-)

Chain of methods of the indicated type (send/get) (re)defined for this class. Inherited or delegated methods are not in this chain. See also ←get method and ←send method, ‘object ←send method’ and ‘object ←get method’, for resolving methods.

Send Method install

Prepare class for creating instances

Variable instance variables vector (←)

Vector object holding all instance variables of this class. Initially a copy of the superclass. The variable object at index <n> of this vector describes the <n>-th slot of the object. See also ‘object ←slot’.

The ‘variable ←context’ argument may be used to find the class on which a variable is defined. The following code returns a chain of instance variables not inherited:

    new(Vs, chain),
    send(Class?instance_variables, for_all,
         if(@arg1?context == Class,
            message(Vs, append, @arg1)))

Send Method send method send method=send method Refinement of: object->send method Add a send-method to this individual object. Object-level defined send-methods overrule Class-defined send-methods. An object level method may refer to its corresponding class level method using →send class.

Get Method send methods ⇒chain

Send methods not inherited

24.1.7 Meta — Analysing behaviour and objects

Get Method get method name=name ⇒get method|variable Get Method send method name=name ⇒send method|variable

Refinement of: object<-get method Resolve a selector name to its implementation. The returned value is either a method object or a variable. These methods operate at the class level. The methods ‘object ←get method’ and ‘object ←send method’ operate at the object level and take care of object-level defined behaviour as well as delegation.

Get Method instance variable name|int ⇒variable

Resolve the variable object from the named instance variable or the offset (1-based) of the variable. See also ←instance variables, ←send method or ←get method.

24.1.8 File — Saving and loading files, file operations

Variable save style {normal,external,nil} (↔)

Flag to help ‘object →save in file’. If this methods encounters a slot holding an instance of this class it will save the instance according to the value of ←save style:

normal Save the instance to the file
external Save the (named) reference to the file
nil  Write @nil to the file

See also ‘variable ←save style’ and ‘file ←object’.

Send Method save style variable variable=name|int, style={normal,nil} Set the ‘variable ←save style’ for named variable.

24.1.9 Resource — Interface to ~/.Xdefault

Get Method catch all resource=name ⇒any Get the value of the named resource. Backward compatibility. New code should use ‘object ←resource value’ or ‘object →obtain resources’ to query resources.

Get Method resource name=name ⇒resource

Variable resources chain (←)

Send Method resource resource=resource The chain ←resources defines an interface between the X-resource database and the class (and its instances). The methods →resource and ←resource should be used to modify and inspect the resource set of the class.

See class resource for a further discussion on PCE’s resource mechanism.

Send Method resource value name=name, any=any Set the value of the named resource explicitly. Normally the value is retrieved either from the user’s ~/.Xdefault file, the Pce resource file in /usr/lib/X11/app-defaults or the PCE internally defined default.

This method overrules all these values. To be used with care.

24.1.10 Debugging — Debugging PCE programs

Variable instances hash table* (←) Send Method record instances record=[bool], recursive=[bool]

The hash table object ←instances contains all instances of this class that have been created since the table was attached to the class. Note that instances of sub-classes are not in this table. The table is maintained by the new() and free() virtual machine operations as well as by ←clone and ‘file ←object’.

This table is attached using →record instances. If the first argument is @on or @default an ←instances table is attached. If this argument is @off a possible associated table is detached. If the second (‘recursive’) argument is @on (default), →record instances will be invoked with the same arguments on all sub-classes. Thus

    ?- send(class(object), record_instances).

Will record the instances of all classes.

See also →created message and →freed message.

24.1.11 Statistics — Timing, memory usage, etc.

Variable no created int (←) Variable no freed int (←)

Number of instances created/freed. See also ‘@pce ←objects allocated’.

24.1.12 Change — Trapping object modifications

Variable changed messages chain* (↔) Send Method changed message code=code

Chain of code objects activated after a slot of an instance has changed that has ‘object →inspect: @on’. Each code object is activated in turn and the returned status of the execution is ignored. Argument binding:

@arg1 Instance who’s slot changed
@arg2 Name of the changed slot.

Changes are not notified before the initialisation of the instance is complete or after the destruction has started.

This trap is used by the inspector tool. See also →created message and →freed message.

Variable created messages chain* (↔) Send Method created message code=code

Chain of code objects invoked when an instance of this class is created. After successful creation of an instance, the following arguments are forwarded to each code object in the chain:

@arg1 Name of the class
@arg2 Reference to the new instance
@arg3 Action that caused the creation of the object

Possible values for @arg3 are:

new  Normal creation (new/2 or ‘class ←instance’)

loaded Loaded by ‘file ←object’
clone Cloned using ‘object ←clone’

May be used to keep track of the set of instances of this class in combination wit →freed message. See also →changed message and →record instances.

Variable freed messages chain* (↔) Send Method freed message code=code

When an instance of this class is freed that has ‘object ↔inspect: @on’, its reference will be passed to the code objects in this chain. Argument binding:

@arg1: Object to be freed.

This message is sent as the first action of ‘object →free’. See also ‘→changed message’ and ‘→created message’.

24.1.13 Repaint — Behaviour dealing with repaint

Variable solid bool (-)

Graphicals: image affects ALL pixels

24.1.14 Term — Conversion to (Prolog) term

Variable term names vector* (↔)

Vector of selectors of get methods that do not require arguments. The elements of this vector object are used by ‘object ← arg’ to return the nth (1-based) argument of the term-description.

If element <n> of this vector has value <selector>, the class must define ←<selector> and the nth (1-based) result of ‘object ← arg’ is the result of ←<selector> on the object.

For example, class point defined ←term functor: point and ←term vector vector(x,y). Therefore the term has the form:

    point(`point←x', `point←y')

24.1.15 Manual — Support for the online reference manual

Send Method has source

Test if object may have associated sourc

Get Method man card class ⇒class

Manual card type

Get Method man creator ⇒name

Refinement of: object<-man creator Creator used by manual filte

Get Method man delegate header ⇒string

Description of delegation behavi

Get Method man header ⇒string

Refinement of: object<-man header New string with with term description

Get Method man module name ⇒unchecked

Refinement of: object<-man module name Manual module name for class

Get Method man name ⇒string

Refinement of: object<-man name Name for relation browse

Get Method man summary ⇒string

New string with header and summary

Variable source source location* (↔)

Location in the sources

24.1.16 Cache — Caching information (speed up)

Send Method bound get method name=name

Test if class defines get method ‘name’

Send Method bound send method name=name

Test if class defines send method ‘name’

Send Method clear cache

Clear method resolution cache

Variable convert method [get method]* (-)

Variable initialise method [send method] (-)

Variable lookup method [get method]* (-)

Direct pointers to these methods for two reasons:

• Get the system started while there are no chains or hash tables yet.

• Fast implementation of object creation and type conversion.

Send Method delete get method name=name

Delete a get-method

Send Method delete send method name=name

Delete a send-method

Variable get catch all [get method]* (-) Variable send catch all [send method]* (-)

These variables provide fast access to the methods ‘object ↔catch all’.

Variable get table hash table (←) Variable local table hash table (←) Variable send table hash table (←)

The -local table maps instance variable names onto instance variables and is used by ‘object ↔slot’. The -get table and -send table both map selectors onto implementations. The implementation is either a method or a variable. All these tables only contain the currently resolved methods: they are initially empty. Used and maintained by:

-local table ←instance variable
-get table ←get method
-send table ←send method

Variable has init functions bool (←)

@on if one or more variables use functions

Get Method lazy binding {send,get} ⇒bool @on if methods are bound lazy

Send Method lazy binding {send,get}, bool=bool Determines when messages are bound

Variable neighbour index alien:int (-)

Variable tree index alien:int (-)

Used for very fast implementation of ‘class →is a’ and ‘object →instance of’. After a modification on the class hierarchy (normally a class created), PCE numbers the class-hierarchy top-down and left-to-right.

The slot -tree index is assigned the current number when this class is first reached, while the slot -neighbour index is assigned the current number after numbering the subtree below this class. Now, a class A ‘is a’ B iff

    (A←tree_index) >= (B←tree_index)        AND
    (A←tree_index) <  (B←neighbour_index)

Variable proto alien:InstanceProto (-)

Prototype instance + info for fast creation

Variable resolve method message [code|c pointer]* (↔)

Hook for lazy attachment of methods

Variable resource table hash table* (←)

Hash table for all resources

24.1.17 Realise — Realising class definitions

Variable make class method code* (←)

Code object to →realise the class

Send Method realise

Realises a class (i.e. fills the class definition). Called by the kernel if details are requested for a class that has been registered using ‘@pce →define class’. See also ←realised.

Variable realised bool (←)

Bool indicating whether or not the class is fully built. A class that is not realised ←name, ←super class, ←sub classes, ←summary and -make class function are defined. All other slots have undefined values.

When information or instances of a non-realised class are requested, XPCE will invoke →realise on the class to build the class.

24.1.18 Version — Versions of XPCE, OS, X, ...

Get Method feature feature=name ⇒any Get value of given feature

Send Method feature feature=name, value=[any] Register class feature

Variable features sheet* (-)

Defined features on this class

Send Method has feature feature=name, value=[any] Test if class has feature

Variable rcs revision name* (←)

RCS revision of sourcefile

24.1.19 Internal — Private behaviour

This group mainly consists of C-function pointers to speed up some of the OMS and other timecritical operations. They may be converted into C-function names using ‘@pce ←c function name’. This facility is used by the ‘source’ facility of the online manual. Note the restrictions on ‘@pce ←c function name’

Variable boot alien:int (-)

#PCE slots when booting; 0 otherwise

Variable c declarations alien:classdecl* (-)

Description left by C-compiler

Variable changed function alien:SendFunc (-)

C-function activated if a slot of an instance is changed and ‘Object ↔inspect’ for this instance is @on.

Variable clone function alien:SendFunc (-)

C-function pointer. This function is responsible for cloning alien data associated with an instance.

Variable get function alien:GetFunc (-)

Execute function-objects

Variable in event area alien:SendFunc (-)

C-function pointer to validate whether an event should be regarded to have happened ‘inside’ a graphical object.

Variable load function alien:SendFunc (-)

C-function to reload alien data

Variable make class function alien:VoidFunc (-)

C-function that created the class

Variable redraw function alien:SendFunc (-)

C function to repaint graphicals

Variable save function alien:SendFunc (-)

C-function to save alien data

Variable send function alien:SendFunc (-)

Execute code-objects

Variable trace function alien:VoidFunc (-)

C-function to handle trace message

24.2 Class class stub — Autoload stub for a class

Inheritance: ⇒ class stub ⇒ program object ⇒ object

Class class stub is a super-class of class class that holds minimal information to support elementary functions of the XPCE online manual such as showing the hierarchy and finding classes from a search-specification.

Instances of class class stub are used to support lazy creation of XPCE classes.

Conversion of a class sub object into a real class is implemented by the ←realise method. This method is triggered by →catch all, ←catch all and the kernel if the kernel needs the class definition to make instances of the class or to create subclasses.

Instance Variables

type

sub classes  - chain*  Sub classes
super class  ← class stub*  Immediate super class

name

name ← name Name of the class

manual

creator  ← {built in,host,C++}  Who created the class
summary  ↔ string*  Summary documentation for class

Behaviour

24.2.1 Oms — Object management operations

Get Method convert name=name ⇒class stub Refinement of: object<-convert Together with →initialise and ←lookup this method supports the reuse of instances of class class stub. Instances of this class are recorded (just as normal classes) in the global object @classes.

Send Method initialise name=name, super=[class stub]*, summary=[string]* Refinement of: program object->initialise Create an instance of class class stub. Note that these instances are reusable (see also ←convert and ←lookup). The arguments provide the super-class (or class stub) and the summary documentation.

24.2.2 Type — Type definition, test and conversion

Get Method sub classes ⇒chain Variable sub classes chain* (-)

Chain of subclasses or @nil if there are no subclasses. The method ←sub classes causes failure instead of returning @nil.

Variable super class class stub* (←)

Immediate super-class. Only class object has ←super class @nil.

24.2.3 Delegate — Delegation of behaviour

Get Method catch all unchecked ... ⇒unchecked Send Method catch all unchecked ...

Forces conversion to the real class object and delegates the method to the returned class object.

24.2.4 Name — Naming objects

Variable name name (←)

Name of the class. The table @classes contains a mapping from the class-name to the class instance.

24.2.5 Behaviour — Definition of behaviour

Get Method lookup name=name, super=[class stub]*, summary=[string]*

⇒class stub Reuse predefined stub. Exploits @classes.

24.2.6 Manual — Support for the online reference manual

Variable creator {built in,host,C++} (←)

Who created the class

Get Method man id ⇒name Get Method man id ⇒name

Refinement of: object<-man id Card Id for object. ’class.<classname>’.

Get Method man indicator ⇒name

Refinement of: object<-man indicator Manual type indicator (‘C’)

Variable summary string* (↔)

Summary documentation for class

24.2.7 Autoload — Autoloading classes and methods

Get Method realise ⇒class

Method to create the actual class. The method at this level simply fails. Subclasses of this class should define a method here that creates an instance of class class with the same name and super-class.

24.3 Class behaviour — Methods, variables and attributes

Inheritance: ⇒ behaviour ⇒ program object ⇒ object

Behaviour is an super-class of class method and class variable, the classes than can define behaviour at the class level. Class behaviour itself has few properties, but sharing these simplifies and speeds up message passing.

The sub-classes class send method, class get method and class variable all define the methods →send and ←get which executes them in a send- or get operation. Sending a message to an object is thus realised using:

    send(Object, Selector, Arg ...) :-
        get(Object, send_method, Selector,
            tuple(Receiver, Behaviour)),
        send(Behaviour, send, Receiver, Args ...)

(Pseudo code; Prolog cannot handle Arg ...)

Instance Variables

name

name ← name Selector of this behaviour

whole

context  ← class|object*  Definition context of this method

Behaviour

24.3.1 Oms — Object management operations

Send Method initialise name=name, context=[class|object*] Send Method initialise name=name, context=[class|object*]

Refinement of: program object->initialise

Create from ←name and ←context

24.3.2 Name — Naming objects

Variable name name (←)

Selector of this behaviour. This is the name of the send- or get-behaviour handled by this method object.

24.3.3 Whole — Managing object

Variable context class|object* (←)

Definition context of this method. If the behaviour is associated with a class, this is always the class on which the behaviour was initially defined:

         ?- get(class(box), send_method, y, YMethod),
            get(YMethod, context, C).
         C = @graphical_class

See also ‘method ←inherited from’.

24.4 Class variable — Instance- or local-variable

Inheritance: ⇒ variable ⇒ behaviour ⇒ program object ⇒ object

A variable object describes of an instance-variable (slot, attribute) of an object. Variables are managed by classes and used (among other things) to access slots in objects.

A variable has a ←name, which must be unique for this class and all super-classes of this class. A variable has a ←type, which defines the type of value that can be stored in the corresponding slot. Finally, a variable defines ←access: the behaviour that is associated with it.

Instance Variables

oms

alloc value  ↔ alien:void *  Value used to when allocating
init function  ↔ any*  Function to initialise the variable

type

type ← type Type check

behaviour

access ← {none,send,get,both} Read/write access

manual

group  - [name]  Conceptual group of variable
summary  ↔ string*  Summary documentation

storage

offset  ← int  Offset in instance structure

Behaviour

24.4.1 Oms — Object management operations

Get Method alloc value ⇒any|function Initial value when instantiated

Send Method alloc value any|function Value after allocation when instantiated

Variable alloc value alien:void * (↔)

Value used to when allocating

Variable init function any* (↔) Send Method init function any*

Function to initialise the variable

Send Method initial value any|function

Initial value for this variable

Send Method initialise name=name, type=[type], access=[{none,send,get,both}],

summary=[string]*, group=[name], initial value=[any|function]

Send Method initialise name=name, type=[type], access=[{none,send,get,both}],

summary=[string]*, group=[name], initial value=[any|function] Refinement of: behaviour->initialise Initialise an variable. A variable object normally represents an instance variable of a class (see ‘class →instance variable’. The arguments are:

• name (←name)

Name of the instance variable. Instance variable names are local to a class (though instance variables of super-classes are inherited.

• type (←type)

The type of object that may be used to fill the instance variable (see ‘object ↔slot’).

• access (←access)

Defines implicit side-effect free methods associated with this variable. See →access.

• summary (←summary) Summary string used by the online documentation

• group (←group)

Name of the functional group this variable belongs too.

24.4.2 Type — Type definition, test and conversion

Variable type type (←) Send Method type type=type

Type of object that should be used to fill the instance variable. Checked when an attempt is made to write the variable. The method ‘object → check’ may be used to validate the object base. Part of its job is checking the consistency of the values of instance variables.

See also →send, ‘type ←check’ and ‘type ←convert’.

24.4.3 Copy — Copying instances

Get Method clone style ⇒name

Send Method clone style {recursive,reference,reference chain,value,alien,nil} Describes the semantics with respect to cloning instance (‘object ←clone’) of the instance-variable relation:

• recursive When cloning recursively, proceed by cloning the value of this variable recursively too (unless overruled by ‘class ←clone style’ of the value in the slot).

• reference Copy the object reference (e.i. do not clone the value of the slot). If however, the value is cloned as an other part of the cloning process, make the new field point to the copy.

• reference chain The variable contains a chain with references to other objects. In the clone, a new chain will be installed, holding all cloned objects. Used by ‘text buffer ←editors’.

• value Just copy the value.

• alien The slot contains alien data. 32 bits copy is made for it without interpreting the data. Many classes define ‘class -clone function’ for properly cloning alien data.

• nil Replace the value in the copy with @nil. If the value gets cloned as an other part of the cloning process, make the new field point to the copy. This style is used by ‘graphical ←device’. If a graphical is cloned it will be disconnected from it’s device. If a device is cloned however, all graphicals part of it will be cloned and displayed on the clone.

24.4.4 Behaviour — Definition of behaviour

Variable access {none,send,get,both} (←)

The ←access attribute of a variable defines the side-effect-free methods that are associated:

none No methods, only access via ‘object ↔slot’
get Get access, only write through ‘object →slot’
send Send access, only read through ‘object ←slot’
both Both read and write access

If a variable requires side-effects for writing (the most common case), it should be declared with ←access: read and a send method with the same name should be defined on the class. This method may write the variable using ‘object →slot’.

24.4.5 Meta — Analysing behaviour and objects

Get Method argument type index=[int] ⇒type Type of the nth (1-based) argument. If index is 1, returns ←type, otherwise fails. For compatibility to ‘method ←argument type’.

Send Method get access Send Method send access

Test if the variable has the indicated access. Exploits ←access.

Get Method return type ⇒type

Return type if ←access includes ‘get’

24.4.6 Execute — Execution of dialog objects

Get Method get receiver=object, unchecked ... ⇒unchecked Get Method get receiver=object, unchecked ... ⇒unchecked Send Method send receiver=object, value=unchecked ... Send Method send receiver=object, value=unchecked ...

Execute the variable as a behaviour. ←get requires the argument vector to be empty, →send requires it to have exactly one element. →send ‘type ←check’es the argument.

See also class behaviour, ‘object ←get method’ and ‘object ←send method’.

24.4.7 File — Saving and loading files, file operations

Get Method save style ⇒{normal,nil} Save style for this slot. This value is used by ‘object →save in file’ to determine whether or not the value of this slot should be saved in the file. The default value is ‘normal’, which implies the value is saved depending on ‘class ←save style’. If this attribute is ‘nil’, the value is saved as if the slot contains the value @nil.

Send Method save style {normal,nil} Defines how the value of this instance variable is saved by ‘object →save in file’:

normal Save the value according to ‘class ←save style’
nil  Save the value as if it was @nil

See also ‘class ←save style’, ‘object →save in file’ and ‘file ←object’.

24.4.8 Textual — Textual representation

Get Method print name ⇒name

Refinement of: object<-print name Returns a name object of the form <class> <access><selector>. For example:

    point ↔x

24.4.9 Manual — Support for the online reference manual

Get Method access arrow ⇒{-,←,→,↔} Get Method access arrow ⇒{-,←,→,↔}

Arrow indicating access-rights

Get Method context name ⇒name

Name of context class

Get Method group ⇒name Get Method group ⇒name

Variable group [name] (-)

Refinement of: object<-group Conceptual group of variable. Used by the online manual and to structure the reference manual.

Send Method has source

Test if object may have associated sourc

Get Method man card class ⇒class

Manual card type

Get Method man creator ⇒name

Refinement of: object<-man creator ←creator of the ←conte

Get Method man header ⇒string

Refinement of: object<-man header Header for card view

Get Method man id ⇒name Get Method man id ⇒name

Refinement of: object<-man id Card Id for variable

Get Method man indicator ⇒name

Refinement of: object<-man indicator Manual type indicator (‘V’)

Get Method man inherit object name=name ⇒resource Refinement of: object<-man inherit object Lookup default in resour

Get Method man module name ⇒unchecked

Refinement of: object<-man module name Manual module name for varia

Get Method man name ⇒string

Refinement of: object<-man name Name for relation browse

Get Method man summary ⇒string

New string with summary

Get Method source ⇒unchecked Find source (same as related cla

Variable summary string* (↔)

Summary documentation. Used by the reference manual (online and paper).

24.4.10 Storage — Definition of storage details

Variable offset int (←)

Offset in instance structure. See also ‘slot ←object’ and ‘class ←instance variables’.

24.5 Class delegate variable — Instance-variable for delegation

Inheritance: ⇒ delegate variable ⇒ variable ⇒ behaviour ⇒ program object ⇒ object

A delegate variable object is similar to a variable. It may be used to take care of side-effects together with delegation.

When it is used as a delegate (see ‘class →delegate’) and ←wrapper is not @nil, the PCE message passing system will invoke the method named in ←wrapper.

The following (Prolog) example illustrates this:

    :- pce_begin_class(demo, device).
    delegate(attributes, sheet, get, delegate, "Attributes").
    delegate(D, Impl:object, Sheet:sheet, Args:any ...) :→
        send(Impl, send, Sheet, Args),
        send(D, update).
    :- pce_end_class.

Instance Variables

change

wrapper  ↔ name*  Wrapper to take care of side-effects

Behaviour

24.5.1 Oms — Object management operations

Send Method initialise name=name, type=[type], access=[{none,send,get,both}], wrapper=name, summary=[string]*, group=[name]*, initial value=[any|function]

Send Method initialise name=name, type=[type], access=[{none,send,get,both}], wrapper=name, summary=[string]*, group=[name]*, initial value=[any|function] Refinement of: variable->initialise As ‘variable →initialise’. The argument ‘wrapper’ defines the name of a method dealing with side-effects. See ←wrapper.

24.5.2 Change — Trapping object modifications

Variable wrapper name* (↔)

Name of a method which will be invoked to delegate a message. This method will be invoked with the following arguments:

@arg1  Implementation on the ‘part’
@arg2  The Part
@arg3 ... The original arguments to the message

The ‘part’ is the (slot-) value that will handle the delegation. The method named by ←wrapper will normally invoke the implementation using ‘send method →send’ or ‘get method ←get’ as part of its realisation.

24.6 Class method — Mapping from selector to implementation

Inheritance: ⇒ method ⇒ behaviour ⇒ program object ⇒ object

Methods are used by the PCE message passing algorithm to map the combination of an object/class, the type of the message (‘send’ or ‘get’) and the selector of message onto executable code.

Additionally, methods define the expected argument types and the argument names of the operation. The PCE message passing algorithm uses this information to verify and if necessary and possible convert the types of the arguments presented,

The implementation of a method is either a C-function pointer (used for system-defined methods), or a PCE code object (used for user-defined methods). While executing the latter, the following arguments are forwarded:

@receiver  Receiver of the message
@arg1 ... arg<n> Arguments to the message

See also class behaviour, ‘send method →send’, ‘get method ←get’, ‘class →send method’, ‘class →get method’, ‘object →send method’ and ‘object ←get method’.

Instance Variables

type

types ← vector Argument type specification

implementation

function  - alien:Func  If implemented in C: function pointer
message  ↔ code|c pointer*  If implemented in PCE: the code object

manual

group  - [name]  Conceptual group of method
source  ↔ source location*  Location of definition in the sources
summary  - [string]*  Summary documentation

Behaviour

24.6.1 Oms — Object management operations

Send Method initialise name=name, types=[vector], implementation=code|c pointer, summary=[string]*, source=[source location]*, group=[name]*

Send Method initialise name=name, types=[vector], implementation=code|c pointer, summary=[string]*, source=[source location]*, group=[name]*

Refinement of: behaviour->initialise

Create a new method object. Methods come in two flavours: send method objects for ‘procedures’ and get method objects for ‘functions’.

Method objects may be associated to a class or to an individual object using the methods ‘class →send method’, ‘class →get method’, ‘object →send method’ or ‘object →get method’.

The arguments to →initialise are:

←name  Name of the ‘selector’ to handle
←types  Vector of type objects for arguments
implementation ←message implementing the method

←summary  Online manual summary description
←source  Source-file location of the definition
←group  Functional group of the method

Messages to classes are normally associated using the class definition interface implemented by pce begin class/[2,3], pce end class/0 and various macros defined by these predicates.

The example below defines a move gesture object that is only active if the window in which the graphical to be moved defines an attribute (get method) ←mode that yields the value ‘edit’.

    ...,
    new(G, move_gesture),
    send(G, send_method,
         send_method(verify, vector(event),
                     @arg1?window?mode == edit)),
    ...

The alternative would be to define a new class for move gestures that only operate in windows that are editabe:

    :- pce_begin_class(move_if_editable_gesture,
                       move_gesture).
    verify(_G, Ev:event) :→
        "Test if the window is editable"::
        get(Ev?window, mode, edit).
    :- pce_end_class.

24.6.2 Type — Type definition, test and conversion

Variable types vector (←) Send Method types [vector]

The ‘Method ←types’ slot describes the type-checking performed when the method is invoked. it is a vector of type objects. The elements of the vector denote the argument types for the corresponding argument positions. When a C-function is invoked the arguments are the receiver, followed by the arguments that activated the method. When a code object is invoked, @receiver is bound to the receiver, @arg1 is bound to the first argument, @arg2 to the second, etc.

See also class type and ‘send method →send’.

24.6.3 Implementation — Implementation of behaviour

Variable function alien:Func (-)

When implemented in the C-language, this slot contains a pointer to the implementing C-function. When implemented with a code object, the value of this slot is NULL.

Variable message code|c pointer* (↔)

Implementation of the method object. This slot cooperates with the -function variable:

• @nil In this case the -function is a pointer to a C-function implementing the method. This function will be passed the receiver and the arguments of the method. If the last type of the method denotes multiple arguments (...), the C-function will be passed an integer for the number of arguments and a pointer to an array of objects for the actual arguments. Internal use only.

• c pointer object The value of the c pointer object is a handle provided by the host language that normally refers to a procedure in the host language. See also pce predicate reference/2.

• A code object If the method is a get method object, this must be a function object. If the method is executed, @receiver points to the receiver of the message and @arg1, ... point to the arguments provided to the message. See also →initialise.

24.6.4 Meta — Analysing behaviour and objects

Get Method argument count ⇒int

Minimum number of arguments required

Get Method argument type int=int ⇒type

Get type for nth-1 argument

Get Method inherited from ⇒method Get Method inherited from ⇒method

If method is a method of a class, this method will return a method of the same type (send method or get method) of a super-class with the same selector.

This method may be regarded as a redefinition (usually refinement) of the returned method. Used by the reference manual to generate the ‘Refinement of:’ lines.

24.6.5 Textual — Textual representation

Get Method print name ⇒name

Refinement of: object<-print name Textual representation of the method of the form:

<class> <access><selector>

See also ‘variable ←print name’.

24.6.6 Debugging — Debugging PCE programs

Send Method print trace message port={enter,exit,fail}*, receiver=unchecked,

arguments=vector Called from the pce tracer to print ‘passing a port’ for the execution of this method.

See also ‘program object →trace’ and ‘@pce →trace’.

24.6.7 Template — Template support methods

Get Method instantiate template ⇒method

Instantiate a method for use class template/1

24.6.8 Manual — Support for the online reference manual

Get Method access arrow ⇒{←,→}

Arrow indicating send- or get-access

Get Method group ⇒name Get Method group ⇒name

Variable group [name] (-)

Refinement of: object<-group Conceptual group of the method. Used for structuring the reference manual. If the variable is @default, ←group will

1. check for an instance variable of the same name

2. check for a ←inherited from method.

and return the first non @default value encountered.

Send Method has source

Test if object may have associated sourc

Get Method man card class ⇒class

Manual card type

Get Method man creator ⇒name

Refinement of: object<-man creator ←creator of the ←conte

Send Method man documented

Refinement of: object->man documented Look for inherited t

Get Method man id ⇒name Get Method man id ⇒name

Refinement of: object<-man id Card Id for method

Get Method man indicator ⇒name

Refinement of: object<-man indicator Manual type indicator (‘M’)

Get Method man module name ⇒unchecked

Refinement of: object<-man module name Manual module name for metho

Get Method man summary ⇒string

New string with documentation summary

Variable source source location* (↔)

Sourcefile and linenumber where this method is defined. The Prolog defined class compiler fills this argument.

The source editor of this manual uses it to find the sources. This editor uses the TAGS file in the PCE source directory to find the sources of PCE’s built-in methods.

Send Method spy

Set spy-point on Prolog predicate for method

Get Method summary ⇒string Get Method summary ⇒string

Variable summary [string]* (-)

Summary description of the method. It should be a string of about 45 characters maximum width describing the function implemented by the method.

The summary attribute is used by the summary lists of methods, etc. displayed by these manual tools. It is defined for all built-in methods and may be defined in the body of a Prolog defined method.

If the slot contains @default, and the ←context is a class object, the method will extract the summary from a variable with the same name or a method on a super-class with the same name (in this order).

24.7 Class send method — Manipulation method

Inheritance: ⇒ send method ⇒ method ⇒ behaviour ⇒ program object ⇒ object

A send method object defines the mapping from a selector to an implementation for the ‘send’ virtual machine operation. Send method objects may be found using ‘object ←send method’ and executed using →send.

See also class method and class behaviour.

Instance Variables

Behaviour

24.7.1 Execute — Execution of dialog objects

Send Method send receiver=object, argument=unchecked ... Send Method send receiver=object, argument=unchecked ...

Invoke a send-method on receiver. The remaining arguments provide the method arguments. They will be bound to the format arguments of the method according to the following rules:

1. Assign all unbound (e.g. no instances of class :=) by position.

2. If the last argument allows for multiple values, pack all remaining unbound arguments is a code vector object and pass assign them to this last formal argument.

3. If there are bound arguments, process them left-to-right, assigning them to there corresponding named format argument. If the named formal argument allows for multiple values, append the value of the binding to the vector of values. If the last argument allows for multiple values and there are remaining unbound arguments append them to the vector of values.

4. Assign all unassigned arguments to @default.

Finally all arguments are type-checked (see ‘type→validate’ and ‘type←translate’. Examples:

• Type vector: x=[int], y=[int], width=[int], height=[int]

             send(<Obj>, <selector>, 1, 2, 3)  -→
                 x = 1, y = 2, width = 3, height = @default
             send(<Obj>, <selector>, 1, height := 4) -→
                 x = 1, y = width = @default, height = 4

• Type vector: name=name, options=:= ...

             send(<Obj>, <selector>, foo,
                  size := size(4, 6),
                  font := font(helvetica, bold, 14)) -→
                 name = foo,
                 options = code_vector(size := size(4, 6),
                 font = font(helvetica,bold,14))

        send(<Obj>, <selector>,
             format := center, name = foo) -→
            name = foo,
            options = code_vector(format := center)

The second example illustrates how named arguments may be used in combination with multiple valued arguments to achieve Lisp-like keyword arguments.

24.7.2 Manual — Support for the online reference manual

Get Method man header ⇒string

Refinement of: object<-man header Header for card brow

Get Method man inherit object name=name ⇒variable|method|resource Refinement of: object<-man inherit object Inherit from variable if not availab

Get Method man name ⇒unchecked Refinement of: object<-man name Name for relation browse

24.8 Class get method — Query status method

Inheritance: ⇒ get method ⇒ method ⇒ behaviour ⇒ program object ⇒ object

A get method object defines the mapping from a selector to an implementation for the ‘get’ virtual machine operation. For details see class method and class behaviour.

Instance Variables

type

return type  ← type  Type of value returned

Behaviour

24.8.1 Oms — Object management operations

Send Method initialise name=name, return=[type], types=[vector], implementation=function|c pointer, summary=[string]*, source=[source location]*, group=[name]*

Send Method initialise name=name, return=[type], types=[vector], implementation=function|c pointer, summary=[string]*, source=[source location]*, group=[name]*

Refinement of: method->initialise The →initialise of a get method takes one additional argument with respect to ‘method →initialise’: the return type. If the actually returned value does not satisfy this type, type conversion is attempted. If the conversion succeeds, the error converted return value is raised and the converted value is returned. If the conversion is not successful, the error bad return value is raised and the method fails.

24.8.2 Type — Type definition, test and conversion

Variable return type type (←)

Describes the type of the value returned by this method. It is first of all intended for documentation and consistency checking purposes.

24.8.3 Execute — Execution of dialog objects

Get Method get receiver=object, argument=unchecked ... ⇒unchecked Get Method get receiver=object, argument=unchecked ... ⇒unchecked

Invoke get-behaviour on object. Similar to ‘send method →send’. After the implementation returns a result, this result is passed to the ←return type for validation.

24.8.4 Manual — Support for the online reference manual

Get Method man header ⇒string

Refinement of: object<-man header Header for card brow

Get Method man inherit object name=name ⇒variable|method Refinement of: object<-man inherit object Inherit from variable if not availab Get Method man name ⇒unchecked

Refinement of: object<-man name Name for relation browse

24.9 Class source location — Position in a sourcefile

Inheritance: ⇒ source location ⇒ object

A ‘source location’ denotes a location in a sourcefile. They are created by the compiler and used by this manual tool to find the sources for classes and methods.

If possible, the filename must be absolute, so the sources can be found regardless of the current directory.

A value @nil for the line no implies the line number is not known. The Prolog defined class compiler uses the predicate source location/2 to find out about the location from which the last term presented to term expansion/2 was read. The line-numbers for system defined classes are determined via the EMACS tag-file TAGS in the PCE source directory.

Instance Variables

location

file name  ↔ name  Name of the file in which the source resides
line no  ↔ int*  Starting line number of the source

Behaviour

24.9.1 Oms — Object management operations

Get Method convert char array|file ⇒source location Refinement of: object<-convert Convert ‘file’, ‘path-name’ and ‘path-name:line-no’

Send Method initialise file=name, line=[int]* Send Method initialise file=name, line=[int]*

Refinement of: object->initialise Create from file name and line no

24.9.2 Copy — Copying instances

Send Method copy source location=source location Copy file name and line no from argument

24.9.3 Path — File/directory path

Get Method path ⇒name

Used for the PCE sources itself. If ←file name is absolute, returns this value. Otherwise prepend ‘pce ←home’/src/.

24.9.4 Location — Locating points

Variable file name name (↔)

Name of the file in which the source resides

Variable line no int* (↔)

Starting line number of the source 634 Class source location XPCE Reference Manual

Chapter 25

Language Definition

This chapter describes the classes that will be used in the future to support te definition of parsers.

On the basis of these classes, future versions of PCE will define a syntax to create objects and send messages. If one is able to create objects and send messages, it is possible to program PCE by creating classes, methods, etc. The definition of such a language makes it possible to define library modules that are independant of the host language PCE is connected to. It also makes it possible not to connect PCE to any host language.

Overview:

syntax table Basic properties of characters
tokeniser  Tokenisation (programmable)
operator  Prolog-like operator declarations
parser  Parser building blocks

The current version of this manual only describes class syntax table as this class is also used by the classes regex and text buffer to realise syntax directed editors (see PceEmacs). The other classes are considered too immature for printing their documentation.

25.1 Class syntax table — Table of character types

Inheritance: ⇒ syntax table ⇒ object

Class syntax table describes syntactical properties of (programming) languages. It is used by class editor and class text buffer to realise syntax driven editors. Class tokeniser used syntax tables to determine tokens and skip comment.

Syntax-tables are named reusable objects (like -for example- colours or fonts). The default syntax table is named ‘default’.

The code below defines a syntax table for PCE/Prolog programs:

    ?- new(X, syntax_table(prolog)),
       send(X, syntax, '"',  string_quote, '"'),
       send(X, syntax, '''', string_quote, ''''),
       send(X, syntax, @,    symbol),
       send(X, syntax,     '%',  comment_start),
       send(X, add_syntax, '\n', comment_end),
       send(X, add_syntax, '/',  comment_start, '*'),
       send(X, add_syntax, '*',  comment_end, '/').

After this definition, the following call associates this syntax table to an editor (view):

    ?- new(X, view),
       send(X, syntax, prolog).

Instance Variables

name

name ← name* Name of this syntax table

syntax

paragraph end  ↔ regex  Regular expression for end of paragraph
sentence end  ↔ regex  Regular expression for end of sentence

storage

context  - alien:char *  Context information
size  ← int  Size of the table
table  - alien:ushort *  Type-flags

Behaviour

25.1.1 Oms — Object management operations

Send Method initialise name=[name]*, prototype=[syntax table] Refinement of: object->initialise Create a named or anonymous (name = @nil) syntax table. Named syntax tables are registered in @syntax tables for later reuse. If a syntax table is specified its contents is copied in the new table.

Anonymous tables are not stored in @syntax tables.

Get Method lookup name=name ⇒syntax table Performs a lookup in @syntax tables.

Send Method unlink

Refinement of: object->unlink Free alien tables

25.1.2 Conversion — Conversion (for type checking)

Get Method convert name=name ⇒syntax table Refinement of: object<-convert First performs a lookup in @syntax tables. When successful, this table is returned. Otherwise it returns a new (default) table. See also →initialise.

25.1.3 Copy — Copying instances

Send Method copy syntax table=syntax table Copy the contents of the argument syntax table. See also →initialise.

25.1.4 Name — Naming objects

Variable name name* (←)

Name of the syntax table. Each table has a unique name. The global hash table object @syntax tables maps table names into tables. See also ←lookup and ←convert.

25.1.5 Test — Test object properties

Send Method has syntax character=char, category=syntax name Test that character has syntax ‘syntax name’.

25.1.6 Syntax — Defining a syntax (editor, parser)

Send Method add syntax character=char, category=syntax name, context=[char] Performs a bitwise ‘or’ on the table entry, placing the character in multiple categories. If a context is specified it replaces the defined context. See also →syntax.^{1}

Get Method comment end [1..2] ⇒name

Return 1 or 2 character long comment end sequence as a name. With the argument omitted, the 1 character long comment end sequence is returned.

Get Method comment start [1..2] ⇒name

Return 1 or 2 character long comment start sequence as a name. With the argument omitted, the 1 character long comment start sequence is returned.

Get Method context character=char ⇒char Some syntactical categories have a context character associated (see →syntax). The context characters are stored in this C-array.

1 A character may be in any number of syntactical categories but only has one context character defined.

Send Method context character=char, context=char Set the context character for the specified (1st) character. Normally the context is specified along with the syntax category using →syntax or →add syntax.

Variable paragraph end regex (↔)

Regular expression (regex object) that describes the end of a paragraph.

Variable sentence end regex (↔)

Regular expression (regex object) that describes the end of a sentence. Used by ‘text buffer ←scan’, ‘editor →forward sentence’ ‘editor →backward sentence’ and ‘editor →fill’.

Get Method syntax character=char ⇒name|chain Return the syntactical category of the character. If the character is in multiple categories a chain with category names is returned. See also ←context.

Send Method syntax character=char, category=syntax name, context=[char] Modify entry for specified character. See ‘type ←kind’ for a description on type char. Type syntax name is a ‘name of’ type that allows for the following syntactical categories.

Category            Context Default table
=========================================
uppercase_letter    --      A-Z
lowercase_letter    --      a-z
digit               --      0-9
word_separator      --      _
symbol              --
open_bracket        close   ([{
close_bracket       open    }])
end_of_line         --      \C-j
white_space         --      \C-a - \C-i, \C-k - SPC, DEL - M-DEL
string_quote        escape  "'
punctuation         --      !#$%&*+,-./:;<=>?\^|~
end_of_string       --      \C-@
comment_start       end
comment_end         start
letter              --      uppercase_letter|lowercase_letter
word                --      letter|digit|word_separator|symbol
layout              --      end_of_line|white_space

Notes:

• string quote Context is the character to escape the quote in a string. For most languages this is ’\’ (backslash), for Prolog this is the quote itself.

• comment start, comment end If there is no context this specifies a single-character comment. Otherwise the the context is the second character of the comment start/end sequence. More than 2 character comment delimiters are not supported.

→syntax makes the table forget anything defined for this character. →add syntax may be used to specify a character into multiple syntactical categories.

25.1.7 Storage — Definition of storage details

Variable context alien:char * (-)

Context information

Variable size int (←)

Size of the table. Currently XPCE uses 8-bit characters and this value is thus fixed to 256.

Variable table alien:ushort * (-)

Vector of bitmasks. Used by →syntax, →has syntax, etc. See also ←context.

640 Class syntax table XPCE Reference Manual

Chapter 26 Errors and Debugging

26.1 Class error — Description of some (internal) problem

Inheritance: ⇒ error ⇒ object

An error object represents describes how an error, warning or message with specified error-id is handled. When an error is detected PCE will invoke ‘object →error’ on the associated object, which is normally the receiver of the currently executing method.

An error object defines a ←feedback which determines whether the error is reported in a format suitable for the PCE programmer in the host-language window or in a format suitable for the application user using the general ‘object →report’ mechanism.

An error object defiles a ←kind that determines the nature and how serious the error is considered.

The PCE online manual has an entry ‘Errors’ in the ‘Browsers’ menu that allows the user to examine the available (reusable) error objects.

Instance Variables

name

id ← name Unique identifier

report

feedback  ← {report,print}  Where (how) the report is reported
format  ← string  Format used to print the message

kind ↔ {status,inform,warning,error,

fatal,ignored}

Kind of message

Behaviour

26.1.1 Oms — Object management operations

Get Method convert name=name ⇒error Get Method convert name=name ⇒error

Refinement of: object<-convert

Convert an error-id into an error object. It uses the hash table @errors for this purpose.

Send Method initialise name=name, format=string,

kind=[{status,inform,warning,error,fatal,ignored}], feedback=[{report,print}]

Send Method initialise name=name, format=string,

kind=[{status,inform,warning,error,fatal,ignored}], feedback=[{report,print}] Refinement of: object->initialise Create an error from its ←id, ←format, ←kind and ←feedback. The default ‘kind’ is warning and the default ‘feedback’ is report. The error object is locked against the garbage collector and a mapping from its ←id is added to the @errors database.

The following provides a (schematic example).

         :- new(_, error(key_clash,
                         '%N: Key %s is already in use')).
         :- pce_begin_class(database, hash_table).

    add(DB, Record:record) :→
        "Add record to the database"::
        get(Record, key, Key),
        (   get(DB, member, Key, _)
        → send(DB, error, key_clash, Key),
            fail
        ;   send(DB, append, Key, Record)
        ).
    :- pce_end_class.

See also ‘object →report’.

Get Method lookup name=name ⇒error Get Method lookup name=name ⇒error

Performs a ←lookup in the @errors database to ensure the uniqueness of the error identifiers.

26.1.2 Name — Naming objects

Variable id name (←)

Unique identifier of the error. The hash table @errors maps error identifiers to error objects. See also ←convert and ←lookup.

26.1.3 Report — Reporting events, status and errors

Send Method display any|function ...

Present the error to the user or programmer. This method may be redefined to present the error in a different way. The default implementation performs the following actions:

• if ←feedback equals ‘report’ Invoke ‘object →report’ using ←kind, ←format and the arguments passed. This message is sent to the object that generated the error using ‘object →error’.

• if ←feedback equals ‘print’ Use ’@pce →format’ to print the message. If ←kind is ‘error’, start the PCE tracer.

Variable feedback {report,print} (←)

Determines how the error is reported (provided it is reported; see ‘error ←kind’). Its values are:

• report Invokes ‘object →report’ to report the error. See also ‘visual →report’.

• print Prints the error in the window from which xpce was started.

Variable format string (←)

Format string used to print the message. Used by →display. See ‘string →format’ for a description of the format arguments. The first argument formatted is always the ‘generator’ of the error (the object receiving ‘object →error’). The remaining arguments are the context arguments from ‘object →error’.

Variable kind {status,inform,warning,error,fatal,ignored} (↔)

Describes how ‘serious’ the error is. The error categories are related to the report categories defined by ‘object →report’ (see ‘visual →report’), except for ‘fatal’ and ‘ignored’.

The values are:

• status Provide status information that may be ignored by the user.

• inform Provide status information that may not be ignored by the user.

• warning Report a problem that may be ignored by the user.

• error Report a problem that may not be ignored by the user.

• fatal A message is printed and the stacks are dumped. After this, PCE attempts to return to the host (Prolog, Lisp) toplevel.

• ignored The invoked action fails silently.

26.1.4 Manual — Support for the online reference manual

Get Method man card class ⇒class

Manual card type

Get Method man creator ⇒name

Refinement of: object<-man creator For now, always returns built in

Get Method man id ⇒name

Refinement of: object<-man id Identifier of object

Get Method man module name ⇒name

Refinement of: object<-man module name Manual module name for metho

Get Method man name ⇒name

Refinement of: object<-man name Name for relation browse

Get Method man summary ⇒string

Summary stri

Get Method name ⇒name Get Method summary ⇒string

26.2 Class program object — Object of PCE’s program world

Inheritance: ⇒ program object ⇒ object

Class program object is the super-class of all classes that form PCE’s "program world": classes, methods, variables, types and executable objects representing statements (class code).

This class defines the tracing capabilities of PCE using the methods:

• →trace Set a (conditional) trace-point on this object. Entry and exit to this executable object will be printed.

• →break Set a (conditional) break-point on this object. The interactive tracer will be trapped when the object is executed.

Instance Variables

debugging

dflags  ↔ int  Debugging-flags of the program object

Behaviour

26.2.1 Oms — Object management operations

Send Method initialise Send Method initialise

Refinement of: object->initialise Initialises -dflags to represent →trace: @default and →break: @default (i.e. inherit the value). If the program object is created by a goal running in system mode, the ←system flag is set to @on.

26.2.2 Meta — Analysing behaviour and objects

Get Method system ⇒bool

Send Method system bool=bool When @on, the execution of the object is performed in ‘system-mode’, which implies that trace- and break-points reached during the execution will only be printed if ‘@pce ←trace’ equals ‘always’.

26.2.3 Debugging — Debugging PCE programs

Get Method break port=[{enter,exit,fail}] ⇒bool Send Method break value=[bool], ports=[{full,enter,exit,fail}], condition=[code] Send Method break value=[bool], ports=[{full,enter,exit,fail}], condition=[code]

A break-point is similar to a trace-point (see →trace). After printing the entry or completion of the execution of an object it prompts the user how to continue.

At this prompt, the user may examine various stacks, set new trace or break-points, etc.

Get Method break condition ⇒code

Associated break-condition

Send Method break condition code* Send Method break condition code*

Condition associated with this break-point

Variable dflags int (↔)

The various debugging options are represented by an inclusive or of bit-masks. The only legal user operation on these flags is:

get(ProgramObject, dflags, Flags),
<various trace/break operations>
send(ProgramObject, dflags, Flags).

Get Method trace port=[{enter,exit,fail}] ⇒bool Send Method trace value=[bool], ports=[{full,enter,exit,fail}], condition=[code] Send Method trace value=[bool], ports=[{full,enter,exit,fail}], condition=[code]

Set/clear a trace-point on the indicated object. If an object that has a trace-point set is executed a message will be printed on entry and/or exit.

The arguments are:

• on/off/inherit

if @on, a trace-point is set on this object.  If @off, this
object is not traced.  If @default, the value if the trace
point is inherited.  For normal objects the trace-flags will be
inherited from the class.  For classes it will be inherited from
the super-class.

• port(s)

The following ports or combinations of ports are defined:

full Trace all ports (enter, exit and fail)
enter Only trace entry
exit Only trace successful completion
fail Only trace completion with failure

• Condition When present, this code object will be executed if the other conditions are met. If this code object returns success the trace-point will be printed. The arguments are:

@receiver Receiver of the action
@selector Selector of the action
@arg1 ... The arguments.

The query below will trace all message passing as the virtual machine instructions @vmi new, @vmi send, @vmi get and @vmi free are instances of class vmi

?- send(class(vmi), trace, @on).

The query below prints all send-operation in user-mode that fail:

?- send(@vmi_send, trace, @on, fail).

The query below prints the send-operations →event on any object if the current event is a mouse-left-down event. This is very useful to debug parsing of a left-down event.

    ?- send(@vmi_send, trace, @on, full,
            and(selector == event,
                @event?id == ms_left_down)).

Get Method trace condition ⇒code

Associated trace-condition

Send Method trace condition code* Send Method trace condition code*

Condition associated with this trace-point

26.2.4 Compatibility — Methods for backward compatibility

Send Method initialise new slot variable=variable Send Method initialise new slot variable=variable

Refinement of: object->initialise new slot Initialises -dflags when loading program objects created before the introduction of this class. See ‘file ←object’.

26.3 Class vmi — Virtual machine instruction

Inheritance: ⇒ vmi ⇒ program object ⇒ object

Class vmi has 4 instances: @vmi new, @vmi send, @vmi get and @vmi free, which represent the 4 basic instructions of PCE’s virtual machine.

These instructions are represented by true objects to facilitate the PCE tracer. See ‘program object →trace’ and ‘@pce →trace’. Example:

    ?- send(@vmi_send, trace, @on).

Instructs the PCE tracer to print all send-operations executed in user mode.

Instance Variables

name

name  ← name  Name of the vmi

Behaviour

26.3.1 Oms — Object management operations

Send Method initialise name=name Send Method initialise name=name

Refinement of: program object->initialise Create named vmi

26.3.2 Name — Naming objects

Variable name name (←)

Name of the vmi

26.3.3 Stack — Stacking order (object, goals)

Send Method parent goal receiver=unchecked, selector=name Test if operation is on goal-stack

Chapter 27

Predefined Global Objects

Var @arg1

The var objects (function objects) @arg1 ... @arg10 are used to pass context arguments when code objects are executed using ‘code →forward’. The example below shows this mechanism:

    ?- new(@m, and(message(@prolog, write, @arg1),
                   message(@prolog, nl))).
    ?- send(@m, forward, hello).
    hello

They are also used to describe the arguments to user-defined method objects.

See also @receiver, @event, class var, class function, class method and ‘send method →send’.

Var @arg10 Var @arg2 Var @arg3 Var @arg4 Var @arg5 Var @arg6 Var @arg7 Var @arg8 Var @arg9 Bool @on Vmi @vmi get Vmi @vmi send

Image @black image

Predefined images of ‘image ←kind: bitmap’ of 16x16 pixels. These bitmaps are frequently used to fill graphicals. See ‘graphical →fill pattern’.

Var @class

PCE var object that points to the currently compiling class. Pushed/popped by pce begin class/3 and pce end class/0.

Intended for directives on the class that are not converted by the Prolog preprocessor. For example:

    :- pce_begin_class(myclass, object).
    :- send(@class, save_style, external).

...

    :- pce_end_class.

See also pce compiling/1.

HashTable @classes

The hash table object @classes maps class-names into class objects. Application programs that wish to map a class-name into a class object better use ‘@pce ←convert’:

    get(@pce, convert, point, class, X).
    X = @point_class

Using ‘@pce ←convert’ will generate an exception if the class does not exist. See also the Prolog predicate pce autoload/2.

> @colour display

Predefined executable code object that succeeds if the attached default display @display is a colour display. Defined as:

    new(@colour_display, @display?depth > 1).

Commonly used for conditional resource specifications:

    Pce.TextCursor.colour: when(@colour_display, red, black)

See also ‘@display ←visual type’, ‘@display ←depth’.

HashTable @colours

A hash table object mapping colour names into colour objects. This table only holds actually used colours. A list of predefined colour names is normally available from the file

    /usr/lib/X11/rgb.txt

The exact location of this file may be different on your X11 installation.

Sheet @cursor names

The global and predefined sheet @cursor names maps the names of the X-cursors onto the entry-id in the X-cursor font. Thus,

    get(@cursor_names, attribute_names, Chain)

returns a list of all available cursor names.

HashTable @cursors

A hash table object that maps cursor names onto cursor objects. Used by ‘cursor ←lookup’ and ‘cursor ←convert’.

Constant @default

The special object @default represents defaulting. @default is normally used for arguments you do not wish to specify when sending a message or creating an object. @default is also used as filler for a slot. In this case it normally means ‘when this slot is needed; compute a sensible default from the environment’.

The interpretation of @default is handled by the code that handles the arguments or attribute-value.

When too few arguments are presented to a method and the method has defined it is willing to accept @default (indicated by putting the type between square brackets; ‘[int]’ refers to an integer or @default) for the remaining arguments, @default is passed for all remaining arguments. For example, the arguments to ‘Graphical →set’ are ‘[int], [int], [int], [in]’, which makes

    send(Box, set, 40, 40)

equivalent to

    send(Box, set, 40, 40, @default, @default).

Display @display

The global object @display refers to the default display object. This display resides by default at the address specified by the environment variable DISPLAY.

The object @display is normally used for the methods ‘@display →inform’, ‘@display →confirm’ and ‘@display ←size’.

See also class display and class display manager.

DisplayManager @display manager

The global object @display manager the single instance of class display manager. The display manager manages the set of available displays. On the Win32 platforms, there is only one display called @display. On X11, @display refers to the default display, but multiple displays on different computers may be managed by XPCE. See also ‘display manager ←members’.

HashTable @elevations

Hash table object maintained by class elevation. It maps ‘elevation ←name’s onto elevation objects.

HashTable @errors

The hash table object @errors maps error-id’s into error objects. The available errors may be examined using the ‘Errors’ tool from the ‘Browsers’ menu

Var @event

The var object @event provides a reference to the currently executing event. It works similar to @arg1 ..., @receiver, etc. The current event is pushed by ‘event →post’.

@event provides a reference to the event that caused this behaviour to execute, regardless of where you are in your code.

Note that a window maintains a variable ‘window ←current event’ in which the event currently processed by this window is stored.

EventTree @event tree

@event tree describes the event-type hierarchy. This hierarchy is used by ‘event →is a’. This method is used by class handler to verify the type of the event.

The demo program ‘events’ may be used to examine the event hierarchy.

HashTable @fonts

The hash table @fonts maps font reference names (e.g. screen roman 13) onto font objects. Thus, all available fonts may be listed using:

    send(@fonts, for_all, message(@pce, write_ln, @arg2)).

The demo-program ‘FontViewer’ may be used to examine the available fonts.

NOTE: The table @fonts is initially empty. The standard fonts are created from the resource Pce.Display.font families using the method ‘display→load fonts’.

Image @grey12 image

Image filled with 12% 1’s

Image @grey25 image

Image filled with 25% 1’s

Image @grey50 image

Image filled with 50% 1’s

Image @grey75 image

Image filled with 75% 1’s

HashTable @images

The hash table @images maps names of images into images. It is used by ‘Image →initialise: name’. If the name already exists in this table, new/2 returns the existing image. Otherwise a new image is created from the named file and this image is added to @images.

HashTable @key bindings

Hash table object mapping key binding names to key binding objects. Any named key binding object is inserted in this table. The standard ‘editable’ object (class text, class text item and class editor) have default key binding tables with names ‘text’, ‘text item’ and ‘editor’.

HashTable @modifiers

Table mapping modifiers specified as a name holding ‘s’, ‘c’ and or ’m’ into modifier objects. See ‘modifier ←convert’.

Do not modify modifiers in this table.

Constant @nil

The constant @nil is used to indicate ‘not-filled’ or ‘nothing’. It is used very frequently in PCE.

When a new instance is created by PCE’s virtual machine, all slots are initialised to @nil, after which ‘object →initialise’ is invoked on the new instance. When an object is destroyed by PCE’s virtual machine, all slots that are filled with true objects are reset to @nil. See ‘object →unlink’.

Bool @off

The bool objects @on and @off represent ‘true’ and ‘false’. PCE converts various other values into one of these objects if the requested type is ‘bool’. See ‘bool ←convert’.

See also class bool and class constant.

Pce @pce

The object @pce is the only instance of class pce. It defines methods for which there is no clear receiver as well as overall access to the PCE system.

Host @prolog

The object @prolog is the only instance of class host and provides access (calling predicates) to the hosting language. On Lisp systems this object is called @lisp.

Var @receiver

The var object @receiver refers to the object that is receiving a message or event. A new value of receiver is pushed under the following conditions:

• If a message is invoked from a (send or get-) method. In this case @receiver is a reference to the object that received the message. See ‘send method →send’.

• If a message is invoked from a gesture or handler. In this case, @receiver refers to the (graphical) object that received the event. See ‘handler →event’.

Var @reportee

The var object @reportee is managed by ‘visual →report’ to register the most local visual object to which a ‘visual →report’ has been sent.

Parser @resource parser

The global object @resource parser is an instance of class parser. It is used by ‘resource ←convert string’ to translate textual resource specifications into true PCE values. The basic syntax described by this parser is (informally):

<term> ::= <atom>

              | <string>
              | <integer>
              | <real number-name>
              | '@'<reference>
              | '[{<blank>}]'
              | '['<term> {',' <term>}']'
              | <class-name>'('{<term>}')'

<atom> ::= <letter>{<letter|digit>}

              | '{<ascii>}'
    <string> ::= "<ascii>"

The syntax table object of the parser is a default syntax table. ’ ’ is of type ‘word separator’, separating parts of a word.

Examples

left  Just an atom
point(10,50) Point object at 10, 50
colour(red) A red colour object
[left, top]  A chain with atoms ‘left’ and ‘right’
[]  An empty chain
chain()  An empty chain
chain  The atom chain

Chain @running processes

This chain is managed by ‘process →open’, ‘process →stopped’, ‘process →killed’ and ‘process →exited’. It contains all those processes that have pid not equal to @nil (i.e. the process objects that have a living Unix counterpart).

This chain may be used to check whether there are any living subprocesses associated to this PCE process.

HashTable @types

The hash table object @types maps ‘type ←name’ onto type objects. This method is used by ‘type ←lookup’ and ‘type ←convert’. It may also be used to enumerate the existing instances of class type.

Vmi @vmi free

Objects that represent PCE’s 4 basic operations (also called Virtual Machine Instructions’). These objects are defined to allow the user specifying trace- and break-points on these operations.

See also class vmi and ‘program object →trace’.

Vmi @vmi new

The global object @vmi new is an instance of class vmi and represents the new() virtual machine operation.

It is used for reporting errors (see ‘object →error’) occurring while an object is created and provides an interface to set trace- and break-points on object creation:

    ?- send(@vmi_new, trace, @on).

Will trace the creation of any object in ‘user’ mode (see also ‘@pce →trace’).

Image @white image

Image filled with only 0’s

Appendix A

Summary of Functional Groups

This appendix lists all ‘Functional Groups’ and their members in alphabetical order. A functional group is defined the be a group of behaviours that is related by function. The members of a group are either related because they serve functionaly similar operations or they cooperate to realise some functional goal.

A.1 3d — 3-D effect related methods

M hilite (←colour)  Hilited version of the colour  425
M reduce (←colour)  Reduced version of the colour  425

A.2 abort — Cleanup after aborting execution

V global value (←var)  Global value of the var  566
M quit completer (→text item)  Remove completer  93
M reset (→application)  Reset ←modal to @nil  51
M reset (→dialog item)  Change status to ‘inactive’  76
M reset (→display)  Closedown informer/confirmer  48
M reset (→frame)  Remove →busy cursor  11
M reset (→key binding)  Reset ←receiver and ←prefix  365
M reset (→menu bar)  Reset menubar after an abort  126
M reset (→text image)  Reset ←pointed after an abort  369
M reset (→text item)  Remove completer  94
M reset (→visual)  Send a →reset to all contained objects  408
M reset (→visual)  Send a →reset to all contained objects  408
M reset (→window)  Reset window after an abort  33

A.3 accelerator — Binding the keyboard

V accelerator (↔menu item)  Activate when →key: name is received  115
M assign accelerators (→dialog)  Assign accelerators for the dialog item objects  68
M assign accelerators (→dialog)  Assign accelerators for the dialog item objects  68
M assign accelerators (→menu)  Assign accelerators for the items  110
M assign accelerators (→menu bar) Assign accelerators for the items  124
V bindings (↔editor)  key binding table  332
V default button (←button)  Button is default button for its ←device  79
M default button (→button)  Button is default button for its ←device  79
M default button (←dialog)  Current Button connected to ‘RET’  68

M default button (→dialog)  Button connected to ‘RET’  68
M default button (←dialog group) Current Button connected to ‘RET’  131
M event (→popup gesture)  Handle accelerators  292
M key (→button)  Handle accelerator key ‘name’  79
M key (→graphical)  Accelerator-key pressed (fail)  184
M key (→graphical)  Accelerator-key pressed (fail)  184
M key (→menu bar)  Execute (first) menu item with accelerator  124
M key (→popup)  Set ←selected item according to accelerator  121
M key (→text item)  Request keyboard if accelerator is typed  91
M key binding (←editor)  Function for specified key  332
M key binding (→editor)  Set a local key binding  332
V key binding (↔list browser)  Key binding table  152
M typed (→browser)  Handle typed character  142
M typed (→device)  Handle accelerators  195
M typed (→dialog)  Handle accelerators  68
M typed (→dialog)  Handle accelerators  68
M typed (→frame)  Dispatch over available windows  17
M typed (→list browser)  Handle typed character  152
M typed (→window)  Handle accelerator (delegate to ←frame)  31

A.4 action — Associated action

V advance (↔text item)  If ‘next’, proceed to next in window  87
M enter (→text item)  Default handling for RETURN  87
M execute (→button)  Execute associated command  78
M execute (→text item)  Execute related message  88
M execute (→timer)  Fire the timer right now  310
V execute message (↔click gesture) Message sent on up inside area  279
V message (↔dialog item)  Associated command  72
V message (↔handler)  Code executed when event matches  303
M message (←menu item)  Message that will be executed  114
V message (↔menu item)  Message sent when selected  114
M message (→menu item)  Message sent when selected  114
V message (↔scroll bar)  Message used to inform object  61
V message (↔timer)  Code executed each time  310
V open message (↔list browser)  Send on keyboard selection or double click  146
V select message (↔list browser) Send on left-click on item  146

V select middle message (↔list browser)

Send on middle-click on item

147

A.5 active — Activation (greying) of dialog objects

M active (←dialog)  Equivalent to Window ←sensitive  67
M active (→dialog)  (DE)activate the entire window  67
V active (←menu item)  Can be selected by user  114
M active (→menu item)  Can be selected by user  114
M active all items (→menu)  (De)activate all items in the menu  105
M active item (←menu)  Active value if indicated item  105
M active item (→menu)  (De)activate item in menu  105
M active member (→menu bar)  (De)activate popup or name  123
M all active (→menu bar)  (De)activate all popups  123
M all off (→menu)  Deactivate all menu items  105
M all off (→menu bar)  Deactivate all items of popup or name  123

M all on (→menu)  Activate all menu items  105
M all on (→menu bar)  Activate all items of popup or name  123
V condition (↔menu item)  If true, item becomes active  114
M is off (→menu)  Test if item is off  105
M is on (→menu)  Test if item is on  105
M off (→menu)  Deactivate a menu item or value  105
M off (→menu bar)  Deactivate menu item or name  123
M off (→menu item)  Deactivate item  115
M on (→menu)  Activate a menu item or value  105
M on (→menu bar)  Activate menu item or name  123
M on (→menu item)  Activate item  115
M update (→menu)  Evaluate each item’s condition  106
M update (→menu)  Evaluate each item’s condition  106
M update (→popup)  Update entries using context object)  119
M update (→popup)  Update entries using context object)  119
V update message (↔popup)  Ran just before popup is displayed  119

A.6 add — Adding elements to a list

M add (→chain table)  Add association to table  463
M append (→chain table)  Append association to table  463
M append (→dict)  Append dict item at the end  156
M append (→hash table)  Append association to table  461
M append (→hash table)  Append association to table  461
M append (→table)  Add association  464
M insert (→dict)  Insert dict item according to ←sort by  156
M insert after (→dict)  Insert item after 2nd (or prepend)  156
M prepend (→chain table)  Prepend association to table  463

A.7 address — Address specifications

V address (↔display)  Host/screen on which display resides  40
V address (←socket)  Address for the connection end-point  396
V domain (←socket)  Domain for the connection  396
M peer name (←socket)  Description of the other-sides address  396

A.8 animate — Behavariour to support animation

M flush (→display)  Flush pending commands to X-server  43
M flush (→display)  Flush pending commands to X-server  43
M flush (→frame)  Flush X-server  12
M flush (→graphical)  Flush changes to the display  170
M flush (→graphical)  Flush changes to the display  170
M flush (→window)  Update graphicals in this window immediately  25
M flush (→window)  Update graphicals in this window immediately  25
M grab server (→display)  Freeze all other applications  43
M synchronise (→display)  →flush and process pending events  43
M synchronise (→display)  →flush and process pending events  43
M synchronise (→frame)  →flush and process pending events  12
M synchronise (→graphical)  →flush and process all events  170

658 Appendix A: Summary of Functional Groups

A.9 appearance — “Look-and-feel” related aspects

V accelerator font (←menu)  When not @nil, font for accelerators  106
M arrows (←joint)  Which arrows are defined  237
M arrows (→joint)  Default arrows on {none,first,second,both}  237
V attributes (-style)  Character attributes  358
V background (←cursor)  Background colour of the cursor  431
V background (←dialog item)  Opaque background for item  73
M background (→dialog item)  Opaque background for item  73
V background (←display)  Windows default background colour  43
M background (→display)  Windows default background colour  43
V background (←elevation)  Colour/pixmap when area is lowered  427
M background (→elevation)  Colour/pixmap when area is lowered  427
V background (←figure)  Fill pattern used as background  199
M background (→figure)  Fill pattern used as background  199
V background (←frame)  Background of the frame  12
M background (→frame)  Background of the frame  12
V background (↔style)  Background for the characters  358
V background (←text)  @nil: transparent; @default: cleared  213
M background (→text)  @nil: transparent; @default: cleared  213
V background (←text image)  Background colour  367
V background (←text margin)  Background colour  372
M background (→text margin)  Background colour  372
V background (←window)  Background colour or pattern  25
M background (→window)  Background colour or pattern  25
M bold (←style)  Boolean to indicate bold  358
M bold (→style)  Bold text  358
V border (←dialog group)  Space around the items  128
M border (→dialog group)  Space around the items  128
V border (←figure)  Border around graphicals  199
M border (→figure)  Border around graphicals  199
V border (←frame)  Width of border  12
M border (→frame)  X-border width  12
V border (←label)  Space around the image  82
M border (→label)  Space around the image  82
V border (←menu)  Width of border around item  106
M border (→menu)  Width of border around item  106
V border (←text)  Border around actual text  213
M border (→text)  Border around actual text  213
V border (↔tile)  Distance between areas  55
V close (←arc)  How the arc is closed  229
M close (→arc)  How the arc is closed  229
V closed (←path)  Draw line from last to first point  233
M closed (→path)  Draw line from last to first point  233
V colour (←elevation)  Colour/pixmap to paint the ‘top’  427
M colour (→elevation)  Colour/pixmap to paint the ‘top’  427
V colour (←graphical)  Colour of drawing pen  171
M colour (→graphical)  Colour of drawing pen  171
V colour (←menu item)  Colour for label  115
M colour (→menu item)  Colour for label  115
V colour (↔style)  Colour of the characters  358
M colour (→window)  Default colour of graphicals  25
V colour map (←display)  Default for ‘frame →colour map’  44
M colour map (→display)  Default for ‘frame →colour map’  44

XPCE Reference Manual

V colour map (←frame)  Colourmap for the window’s frame  12
M colour map (→frame)  Colourmap for the window’s frame  12
V columns (←menu)  Number of columns  106
M columns (→menu)  Number of columns  106
M decorate (→window)  Embed window for scrollbars, etc.  25
V decoration (←window)  Window displaying me and my decorations  25
M default arrow (←joint)  Create default arrow for →arrows  237
V default item (↔popup)  Initial previewed item  119
M display colour (←graphical)  Colour graphical is displayed in  171
V elevation (←dialog group)  Elevation from background  128
M elevation (→dialog group)  Elevation from background  128
V elevation (←figure)  Elevation from background  199
M elevation (→figure)  Elevation from background  199
M end group (→popup)  Pullright: separation line below item in super  120
V feedback (←menu)  Type of feedback for selection  106
M feedback (→menu)  Type of feedback for selection  106
V fill pattern (←arc)  Fill pattern for the slice  229
M fill pattern (→arc)  Fill pattern for the slice  229
V fill pattern (←arrow)  How it is filled  238
M fill pattern (→arrow)  How it is filled  238
V fill pattern (←box)  Fill pattern for internals  206
M fill pattern (→box)  Fill pattern for internals  206
V fill pattern (←circle)  Fill pattern for internals  210
M fill pattern (→circle)  Fill pattern for internals  210
V fill pattern (←ellipse)  Fill pattern for internals  208
M fill pattern (→ellipse)  Fill pattern for internals  208
V fill pattern (←path)  Fill pattern  233
M fill pattern (→path)  Fill pattern  233
V first arrow (←joint)  Arrow on start-point  237
M first arrow (→joint)  Arrow on start-point  237
M font (→button)  same as →label font  78
V font (←editor)  Default font for the text  322
M font (→editor)  Default font for the text  322
V font (←label)  Font for selection  82
M font (→label)  Font for selection  82
V font (←list browser)  Font for displayed items  147
M font (→list browser)  Font for displayed items  147
V font (←menu item)  Font for label  115
M font (→menu item)  Font for label  115
V font (↔style)  Font of characters  359
V font (←text)  Font used to draw the string  213
M font (→text)  Font used to draw the string  213
M font (→text cursor)  Set →style according to font  374
M font (→text cursor)  Set →style according to font  374
V font id (←cursor)  Id in X-cursor font  431
V foreground (←cursor)  Foreground colour of the cursor  431
M foreground (→device)  Default colour for all members  190
M foreground (→device)  Default colour for all members  190
V foreground (←display)  Windows default foreground colour  44
M foreground (→display)  Windows default foreground colour  44
M foreground (←window)  Get foreground colour  25
M foreground (→window)  Set foreground colour  25
V format (←menu)  Horizontal alignment of items in box  106
M format (→menu)  Horizontal alignment of items in box  106

V format (←menu bar)  Format of labels in their box  123
V format (←slider)  Format for the printed values  97
M format (→slider)  Format for the printed values  97
V format (←text)  Left, center or right alignment  213
M format (→text)  Left, center or right alignment  213
M format center (→text)  Set center alignment  214
M format left (→text)  Set left alignment  214
M format right (→text)  Set right alignment  214
V gap (←dialog group)  Distance between the items  128
M gap (→dialog group)  Distance between the items  128
V gap (←menu bar)  Distance between buttons  123
M grey (←style)  Boolean to indicate grey  358
M grey (→style)  Greyed-out text  358
V height (←elevation)  Height above the surface  427
M height (→elevation)  Height above the surface  427
M hidden (←style)  Boolean to indicate invisible text  359
M hidden (→style)  Make text invisible  359
M highlight (←style)  Boolean to indicate inverse video  358
M highlight (→style)  Inverse video  358
V hot spot (←cursor)  User-defined hot spot  431
V hot spot (←text cursor)  The ‘hot-spot’ of the image  374
V icon (↔style)  Image for annotation margin  359
V image (←bitmap)  The pixel collection managed  221
M image (→bitmap)  The pixel collection managed  221
V image (←cursor)  User-defined image  431
V image (←node)  Graphical image of the node  251
M image (→node)  Graphical image of the node  251
V image (←text cursor)  Image when ↔style is image  374
M image (→text cursor)  Image when ↔style is image  374
V inverted (←graphical)  If @on, invert bounding box after painting  171
M inverted (→graphical)  If @on, invert bounding box after painting  171
M kind (→dialog group)  Set standard default appearance  128
V kind (←elevation)  How the elevation is realised  427
M kind (→elevation)  How the elevation is realised  427
V kind (←frame)  Tool, support or popup  13
M kind (→frame)  Tool, support or popup  12
V kind (←menu)  Kind of menu  107
M kind (→menu)  Kind of menu  107

M label (←dict item)

←label←print name or ←key if ←label == @default

160

V label (-dict item)  Label used to display in browser  160
M label (→dict item)  Label used to display in browser  160
V label (←menu item)  Image or string displayed  115
M label (→menu item)  Image or string displayed  115
V label font (←dialog group)  Font used to display the label  129
M label font (→dialog group)  Font used to display the label  129
V label format (←dialog group)  Alignment of label with top  129
M label format (→dialog group)  Alignment of label with top  129
V label format (←tab)  Alignment of label in box  132
M label format (→tab)  Alignment of label in box  132
V layout (←menu)  Horizontal or vertical layout  107
M layout (→menu)  Horizontal or vertical layout  107
V left margin (↔style)  Left margin for wrapping (relative to current)  359
V line (←link)  Line (with pen, arrows, etc.)  260

V look (←dialog item)  Look-and-feel switch  73
M look (→dialog item)  Look-and-feel switch  73
V look (←scroll bar)  Look-and-feel (only ‘x’)  61
M look (→scroll bar)  Look-and-feel (only ‘x’)  61

V margin (←menu)

Extra margin at left and right side of values (for popup)

107

M margin (→menu)

Extra margin at left and right side of values (for popup)

107

V margin (←text)  Margin for ↔wrap equals wrap  214
M margin (→text)  Determine how long text is handled  214
V mark (←path)  Mark used for points  233
M mark (→path)  Mark used for points  233
V mask (←cursor)  User-defined mask  431
M modify (←elevation)  Return modified (new) elevation object  428
V off image (←menu)  Left mark if selected equals @off  107
M off image (→menu)  Left mark if selected equals @off  107
V on image (←menu)  Left mark if selected equals @on  107
M on image (→menu)  Left mark if selected equals @on  107
V orientation (←scroll bar)  Scroll object horizontal or vertical  61
M orientation (→scroll bar)  Scroll object horizontal or vertical  61
M paint selected (→path)  Paint inverted drops on control-points  233
V pen (←graphical)  Thickness of drawing pen  171
M pen (→graphical)  Thickness of drawing pen  171
M pen (→window)  Thickness of line around window  25
V popup image (←button)  Indication that button has a popup menu  78
M popup image (→button)  Indication that button has a popup menu  78
V popup image (←menu)  Right mark if popup not equal @nil  107
M popup image (→menu)  Right mark if popup not equal @nil  107
V preview feedback (↔menu)  Feedback given to item in preview state  108
V radius (←box)  Rounding radius for corners  206
M radius (→box)  Rounding radius for corners  206
V radius (←button)  Rounding radius for corners  78
M radius (→button)  Rounding radius for corners  78
V radius (←dialog group)  Radius for the corners  129
M radius (→dialog group)  Radius for the corners  129
V radius (←figure)  Radius of outline  199
M radius (→figure)  Radius of outline  199
V radius (←menu bar)  Radius for the buttons  123
V radius (←path)  Rounding radius for ‘poly’ type  234
M radius (→path)  Rounding radius for ‘poly’ type  234
V relief (←elevation)  Colour/pixmap used at ‘light’ side  428
M relief (→elevation)  Colour/pixmap used at ‘light’ side  428
V right margin (↔style)  Right margin for wrapping (relative to current)  359
V second arrow (←joint)  Arrow on end-point  237
M second arrow (→joint)  Arrow on end-point  237
V selected fragment style (←editor) Style for the current fragment  322
M selected fragment style (→editor) Style for the current fragment  322
V selection feedback (←window)  How ←selected graphicals are visualised  25
M selection feedback (→window)  How ←selected graphicals are visualised  25
V selection style (←editor)  Feedback for the ←selection  322
V selection style (←list browser) Style for selection feedback  147
V shadow (←box)  Shadow at bottom-right of box  206
M shadow (→box)  Shadow at bottom-right of box  206
V shadow (←button)  Shadow shown around the box  78

M shadow (→button)  Shadow shown around the box  78
V shadow (←elevation)  Colour/pixmap used at ‘dark’ side  428
M shadow (→elevation)  Colour/pixmap used at ‘dark’ side  428
V shadow (←ellipse)  Shadow painted below/right  208
M shadow (→ellipse)  Shadow painted below/right  208
M shadow (→figure)  Attach ‘shadow’ elevation object  199
V show caret (←text)  If not @off, show the caret  214
M show caret (→text)  If not @off, show the caret  214
V show current (←popup)  If @on, show the currently selected value  120
M show current (→popup)  If @on, show the currently selected value  120
M show label (←editor)  Bool indicating if label is visible  322
M show label (→editor)  Show/unshow the label  322
M show label (→frame)  If @off, sets ↔kind to ‘transient’  13
M show label (←list browser)  Bool indicating if label is visible  147
M show label (→list browser)  Show/unshow the label  147
V show label (←menu)  Whether label is visible  108
M show label (→menu)  Whether label is visible  108
V show label (←slider)  Whether label is shown  97
M show label (→slider)  Whether label is shown  97
V show label (←text item)  Whether label is visible  88
M show label (→text item)  Whether label is visible  88
V show value (←slider)  Whether selection is shown  97
M show value (→slider)  Whether selection is shown  97
V status (←tab)  Currently displayed status  132
M status (→tab)  Currently displayed status  132
V style (←arrow)  If ‘closed’, the triangle is closed  239
M style (→arrow)  If ‘closed’, the triangle is closed  239
V style (←dict item)  Display style for item  160
M style (→dict item)  Display style for item  160
M style (→editor)  Set style associated with name  322
V style (←fragment)  Visual feedback: name of style in editor  355
M style (→fragment)  Visual feedback: name of style in editor  355
M style (→list browser)  Set style associated with name  147
V style (←text cursor)  How the text cursor object is visualised  374
M style (→text cursor)  How the text cursor object is visualised  374
V style (←text item)  Show combo-box item for completions  88
M style (→text item)  Set style or termine default style  88
V styles (←editor)  Style-name to style-object mapping  322
M styles (→editor)  Associate new name -→ style object map  322
V styles (←list browser)  Name -→ style mapping  148
V tab distance (←editor)  Distance between tabs  323
M tab distance (→editor)  Distance between tabs  323
V tab distance (←text image)  Pixel distance between tab stops  367
M tab distance (→text image)  Pixel distance between tab stops  367
M tab stops (←editor)  Vector with tab-stop positions in pixels (or @nil) 323
M tab stops (→editor)  Set tab-stops (vector of pixels)  323
M tab stops (→list browser)  Set tab-stops (pixels)  148
V tab stops (←text image)  Vector of tab-stops in pixels  367
M tab stops (→text image)  Vector of tab-stops in pixels  367
V texture (←graphical)  Stipple pattern of drawing pen  171
M texture (→graphical)  Stipple pattern of drawing pen  171
V transparent (←bitmap)  When @on, 0-pixels are not painted  221
M transparent (→bitmap)  When @on, 0-pixels are not painted  221
M underline (←style)  Boolean to indicate underline  358

M underline (→style)  Underlined text  358
V value font (←menu)  Font for value  108
M value font (→menu)  Font for value  108
V value font (←slider)  Font for current selection  97
M value font (→slider)  Font for current selection  97
V value font (←text item)  Font for entry field  89
M value font (→text item)  Font for entry field  89

V vertical format (←menu)

Vertical alignment of items (and decorations) in box

108

M vertical format (→menu)

Vertical alignment of items (and decorations) in box

108

V wrap (←text)  How long text is handled  214
V wrap (←text image)  Wrap mode for long lines  367
M wrap (→text image)  Wrap mode for long lines  367

A.10 apply — Applying dialog windows

M apply (→dialog)  →apply all changed items  67
M apply (→dialog group)  →apply all changed items  128
M apply (→graphical)  Virtual method  170
M apply (→graphical)  Virtual method  170
M apply (→menu)  →execute if ←modified or @on  104
M apply (→slider)  →execute if ←modified or @on  96
M apply (→text item)  →execute if ←modified or @on  88
M default (←dialog item)  Virtual method  72
M default (→dialog item)  Virtual method  72
M default (←menu)  Current default value  104
V default (-menu)  Default value  104
M default (→menu)  Set variable -default and →selection  104
M default (←slider)  Current default value  96
V default (-slider)  The default selection or function to get it  96
M default (→slider)  Set variable -default and →selection  96
M default (←text item)  Current default value  88
V default (-text item)  The default value  88
M default (→text item)  Set variable -default and →selection  88
M modified (←dialog item)  Virtual method (return @off)  73
M modified (→dialog item)  Forward modification to associated ←device  73
M modified (←menu)  If @on, menu has been modified  104
M modified (→menu)  Reset modified flag  104
M modified (←slider)  If @on, slider has been modified  96
M modified (→slider)  Reset modified flag  97
M modified (←text item)  Test if item has been modified  88
M modified (→text item)  Reset modified flag  88
M modified item (→dialog)  Indicates item has changed state  67
M modified item (→dialog group) Indicates item has changed state  128
M restore (→dialog)  →restore all items to their ←default  67
M restore (→dialog group)  →restore all items to their ←default  128
M restore (→graphical)  Virtual method  170
M restore (→graphical)  Virtual method  170
M restore (→menu)  Set →selection to ←default  104
M restore (→slider)  Set →selection to ←default  97
M restore (→text item)  Set →selection to ←default  88

664 Appendix A: Summary of Functional Groups

A.11 area — Handling size and position

M size (→editor)  Set size in pixels (trap window resize)  324
M size (→editor)  Set size in pixels (trap window resize)  324
M size (→list browser)  Set size in pixels (trap window resize)  148
M absolute position (←graphical) Get position relative to device (or window)  174
M absolute x (←graphical)  Get X-position relative to device  174
M absolute y (←graphical)  Get Y-position relative to device  174
V area (←frame)  Area of the opened frame on the display  13
M area (→frame)  Area of the opened frame on the display  13
M area (←graphical)  →compute and return area slot  174
V area (-graphical)  Bounding box of affected pixels  174
M area (→graphical)  Bounding box of affected pixels  174
M bottom side (←graphical)  Bottom-side of graphical  174
M bottom side (→graphical)  Resize graphical to set bottom-side  175
M bounding box (←window)  Union of graphicals  28
V bounding box (-window)  Union of graphicals  28
M center (→frame)  Move the frame to make point its center  14
M center (←graphical)  New point representing center  175
M center (→graphical)  Move to make point the center  175
M center (→graphical)  Move to make point the center  175
M center x (←graphical)  X-coordinate of center  175
M center x (←graphical)  X-coordinate of center  175
M center x (→graphical)  Move horizontal to make int the ←x center  175
M center y (←graphical)  Y-coordinate of center  175
M center y (←graphical)  Y-coordinate of center  175
M center y (→graphical)  Move vertical to make int the ←y center  175
M connect angle (→arc)  Connect both lines with an angle  230
M corner (←graphical)  New point from point opposite origin  175
M corner (→graphical)  Resize to make opposite of origin point  175
M corner x (←graphical)  X-coordinate of corner  175
M corner x (→graphical)  Resize to set X of →corner  175
M corner y (←graphical)  Y-coordinate of corner  176
M corner y (→graphical)  Resize to set Y of →corner  176
M diameter (←circle)  Diameter (= twice radius)  210
M diameter (→circle)  Set diameter  210
M display position (←graphical)  Position relative to display  176
M do set (→graphical)  Set X, Y, W and H for graphical  176
M do set (→graphical)  Set X, Y, W and H for graphical  176
M geometry (→circle)  Force width and height to be equal  210
M geometry (←frame)  X-geometry specification  14
V geometry (-frame)  X-window geometry specification  14
M geometry (→frame)  X-window geometry specification  14
M height (←editor)  Height in character units  324
M height (→frame)  Set height of frame  14
M height (←graphical)  Height of graphical  176
M height (←graphical)  Height of graphical  176
M height (→graphical)  Set height  176
M height (←list browser)  Height in character units  148
M height (←text image)  Height of the image  367
V height (-text image)  Height of the image  367
M left side (←graphical)  Left-side of graphical  176
M left side (→graphical)  Resize graphical to set left-side  176
V length (←arrow)  Distance tip to base  239

XPCE Reference Manual

M length (→arrow)  Distance tip to base  239
V length (←label)  Length in characters (with text)  83
M length (→label)  Length in characters (with text)  83
M length (→text)  (compatibility)  215
V length (←text item)  Length of entry field in characters  90
M length (→text item)  Length of entry field in characters  90
V mask (←image)  Image for masked painting  441
M mask (→image)  Image for masked painting  441
M move (→device)  Set origin  191
M move (→frame)  Move the frame on the display  14
M move (→graphical)  Move origin to argument  176
M move (→window)  Move origin to argument  24
M normalise (→graphical)  Make top-left corner the origin  176
M normalise (→line)  Redefined from graphical: no-op  226
M offset (←device)  Get origin (also ←position)  191
V offset (-device)  Offset of origin  191
M orientation (←graphical)  Current orientation  176
M orientation (→graphical)  Put origin at {north,south} {west,east}  176
M orientation (→line)  Redefined from graphical: no-op  226
M place (→scroll bar)  Position scrollbar relative to object  61
M points (→arrow)  Set XY of tip and reference  239
V position (←arc)  Position of the arc  230
M position (→arc)  Position of the arc  230
M position (←device)  Get origin  191
M position (←device)  Get origin  191
M position (→device)  Set origin  191
M position (→device)  Set origin  191
M position (←dialog group)  Top-left corner of tab  129
M position (→dialog group)  Top-left corner of tab  129
M position (←dict item)  Position in coordinate-system of list browser  160
M position (←frame)  Position on the display  14
M position (→frame)  Move the frame on the display  14
M position (→frame)  Move the frame on the display  14
M position (←graphical)  New point representing origin  177
M position (←graphical)  New point representing origin  177
M position (→graphical)  Move origin to argument (as →move)  177
M position (→graphical)  Move origin to argument (as →move)  177
M position (←tab)  Top-left corner of tab  133
M position (→tab)  Top-left corner of tab  133
M position (→window)  Position in ←frame  28
M radius (←arc)  Equivalent to ←width  230
M radius (←circle)  Radius (= half diameter  210
M radius (→circle)  Set radius (= half diameter)  210
V reference (←arrow)  Where arrow points to  239
M reference (→arrow)  Where arrow points to  239
M reference (→device)  Move origin, while moving members opposite  192
M reference (→device)  Move origin, while moving members opposite  192
M reference (→path)  Move ←offset while retaining points  234
M reference x (←arrow)  X of reference point  239
M reference x (→arrow)  Set X of reference  239
M reference y (←arrow)  Y of reference point  239
M reference y (→arrow)  Set Y of reference  239
M relative move (→graphical)  Move origin by argument  177
M resize (→arc)  Resize arc with specified factor  230

M resize (→device)  Resize device with specified factor  192
M resize (→device)  Resize device with specified factor  192
M resize (→graphical)  Resize graphical with specified factor  177
M resize (→graphical)  Resize graphical with specified factor  177
M resize (→line)  Resize line with specified factor  226
M resize (→path)  Resize path with specified factor  234
M resize (→text)  Resize text with specified factor  215
M resize (→window)  Execute ←resize message  28
M resize (→window)  Execute ←resize message  28
M resize (→window decorator)  Also ‘window →resize’ ←window  37
M right side (←graphical)  Right-side of graphical  177
M right side (→graphical)  Resize graphical to set right-side  177
M set (→frame)  Set XYWH of frame on display  15
M set (→graphical)  Request new X, Y, W and H for graphical  177
M set (→graphical)  Request new X, Y, W and H for graphical  177
M set (→text cursor)  Set x, y, w, h and baseline  375
V size (←arc)  Size of the ellipse I’m part of  230
M size (→arc)  Size of the ellipse I’m part of  230
M size (←browser)  Size in character units  141
M size (→dialog)  Give the dialog window an explicit size  68
V size (←dialog group)  Size of the contents  130
M size (→dialog group)  Size, @default implies minimal size  130
M size (←editor)  Size in character units  324
V size (←editor)  Size of editor in character units  324
M size (←frame)  Size on the display  15
M size (→frame)  Resize the frame  15
M size (←graphical)  New size representing size  178
M size (→graphical)  Resize to specified size  178
V size (←list browser)  Size in characters/lines  148
V tip (←arrow)  Tip of the arrow  239
M tip (→arrow)  Tip of the arrow  239
M tip x (←arrow)  X of tip point  239
M tip x (→arrow)  Set X of tip  239
M tip y (←arrow)  Y of tip point  239
M tip y (→arrow)  Set Y of tip  239
M top side (←graphical)  Top-side of graphical  178
M top side (→graphical)  Resize graphical to set top-side  178
M value width (→text item)  Set width of value-part in pixels  90
M visible (←window)  New area representing visible part  28
M visible (←window)  New area representing visible part  28
M width (←editor)  Width in character units  324
M width (→frame)  Set width of frame  15
M width (←graphical)  Width of graphical  178
M width (←graphical)  Width of graphical  178
M width (→graphical)  Width of graphical  178
M width (←list browser)  Width in character units  149
M width (←slider)  Get width of bar  98
V width (-slider)  Length of the bar  98
M width (→slider)  Length of the bar  98
M width (←text image)  Width of the image  367
V width (-text image)  Width of the image  367
M width (→text item)  Equivalent to →length  90
V wing (←arrow)  Length of base  239
M wing (→arrow)  Length of base  239

M x (←device)  Get X of origin  192
M x (←device)  Get X of origin  192
M x (→device)  Set X of origin  192
M x (→device)  Set X of origin  192
M x (←dialog group)  Left-side of tab  130
M x (→dialog group)  Left-side of tab  130
M x (→frame)  Set X-coordinate of frame  15
M x (←graphical)  X or origin  178
M x (→graphical)  Move graphical horizontally  178
M x (←tab)  Left-side of tab  133
M x (→tab)  Left-side of tab  133
M x (→window)  Move graphical horizontally  24
M y (←device)  Get Y of origin  192
M y (←device)  Get Y of origin  192
M y (→device)  Set Y of origin  192
M y (→device)  Set Y of origin  192
M y (←dialog group)  Top-side of tab  130
M y (→dialog group)  Top-side of tab  130
M y (→frame)  Set Y-coordinate of frame  15
M y (←graphical)  Y of origin  178
M y (→graphical)  Move graphical vertically  178
M y (←tab)  Top-side of tab  133
M y (→tab)  Top-side of tab  133
M y (→window)  Move graphical vertically  24

A.12 argument — Argument processing

M argument (←create)  Nth-1 argument  554
V argument (↔create)  Arguments used to create instance  554
M argument (→create)  Set nth-1 argument  554
V argument (←key binding)  Universal (numerical) argument  362
M argument (←message)  Nth-1 argument  522
M argument (→message)  Set nth-1 argument  522
V argument name (←type)  Name of the argument  574
V name (↔:=)  Name of the binding  576
V parameters (↔block)  Vector with formal parameters  537
V vector (←type)  Methods: variable number of arguments  574

A.13 attributes — Object- and sheet attributes

M append (→sheet)  Append attribute  457
M append (→sheet)  Append attribute  457
M delete (→sheet)  Delete named attribute  457

A.14 authority — Access rights

V authority (←socket)  Name of authority-file (if any)  397

A.15 autoload — Autoloading classes and methods

M realise (←class stub)  Create the actual class  616

668 Appendix A: Summary of Functional Groups

A.16 behaviour — Definition of behaviour

V access (←variable)  Read/write access  620
M convert old slot (→frame)  Convert old ‘show’ slot  11
V delegate (←class)  Instance variables for delegation  606
M delegate (→class)  Add instance-variable for delegation  606
M get method (→class)  Add/redefine get method  607
M get methods (←class)  Get methods not inherited  607
V get methods (-class)  Get methods not inherited  607
M group (←object)  Classes are of the group cla  500
M install (→class)  Prepare class for creating instances  607
M instance variable (→class)  Add/redefine instance variable  607
V instance variables (←class)  Vector object holding all instance variables  607
M lookup (←class stub)  Reuse predefined stub  616
M lookup (←elevation)  Lookup from @elevations  427
M lookup (←elevation)  Lookup from @elevations  427
M lost text buffer (→editor)  ←text buffer is being freed  320
M man description (←object)  (undocumented)  500
M man description source (←object) Object that provided the description  500
M man header (←object)  (undocumented)  500
M prepend delegate (→class)  Add instance-variable for delegation (as first)  606
M send method (→class)  Add/redefine send method  607
V send methods (-class)  Send methods not inherited  607
M send methods (←class)  Send methods not inherited  608
M texi description (←object)  Cached description slot for texinfo generation  500

A.17 binding — Binding the keyboard

V bindings (←key binding)  Sheet mappings keys to functions  365
V default function (↔key binding) Default function to perform  365
M function (→key binding)  Append function association  365
M function (→key binding)  Append function association  365
M prefix (→text)  Multi-key prefix (see class key binding)  218

A.18 cache — Caching information (speed up)

M bound get method (→class)  Test if class defines get method ‘name’  611
M bound send method (→class)  Test if class defines send method ‘name’  611
V cache (↔display)  Scratch image to avoid flickering  49
M clear cache (→class)  Clear method resolution cache  611
V convert method (-class)  Type conversion  611
M delete get method (→class)  Delete a get-method  611
M delete send method (→class)  Delete a send-method  611
V fragment cache (-editor)  Cache to compute fragment attributes  336
V get catch all (-class)  Handle not-yet-handled get messages  611
V get table (←class)  Hash table for all get methods  611
V has init functions (←class)  @on if one or more variables use functions  612
V initialise method (-class)  Used to initialise a new instance  611
M lazy binding (←class)  @on if methods are bound lazy  612
M lazy binding (→class)  Determines when messages are bound  612
V local table (←class)  Hash table for all instance variables  611
V lookup method (-class)  Type conversion  611
V map (-text image)  2-dimensional map of source  370

XPCE Reference Manual

V neighbour index (-class)  Index of neighbour in hierarchy  612
V proto (-class)  Prototype instance + info for fast creation  612
V quick and dirty (↔display)  Painting quick or correct?  49
V resolve method message (↔class) Hook for lazy attachment of methods  612
V resource table (←class)  Hash table for all resources  612
V send catch all (-class)  Handle not-yet-handled send messages  611
V send table (←class)  Hash table for all send methods  611
V start cell (-list browser)  Cell reference to top-row of display  153
V tree index (-class)  Index in depth-first numbering of hierarchy  612
V value (-resource)  Value of the resource  404

A.19 calculate — Compute properties

M angle (←line)  Angle  226
M area (←region)  New area describing region of argument  422
M area height (←region)  H of region of argument  422
M area width (←region)  W of region of argument  422
M area x (←region)  X of region of argument  422
M area y (←region)  Y of region of argument  422
M character position (←text)  Convert index to position of character  215
M difference (←date)  Difference between dates in specified units  490
M difference (←point)  New point that reflects distance  412
M distance (←event)  Rounded integer distance between events  298
M distance (←line)  Distance between areas or to point  226
M distance (←point)  Integer for distance between points  412
M divide (→number)  Divide value by argument  484
M divide (→real)  Divide value by argument  487

M intersection (←line)

Intersection between both infinitely extended lines

226

M length (←line)  Distance between start and end-points  226
M maximum (→number)  Set value to largest of current and argument  484
M minimum (→number)  Set value to largest of current and argument  484
M minus (→number)  Subtract argument from value  484
M minus (←point)  New point p1 - p2  413
M minus (→point)  Subtract x and y of argument point  413
M minus (→real)  Subtract argument from value  487
M mirror (←point)  New point mirrored over argument  413
M mirror (→point)  Mirror point around argument or (0,0)  413
M negate (←bool)  Maps @on ↔ @off  469
M offset (→point)  Move the point by given x and y  413
M offset (→size)  Add 1st argument to W, 2nd to H  414
M plus (→number)  Add argument to value  484
M plus (←point)  New point p1 + p2  413
M plus (→point)  Add x- and y-values of argument point  413
M plus (→real)  Add argument to value  487
M set (→point)  Set x- and y-values  413
M set (→size)  Set W and H from arguments  414
M times (→number)  Multiply value by argument  484
M times (→real)  Multiply value by argument  487
M union (→size)  set W and H to maximum of the two  415
M value (←binary expression)  Evaluate, given variable bindings  557
M var (←=)  Get value of a variable  532

670 Appendix A: Summary of Functional Groups

A.20 callback — Calling the host-language

M call (←c)  Invoke a C-function get method  583
M call (→c)  Invoke a C-function send method  583
M call (←host)  Invoke a host defined get method  581
M call (→host)  Invoke a host defined send method  581
M call (→host)  Invoke a host defined send method  581
V call back (↔host)  Queue messages or invoke asynchronously  581
M call c plus plus (←c)  Invoke a C++-function  583
M call c plus plus (→c)  Invoke a C++-function  583
M call c plus plus method (←c)  Invoke C++ method on C++ object  583
M call c plus plus method (→c)  Invoke C++ method on C++ object  583
M catch all (←host)  Call function on host  581
M catch all (←host)  Call function on host  581
M catch all (→host)  Call procedure on host  581
M catch all (→host)  Call procedure on host  581
M message (←host)  Read next message from queue  581
V messages (←host)  Message queue  582

A.21 cancel — Cancel event handling

M cancel (→click gesture)  Cancel this gesture and try the next  280
M cancel (→gesture)  Cancel this gesture and try the next  276

V max drag distance (↔click gesture)

Cancel after dragging this far

280

A.22 cardinality — Number of elements, characters, ...

V buckets (-hash table)  Number of buckets in the table  460
M empty (→chain)  Test if chain has no elements  444
M empty (→chain)  Test if chain has no elements  444
M length (←text buffer)  Equivalent to ←size (# characters)  339
V lines (-text buffer)  Number of newlines in the buffer  339
V size (←chain)  Number of elements  445
M size (←char array)  Number of characters in the text  471
V size (←hash table)  Number of symbols in table  461
M size (←text buffer)  Number of characters in buffer  339
V size (-text buffer)  Number of valid characters in buffer  339

A.23 caret — Moving the insertion point

M backward char (→editor)  Move characters backward  326
M backward char (→text)  Move caret characters backward (\C-f)  215
M backward paragraph (→editor) Move paragraphs backward  326
M backward sentence (→editor)  Move sentences backward  326
M backward term (→editor)  Move Prolog terms backward  326
M backward word (→editor)  Move words backward  326
M backward word (→text)  Move caret words backward (\eb)  215
M beginning of line (→editor)  Move lines backward  326
M beginning of line (→text)  Move caret to start of line (\C-a)  215
V caret (←editor)  0-based caret index  326
M caret (→editor)  Put the caret at 0-based index  326

XPCE Reference Manual

M caret (→editor)  Put the caret at 0-based index  326
V caret (←text)  Index (0-based) of caret  215
M caret (→text)  Move caret to 0-based index  215
M column (←editor)  Column point is at  326
M column (→editor)  Move caret to column at current line  326
M column (←text)  Current X-location of caret (pixels)  215
M end of line (→editor)  Move lines forward  326
M end of line (→text)  Move caret to end of line (\C-e)  215

M exchange point and mark (→editor)

Exchange caret with mark

326

M extend prefix or next (→list browser)

→extend prefix or →next

150

M forward char (→editor)  Move characters forward  326
M forward char (→text)  Move caret characters forwards (\C-f)  215
M forward paragraph (→editor)  Move paragraphs forward  326
M forward sentence (→editor)  Move sentences forward  326
M forward term (→editor)  Move Prolog terms forward  326
M forward word (→editor)  Move words forward  326
M forward word (→text)  Move caret words forward (\ef)  216
V mark (↔editor)  0-based mark index  326
M next (→list browser)  Move caret to next item (‘device →advance’)  150
M next (→text item)  Advance to next item in same ←device  90
M next line (→editor)  Move lines downward; place caret at column  326
M next line (→text)  Move caret lines down (\C-n)  216
M point to bottom of file (→editor) Move to end of file  327

M point to bottom of window (→editor)

Scroll caret to bottom of window

327

M point to mark (→editor)  Move to mark  327
M point to top of file (→editor)  Move to start of file  327
M point to top of window (→editor) Move to 1st character of window  327
M previous line (→editor)  Move lines upward; place caret at column  327
M previous line (→text)  Move caret lines up (\C-n)  216
V saved column (←key binding)  Saved {next line,previous line} column  363
M set mark (→editor)  Set mark at point  327

A.24 case — Case (UPPER/lower) translation

M capitalise (←char array)  Capitalised version of name  475
M capitalise (←char array)  Capitalised version of name  475
M capitalise (→text buffer)  Capitalise (start, length)  343

M capitalise previous word (→editor)

Capitalise n word before caret

330

M capitalise region (→editor)  Capitalise words in region  330
M capitalise word (→editor)  Capitalise n words from caret  330
M downcase (←char array)  Map all uppercase letters to lowercase  475
M downcase (→string)  Change all letters in string to lower case  481
M downcase (→text buffer)  Bring (start, length) to lowercase  343

M downcase previous word (→editor)

Lower-case n words before caret

330

M downcase region (→editor)  Put region in lower case  330
M downcase word (→editor)  Loser-case n words after caret  330
V exact case (↔editor)  Search/replace uses exact case  330
M label name (←char array)  Default name used for labels  475

M toggle char case (→editor)  Toggle case of character before caret  330
M upcase (←char array)  Map all lowercase letters to uppercase  475
M upcase (→string)  Change all letters in string to upper case  481
M upcase (→text buffer)  Bring (start, length) to uppercase  343
M upcase previous word (→editor) Uppercase n words before caret  330
M upcase region (→editor)  Put region in uppercase  330
M upcase word (→editor)  Uppercase n words after caret  330

A.25 cell — Direct operations on chain cells

M cell value (←chain)  Value for cell-reference  451
M cell value (→chain)  Change value of cell  451
M head cell (←chain)  Reference (int) to first cell  451
M next cell (←chain)  Reference to next cell at reference  451

A.26 change — Trapping object modifications

M changed message (→class)  Add message to trap changed slots  609
V changed messages (↔class)  Report (forward) changes to instances  609
M created message (→class)  Add message to trap created instances  609
V created messages (↔class)  Report (forward) created instances  609
M freed message (→class)  Add message to trap freed instances  610
V freed messages (↔class)  Report (forward) freed instances  610
M redraw (→bitmap)  Update size and repaint indicated area  222
V wrapper (↔delegate variable)  Wrapper to take care of side-effects  623

A.27 check — Type definition and checking

M check (←type)  Validate and translate if necessary  571
M check (←type)  Validate and translate if necessary  571
V context (←type)  Context for check- and convert functions  571
M convert (←type)  Convert symbolic type-name  571
M convert (←type)  Convert symbolic type-name  571
V kind (←type)  Type of type  572
M kind (→type)  Type of type  572
M translate (←type)  Translate argument given context  573
M validate (→type)  Validate argument is of this type  573

A.28 class — Defining classes

V class (↔create)  Class (name) to create instance of  555
M define class (→pce)  Declare a class without details  598

A.29 classify — Classify events

M button (←event)  Button-name of button-event  296
V buttons (←event)  Bitmask with status of buttons  296
M click displacement (←event)  ‘up’ events: distance since corresponding ‘down’  296
M click time (←event)  ‘up’ events: time since corresponding ‘down’  296
M has modifier (→event)  Test if event meets modifier spec  296
M has modifier (→event)  Test if event meets modifier spec  296

M is a (→event)  Test if event matches type identifier  297
M is down (→event)  Test if event is a button-down event  297
M is drag (→event)  Test if event is a button-drag event  297
M is up (→event)  Test if event is a button-up event  297
M key (←event)  Key(-binding) description of event  297
M multiclick (←event)  Click type  297

A.30 client — Controlled object

V from (←constraint)  ‘From’ side of the constraint  264
M from (→constraint)  ‘From’ side of the constraint  264
V from (←hyper)  From side of hyper link  515
V object (↔scroll bar)  Graphical to be scrolled scrolled  60
V object (←tile)  Object managed  55
M receiver (←key binding)  Client of the key binding object  362
M receiver (→key binding)  Client of the key binding object  362
V to (←constraint)  ‘To’ side of the constraint  264
M to (→constraint)  ‘To’ side of the constraint  264
V to (←hyper)  To side of hyper link  515
V window (←window decorator)  Decorated window  36

A.31 colour — Defining and managing colours

V background (↔image)  Colour of background (pixmap)  440
M blue (←colour)  Blue value  425
V blue (-colour)  Blue value  425
M colour map (←image)  New colour map for best display of image  440
M depth (←display)  Number of bits/pixel  45
M depth (←display)  Number of bits/pixel  45
V depth (←image)  Number of bits/pixel  440
V foreground (↔image)  Colour of foreground (pixmap)  440
V green (-colour)  Green value  425
M green (←colour)  Green value  425
V kind (←image)  ‘bitmap’ (0 and 1’s) or ‘pixmap’ (coloured)  440
V red (-colour)  Red value  425
M red (←colour)  Red value  425
M visual type (←display)  Type of display attached  45

A.32 command — Process’ command specification

V arguments (←process)  Vector with arguments  392
V name (←process)  Name of command executed  392

A.33 compare — Comparing objects

M after (→date)  Test if date is after argument  490
M before (→date)  Test if date is before argument  490
M compare (←char array)  Alphabetical comparison  472
M compare (←char array)  Alphabetical comparison  472
M compare (←date)  Compare two dates for ‘chain →sort’  490
M compare (←number)  Compare with argument  484
M compare (←real)  Compare with argument  486

M equal (→chain)  Test if both chains have the same objects  449
M equal (→char array)  Test if names represent same text  472
M equal (→char array)  Test if names represent same text  472
M equal (→date)  Test if date is equal  490
M equal (→name)  Test if names represent same text  478
M equal (→number)  Test if equal to argument  484
M equal (→object)  Test if i’m equal to the argument  499
M equal (→object)  Test if i’m equal to the argument  499
M equal (→point)  Test if argument is same position  412
M equal (→real)  Test if equal to argument  486
M equal (→size)  Test if equal to argument  414
M inside (→region)  Test if point is inside region of area  421
M larger (→char array)  Test if I’m alphabetically after arg  472
M larger (→number)  Test if larger than argument  484
M larger (→real)  Test if larger than argument  487
M larger equal (→number)  Test if larger-or-equal than argument  484
M larger equal (→real)  Test if larger-or-equal than argument  487
M less equal (→number)  Test if less-or-equal than argument  484
M less equal (→real)  Test if less-or-equal than argument  487
M not equal (→number)  Test if not-equal to argument  484
M not equal (→real)  Test if not-equal to argument  487
M overlap (→fragment)  Test if overlap with argument  355
M same reference (→object)  Test if i’m the same object as the argument  499
M smaller (→char array)  Test if I’m alphabetically before arg  472
M smaller (→number)  Test if less than argument  484
M smaller (→real)  Test if less than argument  487

A.34 compatibility — Methods for backward compatibility

M convert loaded object (→device) Initialise recompute and request compute  198
M convert old slot (→figure)  Translate old shadow into elevation  201
M convert old slot (→fragment)  Convert start and length slots  356
M convert old slot (→hash table) File ←object conversion  462
M convert old slot (→text) Convert ←transparent to ←background 219
M initialise new slot (→function) Initialise ←dflags  544
M initialise new slot (→path) Initialise ←offset 236

M initialise new slot (→program object)

Initialise ←dflags

647

M initialise new slot (→program object)

Initialise ←dflags

647

M shadow (←figure)  Read ‘elevation ←height’  202
M transparent (←text)  Map ←background  219
M transparent (→text)  Defines ←background  219

A.35 compilation — Compiling representations

M compile (→regex)  Compile expression (optimized)  352
M compile (→regex)  Compile expression (optimized)  352
V compiled (-regex)  Buffer holding compiled pattern  352

Appendix A: Summary of Functional Groups 675

A.36 complete — Automatic completion of textual constants

M complete (→text item)  Complete current value  91
M completions (←text item)  Chain of ‘files’ for dir/file  92
M dabbrev expand (→editor)  Dynamically expand word  333
M has completions (←text item)  Return @on if item can generate completions  92
M indicate directory (→text item) Indicate current value is a ‘directory’  92
M keyboard quit (→menu)  Remove completer  110
M keyboard quit (→text item)  Remove completer and →alert  92
M select completion (→text item) Select candidate expansion using browser  92
M selected completion (→text item) Handle selection from browser  92
M show combo box (→text item) Show the combo-box browser  92
M split completion (←text item)  Split value in ‘directory’- and ‘file’ part  93
V value set (←text item)  Set of possible values  93
M value set (→text item)  Set of possible values  93

A.37 completion — Automatic completion of textual constants

M complete name (←chain)  New tuple with matches and common prefix  450

A.38 components — Parts I’m built from

V image (←editor)  Screen/redisplay management  318
V image (←list browser)  TextImage used to display textlines  145
V label text (←editor)  Text object that displays the label  318
V label text (←list browser)  Text object that displays the label  145
V margin (←editor)  Margin for annotations  318
V scroll bar (←editor)  Scrollbar for the text  318
V scroll bar (←list browser)  Scrollbar used to scroll window  145
V supers (←type)  Super-types  574
V text cursor (←editor)  The caret  318

A.39 condition — Specifying conditions

V event (←handler)  Type of the event  303
V region (↔handler)  Region of graphical the event must be in  303

A.40 connect — Establish socket connection (IPC)

V accept message (↔socket)  Message to accept new client  397
M connect (→socket)  Connect with server socket  397
M listen (→socket)  Listen for connection requests]  397

A.41 connection — Line connection graphicals

V from handle (←connect gesture) Name of handle at from side  289
V link (↔connect gesture)  Link used to connect the graphicals  289
V to (←connect gesture)  Graphical at to side (target)  289
V to handle (←connect gesture)  Name of handle at to side  290

Appendix A: Summary of Functional Groups

A.42 console — Controlling the host-language console

M console label (→pce)  Set the label for the console window  595
M expose console (→pce)  Expose the PCE/host console window  595
M iconify console (→pce)  Make PCE/host console window an icon  595
M show console (→pce)  Control visibility of the console window  596

A.43 constraint — Maintaining constraints and relations

M backwards (→identity)  Update after ‘from’ object has changed  266
M backwards (→relation)  Called to update after a change of ‘to’  265
M backwards (→spatial)  Maintain after ‘from’ has changed  268
M create (→identity)  Update after instantiation  266
M create (→relation)  Called to initiate the relation  265
M create (→spatial)  Establish spatial relation  268
M forwards (→identity)  Update after ‘to’ object has changed  266
M forwards (→relation)  Called to update after a change of ‘from’  265
M forwards (→spatial)  Maintain after ‘to’ has changed  268
V max size (↔resize gesture)  Specify maximum size of the graphical  283

M max size (→resize outline gesture)

Specify maximum size of the graphical

285

V min size (↔resize gesture)  Specify minimum size of the graphical  283
M min size (→resize outline gesture) Specify minimum size of the graphical  285

A.44 content — String content

M append (←char array)  Concatenation of me and the argument(s)  471
M append (←char array)  Concatenation of me and the argument(s)  471
M append (→string)  Append to the string  479
M append (→string)  Append to the string  479
M character (←char array)  ASCII value of 0-based nth character  471
M character (→string)  Change character at 0-based index  479
M delete (→string)  Delete range from 0-based start and length  479
M delete (→string)  Delete range from 0-based start and length  479
M delete prefix (←char array)  Delete specified prefix  471
M delete suffix (←char array)  Delete specified suffix  471
M delete suffix (←char array)  Delete specified suffix  471

M ensure nl (→string)

Ensure string has trailing newline [and append string]

480

M ensure nl (→string)

Ensure string has trailing newline [and append string]

480

M ensure suffix (←char array)  Append suffix if not already there  471
M ensure suffix (←char array)  Append suffix if not already there  471
M ensure suffix (→string)  Ensure string has indicated suffix  480
M insert (→string)  Insert string at 0-based index  480
M insert (→string)  Insert string at 0-based index  480
M insert character (→string)  Insert times character(s) at location  480
M newline (→string)  Append a newline to string  480
M prepend (→string)  Add argument at the beginning  480
M prepend (→string)  Add argument at the beginning  480
M strip (→string)  Strip leading/trailing blanks  480
M strip (→string)  Strip leading/trailing blanks  480
M sub (←char array)  Get substring from 0-based start and end  472

M sub (←char array)  Get substring from 0-based start and end  472
M translate (→string)  Map occurrences of 1-st arg into 2-nd arg  480
M truncate (→string)  Truncate string to argument characters  481

A.45 contents — Modify/query contents of object

M delete (→fragment)  Delete range of characters  354
M directories (←directory)  New chain with names of member directories  386
M directory (←directory)  New directory object with name in directory  386
M file (←directory)  New file object with name in directory  386
M file (←directory)  New file object with name in directory  386
M files (←directory)  New chain with names of member files  386
M insert (→fragment)  Insert text at location [append]  354
M scan (→directory)  Get member files and directories  386
M string (←fragment)  New string with contents  354
M string (→fragment)  Replace text by argument  354
M sub (←fragment)  New string with contents in range  354

A.46 context — Context I belong too, I am executed in

V context (↔popup)  Invoking context  118
V context (↔popup gesture)  Context to be send with the →execute  291
V context (←resource)  Object resource is associated with  402
M context (→resource)  Attach resource to an object  402
V device (↔connect gesture)  Device used for feedback  288
M display (←event)  Display on which the event occurred  294
M master (←event)  The ←master of ←receiver  294
V receiver (←event)  Object receiving event  294
V window (←event)  Window that generated event  294

A.47 control — Control autonomous processes

M broken pipe (→socket)  Attempt to write on broken connection  398
M fail (→pce)  Simply fails  594
M fail (→pce)  Simply fails  594
M kill (→process)  Send signal to the [term] process  393
M open (→process)  Start the process [with new command]  393
M open (→process)  Start the process [with new command]  393
M succeed (→pce)  Simply succeeds  594
M succeed (→pce)  Simply succeeds  594
M wait (→stream)  Wait for the complete output  390
M wait (→stream)  Wait for the complete output  390

A.48 conversion — Conversion (for type checking)

M convert (←bitmap)  Convert image-names  220
M convert (←char array)  Convert ‘text-convertible’  470
M convert (←char array)  Convert ‘text-convertible’  470
M convert (←colour)  Convert X-colour name  424
M convert (←colour)  Convert X-colour name  424
M convert (←cursor)  Convert cursor-name to cursor  430

M convert (←cursor)  Convert cursor-name to cursor  430
M convert (←directory)  Convert directory name  385
M convert (←editor)  The ‘view ←editor’  317

M convert (←font)

Convert logical font-name and

@family style points

433

M convert (←font)

Convert logical font-name and

@family style points

433

M convert (←graphical)  Convert using ←image  167
M convert (←graphical)  Convert using ←image  167
M convert (←key binding)  Lookup existing table or create new named table 362
M convert (←key binding)  Lookup existing table or create new named table 362
M convert (←modifier)  Convert name, consisting of {s|m|c}  299
M convert (←name)  Convert ‘text-convertable’  477
M convert (←name)  Convert ‘text-convertable’  477
M convert (←pce)  Convert anything to specified type  587
M convert (←pce)  Convert anything to specified type  587
M convert (←regex)  Converts char array to regex(pattern)  347
M convert (←regex)  Converts char array to regex(pattern)  347
M convert (←string)  Convert name, int, real, etc.  479
M convert (←string)  Convert name, int, real, etc.  479
M convert (←syntax table)  Convert table-name into table  637
M convert (←var)  Converts name to var from @variables  565
M convert (←window)  Return graphical’s ←window  23

M image (←display)

Image with the pixels of a region from the display

40

M image (←frame)  Image with the pixels of the frame  7
M value (←char array)  Value as a name  470
M value (←char array)  Value as a name  470

A.49 copy — Copying instances

M backup (→file)  Make a backup by adding extension (∼)  379
M backup (→file)  Make a backup by adding extension (∼)  379
M backup file name (←file)  Name for storing →backup data  379
M catch all (←number)  Create copy and run method on it  483
M catch all (←real)  Create copy and run method on it  486
M clip (←image)  Get a subimage  437
M clone (←object)  New object that is a (recursive) copy)  497
M clone (←object)  New object that is a (recursive) copy)  497
V clone style (↔class)  How to clone instances  605
M clone style (←variable)  Clone style for this slot  619
M clone style (→variable)  Clone-style for this slot  619
M clone style variable (→class)  Set ↔clone style of named variable  606
M copy (→area)  Copy X, Y, W and H from argument area  416
M copy (←bitmap)  Make a copy that shares the image  220
M copy (←chain)  New chain with same elements  444
M copy (←char array)  Copy representing the same text  471
M copy (→file)  Copy to destination file  379
M copy (→image)  Copy contents of argument in image  437
M copy (→line)  Copy attributes from other line  225
M copy (←name)  The name itself  478
M copy (←point)  New point with same ←x and ←y  412
M copy (→point)  Copy x- and y values from the argument  412

M copy (→size)  Copy W and H from argument  414
M copy (→source location)  Copy file name and line no from argument  633
M copy (←string)  Copy with the same text  479
M copy (←string)  Copy with the same text  479
M copy (→syntax table)  Copy contents of argument table  637
M copy (←type)  Get a copy of a type with a different name  573
M copy (←vector)  Create a copy of a vector  453
M draw in (→image)  Paint graphical in image [at point]  437
M monochrome (←image)  Get monochrome version of pixmap image  437
M normalised (←area)  New area with origin at top-left  416
M rotate (←image)  Get anti-clockwise rotated copy  437
M scale (←image)  Get copy with different dimensions  438
M value (→string)  Set the contents of the string  479

A.50 create — Realising constraints

M create editor (←view)  Create the editor of the view  312
M create editor (←view)  Create the editor of the view  312

A.51 current — Operations on ‘current’ object

M current (←chain)  Value for the current cell  450
M current (→chain)  Make cell with ‘value’ the current cell  450
M current (←display manager)  Get the current display  53
V current (-display manager)  Stack with current displays  53
M current (→display manager)  Make display the current display  53
M current no (←chain)  Index number of current cell (1-based)  451
M current no (→chain)  Set current cell to nth-1 (0: no current)  451
M delete current (→chain)  Delete current cell  451
M find (→chain)  Set current to first cell accepted by code  451
M insert (→chain)  Insert argument before current  451
M pop current (→display manager) Pop the current stack  53

A.52 cursor — Image of the pointer (mouse) cursor

M cursor (→browser)  Cursor when in focus of events  142
V cursor (↔gesture)  Cursor while active  275
V cursor (←graphical)  Cursor when in focus of events  182
M cursor (→graphical)  Cursor when in focus of events  182
M displayed cursor (←device)  Currently displayed cursor  193
M displayed cursor (←graphical)  Currently displayed cursor  182
M displayed cursor (←text image) Currently displayed cursor  368
M displayed cursor (←window)  Currently displayed cursor  29
V focus cursor (←window)  Cursor while there is a focus  30
M focus cursor (→window)  Cursor while there is a focus  30

A.53 date component — Manipulate/query components of a date

M day (←date)  Day in the month  488
M day (→date)  Set day  488
M day name (←date)  Name of day in the week  488

M hour (←date)  Hour in the day  489
M hour (→date)  Set hour  489
M minute (←date)  Minute in the hour  489
M minute (→date)  Set minute  489
M month (←date)  Month in the year  489
M month (→date)  Set month  489
M month name (←date)  Name of the month  489
M second (←date)  Second in the minute  489
M second (→date)  Set seconds  489
M week day (←date)  Day in the week  489
M year (←date)  Year of the date  489
M year (→date)  Set year  489

A.54 debugging — Debugging PCE programs

M check (→function)  Check obtainer instead of result  544
M check (→object)  Check types for all instance-variables of object  504
M flags (←function)  Flags instead of result’s  545
M flags (←object)  Name width {P, L and A} flags  504
M break (←program object)  Current setting of break-point  645
M break (→program object)  set/clear break-point on object  645
M break (→program object)  set/clear break-point on object  645

M break condition (←program object)

Associated break-condition

645

M break condition (→program object)

Condition associated with this break-point

646

M break condition (→program object)

Condition associated with this break-point

646

M c function name (←pce)  Translate address into C-function name  591
M c symbol file (←pce)  Name of Unix format symbol-file  591
V catch error signals (←pce)  Trap Unix signals to deal with errors  591
M catch error signals (→pce)  Trap Unix signals to deal with errors  591
M code references (←object)  Number of code-references to this object  505
M debug subject (→pce)  Report internal event on terminal  591
V debugging (←pce)  Add consistency checks  592
M debugging (→pce)  Add consistency checks  592
V dflags (↔program object)  Debugging-flags of the program object  646
M dump map (→text image)  Dump map of the screen  369
M for slot reference (→object)  Run code on object-slot-value references  505
M info (→pce)  Write statistics/info to terminal  592
M inspect (←object)  Boolean to indicate changes forwarding  505
M inspect (→object)  Forward changes via classes’ changed messages  505
V instances (←class)  Hash table holding existing instances  609
V kind (↔application)  If @off, events cannot be debugged  51
M list wasted core (→pce)  List wasted core map  592
M max goal depth (←pce)  Maximum recursion level  593
M max goal depth (→pce)  Set maximum recursion level  593
M nodebug subject (→pce)  Don’t Report internal event on terminal  591
M print stack (→pce)  Print PCE message stack to host-window  593
M print trace message (→method) Print standard trace message  626
M record instances (→class)  Maintain ←instances table  609
M references (←object)  Number of references to this object  505
M synchronous (→display)  Make communication to X-server synchronous  48

V trace (←pce)  Trace message passing  593
M trace (→pce)  Set trace mode (default = user)  593
M trace (←program object)  Current setting of trace-point  646
M trace (→program object)  set/clear trace-point on object  646
M trace (→program object)  set/clear trace-point on object  646

M trace condition (←program object)

Associated trace-condition

647

M trace condition (→program object)

Condition associated with this trace-point

647

M trace condition (→program object)

Condition associated with this trace-point

647

V trap errors (←pce)  Trap tracer on errors  593
M trap errors (→pce)  Trap tracer on errors  593
M unresolved types (←pce)  New chain with unresolved types  593

A.55 default — Resource default values

V defaults (↔key binding)  Chain with key bindings to inherit from  362

A.56 delegate — Delegation of behaviour

M catch all (←class stub)

Convert to class and delegate message to the class

616

M catch all (→class stub)

Convert to class and delegate message to the class

616

M catch all (→label)  Delegate to ↔selection  81
M catch all (→window)  Handle frame methods when no frame is present  23
M delegate (→text)  Delegate to string  212
M delegate (→text item)  Delegate to ←value text and update  86
V dict (←list browser)  Associated dict object (table of items)  145
M dict (→list browser)  Associated dict object (table of items)  145
V editor (←view)  Editor displayed  312
M editor (→view)  Associate editor with view  312
M editor (→view)  Associate editor with view  312
V list browser (←browser)  Displayed list browser  140
V object (↔dict item)  Associated data  159
V text buffer (←editor)  Underlying text  317
M text buffer (→editor)  Underlying text  317

A.57 delete — Text deletion commands

M backward delete char (→editor) Delete characters backward  328
M backward delete char (→text)  Delete chars backward from caret (DEL)  216
M backward kill word (→editor)  Kill words backward  329
M backward kill word (→text)  Deletes words backward from caret (\eDEL)  216
M clear (→browser)  Delete all items  142
M clear (→dict)  Delete all members  158
M clear (→editor)  Clear the contents  329
M clear (→hash table)  Delete all entries  462
M clear (→table)  Remove all vectors from the table  465
M clear (→text)  Wipe out all text (\C-u)  216
M clear (→view)  Overrule window behaviour  314
M clear (→view)  Overrule window behaviour  314

M cut or delete char (→editor)  Cut selection or delete characters forward  329
M cut or delete char (→text)  Delete characters forwards (DEL)  216
M cut or delete char (→text)  Delete characters forwards (DEL)  216
M delete (→chain table)  Delete all matching symbols  463
M delete (→dict)  Delete dict item or name  158
M delete (→editor)  Delete range [from, to)  329
M delete (→hash table)  Delete all matching symbol  462
M delete (→table)  Delete association  465
M delete blank lines (→editor)  Delete blank lines around point  329
M delete char (→editor)  Delete characters forward  328
M delete char (→text)  Delete characters forwards (\C-d)  216
M delete horizontal space (→editor) Delete blanks around caret  329
M delete selection (→editor)  Delete the selection  329
M grab (→editor)  Add text to the kill-buffer  329
M kill (→editor)  Delete text and add it to the kill-buffer  329
M kill line (→editor)  Kill lines forward  329
M kill line (→text)  Delete lines from caret \C-k)  216
M kill or grab region (→editor)  Kill or grab (with arg) region  329
M kill paragraph (→editor)  Kill paragraphs  329
M kill sentence (→editor)  Kill sentences forward  329
M kill term (→editor)  Kill Prolog terms  329
M kill word (→editor)  Kill words forward  329
M kill word (→text)  Deletes words forward from caret (\ed)  216
M remove (→file)  Unlink from Unix file system  384

A.58 dialog item — Dialog Item placement for graphicals

M reference (→editor)  Set reference as dialog item  334
M reference (→list browser)  Set reference as dialog item  152

A.59 dimension — Dimensions of (graphical) objects

V area (←tile)  Area of the object  57
M area (→tile)  Area of the object  57
M ascent (←font)  Highest point above baseline  434
M center (→tile)  Set center by moving tile  57
M corner (→tile)  Set point opposite to origin  57
M descent (←font)  Lowest point below baseline  434
M end (←fragment)  End (←start + ←length) of fragment  355
M end (→fragment)  End (changes ←length)  355
M ex (←font)  Width of the letter ‘x’  434
V ex (-font)  Width of the letter ‘x’ in this font  434
V h to (↔spatial)  Equation between ‘h’ and ‘h2’  268
V height (↔area)  Height in pixels (may be negative)  419
M height (←display)  Height of the display in pixels  45
M height (←font)  Height of highest character in font  434
V height (↔region)  H of area expressed in XYWH of area  421
V height (↔size)  Height (H) of the size  414
M height (→tile)  Set H of tile  57
V hot spot (↔image)  Hot-spot position  441
V ideal height (↔tile)  Desired height of the tile  57
V ideal width (↔tile)  Desired width of the tile  57
M length (←fragment)  Length in characters  355

V length (-fragment)  Length in characters  355
M length (→fragment)  Length in characters  355
M measure (←area)  ‘Area’ of the area  419
V offset (←path)  Offset to origin  234
M position (→tile)  Set XY of the tile  57
M radius (→arc)  →width and →height  230
M resize (→image)  Resize image to width, height  441
M set (→tile)  Set XYWH of entire tile  57
M set (→tile)  Set XYWH of entire tile  57
M size (←area)  New size from size of area  419
M size (←display)  Size of the display  46
V size (-display)  Size (width, height) of display  46
M size (←file)  Size in characters  383
M size (←font)  New size from ←width and ←height  434
V size (←image)  Size of the image in pixels  441
M size (→tile)  Set WH of the tile  57
M start (←fragment)  Start index (0-based)  355
V start (-fragment)  Start index (0-based)  355
M start (→fragment)  Start index (0-based)  355
V w to (↔spatial)  Equation between ‘w’ and ‘w2’  268
V width (↔area)  Width in pixels (may be negative)  419
M width (←display)  Width of the display in pixels  46
M width (←font)  Width of string (default ”x”)  435
V width (↔format)  Width in columns/rows or pixels  205
V width (↔region)  W of area expressed in XYWH of area  421
V width (↔size)  Width (W) of the size  414
M width (→tile)  Set W of tile  58
V x (↔point)  x-coordinate of point  412
V x (↔region)  X of area expressed in XYWH of area  421
M x (→tile)  Set X of the tile  58
V y (↔point)  y-coordinate of point  412
V y (↔region)  Y of area expressed in XYWH of area  421
M y (→tile)  Set Y of the tile  58

A.60 display — X-Screen oriented behaviour

M append (→display manager)  Attach a new display to the manager  53
M member (←display manager)  Find display for specified address  53
V members (←display manager)  Available displays  53

A.61 draw — Methods for user-defined graphics

M clip (→graphical)  Clip subsequent drawing actions to area  179
M clip (→graphical)  Clip subsequent drawing actions to area  179
M draw arc (→graphical)  Draw a ellipse-part  179
M draw box (→graphical)  Draw rectangular (rounded) box  179
M draw fill (→graphical)  Fill rectangle with specified pattern  179
M draw image (→graphical)  Draw a bitmap or pixmap image  180
M draw line (→graphical)  Draw line segment from (X1,Y1) to (X2,Y2)  180
M draw poly (→graphical)  Draw/fill a polyfon  180
M draw text (→graphical)  Draw text-string  180
M graphics state (→graphical)  Modify the graphics state  180

684 Appendix A: Summary of Functional Groups M restore graphics state (→graphical)

Restore saved pen, texture, colours and font

181

M save graphics state (→graphical) Save current pen, texture, colours and font  181
M unclip (→graphical)  Undo previous →clip  179

A.62 edit — Modify object

M and (→image)  Bitwise and with argument  441
M append (→text buffer)  Append string (n-times)  342
M character (→text buffer)  Change character at index to ASCII value  342
M clear (→image)  Clear all pixels to 0 or ←background  441
M clear (→list browser)  Remove all items from the associated dict  150
M clear (→text buffer)  Delete all contents (and fragments)  342
M contents (→text buffer)  Set the contents (deletes fragments)  342
M delete (→node)  Delete, reconnect sons to parents  252
M delete (→text buffer)  Delete characters from index  342
M delete tree (→node)  Delete node and all subnodes  252
M fill (→image)  Fill rectangular area of image with pattern  441
M fill (→image)  Fill rectangular area of image with pattern  441
M fill (→pixmap)  Fill rectangular area of image with pattern  224
M insert (→text buffer)  Insert string at index (n-times)  342
M invert (→image)  Invert all pixels in image  441
M make (→directory)  Create the OS counterpart  386
M move (→node)  Move argument to become a son of me  253
M move after (→node)  Move node to be just after (below) arg  253
M or (→image)  Bitwise or with argument  442
M remove (→directory)  Delete the OS counterpart  386
M son (→event node)  Add a son to the node  302
M son (→event node)  Add a son to the node  302
M son (→node)  Add argument to my sons  253
M swap (→node)  Swap images of two nodes  253
M swap tree (→node)  Swap positions of two entire trees  253
M transpose (→text buffer)  Transpose [from1, to1) with [from2, to2)  342
M unrelate (→node)  Delete (direct) relation to argument  253
M xor (→image)  Bitwise xor with argument  442

A.63 edit continue — Temporary re-binding keys

M dabbrev expand (→editor)  Focus function  331
M isearch (→editor)  Focus function  331
M start isearch (→editor)  Focus function  331
V focus function (↔editor)  Method in focus of keystrokes  331

A.64 element — Vector elements

M element (→code vector)  Set specified element  577
M element (←vector)  Get element at index  454
M element (←vector)  Get element at index  454
M element (→vector)  Set specified element  454
M fill (→code vector)  Fill index range with one value  577
M fill (→vector)  Fill index range with one value  454
M head (←vector)  First element (as class chain)  454

XPCE Reference Manual

M tail (←vector)  Last element (as class chain)  454

A.65 encoding — Character-set related behaviour

M b16 (←font)  Boolean to indicate font is 16-bits  435
M bits per character (→string)  8- or 16-bits per character  481

A.66 environment — Handling the process’ environment

V directory (←process)  Directory to start the child  394
M directory (→process)  Start process in this directory  394
M environment (←process)  Sheet with process’ environment  394
V environment (-process)  Environment for the process  394
M environment (→process)  Set environment variable  394
M environment variable (←pce)  Unix environment variable (getenv)  594
M environment variable (←pce)  Unix environment variable (getenv)  594
M home (←pce)  Find XPCE’s home directory  594
M home (←pce)  Find XPCE’s home directory  594
V home (→pce)  PCE’s home directory  594
M hostname (←pce)  Name of host on which PCE runs  594
M user (←pce)  Login name of user  594
M user info (←pce)  Get information on user (from the passwd file)  594

A.67 equality — Comparing objects

M equal (→area)  Test if area is equal to the argument  418

A.68 event — Event processing

M wants keyboard focus (→button) Test if ready to accept input  79
M wants keyboard focus (→button) Test if ready to accept input  79

M wants keyboard focus (→dialog group)

Test if a member is ready for input

130

M wants keyboard focus (→editor) Test if ready to accept input (true)  332

M wants keyboard focus (→list browser)

Test if ready to accept input (non-empty)

151

M wants keyboard focus (→text item)

Test if ready to accept input

90

M activate (→text item)  Select all/deselect  90
V active (←graphical)  If @off, greyed out and insensitive  182
M active (→graphical)  If @off, greyed out and insensitive  182

M busy cursor (→display)

Define (temporary) cursor for all frames on the display

46

M busy cursor (→frame)

Define (temporary) cursor for all windows in the frame

16

V button (←gesture)  Mouse button to initiate on  275
V button (-menu bar)  Button that caused me to start  124
V button (←popup)  Name of invoking button  120
M cancel (→dialog item)  Cancel operation (enter inactive state)  75
M collapsed handler (→tree)  Add recogniser for collapsed node  247
V collapsed handlers (←tree)  Event handlers for collapsed nodes  247
V condition (↔gesture)  Additional conditions  275

V condition (↔key binding)  Activation condition  363
V current (←menu bar)  Currently visible popup  124
V current event (←window)  Event being processed now  30
M cursor (→frame)  Define the cursor for the frame-background  17
M delete recogniser (→graphical) Delete a recogniser  182
M dict item (←list browser)  DictItem on which event occurred  151
M dispatch (→display)  Dispatch events for 1/4th second  46
M dispatch (→display manager)  Dispatch events for 1/4th second  52
M drag (→click gesture)  Does nothing  279
M drag (→connect gesture)  Drag to next position  290
M drag (→gesture)  Mouse has been dragged (just succeeds)  275
M drag (→move gesture)  Drag to next position  281
M drag (→move outline gesture)  Drag outline to next position  282
M drag (→popup)  Handle a drag event  120
M drag (→popup gesture)  Pass drag events to popup  292
M drag (→resize gesture)  Changes the appropriate edges  284
M drag (→resize outline gesture) Drag outline to next position  285
V drag (↔scroll bar)  If @on, messages are sent continuously  62
V drag (↔slider)  Send messages while dragging  98
V editable (←text item)  TextItem may be edited  90
M editable (→text item)  TextItem may be edited  90
M event (→button)  Process an event  79
M event (→connection)  Process an event  258
M event (→device)  Process an event  194
M event (→device)  Process an event  194
M event (→dialog group)  Process an event  130
M event (→dialog item)  Process an event  75
M event (→editor)  Handle a general event  332
M event (→frame)  Handle event on frame-background  17
M event (→gesture)  Handle an event  276
M event (→graphical)  Handle a user-event  182
M event (→graphical)  Handle a user-event  182
M event (→handler)  Process an event  303
M event (→handler group)  Process an event  304
M event (→key binding)  Process keyboard event  363
M event (→label)  Act as button if ←message not @nil  83
M event (→list browser)  Handle arbitrary event  151
M event (→menu)  Process an event  110
M event (→menu bar)  Process an event  124
M event (→popup)  Handle an event  120
M event (→recogniser)  Process an event (fails)  273
M event (→scroll bar)  Process a user event  62
M event (→slider)  Process an event  98
M event (→tab)  Process event  133
M event (→tab stack)  Process an event  136
M event (→text)  Handle focus and keyboard events  217
M event (→text image)  Forward event to included graphicals  368
M event (→text item)  Process user event  90
M event (→tree)  Process an event  247
M event (→window)  Handle event  30
M event (→window)  Handle event  30
M event queued (→display)  Test if there are X-events waiting  46
M event queued (→display)  Test if there are X-events waiting  46
M execute (→key binding)  Invoke ‘selector’ on ‘receiver’ with args  363

M fill arguments and execute (→key binding)

Collect additional arguments and →execute

363

M generate event (→graphical)  Generate named event for graphical  183
M generate event (→graphical)  Generate named event for graphical  183
M grab keyboard (→window)  Grab keyboard events  31
M grab pointer (→frame)  Grap all pointer-events  17
M grab pointer (→window)  Grab pointer (mouse) events  31
V has pointer (↔window)  If @on, pointer (mouse) is in window  31
M in event area (→graphical)  Test if (X,Y) is in the sensitive area for events  183
M index (←text image)  Character index from event (position)  369
M initiate (→click gesture)  Send preview message  279
M initiate (→connect gesture)  Initiate connect  290
M initiate (→gesture)  Initiate the gesture (just succeeds)  276
M initiate (→move gesture)  Initiate move  281
M initiate (→move outline gesture) Display outline and change cursor  282
M initiate (→popup gesture)  Show popup  292
M initiate (→resize gesture)  Set cursor and warp pointer  284
M initiate (→resize outline gesture) Display outline and change cursor  285
V input focus (←frame)  Frame has focus for keyboard events  17
M input focus (→frame)  Frame has focus for keyboard events  17
M inspect handler (→display)  Register handler for inspect tool  46
V inspect handlers (←display)  Chain of handlers to support inspector tools  46
M item from event (←menu)  Find item on which event occurred  110

M keyboard focus (→graphical)

Get ←window’s keyboard focus if

→ wants keyboard focus

183

M leaf handler (→tree)  Add recogniser for leaf node  248
V leaf handlers (←tree)  Event handlers for leafs  248
M master (←editor)  Principal visual I’m part of (self or view)  320
M master (←list browser)  Principal visual I’m part of (self or browser)  146
M master (←visual)  Principal visual I’m part of (self)  406
V modal (←application)  Frame for modal operation  51
V modifier (↔gesture)  Key modifiers (shift, control and/or meta)  276
M node handler (→tree)  Add recogniser for any node node  248
V node handlers (←tree)  Event handlers for any type of node  248
M point (←path)  Find closest point  235
M pointed (←connect gesture)  Find the graphicals covered by the mouse  290
V pointed (←device)  Graphicals pointed-to by the mouse  194
M pointed (←text)  Convert position to character index  217
V pointed (←text image)  Graphical under the pointer  369
M pointed (←text item)  Convert position to character index  90
M pointed objects (←device)  New chain holding graphicals at point|event  194
M popup from event (←menu bar) Find popup to open from event on menu bar  124
V prefix (←key binding) Currently parsed prefix 364
M prepend recogniser (→graphical) Add recogniser for user events (first)  183
V preview (←menu)  Item in ‘preview’ state  110
M preview (→menu)  Item in ‘preview’ state  110
M recogniser (→graphical)  Add recogniser for user events (last)  183
M root handler (→tree)  Add recogniser for root node  248
V root handlers (←tree)  Event handlers for root  248
M segment (←path)  Return start-point of closest line-segment  235
V sensitive (↔window)  Window accepts events  31
M show popup (→menu bar)  Make popup ←current and →open it  124
M show pullright menu (→popup) Show pullright for this item  120
M status (→button)  Status for event-processing  79

V status (←dialog item)  Status for event-processing  75
M status (→dialog item)  Status for event-processing  75
V status (-key binding)  Internal flag  364
M status (→label)  Status for event-processing  83
V status (←list browser)  Handle typing?  151
M status (→list browser)  Handle typing?  151
M status (→menu)  Status for event-processing  110
V status (←scroll bar)  Current status for event parsing  62
M status (→text item)  Status for event-processing  91
M sub tile to resize (←tile)  Tile above or left-of gap at point  58
M terminate (→click gesture)  Send execute or cancel message  279
M terminate (→connect gesture)  Finish the connect  290
M terminate (→gesture)  Mouse button went up (just succeeds)  276
M terminate (→move gesture)  Finish the move  281

M terminate (→move outline gesture)

Move object and undisplay outline

282

M terminate (→popup gesture)  Unshow popup and execute selected item  292
M terminate (→resize gesture)  Equivalent to →drag  284

M terminate (→resize outline gesture)

Resize object and undisplay outline

286

M typed (→key binding)  Process event-id (of keyboard event)  364
M typed (→text)  Handle a keystroke  217
M typed (→text)  Handle a keystroke  217
M typed (→text item)  Process event with given id  91

M update pointed (→device)

Update ←pointed, sending area enter and area exit events

194

M verify (→click gesture)  Verify modifier and multiclick  280
M verify (→connect gesture)  Verify object connected is displayed on a device  290
M verify (→gesture)  Verify additional conditions (just succeeds)  276
M verify (→move gesture)  Verify object moved is displayed on a device  281
M verify (→popup gesture)  Verify popup can be activated  292
M verify (→resize gesture)  Test margins and set modes  284

A.69 exception — Trapping and generation exceptions

M catch error (→pce)  Indicate code is prepared to handle errors  589
M catch pop (→pce)  Pop pushed error handlers  590
M catched (→pce)  Test if error id is catched  590
V catched errors (←pce)  Errors are expected by code  590
M exception (→pce)  Raise an exception  590
V exception handlers (←pce)  Exception-name → handler mapping  590
V last error (↔pce)  Id of last occurred error  591

A.70 execute — Execution of dialog objects

M execute (←?)  Execute the get-operation  548
M execute (←binary expression) Evaluate, given variable bindings  557
M execute (←create)  Create instance and return it  554
M execute (←function)  Execute and return value  543
M execute (←progn)  Execute the progn  550
M execute (←var)  Current value of the variable  566
M execute (←when)  Test condition and evaluate ←then or ←else  553
M forward (←function)  Push @arg1, ...; execute and return value  544

M connect (→connect gesture)  Connect the receiver with the target  289
M execute (→code)  Execute code  518
M execute (←function)  Execute the function object (yielding value)  544
M execute (→label)  Execute associated message  82
M execute (→menu)  Change selection and forward message  104
M execute (→popup)  Execute selected message of item  118
M execute (→popup)  Execute selected message of item  118
M forward (→block)  Push ←parameters, @arg1 ... and execute  537
M forward (→code)  Push @arg1, ... and execute  519
M forward (→code)  Push @arg1, ... and execute  519
M forward (←function)  Push @arg1, ...; execute and return value  544
M forward vars (→code)  Push vars and execute  519
M forward vector (→code)  Push @arg1, ... from a vector and execute  519
M get (←attribute)  Invoke (read) object-attribute  512
M get (←attribute)  Invoke (read) object-attribute  512
M get (←get method)  Invoke get-method  631
M get (←get method)  Invoke get-method  631
M get (←variable)  Invoke (read) variable in object  620
M get (←variable)  Invoke (read) variable in object  620
M send (→attribute)  Invoke (write) object-attribute  512
M send (→send method)  Invoke send method on object  629
M send (→send method)  Invoke send method on object  629
M send (→variable)  Invoke (write) variable in object  620
M send (→variable)  Invoke (write) variable in object  620

A.71 feedback — Feedback for event-handling

V cancel message (↔click gesture) Message sent on up outside area  279
V execute cursor (↔click gesture) Cursor displayed while message is executed  279

V from indicators (←connect gesture)

Chain of bitmaps to indicate handles

289

M indicate (→connect gesture)  Indicate possible connectionpoints  289

M indicate handle (→connect gesture)

Indicate position of named handle

289

V line (←connect gesture)  Line for feedback (cf. outline)  289
V mark (↔connect gesture)  Image used to mark handles  289
V outline (←move outline gesture) The outline moved  282
V outline (←resize outline gesture) The outline resized  285
V preview message (↔click gesture) Message sent on down  279
V to indicators (←connect gesture) Chain of bitmaps to indicate handles  289

A.72 file — Saving and loading files, file operations

M save relation (→hyper)  Consider saving relation (→save in file)  515
M check object (→file)  Test if file contains a saved PCE object  382

M convert loaded object (→function)

Called by File ←object if conversion might be required

544

M convert loaded object (→object)

Called by File ←object if conversion might be required

501

M convert loaded object (→object)

Called by File ←object if conversion might be required

501

M convert loaded object (→scroll bar)

Convert placement attribute 60 690 Appendix A: Summary of Functional Groups

M convert old slot (→number)  Convert old value slot to new representation  484
M fd (←pce)  Number of free file descriptors  588
V file (←editor)  Associated file  321
V file (←image)  File from which to load  439
M initialise new slot (→frame)  Initialise ←background  11
M initialise new slot (→graphical) Assigns ←shadow to ZERO, active to @off  170
M initialise new slot (→object)  Called by File ←object if a new slot is found  501
M initialise new slot (→object)  Called by File ←object if a new slot is found  501
M insert file (→text buffer)  Insert file at index (n-times)  340
M load (→bitmap)  Load file (in path) into bitmap  221
M load (→editor)  Clear editor and load a file  321
M load (→image)  Load image from file (searching in path)  439
M load (→image)  Load image from file (searching in path)  439
M object (←file)  New object from file created with →save in file  382
M object (←file)  New object from file created with →save in file  382
M save (→editor)  Save to current or given file  321
M save (→editor)  Save to current or given file  321
M save (→image)  Save bits in standard X11 format  439
M save (→text buffer)  Save (from, length) to file  340
M save buffer (→editor)  Save to current ←file  321
M save in file (→object)  Save object and it’s context in a file  502
V save style (↔class)  How to save instances to file  608
M save style (←variable)  Save style for this slot  620
M save style (→variable)  Slot saved as @nil or its value  620
M save style variable (→class)  Set the save style for named variable  608
M storage reference (←colour)  Description name for →save in file  424
M storage reference (←function)  Description name for →save in file  544
M storage reference (←object)  Description name for →save in file  502

A.73 file type — File properties

V kind (←file)  Text or binary file  383
M kind (→file)  Text or binary file  383

A.74 fill — Breaking (long) text into lines

M fill (→editor)

Fill (from, to) using left- and rightmargin [justify]

331

M fill paragraph (→editor)  Fill paragraph around point  331
M fill region (→editor)  Fill paragraphs in region  331
M fill selection (→editor)  Fill paragraphs in selection  331
M justify paragraph (→editor)  Justify paragraph around point  331
M justify region (→editor)  Justify region  331
V left margin (↔editor)  Auto-indent margin width  331
V right margin (↔editor)  Auto-fill margin  331
M set fill column (→editor)  Set fill column to argument  331

A.75 filter — Filtering file I/O

M filter (←file)  Determine input filter from extension  384
V filter (↔file)  Name of input/output filter used  384

XPCE Reference Manual

A.76 focus — Focussing events to objects

M wants keyboard focus (→graphical)

Test if graphicals wants keyboard events (fail)

185

M wants keyboard focus (→graphical)

Test if graphicals wants keyboard events (fail)

185

M advance (→device)  Advance keyboard focus to next item  195
M advance (→device)  Advance keyboard focus to next item  195
M advance (→tab)  Advance keyboard focus to next item  133
M caret (→dialog)  Assign the caret to an input object  69
M focus (→graphical)  Set window focus to this graphical  185
V focus (←window)  Graphical in focus  32
M focus (→window)  Forward events to graphical  31
M focus (→window)  Forward events to graphical  31
V focus button (←window)  Button that should terminate focus  32
M focus cursor (→graphical)  Set cursor until focus in released  185
V focus event (←window)  ←current event when →focus was set  32
V focus recogniser (←window)  Recogniser in focus  32
V input focus (←window)  Window has input focus  32
M input focus (→window)  Window has input focus  32
M input window (→frame)  Input is directed to this window  18
M keyboard focus (←frame)  Window for default keyboard input  18
M keyboard focus (→frame)  Redirect (default) keyboard input here  18
M keyboard focus (←graphical)  @on if graphical is in focus of the keyboard  185
V keyboard focus (←window)  Graphical in focus of keyboard events  32
M keyboard focus (→window)  Graphical in focus of keyboard events  32

A.77 font — Available fonts

M font alias (←display)  Lookup logical name  44
M font alias (→display)  Define a logical name for a font  44
M font alias (→display)  Define a logical name for a font  44
V font table (↔display)  Mapping for logical font-names to fonts  44
M load font aliases (→display)  Load font aliases from named resource  44
M load font aliases (→display)  Load font aliases from named resource  44
M load font family (→display)  Create predefined fonts from family  44
M load font family (→display)  Create predefined fonts from family  44
M load fonts (→display)  Create predefined font set from resources  44
M load fonts (→display)  Create predefined font set from resources  44

A.78 format — Formatted write (as C printf())

M appendf (→editor)  Formatted append (see ‘string →format’)  327
M format (→editor)  Formatted insert (see ‘string →format’)  327

M format (→label)

Create string from format and make it the selection

83

M format (→string)  Format (like printf) in string  481
M format (→string)  Format (like printf) in string  481
M format (→text buffer)  Append formatted text  342
M format (→view)  Formatted insert (see ‘string→format’)  313
M format (→view)  Formatted insert (see ‘string→format’)  313

692 Appendix A: Summary of Functional Groups

A.79 forward — Execute code, forwarding context parameters

M post (→event)  Deliver the event at the argument  294
M post (→event)  Deliver the event at the argument  294

A.80 fragment — Text fragments

M find all fragments (←text buffer) New chain holding fragments accepted by code  343
M find fragment (←text buffer)  First fragment that accepts code  343
V first fragment (←text buffer)  First fragment (lowest start index)  343
M fragment (←text margin)  Find the fragment at the event-position  372
V last fragment (←text buffer)  Last fragment (highest start index)  343

A.81 function — Object management for functions

M class (←function)  Class instead of result’s  545
M class (←object)  Equivalent to ←class  508
M class name (←function)  Class name instead of result’s  545
M class name (←object)  Equivalent to ←class name  508
M free (→function)  Free obtainer instead of result  545
M free (→object)  Equivalent to →free  508
M inspect (←function)  Inspect instead of result’s  545
M inspect (→function)  Inspect obtainer instead of result  546
M inspect (←object)  Equivalent to ←inspect  508
M inspect (→object)  Equivalent to →inspect  508
M instance of (→function)  Test class of obtainer instead of result  546
M instance of (→object)  Equivalent to →instance of  508
M instance of (→object)  Equivalent to →instance of  508
M man id (←function)  Manual identifier instead of result’s  546
M man id (←object)  Equivalent to ←man id  508
M references (←function)  Reference count instead of result’s  546
M references (←object)  Equivalent to ←references  508
M same reference (→function)  Test equivalence instead of result  546
M same reference (→object)  Equivalent to →same reference  508
M slot (←function)  Slot value instead of result’s  546
M slot (←object)  Equivalent to ←slot  508

A.82 grey — Colour to greylevel transformation

M intensity (←colour)  Total light intensity of the colour  425

A.83 group — Functional grouping of behaviour

V end group (←menu item)  Popup: add separation-line  116
M end group (→menu item)  Popup: add separation-line  116

A.84 hashing — Caching information (speed up)

V keys (←table)  Vector to determine key columns  465
M table (←dict)  Return hash-table key -→ dict item  158
V table (-dict)  Hashtable for access on key  158
V table (-event tree)  Hashtable to find nodes by value  301

XPCE Reference Manual Appendix A: Summary of Functional Groups 693

A.85 hierarchy — Hierarchical structure

M is parent (→node)  Test if node is a parent (recursively)  254
M is son (→node)  Test if node is a son (recursively)  254
V level (←node)  Distance from the root  254
M parent (←directory)  New directory for parent directory  387
V parent (←event node)  Direct parent of the node  302
V parents (←node)  Parent nodes of this node  254
V root (←event tree)  Root node of the hierarchy  301
M root (→event tree)  Root node of the hierarchy  301
V sons (←event node)  Chain of direct sons  302
V sons (←node)  Sub nodes of this node  254

A.86 host — Communication with the host language

M connection fd (←display)  Unix file descriptor for X-display connection  43
V language (↔host)  Host language pce is connected to  581
M syntax (→pce)  Specify language compatible syntax  588
M syntax (→pce)  Specify language compatible syntax  588
V system (↔host)  Identifier name of host language  581

A.87 icon — Iconising Frames

M closed (←frame)  Open (@off) or iconic (@on)  8
M closed (→frame)  Open/iconify frame  8
M icon (→frame)  Set image and icon label  8
V icon image (←frame)  Image used for the iconic representation  8
M icon label (←frame)  Name of the icon  8
V icon label (-frame)  Label in the iconic representation  8
M icon label (→frame)  Label in the iconic representation  8
M icon position (←frame)  (Current) position of the icon  8
V icon position (←frame)  Position of the iconic image  8
M icon position (→frame)  Position of the iconic image  8

A.88 implementation — Implementation of behaviour

V function (-method)  If implemented in C: function pointer  625
V message (↔method)  If implemented in PCE: the code object  625

A.89 indentation — Create/analyse text indentation

M align (→editor)  Align here [caret] to indicated column  323
M align line (→editor)  Align line to argument  323
M align region (→editor)  Align region to argument  323
V indent increment (↔editor)  Indent/undent amount  323
M indent line (→editor)  Indent line by ←indent increment  323
M indent region (→editor)  Indent lines in region by ←indent increment  323
M indent selection (→editor)  Indent lines in selection by ←indent increment  323
M indentation (←editor)  Column of first non-blank character  323
M newline and indent (→editor)  Start a newline and indent  324
M undent line (→editor)  Unindent line by ←indent increment  323
M undent region (→editor)  Unindent lines in region by ←indent increment  323

Appendix A: Summary of Functional Groups 694 Appendix A: Summary of Functional Groups M undent selection (→editor)

Unindent lines in selection by ←indent increment

323

M untabify (→string)  Replace tab characters by spaces  481
M untabify (→string)  Replace tab characters by spaces  481

A.90 index — Position in a sequence

M index (←chain)  Index (1-based) at which argument is  447
M next (←chain)  Element after given value  447
M nth0 (←chain)  Element at 0-based index  447
M nth0 (→chain)  Change content of nth (0-based) cell  447
M nth1 (←chain)  Element at 1-based index  447
M nth1 (←chain)  Element at 1-based index  447
M nth1 (→chain)  Change content of nth (1-based) cell  447
M previous (←chain)  Element before given value  447

A.91 initialise — Realising constraints

M banner (→pce)  Write standard banner to terminal  587
M banner (→pce)  Write standard banner to terminal  587

A.92 input — Handling (process) input

M end of file (→process)  Send when end-of-file is reached  392
M end of file (→socket)  EOF read  397
M end of file (→stream)  Send when end-of-file is reached  389
M exited (→process)  Process has exited with status  392
V input message (↔stream)  Forwarded on input from the stream  389
M killed (→process)  Process has terminated on named signal  392
M read line (←stream)  Read line with optional timeout (milliseconds)  389
V record separator (←stream)  Regex that describes the record separator  389
M record separator (→stream)  Regex that describes the record separator  389
M stopped (→process)  Process has stopped on named signal  392
V terminate message (↔process) Forwarded when the process terminates  392

A.93 insert — Text insertion commands

M append (→editor)  Append text (left margin, auto newline)  328
M append (→editor)  Append text (left margin, auto newline)  328
M insert (→editor)  Insert text at caret (moves caret)  328
M insert (→text)  Insert text at position [←caret]  216
M insert cut buffer (→editor)  Insert value of X cut-buffer  328
M insert quoted (→editor)  Insert typed character n times (no fill)  328
M insert self (→editor)  Insert typed character n times  328
M insert self (→text)  Insert n-times char at caret  216
M insert self fill (→editor)  Insert char n times; adjust margins  328
M newline (→editor)  Insert newlines  328
M newline (→text)  Insert newlines (RET, LFD)  216
M open line (→editor)  Insert newlines after caret  328
M open line (→text)  Insert newlines after caret (\C-o)  216
M print (→editor)  Insert text at caret (auto newline)  328
M typed (→editor)  Process a keystroke  328

XPCE Reference Manual

M yank (→editor)  Yank current kill-buffer  328
M yank (→editor)  Yank current kill-buffer  328

A.94 internal — Private behaviour

M confirm pressed (→display)  Handle confirmer events  49
M execute (→<)  Evaluate arguments and compare  533
M execute (→=)  Test if equation is true  532
M execute (→=<)  Evaluate arguments and compare  535
M execute (→==)  Evaluate both sides and test on equal  539
M execute (→==)  Evaluate both sides and test on equal  539
M execute (→>)  Evaluate arguments and compare  534
M execute (→>)  Evaluate arguments and compare  534
M execute (→>=)  Evaluate arguments and compare  536
M execute (→@=)  Assign the reference  542
M execute (→@=)  Assign the reference  542
M execute (→\==)  Evaluate both sides and test on non-equal  540
M execute (→and)  Evaluate and  528
M execute (→and)  Evaluate and  528
M execute (→assign)  Bind the variable  568
M execute (→assign)  Bind the variable  568
M execute (←code)  Execute the function object (error)  519
M execute (→code)  Execute the code object (redefined)  519
M execute (→code)  Execute the code object (redefined)  519
M execute (→if)  Test condition and branch  524
M execute (→if)  Test condition and branch  524
M execute (→message)  Send the message  522
M execute (→message)  Send the message  522
M execute (→not)  Evaluate argument test and negate result  530
M execute (→not)  Evaluate argument test and negate result  530
M execute (→or)  Evaluate tests until one succeeds  529
M execute (→or)  Evaluate tests until one succeeds  529
M execute (→while)  Execute body until test fails  526
M fetch function (←editor)  Pointer to C-function to fetch char  336
M fetch function (←editor)  Pointer to C-function to fetch char  336
M fetch function (←list browser) Pointer to C-function to fetch char  153
M margin function (←editor)  Pointer to C-function to fetch margins  336
M margin function (←editor)  Pointer to C-function to fetch margins  336
M margin function (←list browser) Pointer to C-function to fetch margins  154
V margin function (-text image) C-function to fetch margins from source  371
M rewind function (←editor)  Pointer to C-function to rewind object  336
M rewind function (←editor)  Pointer to C-function to rewind object  336
M rewind function (←list browser) Pointer to C-function to rewind object  154
V rewind function (-text image) C-function to rewind input  371
M scan function (←editor)  Pointer to C-function to scan for char-type  336
M scan function (←editor)  Pointer to C-function to scan for char-type  336
M scan function (←list browser) Pointer to C-function to scan for char-type  154
M seek function (←editor)  Pointer to C-function to seek to position  336
M seek function (←editor)  Pointer to C-function to seek to position  336
M seek function (←list browser) Pointer to C-function to seek to position  154
V selection (-text)  Selected text  219
M value (→name)  Modify name, preserving identity  478
V amount (-scroll bar)  Amount to scroll  63

V attributes (-fragment)  Various packed attributes  356
V auto hide (←scroll bar)  If @on, hide if all is visible  63
M auto hide (→scroll bar)  If @on, hide if all is visible  63
V boot (-class)  #PCE slots when booting; 0 otherwise  613
V bubble length (-scroll bar)  Pixel size of bubble  63
V bubble start (-scroll bar)  Pixel position of bubble  63
V c declarations (-class)  Description left by C-compiler  613
V changed function (-class)  C function to trap slot changes  613
V clone function (-class)  C function to clone alien data  613
M compute level (→node)  Recursively assign each node a ←level  254
V current (-chain)  Pointer to current cell  452
V dabbrev origin (-editor)  Caret index of start of target  336
V dabbrev pos (-editor)  Caret index at start of dabbrev  336
V dabbrev reject (-editor)  Rejected alternatives  336
V dabbrev target (-editor)  Dynamic abbreviation target  336
V destroying (-frame)  Handle destruction gracefully  21
V direction (-scroll bar)  Direction in which to scroll or jump  63
V displayed cursor (-window)  Currently displayed cursor  35
V down position (←click gesture) Position of the down event  280
V fd (-file)  Unix file (stream) handle  384
V fetch (-text image)  C-function to fetch next character from source  371
V get function (-class)  Execute function-objects  614
V head (-chain)  Pointer to first cell  452
V header (-char array)  Header info (packed)  476
V in event area (-class)  Graphicals: test if event in area  614
V input allocated (-stream)  Allocated size of input buffer  390
V input buffer (-stream)  Buffer for collecting input-data  390
V input p (-stream)  Number of characters in input buffer  390
V internal mark (-editor)  Additional mark for internal use  336
V kill location (-editor)  Status for handling kill commands  336
V left (-arrow)  Left-end of base  241
V load function (-class)  C-function to reload alien data  614
V locked (-constraint)  Avoid looping of propagation  264
V make class function (-class)  C-function that created the class  614
M modify (←char array)  New instance of my class  476
M modify (←name)  Lookup or create argument name  478
M modify (←string)  Make modified version  481
V offset (←move gesture)  Offset of down relative to object  281
V offset (-scroll bar)  Offset of down from top of bubble  63

V outline gesture (←resize outline gesture)

The outline resized

286

V position (-text)  Avoid ‘walking’ with alignment  219
V rdfd (-stream)  File-handle to read from stream  390
V rdstream (-stream)  Stream used for ←read line  390
V redraw function (-class)  C function to repaint graphicals  614
V right (-arrow)  Right-end of base  241
V save function (-class)  C-function to save alien data  614
V scan (-text image)  C-Function to scan for a syntactical category  371
V scroll offset (-window)  How much the window is scrolled  35
V search base (-editor)  Index where last change was done  336
V search direction (-editor)  Current direction of search  337
V search origin (-editor)  Index where search started  337
V search string (↔editor)  Current target of search  337
V seek (-text image)  C-Function to seek to a position  371

M selected completion (→menu)  Handle combo box message  111
V send function (-class)  Execute code-objects  614
M syntax (→name)  Upcase and map word separator  478
V tail (-chain)  Pointer to last cell  452
V text (-char array)  Text represented (8- or 16-bits chars)  476
V trace function (-class)  C-function to handle trace message  614
V translate function (-type)  C-function to convert to this  575
V unit (-scroll bar)  Unit to scroll  63
M unlink from (→hyper)  ←from side is being unlinked  515
M unlink to (→hyper)  ←to side is being unlinked  515
V validate function (-type)  C-function to check this type  575
V wm protocols attached (←frame) Have we registered the protocols  21
V wrfd (-stream)  File-handle to write to stream  390
V ws ref (-stream)  Window system synchronisation  390
V ws ref (←timer)  Window System Reference  310
V x caret (-text)  X-position of caret  219
V x offset (-text)  Horizontal scroll when nonzero length  219
V y caret (-text)  Y-position of caret  219

A.95 interpolation — Interpolation points for smooth lines

V interpolation (←path)  Derived interpolated points  234
V intervals (←path)  Interpolation intervals between points  234
M intervals (→path)  Interpolation intervals between points  234
V kind (←path)  Whether path is interpolated over points  234
M kind (→path)  Whether path is interpolated over points  234

A.96 items — Manipulation and query items of a browser or menu

M append (→menu)  Append a menu item, value or popup  102
M append (→menu)  Append a menu item, value or popup  102
M clear (→menu)  Delete all menu items  102
M delete (→menu)  Delete a menu item or value  102
M member (←menu)  Find menu item with given value  102
M member (→menu)  Test if menu item or value is member  102
M members (→menu)  →clear and →append members of chain  102
M prepend (→menu)  Prepend a menu item, value or popup  102
M sort (→menu)  Sort members (see ‘chain →sort’)  102

A.97 iterate — Run code on each element of a collection

M find (←chain)  First element accepted by code  449
M find (←chain)  First element accepted by code  449
M find (←node)  Find node that accepts code  251
M find all (←chain)  New chain with elements accepted by code  449
M find node (←node)  Find node that has →image graphical  251

M for all (→chain)

Run code on all elements, demand acceptance ([safe])

449

M for all (→chain)

Run code on all elements, demand acceptance ([safe])

449

M for all (→device)  Run code on graphicals; demand acceptance  190

M for all (→dict)

Run code on all dict items, demand acceptance ([safe])

157

M for all (→hash table)

Run code on all values; demand acceptance ([safe])

461

M for all (→hash table)

Run code on all values; demand acceptance ([safe])

461

M for all (→node)  Run code on all sons; demand acceptance  251
M for all (→regex)  Run code on each match  351
M for all (→regex)  Run code on each match  351
M for all (→sheet)  Run code on all attributes (demand acceptance)  458
M for all (→sheet)  Run code on all attributes (demand acceptance)  458
M for all (→tile)  Iterate over all ←object’s  55
M for all (→tree)  Run code on all nodes (demand acceptance)  245
M for all (→vector)  Run code on all elements; demand acceptance  455
M for all (→vector)  Run code on all elements; demand acceptance  455
M for all fragments (→text buffer) Iterate code over all fragments  339
M for some (→chain)  Run code on all elements ([safe])  449
M for some (→chain)  Run code on all elements ([safe])  449
M for some (→device)  Run code on all graphicals  190
M for some (→dict)  Run code on all dict items ([safe])  157
M for some (→hash table)  Run code on all values ([safe])  461
M for some (→node)  Run code on all sons  251
M for some (→sheet)  Run code on all attributes  458
M for some (→tree)  Run code on all nodes  245
M for some (→vector)  Run code on all elements  455
M map (←chain)  New chain with result of applying function  450
M map (←chain)  New chain with result of applying function  450

A.98 kind — Category of the instance

V kind (-colour)  From X-colour database or user-defined  424

A.99 label — Visible name of objects

M default label (←menu item)  Compute default label from value  113
M default label (←menu item)  Compute default label from value  113
M label (→button)  Sets the visible label  77
M label (→button)  Sets the visible label  77
V label (←dialog group)  Text displayed for the label  128
V label (←dialog item)  Label of the item  72
M label (→dialog item)  Label of the item  72
M label (→editor)  Set the name of the label  318
V label (←frame)  Label of the frame  7
M label (→frame)  Set label of the frame  7
M label (←list browser)  Current value of the label  145
M label (→list browser)  Set the name of the label  145
M label (←window decorator)  Currently displayed label  36
M label (→window decorator)  Define window-level label  36
V label font (←dialog item)  Font used for the label if not an image  72
M label font (→dialog item)  Font used for the label if not an image  72
M label name (←dialog group)  Determine default-label from the name  128
M label name (←dialog item)  Determine default-label from the name  72
M label name (←dialog item)  Determine default-label from the name  72

V label text (←window decorator) Text object to display label  36
M selection (←button)  Equivalent to ←label  77
M selection (→button)  Equivalent to →label  77

A.100 language — Specialisation for specific languages

M in comment (→text buffer)  Test if first index is in comment  340
M in string (→text buffer)  Test if first index is in string constant  340
M matching bracket (←text buffer) Find bracket matching bracket at index  341
M matching quote (←text buffer) Find matching string-quote  341
M scan syntax (←text buffer)  Find syntactical state of position  341
M skip comment (←text buffer)  Skip comments and optionally white space  341
V syntax (↔text buffer)  Description of the used syntax  341

A.101 layout — Spatial relations between graphical objects

M compute desired size (→dialog) Compute the desired size  67
M compute desired size (→dialog) Compute the desired size  67
M compute desired size (→window) Compute the desired size (no-op)  26
M compute desired size (→window) Compute the desired size (no-op)  26

M compute desired size (→window decorator)

Compute the desired size (delegate to ←window)

37

V above (←dialog item)  DialogItem above me  73
M above (←graphical)  Dialog item integration; fails  171
M above (→graphical)  Put me above argument  171
M above (→tile)  Place a tile above me  56
M above (→window)  Put me above argument  26
V accelerator (←dialog item)  Automatically align value  73
M accelerator (→dialog item)  Automatically align value  73
V alignment (↔dialog group)  Align in columns or right of item to the left  129
V alignment (↔dialog item)  Align in columns or right of item to the left  73
M alignment (←graphical)  Dialog item integration  172
M alignment (→graphical)  Dialog item integration  172
V auto align (↔dialog group)  Automatically align in dialog (@on)  129
V auto align (↔dialog item)  Item is automatically placed by its dialog  74
M auto align (←graphical)  Dialog item integration  172
M auto align (→graphical)  Dialog item integration  172
V auto label align (↔dialog item) Automatically align label  74
M auto label align (←graphical)  Dialog item integration  172
M auto label align (→graphical)  Dialog item integration  172
V auto layout (←tree)  Enforce automatic layout?  245
M auto layout (→tree)  Enforce automatic layout?  245
V auto value align (↔dialog item) Automatically align value  74
M auto value align (←graphical)  Dialog item integration  172
M auto value align (→graphical)  Dialog item integration  172
V below (←dialog item)  DialogItem below me  74
M below (←graphical)  Dialog item integration; fails  171
M below (→graphical)  Put me below argument  171
M below (→graphical)  Put me below argument  171
M below (→tile)  Place a tile below me  56
M below (→tile)  Place a tile below me  56
M below (→window)  Put me below argument  26
M below (→window)  Put me below argument  26

V direction (←tree)  Layout of the tree  246
M direction (→tree)  Layout of the tree  246
V distance (←scroll bar)  Relative distance (pixels)  61
M enforce (→tile)  Enforce the tile layout  56
V enforced (←tile)  If @on, the tile’s layout will be enforced  56
M fit (→frame)  Recompute windows and resize the frame  13
M fit (→frame)  Recompute windows and resize the frame  13
V format (←device)  Use tabular layout  190
M format (→device)  Use tabular layout  190
V gap (↔dialog)  Distance in X and Y direction between items  68
V gap (←menu)  Gap between items  108
M gap (→menu)  Gap between items  108
V gap (←text margin)  Distance between icons in X and Y  372
M gap (→text margin)  Distance between icons in X and Y  372
M hor stretch (←graphical)  Horizontal stretchability of dialog item (fail)  172
M hor stretch (←graphical)  Horizontal stretchability of dialog item (fail)  172
M hor stretch (←menu bar)  Stetchability (1)  123
V hor stretch (↔text item)  Horizontal stretchability  89
M just one space (→editor)  Replace blanks with a single space  323
V label format (←dialog item)  Align labels in their box  74
M label format (→dialog item)  Align labels in their box  74
V label offset (←tab)  X-Offset of label-box  132
M label offset (→tab)  X-Offset of label-box  132
V label size (←tab)  Size of the label-box  132
M label width (←dialog item)  Virtual method  74
M label width (←dialog item)  Virtual method  74
V label width (-dialog item)  Width of the label in pixels  74
M label width (→dialog item)  Virtual method  74
M label width (←menu)  Minimum width for label in pixels  108
M label width (→menu)  Set width in pixels used for label  108
M label width (←slider)  Get minimal width required for label  97
M label width (→slider)  Set width of label in pixels  97
M label width (←text item)  Width required to display label  89
M label width (→text item)  Width of label in pixels  89
M layout (→dialog)  (Re)compute layout of dialog items  68
M layout (→dialog)  (Re)compute layout of dialog items  68
M layout (→graphical)  Make graph-layout for connected graphicals  172
M layout (→graphical)  Make graph-layout for connected graphicals  172
M layout (→tile)  Compute subtile layout and adjust objects  56
M layout dialog (→device)  (Re)compute layout of dialog items  191
M layout dialog (→device)  (Re)compute layout of dialog items  191
M layout dialog (→dialog group)  (Re)compute layout of dialog items  129
M layout dialog (→graphical)  Compute layout as a dialog object  173
M layout dialog (→graphical)  Compute layout as a dialog object  173
M layout dialog (→tab stack)  Adjust the members  135

M layout dialog (→window decorator)

(Re)compute layout of dialog items (ignore)

37

M layout labels (→tab stack)  Assign positions for the labels  135
V left (←dialog item)  DialogItem left of me  74
M left (←graphical)  Dialog item integration; fails  171
M left (→graphical)  Put me left of argument  171
M left (→tile)  Place a tile to my left  56
M left (→window)  Put me left of argument  26
V level gap (←tree)  Distance between levels  246

M level gap (→tree)  Distance between levels  246
V link (←tree)  Generic connection between graphicals  246
V link gap (←tree)  Distance between line and image  246
M link gap (→tree)  Distance between line and image  246
V neighbour gap (←tree)  Distance between neighbours  246
M neighbour gap (→tree)  Distance between neighbours  246
V orientation (←tile)  Direction of adjacent sub-tiles  56
V placement (←scroll bar)  Relative automatic placement  61

M rearrange (→window decorator)

Rearrange ←window, ←scrollbars and ←label text

37

M reference (←button)  Left, baseline of label  78
M reference (←button)  Left, baseline of label  78
M reference (←dialog item)  Reference point for alignment  74
V reference (→dialog item)  Reference point for alignment  74
M reference (←graphical)  Dialog item integration; fails  172
M reference (→graphical)  Dialog item integration  172
M reference (←label)  Baseline or bottom (image)  82
M reference (←label)  Baseline or bottom (image)  82
M reference (←menu)  Baseline of label  108
M reference (←menu bar)  Reference of first button  123
M reference (←slider)  Baseline of label  97
M reference (←text item)  Baseline of label  89
M resize (→frame)  Recompute layout of sub-windows  13
V right (←dialog item)  DialogItem right of me  75
M right (←graphical)  Dialog item integration; fails  171
M right (→graphical)  Put me right of argument  171
M right (→graphical)  Put me right of argument  171
M right (→tile)  Place a tile to my right  56
M right (→window)  Put me right of argument  26
M room (→device)  Test if no graphicals are in area  191
V size given (-dialog)  User specified explicit size  68
M tile (←frame)  Find tile managing object  13
M tile (←window)  Tile of window (create if not there)  26
V tile (-window)  Tile that manages my area  26
M value width (←dialog item)  Virtual method  75
M value width (←dialog item)  Virtual method  75
M value width (→dialog item)  Virtual method  75
M value width (←menu)  Minimum width for value in pixels  109
V value width (←menu)  Minimum width for values  109
M value width (→menu)  Minimum width for values  109
V value width (-text item)  Width of the value-part in pixels  89
M ver stretch (←graphical)  Vertical stretchability of dialog item (fail)  173
M ver stretch (←graphical)  Vertical stretchability of dialog item (fail)  173

A.102 limit — Query PCE limits

M max integer (←pce)  Highest representable integer  588
M min integer (←pce)  Lowest representable integer  588

A.103 line — Line oriented operations

M delete line (→editor)  Delete given line number  333
M line no (←char array)  Get 1-based line number at which index is  475

M line number (←editor)  Line number point is at  333
M line number (→editor)  Move caret to start of line  333
M line number (←text buffer)  Get line number (1-based) for character index  343
M replace line (→editor)  Replace given line number by string  333

A.104 list — List operations (add, delete)

M append (→chain)

Append argument to chain (not expanding obtainers)

445

M append (→chain)  Append argument to chain  445
M append (→chain)  Append argument to chain  445
M append (→code vector)  Append element at ←high index+1  577
M append (→handler group)  Append a recogniser  304
M append (→progn)  Append a statement  550
M append (→vector)  Append element at ←high index+1  454
M clear (→chain)  Remove all elements from chain  445
M delete (→chain)  Delete first occurrence of argument  445
M delete (→handler group)  Delete first occurrence of recogniser  304
M delete all (→chain)  Delete all occurrences of argument  445
M delete head (←chain)  First element and delete it  445
M delete head (→chain)  Delete first element  445
M delete tail (→chain)  Delete last element  445
M head (←chain)  First element  445
M head (←chain)  First element  445
M insert after (→chain)  Insert first after second object (@nil: prepend)  445
M insert before (→chain)  Insert first before second object  446
V members (←handler group)  Members of the collection  304
M merge (←chain)  New chain holding concatenation  446
M merge (→chain)  Append all elements from argument  446
M merge (→chain)  Append all elements from argument  446
M next (←fragment)  Next in list for which condition is true  354
V next (-fragment)  Next in double-linked chain  354
M prepend (→chain)  Add argument as first element  446
M previous (←fragment)  Previous in list for which condition is true  354
V previous (-fragment)  Previous in double-linked chain  354
M replace (→chain)  Replace all occurrences  446
M tail (←chain)  Last element  446
M tail (←chain)  Last element  446

A.105 location — Locating points

V file name (↔source location)  Name of the file in which the source resides  633
M find (→file)  Find file in search-path  383
M find (→file)  Find file in search-path  383
M index (←file)  Current index (Unix tell())  383
V line no (↔source location)  Starting line number of the source  633

M position (←handle)

New point with position on graphical relative to device

262

M seek (→file)  Seek to index from {start,here,end}  384
M x (←handle)  X-position on graphical relative to device  262
V x position (↔handle)  Expression for X in variable ‘w’  262
M y (←handle)  Y-position on graphical relative to device  262
V y position (↔handle)  Expression for Y in variable ‘h’  262

Appendix A: Summary of Functional Groups 703

A.106 lookup — (Table) lookup methods

M match (←table)  New chain with vectors matching arg-1  465
M member (←browser)  Dict item with given key value  140
M member (←dict)  Find dict item from ←key  157
M member (←hash table)  Get associated value  461
M member (←hash table)  Get associated value  461
M members (←table)  New chain with all member-vectors  465
M node (←event tree)  Find a node from it’s associated value  301
M vectors (←table)  Chain with vectors matching named field  465

A.107 manual — Support for the online reference manual

M access arrow (←method)  Arrow indicating send- or get-access  627
M access arrow (←variable)  Arrow indicating access-rights  621
M access arrow (←variable)  Arrow indicating access-rights  621
M context name (←variable)  Name of context class  621
V creator (←class stub)  Who created the class  616
M group (←method)  (Possible inherited) group-name  627
M group (←method)  (Possible inherited) group-name  627
V group (-method)  Conceptual group of method  627
M group (←resource)  Same as related variable  403
M group (←variable)  (Possible inherited) group-name  621
M group (←variable)  (Possible inherited) group-name  621
V group (-variable)  Conceptual group of variable  621
M has source (→class)  Test if object may have associated sourc  610
M has source (→method)  Test if object may have associated sourc  627
M has source (→resource)  Test if object may have associated sourc  403
M has source (→variable)  Test if object may have associated sourc  621
M man attribute (←object)  Fetch a manual attribute  509
M man attribute (→object)  Store a slot of the manual c  509
M man attribute (←resource)  Get default value of resourc  403
M man card (←object)  Manual card for obje  509
M man card class (←class)  Manual card type  610
M man card class (←error)  Manual card type  644
M man card class (←method)  Manual card type  627
M man card class (←resource)  Manual card type  403
M man card class (←variable)  Manual card type  621
M man create card (←object)  Create manual card for objec  509
M man creator (←class)  Creator used by manual filte  610
M man creator (←error)  For now, always returns built in  644
M man creator (←method)  ←creator of the ←conte  627
M man creator (←object)  Global defau  509
M man creator (←resource)  ←creator of the ←conte  404
M man creator (←variable)  ←creator of the ←conte  621
M man delegate header (←class)  Description of delegation behavi  610
M man documented (→method)  Look for inherited t  627
M man documented (→object)  Test if object is documented  509
M man header (←class)  New string with with term description  610
M man header (←get method)  Header for card brow  631
M man header (←send method)  Header for card brow  630
M man header (←variable)  Header for card view  621
M man id (←class stub)  Card Id for method  616

Appendix A: Summary of Functional Groups

M man id (←class stub)  Card Id for method  616
M man id (←error)  Identifier of object  644
M man id (←method)  Card Id for method  627
M man id (←method)  Card Id for method  627
M man id (←object)  Card Id for global object  509
M man id (←object)  Card Id for global object  509
M man id (←resource)  Card Id for resource  404
M man id (←variable)  Card Id for variable  621
M man id (←variable)  Card Id for variable  621
M man indicator (←class stub)  Manual type indicator (‘C’)  616
M man indicator (←method)  Manual type indicator (‘M’)  627
M man indicator (←object)  Manual type indicator (‘O’)  510
M man indicator (←object)  Manual type indicator (‘O’)  510
M man indicator (←resource)  Manual type indicator (‘R’)  404
M man indicator (←variable)  Manual type indicator (‘V’)  621

M man inherit object (←get method)

Inherit from variable if not availab

631

M man inherit object (←object)  Object from which to inherit attribu  510

M man inherit object (←send method)

Inherit from variable if not availab

630

M man inherit object (←variable) Lookup default in resour  621

M man inherited attribute (←object)

Default inherited va

510

M man inherited attribute (←resource)

Inherit description from variabl

404

M man module (←object)  Module for global object  510
M man module name (←class)  Manual module name for class  611
M man module name (←error)  Manual module name for metho  644
M man module name (←method) Manual module name for metho  627
M man module name (←object) Module name for global objec 510
M man module name (←resource) Manual module name for metho  404
M man module name (←variable) Manual module name for varia  622
M man name (←class)  Name for relation browse  611
M man name (←error)  Name for relation browse  644
M man name (←get method)  Name for relation browse  632
M man name (←object)  Name for relation browse  510
M man name (←resource)  Name for relation browse  404
M man name (←send method)  Name for relation browse  630
M man name (←variable)  Name for relation browse  622
M man relate (→object)  Create a manual relation  510
M man related (←object)  New chain with related objec  510
M man related (→object)  Create a manual relation  510
M man summary (←class)  New string with header and summary  611
M man summary (←error)  Summary stri  644
M man summary (←method)  New string with documentation summary  627
M man summary (←resource)  New string with documentation summary  404
M man summary (←variable)  New string with summary  622
M man unrelate (→object)  Destroy a manual relatio  510
M name (←error)  (undocumented)  644
V source (↔class)  Location in the sources  611
V source (↔method)  Location of definition in the sources  628
M source (←resource)  Find source (same as related cla  404
M source (←variable)  Find source (same as related cla  622
M spy (→method)  Set spy-point on Prolog predicate for method  628

V summary (↔class stub)  Summary documentation for class  616
V summary (↔constant)  Short description  468
M summary (←error)  (undocumented)  644
M summary (←method)  ←summary or try to infer summary  628
M summary (←method)  ←summary or try to infer summary  628
V summary (-method)  Summary documentation  628
V summary (↔resource)  Summary documentation  404
V summary (↔variable)  Summary documentation  622

A.108 member — Find objects (by name)

M member (←list browser)  DictItem with given key  152

A.109 menu — Associating (Popup) menus

M popup (←browser)  Get popup menu of the list browser  141
M popup (→browser)  Associated popup menu  141
M popup (→browser)  Associated popup menu  141
M popup (←button)  Associated popup (make one if create = @on)  79
M popup (→button)  Associated popup menu  79
V popup (↔dialog item)  Associated popup menu  75
M popup (←graphical)  Associated →popup  181
M popup (→graphical)  Associate a popup menu with the graphical  182
M popup (→graphical)  Associate a popup menu with the graphical  182
V popup (↔list browser)  Associated popup menu  150
V popup (←menu item)  Associated popup (pull-right)  115
M popup (→menu item)  Associated popup (pull-right)  115
V popup (↔window)  Popup-menu of the window  29

A.110 meta — Analysing behaviour and objects

M all attributes (←object)  Chain with object-level attributes  500
M all attributes (←object)  Chain with object-level attributes  500
M all constraints (←object)  Chain with all constraints  500
M all get methods (←object)  Chain with all get methods  500
M all hypers (←object)  Chain with all hypers  500
M all recognisers (←graphical)  Chain with all recognisers  170
M all send methods (←object)  Chain with all send methods  500
M argument count (←method)  Minimum number of arguments required  626
M argument type (←attribute)  Type of n-th1 argument  512
M argument type (←method)  Get type for nth-1 argument  626

M argument type (←variable)

Type of n-th1 argument if ←access includes ‘send’

620

M attribute names (←sheet)  New chain with attribute names  458
M binding (←key binding)  Find key-binding from function  362
M find all send methods (←object) New chain with all send-methods satisfying code 500
M function (←key binding)  Get function for given event-id  362
M get access (→variable)  Test if variable has read access  620
M get method (←class)  Method implementing named get behaviour  608

M get method (←object)

Tuple containing receiver and implementing object

501

M has get method (→object)  Test if object defines get method  501

M has get method (→object)  Test if object defines get method  501
M has send method (→object)  Test if object defines send method  501
M has send method (→object)  Test if object defines send method  501
M includes (→type)  Type includes its argument  574
M inherited from (←method)  Method I’m a refinement of  626
M inherited from (←method)  Method I’m a refinement of  626
M instance variable (←class)  Get instance variable from name of offset  608
M is attribute (→sheet)  Test if object is name of an attribute  458
M is attribute (→sheet)  Test if object is name of an attribute  458
M member (←sheet)  Attribute object with name  458
M return type (←variable)  Return type if ←access includes ‘get’  620
M send access (→variable)  Test if variable has write access  620
M send method (←class)  Method implementing named get behaviour  608

M send method (←object)

Tuple containing receiver and implementing object

501

M specialised (→type)  Test if argument is a specialised type  574
M system (←program object)  System defined object?  645
M system (→program object)  System defined object?  645
M value set (←type)  Chain with values that satisfy this type  574
M var in (←binary expression)  Count occurrences of (named) variable  557

A.111 modal — Event sub-loops: modal windows

M confirm (←frame)  Start sub-eventloop until →return  18
M confirm (←frame)  Start sub-eventloop until →return  18
M confirm (←window)  Run sub event-loop until →return  32
M confirm centered (←frame)  As ←confirm, but centered around point  19
M confirm centered (←frame)  As ←confirm, but centered around point  19
M confirm centered (←window)  →confirm with frame centered around point  32
V modal (←frame)  Operate as modal window  19
M modal (→frame)  Operate as modal window  19
M return (→frame)  Return after a ←confirm  19
M return (→frame)  Return after a ←confirm  19
V return value (-frame)  Bin for value of →return  19

A.112 mode — Modes of operation

M auto fill mode (→editor)  Toggle auto fill mode  321
V auto newline (↔editor)  If @on, append newline after →append  321
V editable (↔editor)  If @on, text may be changed by user  321
V fill mode (↔editor)  If @on, automatically insert newlines  321
V h mode (↔resize gesture)  Horizontal resize mode  283
M switch case mode (→editor)  Toggle exact/either case search  321
M switch case mode (→editor)  Toggle exact/either case search  321
V v mode (↔resize gesture)  Vertical resize mode  284

A.113 modified — Modification of dialog and text

M check point undo (→text buffer) Set ‘no-change’ checkpoint in undo buffer  339
M mark undo (→text buffer)  Mark undo point  339
V modified (←text buffer)  Has buffer been modified  340
M modified (→text buffer)  Has buffer been modified  340

M reset undo (→text buffer)  Clear the undo-buffer  340
M undo (→text buffer)  Undo operations backto last mark  340
V undo buffer size (←text buffer) Size of the undo-buffer in characters  340
M undo buffer size (→text buffer) Size of the undo-buffer in characters  340

A.114 modifier — Test Meta-, Shift- and Control-keys

V control (↔modifier)  Condition on control  300
V meta (↔modifier)  Condition on meta  300
V multiclick (↔click gesture)  Demand single, double or triple click  278
V shift (↔modifier)  Condition on shift  300

A.115 name — Naming objects

V name (←var)  Name of the var  565
V backward name (↔hyper)  Name as visible from ←to  514
M base name (←directory)  Same as ←name, cf. ‘file ←base name’  385
V family (←font)  Family the font belongs to (times, etc.)  433
M for name (→pce)  Execute code on all defined names  587
V forward name (↔hyper)  Name as visible from ←from  514
V fullname (←type)  Symbolic name for this type  574
V id (←error)  Unique identifier  643
V id (←event)  Id of the event (type of event)  293
M label (→dialog group)  Change visual label  127
V name (↔application)  Identifier name of the application  51
V name (←behaviour)  Selector of this behaviour  617
V name (←class stub)  Name of the class  616
V name (←colour)  Name of the colour  424
V name (↔constant)  Name of the constant  468
V name (←cursor)  Name of the cursor  430
M name (→dialog group)  Change ←name, update ←label  127
M name (→dialog item)  Change ←name, update ←label  72
V name (←directory)  Name of the directory  385
V name (←elevation)  Name for reuse  427
M name (←event)  Name of the event (synonym for ←id)  294
V name (↔frame)  Name of the frame  7
V name (↔graphical)  Name of graphical  167
V name (↔handle)  Logical name of handle  261
V name (←image)  Name of the image  438
V name (←key binding)  Name of this binding-table  362
V name (←resource)  Name of the resource  401
V name (←syntax table)  Name of this syntax table  637
M name (←type)  Name without argument specification  574
M name (←type)  Name without argument specification  574
V name (←vmi)  Name of the vmi  648
V names (←table)  Vector to determine column names  464
V path (←directory)  Full path name  385
M points (←font)  Specified point-size or ←height  433
V points (-font)  Point-size of the font  433
V resource class (←resource)  Class of the resource  401
M resource class name (←resource) Resource class name  401
M resource class name (←resource) Resource class name  401
V style (←font)  Style of the font (bold, italic, etc.)  433

708 Appendix A: Summary of Functional Groups

A.116 nodes — Nodes in a hierarchy (tree)

M node (←graphical)  When image of node in tree, find the node  167
V root (←tree)  Root-node of the tree  245
M root (→tree)  Set root node  245

A.117 oms — Object management operations

M alloc value (←variable)  Initial value when instantiated  618
V alloc value (↔variable)  Value used to when allocating  618
M alloc value (→variable)  Value after allocation when instantiated  618
M convert (←attribute)  Converts name to attribute(name, @nil)  512
M convert (←bool)  Converts true, false and integer  469
M convert (←class)  Convert class name  603
M convert (←class stub)  Reuse predefined stub  615
M convert (←dict item)  Convert ←key to dict item  159
M convert (←display)  Convert graphical or ‘host:display[.screen]’  39
M convert (←display)  Convert graphical or ‘host:display[.screen]’  39
M convert (←elevation)  Convert name to object (reuse) or int to height  426
M convert (←elevation)  Convert name to object (reuse) or int to height  426
M convert (←error)  Convert id into error  642
M convert (←error)  Convert id into error  642
M convert (←event)  Convert @default into current event (@event)  293
M convert (←file)  Convert name to file  378
M convert (←frame)  Frame of the window  7
M convert (←function)  Convert quoted function to quoted value  543
M convert (←image)  Convert bitmap or (file-)name  436
M convert (←menu item)  Convert value  112
M convert (←menu item)  Convert value  112
M convert (←node)  Convert graphical object  250
M convert (←number)  Converts int, real and char array  483
M convert (←object)  Convert ’@reference’ into object  494
M convert (←object)  Convert ’@reference’ into object  494
M convert (←pixmap)  Lookup already made conversion  223
M convert (←real)  Converts int, number and char array  486

M convert (←source location)

Convert ‘file’, ‘path-name’ and ‘path-name:line-no’

633

M convert (←text buffer)  Return ‘editor ←text buffer’  338
M destroy (→visual)  Destroy consists-of tree of visual objects  406
M destroy (→window)  →destroy associated frame  24
M done (→object)  Indicate I’m done with some answer  494
M done (→object)  Indicate I’m done with some answer  494
M free (→object)  Delete object from the object-base  495
M free (→window)  →free associated frame  24
V init function (↔variable)  Function to initialise the variable  618
M init function (→variable)  Function to initialise the variable  618
M initial value (→variable)  Initial value for this variable  618
M initialise (→-)  Create unary or binary ‘-’  559
M initialise (→:=)  Create binding from name and value  576
M initialise (→:=)  Create binding from name and value  576
M initialise (→==)  Create from left- and right-hand  539
M initialise (→==)  Create from left- and right-hand  539
M initialise (→?)  Create from receiver, selector and args  548

XPCE Reference Manual

M initialise (→@=)  Create from reference and object  541
M initialise (→@=)  Create from reference and object  541
M initialise (→\==)  Create from left- and right-hand  540
M initialise (→and)  Create and from tests  527
M initialise (→and)  Create and from tests  527
M initialise (→application)  Create named application  50

M initialise (→arc)

Create Arc from radius, start angle and size angle (degrees)

228

M initialise (→area)  Create area from X, Y, W and H  416
M initialise (→area)  Create area from X, Y, W and H  416
M initialise (→arrow)  Create from length and wing  238
M initialise (→assign)  Create assignment from var and value  567
M initialise (→assign)  Create assignment from var and value  567
M initialise (→attribute)  Create attribute from name and value  512
M initialise (→attribute)  Create attribute from name and value  512
M initialise (→behaviour)  Create from ←name and ←context  617
M initialise (→behaviour)  Create from ←name and ←context  617
M initialise (→binary condition)  Initialise from 2 expressions  531
M initialise (→binary condition)  Initialise from 2 expressions  531
M initialise (→binary expression) Create binary expression  556
M initialise (→bitmap)  Create from image  220
M initialise (→block)  Create from parameters and statements  537
M initialise (→bool)  Create bool (cannot be created)  469
M initialise (→box)  Create box from width and height  206
M initialise (→browser)  Create from label, size and display  140
M initialise (→button)  Create from name and command  77
M initialise (→button)  Create from name and command  77
M initialise (→c)  Create C interface  583
M initialise (→chain)  Create a chain with initial elements  444
M initialise (→chain)  Create a chain with initial elements  444
M initialise (→char array)  Create from other char array  470
M initialise (→char array)  Create from other char array  470
M initialise (→circle)  Create circle from diameter  210
M initialise (→class)  Create from name and super class  604
M initialise (→class stub)  Create Class Stub object  615
M initialise (→click gesture)  Create from button, modifier, multi, ...  278
M initialise (→code vector)  Create vector with elements at 1, ...  577
M initialise (→code vector)  Create vector with elements at 1, ...  577
M initialise (→colour)  Create from name and optional rgb  423
M initialise (→colour)  Create from name and optional rgb  423
M initialise (→connect gesture)  Create from button, modifier and link  288
M initialise (→connection)  Create from graphicals, link and handle names  256
M initialise (→constant)  Create constant  468
M initialise (→constraint)  Create from objects, relation and direction  263
M initialise (→create)  Create from class (name) and arguments  554

M initialise (→cursor)

Create from name or name, image, mask, hot spot

429

M initialise (→cursor)

Create from name or name, image, mask, hot spot

429

M initialise (→date)  Create a date from smhDMY (default now)  488
M initialise (→delegate variable)  Create from name, type, access and doc  623
M initialise (→delegate variable)  Create from name, type, access and doc  623
M initialise (→device)  Create an empty device  189
M initialise (→dialog)  Create from label, size and display  66

M initialise (→dialog)  Create from label, size and display  66
M initialise (→dialog group)  Create a new group of dialog items  127
M initialise (→dialog item)  Create from name  71
M initialise (→dict)  Create a dict and append the arguments  155
M initialise (→dict item)  Create from key, label, object and style  159
M initialise (→directory)  Create from name  385
M initialise (→directory)  Create from name  385
M initialise (→display)  Create from address and resource class  40
M initialise (→display)  Create from address and resource class  40
M initialise (→display manager)  Create the display manager  52
M initialise (→display manager)  Create the display manager  52
M initialise (→editor)  Create from text buffer, W, H and margin  317
M initialise (→editor)  Create from text buffer, W, H and margin  317
M initialise (→elevation)  Create elevation from name, height and colours  426
M initialise (→elevation)  Create elevation from name, height and colours  426
M initialise (→ellipse)  Create ellipse from width and height  208
M initialise (→error)  → id, format, [kind], [feedback]  642
M initialise (→error)  → id, format, [kind], [feedback]  642

M initialise (→event)

Create from type, window, x, y, buttons and time

293

M initialise (→event node)  Create from value and parent  302
M initialise (→event node)  Create from value and parent  302
M initialise (→event tree)  Create from root node  301
M initialise (→event tree)  Create from root node  301
M initialise (→figure)  Create figure  199
M initialise (→file)  Create from name and kind  378
M initialise (→file)  Create from name and kind  378
M initialise (→font)  Create from fam, style, points, name  432
M initialise (→font)  Create from fam, style, points, name  432
M initialise (→format)  Create from direction, width and columns  203
M initialise (→fragment)  Create from text buffer, start, length, style  353
M initialise (→frame)  Create from label, kind and display  7
M initialise (→frame)  Create from label, kind and display  7
M initialise (→function)  Initialise function  543
M initialise (→gesture)  Create from button and modifier  275
M initialise (→get method)  →selector, return type, types, msg, doc, location 631
M initialise (→get method)  →selector, return type, types, msg, doc, location 631
M initialise (→graphical)  Create from XYWH  166
M initialise (→handle)  Create from X-, Y expression, kind and name  261
M initialise (→handler)  Create from event-type, message and region  303
M initialise (→handler group)  Create from given recognisers  304
M initialise (→hash table)  Create from buckets  460
M initialise (→hash table)  Create from buckets  460
M initialise (→host)  Create host from name  580
M initialise (→host)  Create host from name  580
M initialise (→hyper)  Create named link between objects  514
M initialise (→identity)  Create from attribute names  266
M initialise (→if)  Create from condition, if- and else  524
M initialise (→if)  Create from condition, if- and else  524
M initialise (→image)  Create from name, [width, height, kind]  437
M initialise (→image)  Create from name, [width, height, kind]  437
M initialise (→joint)  Create joint with bounding-box and arrows  237
M initialise (→key binding)  Create named binding-table with defaults  361
M initialise (→key binding)  Create named binding-table with defaults  361

M initialise (→label)  Create from name, selection and font  81
M initialise (→label)  Create from name, selection and font  81
M initialise (→line)  Create line (X1,Y1) - (X2,Y2) with arrows  225
M initialise (→link)  Create from handle names, line  259
M initialise (→list browser)  Create from dict, width and height  144
M initialise (→menu)  Create from label, kind and message  102
M initialise (→menu bar)  Create from a label  122
M initialise (→menu bar)  Create from a label  122
M initialise (→menu item)  Create from value, message, label, end and cond  113
M initialise (→menu item)  Create from value, message, label, end and cond  113
M initialise (→message)  Create from receiver, selector and args  521
M initialise (→message)  Create from receiver, selector and args  521
M initialise (→method)  Create from name, types, code and doc  624
M initialise (→method)  Create from name, types, code and doc  624
M initialise (→modifier)  Create from shift, control and meta  299
M initialise (→modifier)  Create from shift, control and meta  299
M initialise (→move gesture)  Create from button and modifier  281
M initialise (→move outline gesture) Create from button and modifier  282
M initialise (→name)  Create a name from name  477
M initialise (→name)  Create a name from name  477
M initialise (→node)  Create from graphical  250
M initialise (→not)  Create from test  530
M initialise (→not)  Create from test  530
M initialise (→number)  Create from integer  483
M initialise (→object)  Initialise variables and resources  495
M initialise (→object)  Initialise variables and resources  495
M initialise (→or)  Create from tests  529
M initialise (→or)  Create from tests  529
M initialise (→path)  Create from kind and intervals/radius  232
M initialise (→pce)  Create @pce (done only once)  586
M initialise (→pce)  Create @pce (done only once)  586
M initialise (→picture)  Create from label, size and display  164
M initialise (→pixmap)  Create image of ←kind pixmap  223
M initialise (→point)  Create point from x- and y-value  412
M initialise (→point)  Create point from x- and y-value  412
M initialise (→popup)  Create from name and message  117
M initialise (→popup)  Create from name and message  117
M initialise (→popup gesture)  Create from popup, button and modifier  291
M initialise (→process)  Create process from command and arguments  391
M initialise (→progn)  Create progn from statements and return  550
M initialise (→program object)  Create program object  645
M initialise (→program object)  Create program object  645
M initialise (→quote function)  Initialise  547
M initialise (→quote function)  Initialise  547
M initialise (→real)  Create real by converting argument  486
M initialise (→recogniser)  Create new recogniser  273
M initialise (→regex)  Create regex from pattern  346
M initialise (→regex)  Create regex from pattern  346
M initialise (→region)  Create region from XYWH-expressions  421
M initialise (→resize gesture)  Create from button and modifier  283
M initialise (→resize outline gesture) Create from button and modifier  285

M initialise (→resource)

Create from name, class, type, default and context 400 M initialise (→resource)

Create from name, class, type, default and context

400

M initialise (→scroll bar)  Create from object, orientation and message  60
M initialise (→scroll bar)  Create from object, orientation and message  60
M initialise (→sheet)  Create sheet from attributes  457
M initialise (→sheet)  Create sheet from attributes  457
M initialise (→size)  Create size from width and height  414
M initialise (→size)  Create size from width and height  414

M initialise (→slider)

Create from label, low, high, default and message

95

M initialise (→socket)  Create socket from address and domain  396
M initialise (→source location)  Create from file name and line no  633
M initialise (→source location)  Create from file name and line no  633
M initialise (→spatial)  Create from equations x1, y1, x2, y2, w, h  268
M initialise (→stream)  Create stream  388
M initialise (→string)  Create a string, initialise as →format  479
M initialise (→string)  Create a string, initialise as →format  479
M initialise (→style)  Create from icon, font, colour and attributes  357
M initialise (→style)  Create from icon, font, colour and attributes  357
M initialise (→syntax table)  Create name and default table  636
M initialise (→tab)  Create a new tab-entry  132
M initialise (→tab stack)  Create from list of tab objects  135
M initialise (→table)  Create table, given names and keys  464
M initialise (→text)  Create from string, format and font  212
M initialise (→text buffer)  Create from initial contents  338
M initialise (→text buffer)  Create from initial contents  338
M initialise (→text cursor)  Create for specified font  374
M initialise (→text cursor)  Create for specified font  374
M initialise (→text image)  Create from source, width and height  366
M initialise (→text image)  Create from source, width and height  366
M initialise (→text item)  Create from label, selection and message  86
M initialise (→text margin)  Create from editor, width and height  372
M initialise (→tile)  Create from object, width and height  55
M initialise (→tile)  Create from object, width and height  55
M initialise (→timer)  Create for interval and message  309
M initialise (→tree)  Create a tree from a root node  244
M initialise (→tuple)  Create tuple from first and second  466
M initialise (→tuple)  Create tuple from first and second  466

M initialise (→type)

Create type from name, kind, context and supers

570

M initialise (→type)

Create type from name, kind, context and supers

570

M initialise (→var)  Create var from name and value  565
M initialise (→var)  Create var from name and value  565

M initialise (→variable)

Create from name, type, access, doc, group and initial value

618

M initialise (→variable)

Create from name, type, access, doc, group and initial value

618

M initialise (→vector)  Create vector with elements at 1, ...  453
M initialise (→vector)  Create vector with elements at 1, ...  453
M initialise (→view)  Create from label, size, display and editor  312
M initialise (→view)  Create from label, size, display and editor  312
M initialise (→vmi)  Create named vmi  648
M initialise (→vmi)  Create named vmi  648

M initialise (→when)  Create from condition, when- and else  552
M initialise (→while)  Create from condition and statement  526
M initialise (→window)  Create from label, size and display  23
M initialise (→window decorator) Create decoration for window  36
M instance (←class)  Create instance of the class from argument  604
M instance (←pce)  Create instance of any class  586
M instance (←pce)  Create instance of any class  586
V instance size (←class)  Size of an instance in bytes  604
M lock object (←object)  Boolean to indicate locked for GC  496
M lock object (→object)  Lock object for incremental garbage collection  496
M lock object (→object)  Lock object for incremental garbage collection  496
M lookup (←class)  Lookup in @classes and verify super  604
M lookup (←colour)  Lookup in @colours table  423
M lookup (←colour)  Lookup in @colours table  423
M lookup (←cursor)  Lookup from @cursors table  430
M lookup (←cursor)  Lookup from @cursors table  430
M lookup (←error)  Convert id into error  643
M lookup (←error)  Convert id into error  643
M lookup (←font)  Lookup in @fonts table  433
M lookup (←font)  Lookup in @fonts table  433
M lookup (←image)  Lookup in @images table  437
M lookup (←image)  Lookup in @images table  437
M lookup (←key binding)  Lookup existing table  361
M lookup (←key binding)  Lookup existing table  361
M lookup (←name)  Perform lookup in current name-table  477
M lookup (←name)  Perform lookup in current name-table  477
M lookup (←pixmap)  Lookup already made conversion  223
M lookup (←syntax table)  Lookup in @syntax tables  636
M lookup (←type)  Lookup type in type-database  571
M lookup (←type)  Lookup type in type-database  571
M lookup (←type)  Lookup type in type-database  571

M object from reference (←pce)

Convert object-name or integer reference into object

587

M object from reference (←pce)

Convert object-name or integer reference into object

587

M protect (←object)  Boolean to indicate locked for →free  496
M protect (→object)  Lock object for destruction with →free  496

V refer (-hash table)

Determines which fields create references (internal)

460

M register (→name)  Register in unique table  477
M register (→name)  Register in unique table  477
M self (←object)  Returns itself  496
M self (←object)  Returns itself  496
V slots (←class)  Total number of instance variables  604
M sub class (←class)  Create a class below this one (or return existing) 605
V un answer (↔class)  Incremental garbage collection hint  605
M unlink (→application)  →destroy frames and remove from @applications  50
M unlink (→bitmap)  Unlink from ←image  220
M unlink (→bool)  Destroy boolean (cannot be done)  469
M unlink (→browser)  Delete the list browser  140
M unlink (→chain)  Clear the chain  444
M unlink (→chain)  Clear the chain  444
M unlink (→char array)  Free the char *  470
M unlink (→char array)  Free the char *  470

M unlink (→class)  Remove from tables  605
M unlink (→code vector)  Deallocates -elements  577
M unlink (→code vector)  Deallocates -elements  577
M unlink (→colour)  Deallocate the colour object  423
M unlink (→colour)  Deallocate the colour object  423
M unlink (→connection)  Detach from graphicals  256
M unlink (→constraint)  Remove from to- and from-object  264
M unlink (→cursor)  Destroy the cursor  430
M unlink (→device)  Clear device and unlink from super-device  189
M unlink (→dialog item)  Remove left,right,above,below links  72
M unlink (→dict)  Destroy hash-table and unlink from browser  155
M unlink (→dict item)  Delete from dict  159
M unlink (→editor)  Unlink from buffer, margin, etc.  317
M unlink (→elevation)  Delete from @elevations  427
M unlink (→file)  Close file  379
M unlink (→file)  Close file  379
M unlink (→fragment)  Unlink from the text buffer  354
M unlink (→frame)  Destroy windows and related X-window  7
M unlink (→graphical)  Erase from device  166
M unlink (→graphical)  Erase from device  166
M unlink (→hash table)  Clear table  460
M unlink (→hyper)  Unlink hyper from objects  514
M unlink (→image)  Destroy private memory and X-resources  437
M unlink (→list browser)  Unlink from dict and device  144
M unlink (→menu)  Unlink from menu-items  102
M unlink (→menu item)  Unlink from menu  113
M unlink (→name)  Trap error  477
M unlink (→node)  Unlink from tree  251
M unlink (→object)  Unlink from environment  496
M unlink (→object)  Unlink from environment  496
M unlink (→process)  Cleanup process  392
M unlink (→regex)  Deallocate private storage  347
M unlink (→regex)  Deallocate private storage  347
M unlink (→scroll bar)  Stop/disconnect repeat timer  60
M unlink (→socket)  Cleanup socket  396
M unlink (→stream)  Cleanup stream  388
M unlink (→syntax table)  Free alien tables  637
M unlink (→table)  Clear the tables  464
M unlink (→text buffer)  Destroy the text  339
M unlink (→text image)  Reclaim private allocated data  367
M unlink (→tile)  Unlink sub and super-tiles  55
M unlink (→timer)  Destroy X-timer  309
M unlink (→tree)  Removes all the nodes  245
M unlink (→var)  Release code reference of value  565
M unlink (→vector)  Deallocates -elements  453
M unlink (→vector)  Deallocates -elements  453
M unlink (→view)  Unlink the editor  312
M unlink (→when)  temp; just to trap  552
M unlink (→window)  Destroy related X-resources  23
M unlink (→window)  Destroy related X-resources  23
M unlink (→window decorator)  Make sure ←window is destroyed  36
M unlinking (→object)  Try if →unlink is in progress  496

Appendix A: Summary of Functional Groups 715

A.118 open — Making objects visible

M close (→file)  Close file  380
M close (→file)  Close file  380
M close (→popup)  Finish after →open  117
M close input (→stream)  Close input section of stream  389
M close output (→stream)  Close output section of stream  389
M create (→frame)  Establish window-system counterpart  8
M create (→frame)  Establish window-system counterpart  8
M create (→window)  Create associated X-window structure  23
M create (→window)  Create associated X-window structure  23
M input (→stream)  Enable input from file-descriptor  389
M mapped (→frame)  Inform transients using →show  9
M open (→display)  Open connection to X-server and initialise  40
M open (→display)  Open connection to X-server and initialise  40
M open (→file)  Open file in mode, read/write through filter  380
M open (→file)  Open file in mode, read/write through filter  380
M open (→frame)  →create and map on the display  9
M open (→frame)  →create and map on the display  9
M open (→popup)  Open on point relative to graphical  118
M open (→window)  Open associated frame on the display  24
M open (→window)  Open associated frame on the display  24
M open centered (→frame)  Open centered around point  9
M open centered (→window)  Open frame centered around point  24
V status (←file)  One of {closed,read,write}  381
M uncreate (→frame)  Destroy window-system counterpart  9
M uncreate (→window)  Destroy associated X-window structure  24
M wait (→frame)  Wait till ←status is ‘open’  9
M wait (→frame)  Wait till ←status is ‘open’  9

A.119 operant — Operant of expression

V left (↔==)  Left-hand side  539
V left (↔\==)  Left-hand side  540
V left (↔binary condition)  Left-hand side of conditional expression  531
V left (↔binary expression)  Left-hand side of expression  556
V right (↔==)  Right-hand side  539
V right (↔\==)  Right-hand side  540
V right (↔binary condition)  Right-hand side of conditional expression  531
V right (↔binary expression)  Right-hand side of expression  556

A.120 order — Sorting sequences

M after (→chain)  Test if first argument is after second  447
M before (→chain)  Test if first argument is before second  448
M before (→chain)  Test if first argument is before second  448
V index (←dict item)  Index in dict (0-based)  160
M move after (→chain)  Move 1st object just after second  448
M move before (→chain)  Move 1st object just before second  448
M sort (→chain)  Sort according to code’s return-value (or name)  448
M sort (→chain)  Sort according to code’s return-value (or name)  448
M sort (→dict)  Sort contents  156
M sort (→vector)  Sort according to code exit status  455

Appendix A: Summary of Functional Groups

M sort (→vector)  Sort according to code exit status  455
V sort by (←dict)  Sorting rule to apply  156
M sort by (→dict)  Sorting rule to apply  156
M swap (→chain)  Swap position of arguments  448
M swap (→vector)  Swap two elements  455

A.121 organisation — Organisation of (graphical) objects

M append (→application)  Add frame to the application  51
M append (→dialog)  Append dialog item {below,right,next row} last  69
M append (→dialog)  Append dialog item {below,right,next row} last  69
M append (→dialog group)  Append dialog item {below,right,next row} last  131
M append (→frame)  Append a window to the frame  19
M append (→frame)  Append a window to the frame  19
M append (→menu bar)  Append a popup to the menubar  125
M append (→menu bar)  Append a popup to the menubar  125
M append (→tab stack)  Append a tab object  136
M append dialog item (→device) Append dialog item {below,right,next row} last  195
V application (←frame)  Application the frame belongs too  20
M application (→frame)  Application the frame belongs too  20
M application (←graphical)  Application my frame belongs too  185
M attach (→text buffer)  Attach the given editor  344
M attach (→text buffer)  Attach the given editor  344
V bitmap (←image)  Access both and displayed on this bitmap  442
M catch all (←device)  Find named graphicals  195
M catch all (←frame)  Get named window  20
M clear (→device)  Erase all graphicals  196
M clear (→menu bar)  Remove all menus from the menu bar  125
M common device (←graphical)  Deepest device both are displayed on  185
M contained in (←dict)  Equivalent to ←browser  158
M contained in (←dict item)  dict object I’m contained in  161
M contained in (←display)  Display manager  42
M contained in (←fragment)  editor object I’m contained in  355
M contained in (←frame)  Display that contains me  11
M contained in (←frame)  Display that contains me  11
M contained in (←graphical)  Device I’m contained in  185
M contained in (←image)  Equivalent to ←bitmap if ot @nil  442
M contained in (←menu item)  Menu I’m contained in  116
M contained in (←node)  Visual I’m contained in (tree)  253
M contained in (←visual)  Visual I’m contained in (parent)  408
M contained in (←visual)  Visual I’m contained in (parent)  408
M contained in (→visual)  Test if I’m contained in argument  408
M contained in (←window)  Frame/graphical device I’m contained in  24
M container (←visual)  Innermost visual that satisfies condition  408
M contains (←application)  Chain with frames I manage  51
M contains (←bitmap)  New chain with ←image  221
M contains (←browser)  The dict object contained  142
M contains (←device)  Chain with visuals contained  196
M contains (←dict)  Equivalent to ←members  158
M contains (←display)  Chain with frames contained  42
M contains (←display manager)  Contained displays  53
M contains (←editor)  Visuals contained (fails)  334
M contains (←frame)  Chain with windows contained  11

M contains (←list browser)  Dict visualised  152
M contains (←menu)  Chain with menu items contained  110
M contains (←menu bar)  Chain with popup menus contained  125

M contains (←node)

New chain with visuals I manage (holding ←image)

254

M contains (←tree)  New chain with nodes I manage  248
M contains (←visual)  Chain with visuals I manage  408
M contains (←visual)  Chain with visuals I manage  408
M delete (→application)  Remove frame from the application  51
M delete (→dialog)  Delete (named) dialog item  69
M delete (→frame)  Delete window from the frame  20
M delete (→menu bar)  Delete popup or name  125
M detach (→text buffer)  Detach the given editor  344
M device (→dialog item)  Device I’m displayed on  75
M device (→dialog item)  Device I’m displayed on  75
V device (←graphical)  Device I’m displayed on  185
M device (→graphical)  Device I’m displayed on  185
V device (←window)  Device I’m displayed on  33

M device (→window)

Display window on device, take care of ←decoration

33

V dict (←dict item)  Dict holding me  161
M dict (→dict item)  Dict holding me  161
M display (→device)  Display graphical at point  196
M display (→device)  Display graphical at point  196
M display (→dialog)  Display a graphical (or item) at point  69
M display (→figure)  Display graphical at point  200
V display (↔frame)  Display the frame resides on  20
M display (←graphical)  Display graphical is displayed on  186
V display (←image)  X-Display this image belongs to  442
V display manager (←display)  The global display manager (@display manager)  47
M display on (→graphical)  Set device and ensure →displayed: @on  186
M distance (←graphical)  Closest distance between areas  186
M distance x (←graphical)  Distance between graphicals’s in X-direction  186
M distance y (←graphical)  Distance between graphicals’s in Y-direction  186
V editors (←text buffer)  Editors displaying this buffer  344
M erase (→device)  Erase a graphical  196
M frame (←frame)  Returns itself  20
M frame (←graphical)  Frame graphical is displayed on  186
M frame (←visual)  Frame I’m part of (when existing)  408
M frame (←window)  Frame of window (create if not there)  33
V frame (-window)  Frame the window is member of  33
V frames (←display)  Frames displayed on this display  47
V graphicals (←device)  Displayed graphicals (members)  196
V level (←device)  Nesting depth to topmost device  196
M member (←application)  Member frame with given name  51
M member (←device)  Find named graphical  196
M member (←device)  Find named graphical  196
M member (←dialog)  Find named dialog item  70
M member (←dialog)  Find named dialog item  70
M member (→dialog)  Test if dialog item or name is a member  70
M member (←frame)  Find member window by name  20
M member (←menu bar)  Find popup from name  125
V members (←application)  Chain holding member frames  51
M members (←dialog)  Equivalent to ←graphicals  70

V members (←dict)  Objects in the dictionary  158
M members (←frame)  New chain holding all member windows  21
V members (-frame)  Windows in the frame  21
V members (←menu)  Menu items (alternatives)  110
V members (←menu bar)  The pulldown menus  125
V members (←tile)  Managed tiles (subtiles)  58
V menu (←menu item)  Menu I’m part of  116
M open (→dialog item)  Create dialog with this item and →open  75
M open (→dialog item)  Create dialog with this item and →open  75
M reparent (→device)  Device’s parent-chain has changed  196
M reparent (→device)  Device’s parent-chain has changed  196
M reparent (→graphical)  Graphicals parent-chain has changed  186
M reparent (→graphical)  Graphicals parent-chain has changed  186
M reparent (→window)  If no longer related to the window, →uncreate  33
M root (←tile)  Root of the tile-hierarchy  58
M show (←dialog item)  Equivalent to ←displayed  76
M show (→dialog item)  Equivalent to ↔displayed  76
V super (←tile)  Tile that manages me  58
M tree (←event node)  The tree holding this event node  302
V tree (←node)  Tree the node is in  254
M window (←graphical)  Window graphical is displayed on  186

A.122 orientation — Horizontal or vertical orientation

V direction (↔format)  horizontal (rows) or vertical (columns)  204
M normalise (→area)  Make top-left corner the origin  418
M orientation (←area)  Current orientation  418
M orientation (→area)  Put origin at indicated corner  418

A.123 output — Handling (process) output

M append (→stream)  Send data to stream  390
M append line (→stream)  →append and →newline  390
M close (→process)  Same as →close output  392
M close (→socket)  Close communication to socket  397
M format (→stream)  Format arguments and send to stream  390
M newline (→stream)  Send a newline to the stream  390

A.124 parse — Specialisation for specific languages

M index (←char array)  Get 0-based index starting at pos (forwards)  473
M rindex (←char array)  Get 0-based index starting at pos (backwards)  473
M scan (←char array)  C-scanf like parsing of string  473
M scan (←char array)  C-scanf like parsing of string  473
M scan (←text buffer)  Scan textual units  341

A.125 part — Managed objects

V pullright (-popup)  Currently shown pullright menu  121

Appendix A: Summary of Functional Groups 719

A.126 path — File/directory path

M absolute path (←file)  Convert ←name to an absolute path  379
M absolute path (→file)  Convert ←name to an absolute path  379
M base name (←file)  Base name of file in directory  379
M base name (←file)  Base name of file in directory  379
M directory name (←file)  Directory name of file  380
M is absolute (→file)  Test if ←name specifies an absolute path  380
V name (←file)  Name of the file  380
M name (→file)  Name of the file  380
V path (↔file)  Full path-name of the file  380
M path (←source location)  Get absolute path-name of source file  633

A.127 pattern — Regular expression patterns

M ignore case (←regex)  @on if case is ignored during match  347
M ignore case (→regex)  @on: case is ignored during match  347
V pattern (←regex)  Pattern to search for  347
M pattern (→regex)  Set pattern searched for  347
M quote (←regex)  Quoted version of argument  350

A.128 permission — Access rights

V access (←image)  One of {read, both}  441
V can delete (↔frame)  Frame can be deleted by user  16
V confirm done (↔frame)  Ask confirmation on user-delete  16

A.129 pie — Angles, pie-slices, etc.

M end angle (→arc)  Set →size angle to argument - ←start angle  229
V size angle (←arc)  Size (degrees)  229
M size angle (→arc)  Size (degrees)  229
V start angle (←arc)  Start angle (degrees)  229
M start angle (→arc)  Start angle (degrees)  229

A.130 pixel — Pixel manipulations

M clear pixel (→image)  Clear pixel at x-y (to 0 or background)  438
M invert pixel (→image)  Invert pixel at x-y  438
M pixel (←image)  Get 0-1 (image) or colour for x-y  438
M pixel (→image)  Set pixel at x-y to bool or colour  439
M set pixel (→image)  Set pixel at x-y (to 1 or foreground)  439

A.131 pointer — Pointer related methods

M pointer (→graphical)  Warp pointer relative to graphical  185
M pointer (→graphical)  Warp pointer relative to graphical  185
M pointer (→window)  Move the pointer relative to window  33
M pointer (→window)  Move the pointer relative to window  33

Appendix A: Summary of Functional Groups 720 Appendix A: Summary of Functional Groups

A.132 points — Reference points for a smooth line (path)

M append (→path)  Append a point  232
M clear (→path)  Delete all points  232
M delete (→path)  Delete a point  232
M insert (→path)  Insert after 2nd argument (@nil: prepend)  232
V points (←path)  Chain of points  233
M set point (→path)  Move (member) point to (X, Y)  233

A.133 popup — Associating (Popup) menus

V current (-popup gesture)  Currently visible popup  291
M image (←dict item)  ←browser of the ←dict (for popup menu’s)  161
V popup (↔popup gesture)  Popup displayed  291

A.134 position — Position of objects

M area position (←event)  Position relative to top-left-corner  295
M center (←area)  New point from center position  419
M center (→area)  Move to make point the center  419
M corner (←area)  New point from point opposite origin  420
M inside (→event)  Test if event is in area of graphical  295
M inside sub window (←event)  Frame or window event occurred in  295
M position (←area)  New point from origin  420
M position (→area)  Move origin to point  420
M position (←event)  Position relative to argument  295
V position (-event)  Last calculated position  295
M relative move (→area)  Move origin relative by point  420
V x (↔area)  Origin’s X-value  420
M x (←event)  X coordinate relative to argument  295
V x (←event)  X-coordinate, relative to window  295
V x from (↔spatial)  X of reference at ‘from’ (XYHW → xref)  269
V x to (↔spatial)  X of reference at ‘to’ (XYHW → xref)  269
V y (↔area)  Origin’s Y-value  420
M y (←event)  Y coordinate relative to argument  296
V y (←event)  Y-coordinate, relative to window  296
V y from (↔spatial)  Y of reference at ‘from’ (XYHW → yref)  269
V y to (↔spatial)  Y of reference at ‘to’ (XYHW → yref)  269

A.135 postscript — Generating PostScript for printing

M draw post script (→arc)  Create PostScript  230
M draw post script (→arrow)  Create PostScript  240
M draw post script (→bitmap)  Create PostScript  221
M draw post script (→box)  Create PostScript  206
M draw post script (→circle)  Create PostScript  211
M draw post script (→device)  Create PostScript  197
M draw post script (→ellipse)  Create PostScript  208
M draw post script (→figure)  Create PostScript  201

M draw post script (→graphical)

Create PostScript using intermediate image object

187

M draw post script (→image) Create PostScript 442

XPCE Reference Manual

M draw post script (→line)  Create PostScript  226
M draw post script (→path)  Create PostScript  235
M draw post script (→text)  Create PostScript  218
M postscript (→display)  Create PostScript  48
M postscript (→frame)  Create PostScript for interior  21
M postscript (→graphical)  Create PostScript  187
M bounding box (←display)  PostScript bounding box for the display  48
M bounding box (←frame)  Bounding for PostScript  21
M bounding box (←graphical)  Same as ←area; used for PostScript  187
M bounding box (←image)  BoundingBox for PostScript generation  442
M postscript (←display)  Get PostScript or (area of) display  48
M postscript (←display)  Get PostScript or (area of) display  48
M postscript (←frame)  Get PostScript representation of frame  21
M postscript (←frame)  Get PostScript representation of frame  21
M postscript (←graphical)  New string holding PostScript description  187
M postscript (←graphical)  New string holding PostScript description  187
M postscript (←image)  New string holding PostScript description  442
M postscript depth (←image)  Depth for PostScript image to be generated  442
V postscript font (↔font)  PostScript-name of the font  435
M postscript header (←pce)  Find path-name of PostScript header  598
V postscript size (↔font)  PostScript point-size of the font  435

A.136 process — Process identifier

M pid (←pce)  Process id of this process  598
M pid (←pce)  Process id of this process  598

A.137 programming — Methods to write methods

M get class (←object)  Get, using method of class of object  505
M get method (→object)  Add an object-level get method  505
M get sub (←object)  Get, using method of sub-class  506
M get sub (←object)  Get, using method of sub-class  506
M get super (←object)  Get, using method of super-class  506
M get vector (←object)  Varargs: any ..., vector, [int]  506
M send class (→object)  Send using method of class of object  506
M send method (→object)  Add an object-level send method  506
M send method (→object)  Add an object-level send method  506
M send sub (→object)  Send using method of subclass  506
M send super (→function)  Send using method of super-class  545
M send super (→object)  Send using method of super-class  506
M send super (→object)  Send using method of super-class  506
M send super vector (→object)  Varargs: any ..., vector, [int]  506
M send vector (→object)  Varargs: any ..., vector, [int]  507
M slot (←object)  Get value of a slot  507
M slot (←object)  Get value of a slot  507
M slot (→object)  Set value of an instance variable  507
M slot (→object)  Set value of an instance variable  507

A.138 property — Font properties

V b16 (-font)  If @on, font is a 16-bit font  434

M default character (←font)  Character painted for non-existing entries  434
M domain (←font)  Range of valid characters  434
M fixed width (←font)  Boolean to indicate font is fixed-width  434
V fixed width (-font)  If @off, font is proportional  434

A.139 quit — Exiting from PCE

M die (→pce)  Exit this (Unix) process with status  595
M die (→pce)  Exit this (Unix) process with status  595
M exit message (→pce)  Execute code while dying  595
M exit message (→pce)  Execute code while dying  595
V exit messages (←pce)  Executed when the process terminates  595
M quit (→display)  Destroy all window-system references  48

A.140 range — Range of a vector

M high index (←vector)  Get highest valid index  453
M low index (←vector)  Get lowest valid index  453
V offset (←vector)  Offset relative to 1-based  454
M shift (→vector)  Shift contents by n places  454
V size (←vector)  Number of elements  454

A.141 read — Reading text from objects

M character (←file)  Read next character as ASCII value  381
M character (←text buffer)  ASCII value of character at index  339
M contents (←text buffer)  New string holding text (from, length)  339
M first line (←editor)  New string with text of first window line  319
M line (←editor)  New string with text of current line  319
M read (←file)  New string width next n characters  381
M read line (←editor)  As ←line, moves caret to next  319
M read line (←file)  New string with next line  381
M read line (←file)  New string with next line  381
M sub (←text buffer)  New string holding text [from, to)  339
M word (←editor)  New string with text of current word  319

A.142 realise — Realising class definitions

V make class method (←class)  Code object to →realise the class  612
M realise (→class)  Declare methods/variables, etc.  612
V realised (←class)  @on if class is realised  613

A.143 reference — Object reference manipulation

M name reference (→function)  Change named (atomic) reference  546
M for name reference (→pce)  Run code on all name references (global objects) 598
M name reference (→object)  Change named (atomic) reference  508
M name reference (→object)  Change named (atomic) reference  508
V object (↔@=)  Object to assign reference  541
M object reference (←object)  Name of the object (e.g. @pce)  508
V reference (↔@=)  Reference to give to the object  541

M rename reference (→pce)  Rename global reference  598

A.144 registers — Regular expression registers

M register end (←regex)  End index of register or match  352
M register size (←regex)  # characters in register or match  352
M register start (←regex)  Start index of register or match  352
M register value (←regex)  String of specified register or match  352
M register value (←regex)  String of specified register or match  352
M register value (→regex)  Replace indicated register  352
M register value (→regex)  Replace indicated register  352
M registers (←regex)  Number of \( ... \) pairs in pattern  352
V registers (-regex)  Registers for (sub-)matches  352
M replace (→regex)  Replace last match which char array  352
M replace (→regex)  Replace last match which char array  352

A.145 relation — Relations, constraints, (graphical) connections

M attach hyper (→object)  Attach a hyper to an object  498
M connect (→graphical)  Create a connection to another graphical  168
M connected (→graphical)  Test if graphical has specified connection  168
M connection (←link)  Instantiate the link by creating a connection  259
V connection class (↔link)  Class used by ←connection  259
M connections (←graphical)  New chain with matching connections  168
V connections (-graphical)  Connections (links) to other graphicals  168
M delete hyper (→object)  Detach a hyper from an object  498
M delete hypers (→object)  Delete all matching hypers  498
M disconnect (→graphical)  Delete matching connections  168
M distance (←area)  Closest distance between areas  416
M distance x (←area)  Distance between area’s in X-direction  416
M distance y (←area)  Distance between area’s in Y-direction  417
M find hyper (←object)  Find hyper-relation object  498
V fixed from (←connection)  From side is fixed  257
V fixed to (←connection)  To side is fixed  257
V from (←connection)  Graphical at ‘from’ side  257
V from (↔link)  Name of valid handles at ‘from’ side  259
V from handle (←connection)  Name of 1st handle link is connected to  257
M get hyper (←object)  Get-operation using named hypers  498
M handle (→class)  Add handle for graphical instances  606
M handle (←graphical)  Find handle with given name  169
M handle (→graphical)  Add connection point for connection  169
M handle position (←graphical)  New point with position of handle  169
V handles (↔class)  Graphicals: connection points for links  606
M handles (←graphical)  New chain with matching handles  169
V handles (-graphical)  Connection points for connections  169
M hypered (←object)  Find hyper-related object  499
M in (→area)  Test if point is in area  417
M inside (→area)  Test if argument is entirely in area  417
M intersection (←area)  New area from intersection  417
M intersection (→area)  Make area the intersection with argument  417
V kind (↔handle)  Kind of valid connection end-point  261
M less sides (←area)  Bitmask (int) of sides closer to origin  417
V link (←connection)  Generic definition of the link  257

M near sides (←area)  Bitmask (int) of almost equal sides  417
M network (←graphical)  New chain with connected graphicals  169
M network (←graphical)  New chain with connected graphicals  169
M opposite (←connection)  Other side of the connection  257
M overlap (→area)  Test whether area overlaps argument  417
V parent handle (←tree)  Connection point to parent  245
M relate (→connection)  Specify the graphicals related  257
V relation (←constraint)  Relation that describes the constraint  264
M relation (→constraint)  Relation that describes the constraint  264
M same sides (←area)  Bitmask (int) of equal sides  417
M send hyper (→object)  Send message using named hypers  499
V son handle (←tree)  Connection point to sons  245
V to (←connection)  Graphical at ‘to’ side  257
V to (↔link)  Name of valid handles at ‘to’ side  259
V to handle (←connection)  Name of 2nd handle link is connected to  257

A.146 repaint — Behaviour dealing with repaint

M change item (→list browser)  Handle changed item from dict  152
M changed fragment list (→editor) Notify change in text buffers fragment list  335
M changed item (→menu)  Handle change of item  110
M changed region (→editor)  Notify change (start, length)  335
M changed region (→editor)  Notify change (start, length)  335
M clear (→list browser)  Handle clear from dict  152
M delete item (→list browser)  Handle deleted item from dict  153
M insert editor (→editor)  Notify insert (start, length)  335
M insert editor (→editor)  Notify insert (start, length)  335
M insert item (→list browser)  Handle inserted item from dict  153
M redraw area (→arc)  Repaint the argument area  231
M redraw area (→arrow)  Repaint the argument area  240
M redraw area (→bitmap)  Repaint the argument area  222
M redraw area (→box)  Repaint the argument area  207
M redraw area (→button)  Repaint the argument area  80
M redraw area (→circle)  Repaint the argument area  211
M redraw area (→device)  Repaint the argument area  197
M redraw area (→dialog group)  Repaint the argument area  131
M redraw area (→editor)  Repaint the argument area  335
M redraw area (→ellipse)  Repaint the argument area  208
M redraw area (→figure)  Repaint the argument area  201
M redraw area (→graphical)  Repaint the argument area  187
M redraw area (→label)  Repaint the argument area  83
M redraw area (→line)  Repaint the argument area  227
M redraw area (→list browser)  Repaint the argument area  153
M redraw area (→menu)  Repaint the argument area  110
M redraw area (→menu bar)  Repaint the argument area  126
M redraw area (→path)  Repaint the argument area  235
M redraw area (→scroll bar)  Repaint the argument area  62
M redraw area (→slider)  Repaint the argument area  98
M redraw area (→tab)  Repaint the argument area  134
M redraw area (→tab stack)  Repaint the argument area  136
M redraw area (→text)  Repaint the argument area  218
M redraw area (→text cursor)  Repaint the argument area  375
M redraw area (→text image)  Repaint the argument area  370

M redraw area (→text item)  Repaint the argument area  94
M redraw area (→text margin)  Repaint the argument area  373
M redraw area (→tree)  Repaint the argument area  249
M redraw area (→window)  Repaint the argument area  34
V buttons (←menu bar)  Chain holding the buttons  126
V change end (-text image)  End of changes (character index)  370
V change start (-text image)  Start of changes (character index)  370
V changed end (-text buffer)  End of changes since last repaint  344
V changed start (-text buffer)  Start of changes since last repaint  344
V changes data (-window)  Summary info for redraw  34
M compute (→editor)  Recompute the editor  335
M compute (→editor)  Recompute the editor  335
M compute (→text)  Recompute area/offset  219
M draw (→graphical)  Draw specified area  188
V eof in window (←text image)  Is end-of-file inside window?  370
V inserted (-text image)  How much text was inserted/deleted  370
M paint selected (→graphical)  Paint selection feedback  188
M redraw (→graphical)  Request to repaint indicated area  188
M redraw (→window)  Redraw (area of) the window  34
V solid (-class)  Graphicals: image affects ALL pixels  610

A.147 report — Reporting events, status and errors

M error (→function)  Initiate an error  544
M alert (→graphical)  Alert visual or using the bell  184
M alert (→graphical)  Alert visual or using the bell  184
M bell (→display)  Ring the bell at volume  47
M bell (→frame)  Ring the bell on display  17
M bell (→graphical)  Ring the bell on associated display  184
M bell (→graphical)  Ring the bell on associated display  184
M confirm (→display)  Test if the user confirms string  47
M confirm (→display)  Test if the user confirms string  47
M confirm (→pce)  Test if the user confirms string  588
M display (→error)  Display the error message using context  643
M electric caret (→editor)  Temporary display caret at location  333
M error (→object)  Initiate an error: id, context ...  504
V error message (↔editor)  What to do with feedback/errors  333
V feedback (←error)  Where (how) the report is reported  643
M flash (→device)  Alert visual by temporary inverting  195
M flash (→graphical)  Alert visual by temporary inverting  184
M flash (→graphical)  Alert visual by temporary inverting  184
M flash (→tab)  Flash tab or area  133
M flash (→window)  Flash (part of) the window  31
V format (←error)  Format used to print the message  643
M format (→pce)  Formatted like C’s printf  588
M inform (→display)  Inform the user of something  47
M inform (→display)  Inform the user of something  47
M inform (→pce)  Inform the user of something  589
V kind (↔error)  Kind of message  643
V modified message (↔editor)  Forward changes to ↔modified  334
M os error (←pce)  Name of last operating system error  589
M report (→display)  Report message using →inform  47
M report (→editor)  Report message (using ←error message)  334

M report (→frame)  Report message (send to ←members)  17
M report (→frame)  Report message (send to ←members)  17
M report (→label)  Report message  83
M report (→label)  Report message  83
M report (→object)  Report message (send to @event ←receiver)  504
M report (→object)  Report message (send to @event ←receiver)  504
M report (→text buffer)  Report message (send to ←editors)  344
M report (→visual)  Report message (send to ←contained in)  407
M report (→visual)  Report message (send to ←contained in)  407
M report to (←dialog)  ←member: reporter or ←contained in  69
M report to (←dialog)  ←member: reporter or ←contained in  69
M report to (←object)  Object for →report (@event ←receiver)  504
M report to (←visual)  Object for →report (equivalent to ←containe in  408
M report to (←visual)  Object for →report (equivalent to ←containe in  408
M show caret at (→editor)  Display caret at indicated position  334
M show matching bracket (→editor) →electric caret on matching bracket  334
M undefined (→editor)  Warn binding is not defined  334
M write (→pce)  Write arguments, separated by spaces  589
M write ln (→pce)  Write arguments, separated by spaces, add nl  589

A.148 reset — Aborting execution

M keyboard quit (→editor)  Cancel current operation  334
M reset (→popup)  Close popup after an abort  121

A.149 resize — Controlling and trapping resizes

M changed union (→device)  Trap changes to the union of all graphicals  191
M changed union (→device)  Trap changes to the union of all graphicals  191
M clear (→area)  Set X, Y, W and H to 0  418
M corner (→area)  Resize to make opposite of origin point  418
M decrease (→area)  Move all sides inwards  418
M geometry (→arc)  Only move the arc  229
M geometry (→bitmap)  Bitmaps can only be moved  221
M geometry (→connection)  Do nothing: constrained by connected graphicals 257
M geometry (→device)  Move device  191
M geometry (→dialog group)  Move/resize tab  129
M geometry (→editor)  Resize the image  324
M geometry (→editor)  Resize the image  324
M geometry (→graphical)  Resize graphical  173
M geometry (→graphical)  Resize graphical  173
M geometry (→list browser)  Resize the text image  148
M geometry (→menu bar)  Resize menu-bar  124
M geometry (→path)  Move and/or resize the path  234
M geometry (→slider)  Adjust ←width  98
M geometry (→tab)  Move/resize tab  133
M geometry (→text)  Only move text  215
M geometry (→text image)  Change image geometry  367
M geometry (→text image)  Change image geometry  367
M geometry (→text item)  Resize the image  89
M geometry (→window)  Resize window inside its frame  27
M geometry (→window)  Resize window inside its frame  27
M geometry (→window decorator) Update internals  37

V hor shrink (↔tile)  Encouragement to get smaller  56
V hor stretch (↔tile)  Encouragement to get wider  57
M increase (→area)  Move all sides outwards  419
M request geometry (→browser)  Map size to character units  141
M request geometry (→editor)  Map size to character units  324
M request geometry (→graphical) Request resize for graphical  174
M request geometry (→graphical) Request resize for graphical  174
M request geometry (→list browser) Map size to character units  148
M request geometry (→view)  Map size to character units  313
M request geometry (→window)  Resize window inside its frame  27
M request geometry (→window)  Resize window inside its frame  27

M request geometry (→window decorator)

Handle window geometry request

37

V resize message (←window)  Executed after window has resized  27
M resize message (→window)  Executed after window has resized  27
M set (→area)  Set X, Y, W and H values  419
M size (→area)  Resize area to size  419
M union (←area)  New area from union  419
M union (→area)  Enlarge area to entail argument  419
V ver shrink (↔tile)  Encouragement to get lower  57
V ver stretch (↔tile)  Encouragement to get higher  57

A.150 resource — Interface to ~/.Xdefault

M catch all (←class)  Get resource-value  608
V default (←resource)  Default if no resource defined  403
M load resource file (→display)  Load resource-definitions from file  45
M obtain resources (→object)  Obtain resources for @default-valued slots  502
M obtain resources (→object)  Obtain resources for @default-valued slots  502
M resource (←class)  Associated resource from name  608
M resource (→class)  Attach a resource to a class  608
V resource class (←display)  Resource class of display [Pce]  45
M resource value (→class)  Set value of named resource  608
M resource value (←object)  Get value of associated resource  503
M resource value (←object)  Get value of associated resource  503
V resources (←class)  User setable resources (via Xdefaults)  608

A.151 root — Manipulation of the root window (background)

M draw in (→display)  Draw graphical in root window  48

A.152 rotate — Rotating objects

M rotate (→circle)  Rotate (does nothing)  210
M rotate (→graphical)  Rotate (multiple of 90) degrees  173
M rotate (→graphical)  Rotate (multiple of 90) degrees  173

A.153 runtime — Runtime version relate methods

M is runtime system (←pce)  @on if this is the runtime library  595
M is runtime system (←pce)  @on if this is the runtime library  595

A.154 scope — Scope of variable assignments

V scope (↔assign)  Scope of assignment  567

A.155 scroll — Controlling the ‘viewport’

M bubble (→scroll bar)  Set length, start and view  62
M bubble scroll bar (→editor)  Update bubble of given scroll bar object  325
M bubble scroll bar (→editor)  Update bubble of given scroll bar object  325
M bubble scroll bar (→window)  Update bubble of given scroll bar object  28
M center (→text image)  Scroll to place index at given line  368
M changed union (→window)  Request scroll bar update  28
M changed union (→window)  Request scroll bar update  28
V clip area (-device)  Clip all graphicals to this area  192
M clip area (←figure)  Clip area associated with figure  200
M clip area (→figure)  Clip all graphicals to this area  200
V collapsed (←node)  Sub nodes are invisible  251
M collapsed (→node)  Sub nodes are invisible  251
V display root (←tree)  Root of visible subtree  247
V displayed (←node)  Node is visible (@default used by update)  252
V end (←text image)  Index of last character displayed  368

M first (←editor)

Line-number (1-based) of the first line on the window

325

V horizontal scrollbar (←window decorator)

Scrollbar for X-direction

37

M horizontal scrollbar (→window decorator)

Attach/detach horizontal scrollbar

37

M length (←editor)  Length of contents (# characters)  325
M length (←list browser)  Length of contents (for scroll bar)  149
V length (←scroll bar)  Total length of object  62
M length (→scroll bar)  Total length of object  62
M line (←text image)  Window line (row) from character index  368
M line to top of window (→editor) Scroll caret to top of window  325
M lines (←text image)  Number of lines visible  368
M lines visible (←editor)  New point with first and last visible line  325
M normalise (→browser)  Ensure (named) item is visible  141
M normalise (→editor)  Try to make range visible  325
M normalise (→list browser)  Make specified item visible  149
M normalise (→view)  Overrule window behaviour  313
M normalise (→window)  Ensure area|graphical|chain is visible  28
M recenter (→editor)  Scroll caret to center of window  325
M recenter (→list browser)  Recenter current line (to be implemented)  149
M repeat (→scroll bar)  Repeat last action (→look: open look)  62
M scroll down (→editor)  Scroll lines (1 screen) downward  325
M scroll down (→list browser)  Scroll lines down (default one window)  149
M scroll horizontal (→window)  Trap message from horizontal scrollbar  28
M scroll one line down (→editor) Scroll lines (1 line) downward  325
M scroll one line up (→editor)  Scroll lines (1 line) upward  325
M scroll to (→browser)  Scroll to nth-1 item  141
M scroll to (→editor)  Set start of window to index  325
M scroll to (→list browser)  Make nth-1 item start of window  149
M scroll to (→view)  Overrule window behaviour  313
M scroll to (→window)  Make point top-left of window  28

M scroll up (→editor)  Scroll lines (1 screen) upward  325
M scroll up (→list browser)  Scroll lines up (default one window)  149
M scroll vertical (→editor)  Trap scroll bar request  325
M scroll vertical (→list browser)  Handle scroll bar request  149
M scroll vertical (→window)  Trap message from vertical scrollbar  29
M scrollbars (←window decorator) Available scrollbars  37
M scrollbars (→window decorator) Set/remove scrollbars  37
M show scroll bar (→editor)  Control visibility of the ←scroll bar  325
M show scroll bar (→editor)  Control visibility of the ←scroll bar  325
M show scroll bar (→list browser) Control visibility of the ←scroll bar  149

M show scroll bar (→window decorator)

Control visibility of the indicated scroll bar

38

M start (←editor)  Start of nth-1 visible line (for scroll bar)  325
V start (←list browser)  Object on top-row of display  149
V start (←scroll bar)  Start of visible part  62
M start (→scroll bar)  Start of visible part  62
M start (←text image)  Character index for start of screenline  368
V start (-text image)  Index of first character displayed  368
M start (→text image)  Set start of screen and screenlines to skip  368
M unzoom (→node)  Unzoom tree back to its root  252
M unzoom (→tree)  Make the visible root the real root  247

V vertical scrollbar (←window decorator)

Scrollbar for Y-direction

37

M vertical scrollbar (→window decorator)

Attach/detach horizontal scrollbar

37

M view (←editor)  Length of view (for scroll bar)  325
M view (←list browser)  Length of view (for scroll bar)  149
V view (←scroll bar)  Length of visible part  62
M view (→scroll bar)  Length of visible part  62
M view (←text image)  Number of characters visible  368
M zoom (→node)  Zoom the tree to this node  252
M zoom (→tree)  Zoom to a particular node  247

A.156 search — Finding plain text, regex or objects

M backward delete char (→list browser)

Undo last search extension

150

M cancel search (→list browser)  Cancel the current search operation  150
M enter (→list browser)  Select current item as double-click  150
M extend prefix (→list browser)  Extend search with common part  150
M extend to current (→list browser) Extend search to current item  150
M find (←device)  Find most local graphical  193
M find (←dict)  First dict item accepted by code  157
M find (←text buffer)  Search for a string  342
M find (←vector)  First element accepted by code  455
M find all (←dict)  New chain with dict items accepted  157
M find all (←vector)  Chain of elements accepted by code  455
M find cut buffer (→editor)  Find string in X-cut buffer  327
M find key (←hash table)  Find key accepted by code  461
M find prefix (←dict)  First item from index int that matches  157
M find value (←hash table)  Find value accepted by code  461
M index (←vector)  Get first index holding argument  455
M insert self (→list browser)  Start/Continue incremental search  151

M insert self (→list browser)  Start/Continue incremental search  151
M isearch backward (→editor)  Start incremental search backward  327
M isearch forward (→editor)  Start incremental search forward  327
M keyboard quit (→list browser) Equivalent to →cancel search  151
M match (←dict)  New chain with items that match argument  157
M match (←regex)  Length of match at indicated position  351
M match (→regex)  Match regex at indicated position  351
M match (→regex)  Match regex at indicated position  351
M repeat search (→list browser)  Repeat with same string  151
M rindex (←vector)  Get last index holding argument  455
M search (←regex)  →search and return start-position of match  351
M search (→regex)  Search regex in object in range [start,end)  351
V search hit (-list browser)  Current hit  151
V search origin (-list browser)  Start of incremental search  151
V search string (-list browser)  Current search string  151

A.157 selection — Manipulation and query of selections

M change selection (→list browser) Hook in selection management  145
M clear (→label)  Equivalent to →selection: ”  81
M clear (→text item)  Clear entry field  86
M clear selection (→menu)  Clear the selection  103
M copy (→display)  Copy to selection and cut buffer  41
M copy (→editor)  Copy selection  319
M copy (→text)  Copy selection (\C-c)  213
M cut (→editor)  Copy and delete selection  319
M cut (→text)  Copy and delete selection  213
M cut buffer (←display)  New string with value of cut-buffer  41
M cut buffer (←display)  New string with value of cut-buffer  41
M cut buffer (→display)  Set value of numbered X-cut buffer  41
M cut buffer (→display)  Set value of numbered X-cut buffer  41
M deselect (→list browser)  Unselect (remove from selection) item  145
V displayed value (←slider)  Currently displayed value  96
M displayed value (→slider)  Currently displayed value  96
V high (←slider)  Maximum of range  96
M high (→slider)  Maximum of range  96
M inside (←device)  New chain with graphicals inside area  189
V low (←slider)  Minimum of range  96
M low (→slider)  Minimum of range  96
V multiple selection (←list browser) If @on, multiple items may be selected  145
M multiple selection (→list browser) If @on, multiple items may be selected  145
V multiple selection (←menu)  If @on, more than one item may be selected  103
M multiple selection (→menu)  If @on, more than one item may be selected  103
M next (→menu)  Set selection to next (‘cycle’)  103
M next line (→list browser)  Set selection to next item  146
M paste (←display)  Simple interface to get clipboard value  41
M paste (→editor)  Paste the clipboard value  319
M paste (→text)  Paste value of cut-buffer  213
M paste (→text item)  Paste value of cut-buffer  87
M paste (→text item)  Paste value of cut-buffer  87
M previous line (→list browser)  Set selection to previous item  146
M select (→list browser)  Select (add to selection) item  146
M select line (→editor)  Select given line number  319

M selected (→browser)  Test if object is selected  140
M selected (←editor)  New string with contents of selection  319
V selected (←graphical)  If @on, I’m selected  169
M selected (→graphical)  If @on, I’m selected  169
M selected (→list browser)  Test if item is selected  146
M selected (←menu)  Find out if menu item or value is selected  103
M selected (→menu)  (De)select a single menu item or value  103
V selected (←menu item)  Member of menu-selection  114
M selected (→menu item)  Member of menu-selection  114
M selected (←text)  New string with contents of selection  213
M selected (←view)  New string with contents of selection  313
V selected fragment (←editor)  The current fragment  319
M selected fragment (→editor)  The current fragment  319
V selected item (←popup)  Selected menu-item/sub-popup  118
M selection (←browser)  Get selected items  140
M selection (→browser)  Set selected items  141
M selection (←device)  New chain of selected graphicals  190
M selection (←device)  New chain of selected graphicals  190
M selection (→device)  Set selection to graphical or chain  190
M selection (→device)  Set selection to graphical or chain  190
M selection (←display)  Query value of the X-window selection  41
M selection (←display)  Query value of the X-window selection  41
M selection (→display)  Set the (textual) selection  41
M selection (←editor)  New point with start and end of selection  320
M selection (→editor)  Make [from, to) the selection  320
V selection (←label)  Text or image displayed  81
M selection (→label)  Text or image displayed  81
M selection (←list browser)  Current value of selection  146
V selection (-list browser)  Selected items  146
M selection (→list browser)  Selected items  146

M selection (←menu)

Get current selection (menu item←value or chain)

103

V selection (-menu)  Value(s) of currently selected menu items  103
M selection (→menu)  Select menu item or value (or chain)  103
M selection (←slider)  Current value of the selection  96
V selection (←slider)  Current selection  96
M selection (→slider)  Current selection  96
M selection (←text)  New point with start and end of selection  213
M selection (→text)  Make [from, to) the selection  213
M selection (←text item)  Current value of the selection  87
V selection (-text item)  Current value  87
M selection (→text item)  Current value  87
M selection (←view)  New point with start and end of selection  313
M selection (→view)  Overrule window behaviour  313
M selection end (←editor)  Index for end of selection  320
V selection end (-editor)  End of selection  320
M selection extend (→editor)  Extend the selection  320
V selection origin (←editor)  Where the selection started  320
M selection origin (→editor)  Where the selection started  320
M selection owner (←display)  Current object owning the X11 selection  41
M selection owner (→display)  Define the owner of the X11 selection  41
M selection owner (→display)  Define the owner of the X11 selection  41
M selection start (←editor)  Index for start of selection  320
V selection start (-editor)  Start of selection  320

V selection style (↔class)  Graphicals: visual feedback of selected  606
M selection timeout (←display)  Get the current selection timeout time (seconds)  42

M selection timeout (→display)

Set the timeout-time for getting the selection value

42

M selection to cut buffer (→editor) Copy the selection to an X-cut buffer  320
V selection unit (↔editor)  Multiclick processing for the selection  320
M toggle selected (→graphical)  Change selected status  169

A.158 selector — Naming behaviour

V from (↔identity)  Attribute at the ‘From’ side  266
V to (↔identity)  Attribute at the ‘To’ side  266

A.159 server — Unix socket organisation (server)

V clients (←socket)  Chain with accepted connections  398
V master (←socket)  Socket I accepted a connection for  398

A.160 set — Set operations (no duplicates)

M add (→chain)  Prepend object if not already →member  446
M add (→chain)  Prepend object if not already →member  446
M copy (→date)  Copy time from argment date object  489
M current (→date)  Change date to be ‘now’  489
M intersection (←chain)  New chain holding common elements  446
M intersection (→chain)  Delete elements not in argument  446
M intersects (→chain)  Test if both chains have a common member  446
M member (→chain)  Test if argument is an element  446
M member (→chain)  Test if argument is an element  446
M member (→dict)  Test if dict item or name is member  156
M member (→font)  Test if font defines character  433
M members (→dict)  →clear and →append elements of chain  156
M set (→date)  Set date from smhDMY  489
M subtract (→chain)  Delete all elements in argument  446
M subtract (→chain)  Delete all elements in argument  446
M union (←chain)  New chain with union of elements  446
M union (→chain)  Append only new elements from argument  446
M union (→chain)  Append only new elements from argument  446
M unique (→chain)  Remove all duplicates from chain  447
M unique (→chain)  Remove all duplicates from chain  447

A.161 side — Edges of graphicals

M bottom side (←area)  Bottom-side of area  420
M left side (←area)  Left-side of area  420
M right side (←area)  Right-side of area  420
M top side (←area)  Top-side of area  420

A.162 sort — Sorting sequences

M sort (→editor)  Sort range [from, to) by line  319

M sort (→text buffer)  Sort [from, to) alphabetically by line  339
M sort (→text buffer)  Sort [from, to) alphabetically by line  339

A.163 stack — Stacking order (object, goals)

M on top (←tab stack)  Find tab on top  136
M on top (→tab stack)  Put indicated tab on top of the others  136
M parent goal (→vmi)  Test if operation is on goal-stack  648

A.164 stacking — Overlapping frames and graphicals

M expose (→frame)  Put frame above all others on the display  15
M expose (→frame)  Put frame above all others on the display  15
M expose (→graphical)  Place graphical on top or above argument  178
M expose (→graphical)  Place graphical on top or above argument  178
M expose (→window)  Expose (raise) related frame  29
M exposed (→frame)  Inform transient windows to expose  15
M hidden (→frame)  Inform transient windows to hide  15
M hide (→frame)  Put frame below all others on the display  15
M hide (→frame)  Put frame below all others on the display  15
M hide (→graphical)  Place in background or below argument  178
M hide (→graphical)  Place in background or below argument  178
M hide (→window)  Hide (lower) related frame  29
M overlap (→graphical)  Succeeds if graphical overlaps with argument  178
M swap (→graphical)  Swap stacking order of graphicals  178

A.165 statement — Argument code object

V argument (↔not)  Test to negate  530
V body (↔while)  Statement to execute  526
V condition (↔if)  Condition to be tested  524
V condition (↔when)  Condition to be tested  552
V condition (↔while)  Condition to be tested  526
V else (↔if)  Executed if condition is false  524
V else (↔when)  Executed if condition is false  552
V members (←and)  Tests that must succeed  527
V members (←or)  One of these must succeed  529
V members (←progn)  Statements and return function  550
V then (↔if)  Executed if condition is true  524
V then (↔when)  Executed if condition is true  552

A.166 statistics — Timing, memory usage, etc.

M bench (←name)  Lookup text of this name <n> times  478
M buckets (←name)  Number of buckets in name-table  478
M answer stack size (←pce)  Number of cells (objects) in ‘answer’ state  596
M answer stack size (←pce)  Number of cells (objects) in ‘answer’ state  596
M bench (→pce)  Benchmark for message passing  597
M bench (→pce)  Benchmark for message passing  597
M bucket value (←name)  Name at indicated bucket  478
M core usage (←pce)  Total core in active use  597

M core wasted (←pce)  Core requested from system, but not in use  597
M cpu time (←pce)  Total CPU time for this process  597
M cpu time (←pce)  Total CPU time for this process  597
M deferred unalloced (←pce)  # freed referenced objects  597
M hash value (←name)  Its hash-value  478
M info (→hash table)  Check consistency and print statistics  462
M method calls (←pce)  Number of methods called  597
V no created (←class)  Number of instances created  609
V no freed (←class)  Number of instances freed  609
M objects allocated (←pce)  Total number of objects created  597
M objects freed (←pce)  Total number of objects freed  597

A.167 status — Flags indicating current status

V active (↔recogniser)  Ignore events when @off  273
V code (←process)  Signal name or exit status  393
M delay (→timer)  Delay for ←interval  309
M delay (→timer)  Delay for ←interval  309
V pid (←process)  Process id of child process  393
M running (→timer)  Start/stop the timer in ‘repeat’ mode  310
M start (→timer)  Equivalent to →status: [repeat]  310
V status (↔gesture)  Current status  275
V status (←process)  Status of the associated process  393
V status (←socket)  Status of the associated socket  397
V status (←timer)  Status of timer  310
M status (→timer)  Status of timer  310
M stop (→timer)  Equivalent to →status: idle  310

A.168 storage — Definition of storage details

V allocated (-text buffer)  Total size of buffer  344
V arg count (←message)  Argument-count  522
V arguments (-?)  Vector of arguments  549
V arguments (←message)  Vector of arguments  522
M attribute (←object)  Get value of a object-level attribute  510
M attribute (←object)  Get value of a object-level attribute  510
M attribute (→object)  Append/change object-level attribute  510
M attribute (→object)  Append/change object-level attribute  510
M buckets (←hash table)  Number of buckets in the table  462
M buckets (→hash table)  Number of buckets in the table  462
V buffer (-text buffer)  Actual storage bin  344
V context (-syntax table)  Context information  639
V date (-date)  Unix’s notion of date  491
M delete attribute (→object)  Delete object-level attribute  511
V editor (←text margin)  Editor I’m part of  373
V elements (-vector)  The elements themselves  456
V first (↔tuple)  First of the tuple  466
V function (↔quote function)  Quoted function  547
V gap end (-text buffer)  End of gap in buffer  344
V gap start (-text buffer)  Start of gap in buffer  344
V members (←sheet)  Attributes of the sheet  459
V name (↔attribute)  Name of the attribute  513
V offset (←variable)  Offset in instance structure  622

V receiver (-?)  Receiver of the operation  549
V receiver (↔message)  Receiver of the operation  522
V second (↔tuple)  Second of the tuple  466
V selector (-?)  Name of the operation  549
V selector (↔message)  Name of the operation  522
V size (←syntax table)  Size of the table  639
V string (←text)  Represented string (may contain newlines)  219
M string (→text)  Represented string  219
V string header (-text buffer)  Encoding description  344
V symbols (-hash table)  Array of symbols  462
V table (-syntax table)  Type-flags  639
V tables (←table)  Hashtables for key entries  465
V text (←text image)  Source of the text  371
V undo buffer (-text buffer)  Record undo information here  345
V value (↔assign)  Value to give to the assignment  567
V value (↔attribute)  Value of the attribute  513
V value (-number)  Value of number object  485
M value (→number)  Assign a value to the number  485
V value1 (-real)  1-st part of double-value  487
V value2 (-real)  2-nd part of double-value  487
V var (↔assign)  Variable to be bound  568
V ws ref (-image)  Window System Reference  442

A.169 stream — Handling objects as Prolog I/O streams

M read as file (←text buffer)  Implement reading as a file  343
M size as file (←text buffer)  Implement seek when using as a file  343
M truncate as file (→text buffer) Implements handling a buffer as a file  344
M write as file (→text buffer)  Implements handling a buffer as a file  344

A.170 syntax — Defining a syntax (editor, parser)

M add syntax (→syntax table)  Add syntax-type for char  637

M comment end (←syntax table)

Name holding 1- or 2 character comment-end sequence

637

M comment start (←syntax table)

Name holding 1- or 2 character comment-start sequence

637

M context (←syntax table)  Context character for char  637
M context (→syntax table)  Set context for character  637
V paragraph end (↔syntax table) Regular expression for end of paragraph  638
V sentence end (↔syntax table)  Regular expression for end of sentence  638
M syntax (←syntax table)  Syntax for given character  638
M syntax (→syntax table)  Modify syntax entry for char  638

A.171 table — Tabular layout of graphical objects

V adjustment (↔format)  left,center,right alignment  204
V column sep (↔format)  Distance between columns/rows  204
V columns (↔format)  Use columns/rows  204
V row sep (↔format)  Distance between rows/columns  204

736 Appendix A: Summary of Functional Groups

A.172 template — Template support methods

M instantiate template (←method) Instantiate a method for use class template/1  627

A.173 term — Conversion to (Prolog) term

M arg (←?)  Nth-1 argument of term instead of result’s  548
M arg (←and)  Nth-1 argument for term description  527
M arg (←block)  Nth-1 argument for term description  538
M arg (←chain)  Nth-1 argument for object description  451
M arg (←create)  Nth-1 argument for term description  555
M arg (←function)  Nth-1 argument of term instead of result’s  546
M arg (←handler group)  Nth-1 argument or term description  305
M arg (←message)  Nth-1 argument for term description  522
M arg (←object)  Nth-1 argument of term description  509
M arg (←object)  Nth-1 argument of term description  509
M arg (←or)  Nth-1 argument for term description  529
M arg (←progn)  Nth-1 argument for term description  550
M arg (←sheet)  Nth-1 argument of term  458
M arg (←vector)  Get argument for term  456
M arg (←vector)  Get argument for term  456
M arity (←?)  Arity of term instead of result’s  548
M arity (←and)  Arity for term description  527
M arity (←block)  Arity for term description  538
M arity (←chain)  Number of arguments for object description  451
M arity (←create)  Arity for term description  555
M arity (←function)  Arity of term instead of result’s  546
M arity (←handler group)  Arity of term description  305
M arity (←message)  Arity for term description  522
M arity (←object)  Number of arguments of term description  509
M arity (←object)  Number of arguments of term description  509
M arity (←or)  Arity for term description  529
M arity (←progn)  Arity for term description  551
M arity (←sheet)  Arity of term  458
M arity (←vector)  Get arity for term  456
M arity (←vector)  Get arity for term  456
M functor (←function)  Functor of term instead of result’s  546
M functor (←object)  Functor (name) of term description  509
M functor (←object)  Functor (name) of term description  509
M radius or interval (←path)  Radius (‘poly’) or intervals (‘smooth’)  236
M source (←pixmap)  Determine source for term representation  224
V term names (↔class)  Selectors to obtain term arguments  610

A.174 test — Test object properties

M access (→directory)  Test if directory has access {read, write}  386
M access (→directory)  Test if directory has access {read, write}  386
M access (→file)  Test if file has access  382
M access (→file)  Test if file has access  382
M empty (→hash table)  Test if hash table has no elements  461
M exists (→directory)  Test if directory exists  386
M exists (→directory)  Test if directory exists  386
M exists (→file)  Test if file exists  382

XPCE Reference Manual

M exists (→file)  Test if file exists  382
M has syntax (→syntax table)  Test if char has syntax  637
M has value (→object)  Test if Obj ←name equals 2nd argument  499
M is a (→event node)  Test if node is a subnode of argument  302
M is off (→object)  Test if Obj ←name returns @off  499
M is on (→object)  Test if Obj ←name returns @on  499
M not has value (→object)  Test if Obj ←name not-equal 2nd argument  499
M prefix (→char array)  Test if receiver has prefix argument  472
M same (→file)  Test if two paths refer to the same physical file  382
M sub (→char array)  Test if argument is a substring  472
M sub (→char array)  Test if argument is a substring  472
M suffix (→char array)  Test if receiver has suffix argument  473
M suffix (→char array)  Test if receiver has suffix argument  473

A.175 textual — Textual representation

M convert (←date)  Convert Day/Month/Year to date  490
M convert (→date)  Set date conform time description  490
M convert (←point)  Event ←position or the text ‘x,y’  413
M convert (←size)  Convert text ‘WxH’  415
M displayed value (←text item)  Visible (typed) textual value  93
M displayed value (→text item)  Visible (typed) textual value  93
M print name (←char array)  Equivalent to ←self  475
M print name (←date)  Same as ←string  490
M print name (←directory)  Equivalent to ←path  386
M print name (←menu item)  ←print name of ←value  114
M print name (←method)  Class ↔Selector  626
M print name (←number)  Formatted version (%d) of value  485
M print name (←object)  Calls ←name  503
M print name (←object)  Calls ←name  503
M print name (←point)  Printed representation as %d,%d  413
M print name (←real)  Formatted version (%g) of value  487
M print name (←regex)  Same as ←pattern (support text item)  352
M print name (←resource)  Class.name  403
M print name (←size)  Printed representation as %dx%d  415
M print name (←socket)  returns <classname>(<address>)  397
V print name (-text item)  Text-representation of ↔selection  93
M print name (←variable)  Class ↔Name  621
M print name of value (←text item) Determine printable representation  93
M string (←date)  New string representing date  490

A.176 time — Controlling real-time

M date (←pce)  Unix’s standard time string for now  589
V interval (←timer)  Interval between messages in seconds  310
M interval (→timer)  Interval between messages in seconds  310
M mclock (←pce)  #Elapsed milliseconds since XPCE was started  589
V modified (-directory)  Time stamp for →changed  387
M modified (→directory)  Succeed if directory has changed since last test  387
M time (←file)  New date holding modification/access time  384

738 Appendix A: Summary of Functional Groups

A.177 timing — Controlling real-time

M time (←event)  Timestamp (relative to argument)  298
V time (-event)  Window System Time stamp  298

A.178 tip — End-points of a joint (line, arc, path) or arrow

M end (←arc)  End position of arc  228
M end (←line)  New point representing end-point  225
M end (→line)  Set end-point of line segment  225
M end (←path)  End-point of path  233
M end x (←line)  X of end-point  225
M end x (→line)  Set X of end-point  225
M end y (←line)  Y of end-point  225
M end y (→line)  Set Y of end-point  225
M points (→arc)  Arc between two points  228
M points (→connection)  Set X1, Y1, X2, Y2  256
M points (→line)  Reconfigure line (X1,Y1) - (X2,Y2)  225
M start (←arc)  Start position of arc  228
M start (←line)  New point representing start-point  225
M start (→line)  Set start-point of line segment  225
M start (←path)  Start-point of path  233
M start x (←line)  X of start-point  225
M start x (→line)  Set X of start-point  225
M start y (←line)  Y of start-point  225
M start y (→line)  Set Y of start-point  225

A.179 transient — Support windows (e.g. prompters)

V transient for (←frame)  Frame I’m transient for (i.e. support for)  10
M transient for (→frame)  Frame I’m transient for (i.e. support for)  9
V transients (←frame)  Back pointer for transient frames  10

A.180 transpose — Transposition of text

M gosmacs transpose (→editor)  Transpose characters before caret  330
M gosmacs transpose (→text)  Transpose two char array before caret  217
M transpose chars (→editor)  Transpose characters around caret  330
M transpose chars (→text)  Transpose two char array around caret  217
M transpose lines (→editor)  Transpose line with line above  330
M transpose terms (→editor)  Transpose Prolog terms around point  330
M transpose word (→editor)  Transpose words around caret  330

A.181 tty — Controlling the terminal

V tty (←process)  Pseudo-tty used for communication  394
V use tty (←process)  Use pseudo-tty (@on) or pipes (@off)  394
M use tty (→process)  Use pseudo-tty (@on) or pipes (@off)  394

XPCE Reference Manual Appendix A: Summary of Functional Groups 739

A.182 type — Type definition, test and conversion

V type (↔var)  Type of the ← value  565
M class (←object)  Class the object belongs to  496
M class name (←object)  Name of the class the object belongs to  496
M class name (←object)  Name of the class the object belongs to  496
M instance of (→object)  Test of object is an instance of class  497
M instance of (→object)  Test of object is an instance of class  497
M is a (→class)  Test if I’m a subclass of argument  605
V return type (←get method)  Type of value returned  631
M same class (→object)  Is object of the same class as argument  497
M sub (←resource)  Refined resource when redefined by user  401
M sub classes (←class stub)  Sub classes (fails if none available)  615
V sub classes (-class stub)  Sub classes  615
V super class (←class stub)  Immediate super class  615
M super class name (←class)  Name of super-class or @nil (term description  605
V type (←resource)  Type requested  401
V type (↔text item)  Value-type of the selection  86
M type (→text item)  Value-type of the selection  86
V type (←variable)  Type check  619
M type (→variable)  Type check  619
V types (←method)  Argument type specification  625
M types (→method)  Set type-check  625

A.183 undo — Undoing (edit) operations

M undo (→editor)  Undo last interactive command  331

A.184 update — Update Dependant properties

M changed label (→dialog group) Add label-area to the update  130
M changed label (→tab)  Add label-area to the update  133
V bad bounding box (-device)  Indicate bounding box is out-of-date  193
V bad format (-device)  Format needs to be recomputed  193
M compute (→arc)  Compute the bounding box area  230
M compute (→arrow)  Compute ←tip, ←left and ←right  240
M compute (→button)  Compute desired size (from command)  78
M compute (→button)  Compute desired size (from command)  78
M compute (→connection)  Recompute the line  257
M compute (→device)  Recompute device  193
M compute (→device)  Recompute device  193
M compute (→dialog group)  Recompute area  130
M compute (→figure)  Recompute figure (handle ←border)  200
M compute (→graphical)  Update status of graphical  181
M compute (→label)  Recompute layout  82
M compute (→label)  Recompute layout  82
M compute (→list browser)  Recompute the image  149
M compute (→menu)  Compute desired size  103
M compute (→menu bar)  Recompute the menu-bar  122
M compute (→path)  Recompute interpolation and area  234
M compute (→scroll bar)  Recompute the scrollbar values  60
M compute (→scroll bar)  Recompute the scrollbar values  60
M compute (→slider)  Compute desired size  96

Appendix A: Summary of Functional Groups

M compute (→tab)  Recompute area  133
M compute (→text image)  Recompute text-image if necessary  368
M compute (→text image)  Recompute text-image if necessary  368
M compute (→text item)  Compute desired size  87
M compute (→tile)  Compute ideal sizes from sub-tiles  58
M compute (→tree)  Recompute the tree layout  247
M compute (→window)  Recompute window  29
M compute (→window)  Recompute window  29
M compute layout (→node)  Recursively place each node (level, x, y)  252
M compute size (←node)  Recursively compute the sub-tree-size (level)  252
V computed (-node)  Stage of the layout process  252
M does include (→fragment)  Test whether start or end is included  355
M include (→fragment)  Define whether start and end are included  355
V item offset (←menu)  Offset of the first item  109
V item size (←menu)  Size of item-box  109
V label area (←menu)  Area for the label (if show label equals @on)  109
M layout (→tree)  Recompute layout  247
V left offset (←menu)  Offset of item in its box (left-side)  109
V my size (-node)  Height of myself  252
V recompute (-device)  Graphicals that requested a recompute  193
V request compute (←graphical) Graphical requests recomputing  181
M request compute (→graphical) Request a →compute on next repaint  181
V right offset (←menu)  Offset of item in its box (right-side)  109
V sons size (-node)  Height of the combined sons  252

M update link attributes (→connection)

Re-read the link properties

258

A.185 value — Related value

M value (←var)  Current value of the variable  565
V value (-var)  Value of the var  565
M assign (→var)  Assign value to variable (with scope)  565
M catch all (←sheet)  Get value associated with selector  457
M catch all (←sheet)  Get value associated with selector  457
M catch all (→sheet)  Set attribute named selector  457
M convert string (←resource)  Convert textual value into typed value  402
M convert string (←resource)  Convert textual value into typed value  402
V key (←dict item)  Key used to index from dict  160
M key (→dict item)  Key used to index from dict  160
M obtain (→resource)  Compute its value  402
M string value (←resource)  Obtain and return value as a char array  402
M string value (←resource)  Obtain and return value as a char array  402
V value (↔:=)  Value of the binding  576
V value (←event node)  Value of the node  302
V value (←menu item)  Value of the item  114
M value (→menu item)  Set value and recompute label  114
M value (←number)  Integer representing value  484
M value (←real)  Returns itself  486
M value (→real)  Set the value to argument  486
M value (←resource)  Compute and return the value  403
M value (→resource)  Set value of the resource  403
M value (←sheet)  Get value associated with name  458
M value (←sheet)  Get value associated with name  458

M value (→sheet)  Set named attribute to value  458
M value (→sheet)  Set named attribute to value  458

A.186 version — Versions of XPCE, OS, X, ...

M feature (←class)  Get value of given feature  613
M feature (→class)  Register class feature  613
M feature (→pce)  Define new feature  598
V features (-class)  Defined features on this class  613
V features (←pce)  List of installed features  599
M has feature (→class)  Test if class has feature  613
M has feature (→pce)  Test if feature is defined  599
V machine (←pce)  Name of this machine/architecture  599
V operating system (←pce)  Name of operating system  599
V rcs revision (←class)  RCS revision of sourcefile  613
M version (←pce)  Representation of the version number  599
M version (←pce)  Representation of the version number  599
V version (-pce)  Version indication  599
V window system (←pce)  Basic window system used  599
V window system revision (←pce) Revision of Xt library used to compile xpce  599
V window system version (←pce) Version of Xt library used to compile xpce  599

A.187 virtual — Dummy methods on super-classes

M emptied (→fragment)  Called if text is killed/deleted  356
M modified item (→device)  Trap modification of item (fail)  197

A.188 visibility — Making object (in-)visible

V displayed (←graphical)  If @on, graphical is visible  179
M displayed (→graphical)  If @on, graphical is visible  179
M displayed (→window)  (Un)display window, take care of ←decoration  29
M displayed (→window decorator) (Un)display window. Take care of ←window  38
M is displayed (←graphical)  @on if graphical is visible on device  179
M next status (→figure)  Make next in ←graphicals visible  200
M show (←frame)  @on iff ←status = open; @off otherwise  16
M show (→frame)  (Un)show the frame on the display  16
V status (←figure)  Name of visible graphical (or all active)  200
M status (→figure)  Name of visible graphical (or all active)  200
V status (←frame)  Current visibility of the frame  16
M status (→frame)  Current visibility of the frame  16

A.189 visualisation — Making data visible

M browser (←dict)  ListBrowser or Browser associated  155
V browser (-dict)  Associated browser (visualisation)  155
M margin width (←editor)  Width of annotation margin  318
M margin width (→editor)  Set width of annotation margin  318
V value text (←text item)  Graphical text object for selection  86

A.190 whole — Managing object

V context (←behaviour)  Definition context of this method  617
V text buffer (←fragment)  Text buffer I’m a range of  356

A.191 window manager — Interaction with the X-window manager

M delete wm protocol (→frame)  Delete window manager protocol  10

M done message (→frame)

Trap window manager WM DELETE WINDOW

10

M done message (→frame)

Trap window manager WM DELETE WINDOW

10

M save message (→frame)  Trap window manager WM SAVE YOURSELF  10
M save message (→frame)  Trap window manager WM SAVE YOURSELF  10
M window manager (←display)  Window manager running on this display  42
V window manager (→display)  Window manager running on this display  42
M wm delete (→frame)  Default handling for WM DELETE WINDOW  10
M wm delete (→frame)  Default handling for WM DELETE WINDOW  10
M wm protocol (→frame)  Register window manager protocol  10
M wm protocol (→frame)  Register window manager protocol  10
V wm protocols (←frame)  Protocol-name -→ message  11

A.192 window system — Connection to the underlying window system

V ws ref (-display)  Window-System reference  49
V ws ref (-frame)  Window-System reference  21
V ws ref (-window)  Window-System reference  34

A.193 working directory — Process’ or PCE working directory

M cd (→directory)  Change to this directory  387
M pop (→directory)  →cd back to old directory  387
M push (→directory)  →cd until →pop  387

A.194 write — Writing to files

M append (→file)  Append string to file  381
M flush (→file)  Flush pending output  381
M format (→file)  Format arguments and →append  381
M newline (→file)  Append newline to file  381

A.195 x — X-window interaction

M xclose (→colour)  Destroy window-system counterpart  424
M xclose (→cursor)  Destroy X-cursor on display  430
M xclose (→font)  Destroy associated X-resources  434
M xclose (→image)  Closedown resources at server  439
M xopen (→colour)  Create window-system counterpart  424
M xopen (→colour)  Create window-system counterpart  424
M xopen (→cursor)  Create X-cursor on display  430

M xopen (→cursor)  Create X-cursor on display  430
M xopen (→font)  Open the associated X-resources  434
M xopen (→font)  Open the associated X-resources  434
M xopen (→image)  Open X-image  439
M xopen (→image)  Open X-image  439
M screen saver (→display)  Activate (@on) or deactivate (@off) screensaver  42
V x name (←font)  Window-system name for the font  434

744 Appendix A: Summary of Functional Groups XPCE Reference Manual

Appendix B: Group Index 745

Appendix B

Group Index

This appendix provides a list of all functional groups and the pages on which members of these groups may be found.

3

3d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425

A

abort. . . . . . . . 33, 48, 51, 76, 93, 126, 365, 369, 408, 566 accelerator . . 17, 31, 68, 79, 91, 110, 115, 121, 124, 131,

142, 152, 184, 195, 292, 332 action. . . . . . . . . . . 61, 72, 78, 87, 114, 146, 279, 303, 310 active. . . . . . . . . . . . . . . . . . . . . . . . . . . 67, 105, 114, 119, 123 add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156, 461, 463, 464 address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40, 396 animate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12, 25, 43, 170 appearance . . 12, 25, 43, 55, 61, 73, 78, 82, 88, 97, 106,

115, 119, 123, 128, 132, 147, 160, 171, 190, 199, 206, 208, 210, 213, 221, 229, 233, 237, 238, 251, 260, 322, 355, 358, 367, 372, 374, 427, 431

apply . . . . . . . . . . . . . . . . . . . . . 67, 72, 88, 96, 104, 128, 170 area . . 13, 27, 37, 61, 68, 83, 90, 98, 129, 133, 141, 148,

160, 174, 191, 210, 215, 226, 230, 234, 239, 324, 367, 375, 441

argument . . . . . . . . . . . . . . . . . 362, 522, 537, 554, 574, 576 attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 authority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 autoload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616

B

behaviour . . . . . . 11, 24, 42, 60, 78, 82, 87, 96, 103, 114,

122, 146, 320, 427, 500, 606, 616, 620 binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218, 365

C

cache . . . . . . . . . . . . . . . . . . . . . . 49, 153, 336, 370, 404, 611 calculate … 215, 226, 298, 412, 414, 422, 469, 484, 487,

490, 532, 557 callback. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581, 583 cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276, 280 cardinality . . . . . . . . . . . . . . . . . . . . . . . . . 339, 444, 460, 471 caret . . . . . . . . . . . . . . . . . . . . . . . . . . . 90, 150, 215, 326, 363 case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330, 343, 475, 481 cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222, 609, 623 check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555, 598 classify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 client . . . . . . . . . . . . . . . . . . . . . . . . 36, 55, 60, 264, 362, 515 colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 425, 440 command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 compare … 355, 412, 414, 421, 449, 472, 478, 484, 486,

490, 499 compatibility. . . . . . . . . 198, 201, 219, 236, 356, 462, 647 compilation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 complete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91, 110, 333 completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145, 318, 574 condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 connect. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 constraint . . . . . . . . . . . . . . . . . . . . . 265, 266, 268, 283, 285 content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471, 479 contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354, 386 context . . . . . . . . . . . . . . . . . . . . . . . . 118, 288, 291, 294, 402 control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390, 393, 398, 594 conversion . . . . . . 7, 23, 40, 167, 220, 299, 317, 347, 362,

385, 424, 430, 433, 470, 477, 479, 565, 587, 637 copy . . 220, 225, 379, 412, 414, 416, 437, 444, 453, 471,

478, 479, 483, 486, 497, 573, 605, 619, 633, 637 create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53, 450 cursor . . . . . . . . . . . . . . . . . . . . . 29, 142, 182, 193, 275, 368

D

date component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 debugging …. 48, 51, 369, 504, 544, 591, 609, 626, 645 default . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362

Appendix B: Group Index

delegate … 23, 81, 86, 140, 145, 159, 212, 312, 317, 616 delete . . . . . . 142, 158, 216, 314, 328, 384, 462, 463, 465 dialog item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152, 334 dimension …. 45, 57, 205, 230, 234, 268, 355, 383, 412,

414, 419, 421, 434, 441 display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 draw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

E

edit . . . . . . . . . . . . . . . . . . 150, 224, 252, 302, 342, 386, 441 edit continue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454, 577 encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435, 481 environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394, 594 equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 event. . . . . . 16, 30, 46, 51, 52, 58, 62, 75, 79, 83, 90, 98,

110, 120, 124, 130, 133, 136, 151, 182, 194, 217, 235, 247, 258, 273, 275, 279, 281, 282, 284, 285, 290, 292, 303, 304, 332, 363, 368, 406

exception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 execute . . . . . 82, 104, 118, 289, 512, 518, 537, 543, 548,

550, 553, 554, 557, 566, 620, 629, 631

F

feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . 279, 282, 285, 289 file …. 170, 221, 321, 340, 382, 424, 439, 484, 501, 515,

544, 588, 608, 620 file type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 fill. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 focus . . . . . . . . . . . . . . . . . . . . . . . . . 18, 31, 69, 133, 185, 195 font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 format. . . . . . . . . . . . . . . . . . . . . . . . . . 83, 313, 327, 342, 481 forward. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 fragment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343, 372 function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508, 545

G

grey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

H

hashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158, 301, 465 hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . 254, 301, 302, 387 host. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43, 581, 588

I

icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 indentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323, 481 index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 initialise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389, 392, 397 insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216, 328 internal. … 21, 35, 49, 63, 111, 153, 219, 241, 254, 264,

280, 281, 286, 310, 336, 356, 371, 384, 390, 452, 476, 478, 481, 515, 519, 522, 524, 526, 528, 529, 530, 532, 533, 534, 535, 536, 539, 540, 542, 568, 575, 613

interpolation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 iterate . . 55, 157, 190, 245, 251, 339, 351, 449, 455, 458,

461

K

kind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

L

label . . . . . . . . . . . . . . . . . . 7, 36, 72, 77, 113, 128, 145, 318 language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 layout. … 13, 26, 37, 55, 61, 67, 73, 78, 82, 89, 97, 108, 123, 129, 132, 135, 171, 190, 245, 323, 372 limit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333, 343, 475 list . . . . . . . . . . . . . . . . . . . . . . . 304, 354, 445, 454, 550, 577 location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262, 383, 633 lookup. . . . . . . . . . . . . . . . . . . . . . . . . 140, 157, 301, 461, 465

M

manual …. 403, 468, 509, 610, 616, 621, 627, 630, 631,

644 member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 menu . . . . . . . . . . . . . . . . . . . . 29, 75, 79, 115, 141, 150, 181 meta . . 170, 362, 458, 500, 512, 557, 574, 608, 620, 626,

645 modal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 32 mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283, 321 modified . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278, 300

N

name . . . . . . 7, 51, 72, 127, 167, 261, 293, 362, 385, 401, 424, 427, 430, 433, 438, 464, 468, 514, 565, 574, 587, 616, 617, 637, 643, 648

nodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167, 245

O

oms …. 7, 23, 36, 39, 50, 52, 55, 60, 66, 71, 77, 81, 86, 95, 102, 112, 117, 122, 127, 132, 135, 140, 144, 155, 159, 164, 166, 189, 199, 203, 206, 208, 210, 212, 220, 223, 225, 228, 232, 237, 238, 244, 250, 256, 259, 261, 263, 266, 268, 273, 275, 278, 281, 282, 283, 285, 288, 291, 293, 299, 301, 302, 303, 304, 309, 312, 317, 338, 346, 353, 357, 361, 366, 372, 374, 378, 385, 388, 391, 396, 400, 406, 412, 414, 416, 421, 423, 426, 429, 432, 436, 444, 453, 457, 460, 464, 466, 468, 469, 470, 477, 479, 483, 486, 488, 494, 512, 514, 521, 524, 526, 527, 529, 530, 531, 537, 539, 540, 541, 543, 547, 548, 550, 552, 554, 556, 559, 565, 567, 570, 576, 577, 580, 583, 586, 603, 615, 617, 618, 623, 624, 631, 633, 636, 642, 645, 648

open . . . . . . . . . . . . . . . . . . . . . . . . . . 8, 23, 40, 117, 380, 389 operant . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531, 539, 540, 556 order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156, 160, 447, 455 organisation …. 19, 33, 47, 51, 53, 58, 69, 75, 110, 116,

125, 131, 136, 142, 152, 158, 161, 185, 195, 200, 221, 248, 253, 302, 334, 344, 355, 408, 442

orientation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204, 418 output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390, 392, 397

P

parse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341, 473 part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379, 633 pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 permission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16, 441 pie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 pixel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 185 points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 popup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161, 291 position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269, 295, 419 postscript …. 21, 48, 187, 197, 201, 206, 208, 211, 218,

221, 226, 230, 235, 240, 435, 442, 598 process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505, 545 property. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434

Q

quit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48, 595

R

range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319, 339, 381 realise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 508, 541, 546, 598 registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 relation. . . . . 167, 245, 257, 259, 261, 264, 416, 498, 606 repaint . . 34, 62, 80, 83, 94, 98, 110, 126, 131, 134, 136,

152, 187, 197, 201, 207, 208, 211, 218, 222, 227, 231, 235, 240, 249, 335, 344, 370, 373, 375, 610

report . . 17, 31, 47, 69, 83, 133, 184, 195, 333, 344, 407,

504, 544, 588, 643 reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121, 334 resize . . 27, 37, 56, 89, 98, 124, 129, 133, 141, 148, 173,

191, 215, 221, 229, 234, 257, 313, 324, 367, 418 resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45, 403, 502, 608 root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 rotate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173, 210 runtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595

S

scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 scroll . . . . . 28, 37, 61, 141, 149, 192, 200, 247, 251, 313,

325, 368 search . . . . . . . . . . . 150, 157, 193, 327, 342, 351, 455, 461 selection … 41, 81, 86, 96, 103, 114, 118, 140, 145, 169,

189, 213, 313, 319, 606 selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156, 433, 446, 489 side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 sort. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319, 339 stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136, 648 stacking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 29, 178 statement . . . . . . . . . . . . 524, 526, 527, 529, 530, 550, 552 statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . 462, 478, 596, 609 status . . . . . . . . . . . . . . . . . . . . . . . . . 273, 275, 309, 393, 397 storage …. 219, 344, 371, 373, 442, 456, 459, 462, 465,

466, 485, 487, 491, 510, 513, 522, 547, 549, 567, 622, 639

stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637

T

table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 term . . 224, 236, 305, 451, 456, 458, 509, 522, 527, 529,

538, 546, 548, 550, 555, 610 test . . . . . . . . . . . . . . . . . . 302, 382, 386, 461, 472, 499, 637 textual . . . . . . 93, 352, 386, 397, 403, 413, 415, 475, 485,

487, 490, 503, 621, 626 time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310, 384, 387, 589 timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 tip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225, 228, 233, 256 transient. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 transpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217, 330 tty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 type . . . . . . . . . 86, 401, 496, 565, 605, 615, 619, 625, 631

U

undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 update . . 29, 58, 109, 130, 133, 149, 181, 193, 200, 230,

234, 240, 247, 252, 257, 355, 368

V

value . . . . . . . 114, 160, 302, 402, 457, 484, 486, 565, 576 version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598, 613 virtual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197, 356 visibility . . . . . . . . . . . . . . . . . . . . . . . . . . 16, 29, 38, 179, 200 visualisation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86, 155, 318

W

whole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356, 617 window manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 42 window system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21, 34, 49 working directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381

X

x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42, 424, 430, 434, 439

Appendix B: Group Index 748 Appendix B: Group Index XPCE Reference Manual

Appendix C: Class Index 749

Appendix C Class Index

This appendix provides a index to all built-in PCE classes

*_{* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 560} -_{- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559} /_{/ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561} :_{:= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576} =_{= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532}_{==. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539}_{=< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535} ?_{? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548} @_{@= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541} +_{+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558} >_{> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534}_{>= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536} \_{\== . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540} <_{< . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533} A

and. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 arc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 arrow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 assign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512

B

behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 binary condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 binary expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 bitmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 bool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 box. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 browser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 button. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

C

c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 chain table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 char array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602 class stub. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 click gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 code vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 connect gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

Appendix C: Class Index

D

date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 delegate variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 dialog group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 dialog item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 dict . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 dict item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 display manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

E

editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 elevation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 event node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 event tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301

F

figure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 fragment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 frame . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543

G

gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 get method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 graphical . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

H

handle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 handler group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 hash table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 hyper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514

I

identity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436

J

joint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

K

key binding. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

L

label. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 list browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

M

menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 menu item. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 modifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 move gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 move outline gesture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

N

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 not . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483

O

object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529

P

path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 pce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 pixmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 popup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 popup gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 progn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 program object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645

Q

quote function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547

R

real. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 recogniser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 regex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 relation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 resize gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 resize outline gesture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

S

scroll bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 send method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 sheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 slider . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 source location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 spatial. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 style. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 syntax table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636

T

tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 tab stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 text buffer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 text cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 text image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 text item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 text margin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 tile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 tuple . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570

V

var . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 564 variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 visual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 vmi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648

W

when . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 while . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 window decorator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Appendix C: Class Index 752 Appendix C: Class Index XPCE Reference Manual

Appendix D: Concept Index 753

Appendix D

Concept Index

This appendix is generated from the ‘Keyword Browser’ tool from the online manual tools.

?

? (obtainer) . . . . . . . . . . . . . . . . . . . 519, 543, 547, 548, 564

@

@arg1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519, 543, 564, 624 @receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . 519, 543, 564, 624

\

\C-k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 \e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365

A

accelerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69, 73, 115 activate menu-entries . . . . . . . . . . . . . . . 106, 114, 115, 119 Adobe . . . . . . . . . . . . . . 15, 21, 48, 187, 378, 385, 488, 586 alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47, 184 alien . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507, 607, 618 and/or tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228, 256 animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25, 43, 170 annotate text. . . . . . . . . . . . . . . . . . . . . . . 315, 338, 353, 372 app-defaults . . . . . . . . . . . . . . . . . . . . . . . . 400, 502, 503, 608 arc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228, 232, 256 area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 416 arithmetic . . . . . . . . . . . . . . . . 483, 486, 558, 559, 560, 561 array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 arrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237, 238 arrowhead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237, 238 ask (question) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 19 attribute. . . . . . . . . . . . . . . . . . 512, 519, 543, 564, 607, 618

B

back . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 178 backup (file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321, 379 benchmarking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 bitmap . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 200, 220, 353, 436 break (execution). . . . . . . . . . . . . . . . . . . 593, 645, 646, 647 button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 185, 278, 353 bye . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 595

C

C-data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507, 607, 618 callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 caret. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214, 374 case-sensitive . . . . . . . . . . . . . . . . . . . . . . . 151, 321, 330, 588 center. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19, 175 changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609, 610 char (type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 click . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 colour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 colour (menu for) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114, 115 columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203, 460 concatenation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 confirm (action) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 47 connected (-graphs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 connecting graphicals . . 54, 66, 140, 164, 172, 203, 228,

244, 256, 312, 460 control (-key) . . . . . . . . . . . . . . . . . . . . . . . . . . . 276, 296, 299 crash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591, 642 creating instances . . . . . . . . . . . . . . . . . . . . . . . 554, 586, 604 curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 cut-buffer . . . . . . . . . . . . . . . 39, 41, 87, 169, 190, 196, 328

D

dash-pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 deactivate . . . . . . . . . . . . . . . . . . . . . . . . . . 106, 114, 115, 119 debugging . . . . . . . . . . . . . . . . . . . . . . . . . . 593, 645, 646, 647 DEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 dialog-window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 10, 12 die. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 595 display. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 196 DISPLAY (environment) . . . . . . . . . . . . . . . . . . 39, 40, 196 display (multiple-). . . . . . . . . . . . . . . . . . . . . . . . . 39, 40, 196 drag . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 177, 274, 281, 304

Appendix D: Concept Index

E

editor . . . . . . . . . . . . . 66, 85, 140, 164, 312, 315, 338, 372 emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315, 338, 372 environment (variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 evaluate (functions) . . . . . . . . . . . . . . . . 519, 543, 547, 564 event . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 33, 185, 189, 293 event (generation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 event (handling) . . . . . . . . . . . 30, 182, 273, 274, 294, 304 event id (type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 events (during computation) . . . . . . . . . . . . . . . 43, 95, 407 exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 595 expose . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 21, 48, 178, 187 expression (type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531, 556

F

fail (always) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529, 594 fatal error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591, 642 feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43, 95, 407 file (access) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382, 386 file (temporary) . . . . . . . . . . . . . . . 378, 385, 488, 586, 598 file (unix-) . . . . . . . . . . . . . . . . . . . . . . . . . 378, 385, 488, 586 flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47, 184 flickering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 float (in slider) …. 43, 95, 407, 483, 486, 558, 559, 560,

561 floating point . . . . . . . . . . . . . 483, 486, 558, 559, 560, 561 focus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32, 274, 304 font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 font (adding new) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44, 432 font (logical names). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 font (multiple-) . . . . . . . . . . . . . . . . 315, 338, 353, 357, 372 for all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331, 449, 450, 526 forwarding (arguments). . . . . . . . . . . . . 519, 543, 564, 624 forwarding (events). . . . . . . . . . . . . . . . . . . . . . . 30, 182, 294 front . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 21, 48, 178, 187 function . . . . . . . . . . . . . . . . . . . . . . . 519, 543, 547, 548, 564

G

garbage collection . . . . . . . . . . . . . . . . . . . . . . . 494, 596, 605 geometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 267, 416 gesture . . . . . . . . . . . . . . . . . . . . . . . . . 14, 177, 274, 281, 304 get . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 getenv() (Unix) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 gnu-emacs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315, 338, 372 graph (layout) …. 54, 66, 140, 164, 172, 203, 244, 312,

460 graphicals (refining) . . . . . . . . 30, 165, 179, 182, 185, 294 graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 165, 189, 293 grey. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106, 114, 115, 119 group (of menu items) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

H

halt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 595 hashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203, 460 hide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15, 21, 48, 178, 187 hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54, 172, 244 host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 hyper-text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353

I

icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 200, 220, 353, 436 image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 200, 220, 436 indented (list) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54, 172, 244 indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203, 460 inform (user). . . . . . . . . . . . . . . . . . . . . . 43, 47, 95, 184, 407 inheritance (multiple) . . . . . . . . . . . . . . . . . . . . 54, 172, 244 initialise (objects) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 instance-of (test) . . . . . . . . . . . . . . . . . . . . . . . . 497, 571, 587 instance-variable. . . . . . . . . . . . . . . 519, 543, 564, 607, 618 instances (keep track of) . . . . . . . . . . . . . . . . . . . . . 609, 610 internet (number). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 iteration. . . . . . . . . . . . . . . . . . . . . . . . . . . . 331, 449, 450, 526

K

key-names (symbolic) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 keyboard. . . . . . . . . . . . . . . . . . . . 22, 32, 189, 274, 293, 304 keyboard (accelerator) . . . . . . . . . . . . . . . . . . . . . 69, 73, 115 keyword (lisp) . . . . . . . . . . . . . . . . . . . . . . 151, 321, 330, 588

L

landscape (postscript) . . . . . . . . . . . . . . . . . 15, 21, 48, 187 language (multi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 layout … 54, 66, 140, 164, 172, 203, 228, 244, 256, 312,

460 LFD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 line thickness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 link (symbolic file-) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 linking graphicals . . . . . . . . . . . . . . . 54, 172, 228, 244, 256 LISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151, 321, 330, 588 list (indented) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54, 172, 244 location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 look-and-feel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331, 449, 450, 526

M

margin (of text-editor) . . . . . . . . . . . . . 315, 338, 353, 372 memory (limited) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 menu . . . . . . . . . . . . . . 29, 75, 100, 115, 117, 141, 150, 182 menu bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 meta (-key) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276, 296, 299 modal window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 19 modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609, 610 modifier. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276, 296, 299 mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 33, 185, 189, 293 move . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 177, 274, 281, 304

N

new . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495, 554, 586, 604

O

obtainer (?) . . . . . . . . . . . . . . . . . . . . . . . . 519, 543, 547, 564 open . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 24, 40, 75, 380, 393 OpenLook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 OpenWindows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

P

paste . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 41, 87, 196, 328 path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228, 232, 256 path (image search) . . . . . . . . . . . . . . . . . . . . . . . . . . 383, 439 pen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 percentage (done) . . . . . . . . . . . . . . . . . 25, 43, 95, 170, 407 pid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 pie chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228, 256 pixmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 200, 220, 436 point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 pointer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33, 185 polygon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 popup (argument forwarding) . . . . . . . . . . . . . . . . . . . . . 118 popup (menu) . . . . . . . . . . 29, 75, 115, 117, 141, 150, 182 popup (of a frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 popup-windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 200, 220 position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 postscript. . . . . . . . . . . 15, 21, 48, 187, 378, 385, 488, 586 PostScript . . . . . . . . . . 15, 21, 48, 187, 378, 385, 488, 586 progress (of computation) . . . . . . . . . 25, 43, 95, 170, 407 prompt (confirm) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18, 47 prompt (for value) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 pull-down (menu) . . 29, 75, 115, 117, 122, 141, 150, 182 pullright (menu) . . . . . . . . . . . . . . . . . . . . . . . . 102, 112, 115

Q

queue (event-) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 quit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10, 595

R

radio-button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 real (number) . . . . . 43, 95, 407, 483, 486, 558, 559, 560,

561 region (of text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 regular expressions . . . . . . . . . . . . . . . . . . . . . . 346, 347, 472 replace (text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346, 472 report . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43, 47, 95, 184, 407 resize . . . . . . . . . . . . . . . . . . . . . . 27, 173, 177, 191, 274, 304 resize (collections) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 resize (trapping) . . . . . . . . . . . . . . . . . . . . . . . . . 27, 173, 191 resource. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400, 502, 503 RET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 rotate (graphicals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 rows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203, 460

S

saved-state (host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 scale (graphicals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39, 196 scrolling . . . . . . 59, 66, 140, 164, 179, 312, 315, 338, 372 scrolling (text) …. 59, 66, 140, 164, 179, 312, 315, 338,

372 searching (text) . . . . . . . . . . . . . . . . . . . . . . . . . 346, 347, 472 selection . . . . . . . . . . . . . . . . . . . . . . . . . 39, 41, 169, 190, 196 send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 send-method . . . . . . . . . . . . . . . . . . . . . . . 501, 506, 607, 629 separator (in popup). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 shift (-key) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276, 296, 299 signal (error-) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591, 642 sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 slot. . . . . . . . . . . . . . . . . . . . . . . . . . . . 519, 543, 564, 607, 618 smooth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228, 232, 256 sort (objects) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448, 455 spatial-relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14, 267 SPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 stipple-pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 sub-window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 10, 12 succeed (always) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527, 594 suffix handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471, 472 suspend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 synchronous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 syntax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636

T

TAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203, 460 tabular . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203, 460 temporary (file-name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 text-editing . . . . . . . . 66, 85, 140, 164, 312, 315, 338, 372 text-fragment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 texture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 tic box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 toplevel-windows . . . . . . . . . . . . . . . . . . . . . . . . . . 5, 200, 220 trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593, 645, 646, 647 transient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 10, 12 trapping changes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609, 610 tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54, 172, 244 TWM (window manager) . . . . . . . . . . . . . . 8, 9, 10, 12, 42 type (checking). . . . . . . . . . . . . . . . . . . . . . . . . . 497, 571, 587 types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 typing (in text) . . . . . . . . . . . . 85, 217, 315, 338, 360, 372

U

Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378, 385, 488, 586 user-defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400, 502, 503 user-events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22, 189, 293

V

variable. . . . . . . . . . . . . . . . . . . 512, 519, 543, 564, 607, 618 vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 visible (area of window). . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

W

wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9, 390 window-manager . . . . . . . . . . . . . . . . . . . . . . 8, 9, 10, 12, 42 windows. … 5, 22, 66, 140, 164, 189, 200, 220, 293, 312 WM DELETE YOURSELF . . . . . . . . . . . . . . . . . . . . . . . 10 WM SAVE YOURSELF . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

X

Xdefaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400, 502, 503

Appendix D: Concept Index 756 Appendix D: Concept Index XPCE Reference Manual

Appendix E: Behaviour Index 757

Appendix E

Behaviour Index

This appendix provides an index based on the behaviour name. The access (<- = get, -> = send) of the behaviour is mentioned between brackets.

append (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 arg (←?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 arg (←and) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 arg (←block) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 arg (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 arg (←create). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 arg (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 arg (←handler group). . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 arg (←message). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 arg (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 arg (←or) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 arg (←progn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 arg (←sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 arg (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 arity (←?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 arity (←and) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 arity (←block) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538 arity (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 arity (←create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 arity (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 arity (←handler group) . . . . . . . . . . . . . . . . . . . . . . . . . . 305 arity (←message) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 arity (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 arity (←or) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 arity (←progn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 arity (←sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 arity (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 bench (←name). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 buckets (←name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 change item (→ list browser). . . . . . . . . . . . . . . . . . . . . 152 changed fragment list (→ editor) . . . . . . . . . . . . . . . . . 335 changed item (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . 110 changed label (→ dialog group) . . . . . . . . . . . . . . . . . . 130 changed label (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 changed region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 335 check (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 check (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 class (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 class (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 class name (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . 545 class name (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 clear (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 compute desired size (→ dialog). . . . . . . . . . . . . . . . . . . 67 compute desired size (→ window) . . . . . . . . . . . . . . . . . 26 compute desired size (→ window decorator) . . . . . . . 37 confirm pressed (→ display) . . . . . . . . . . . . . . . . . . . . . . . 49 dabbrev expand (→ editor) . . . . . . . . . . . . . . . . . . . . . . 331 delete item (→ list browser) . . . . . . . . . . . . . . . . . . . . . 153 draw post script (→ arc). . . . . . . . . . . . . . . . . . . . . . . . . 230 draw post script (→ arrow) . . . . . . . . . . . . . . . . . . . . . . 240 draw post script (→ bitmap). . . . . . . . . . . . . . . . . . . . . 221 draw post script (→ box) . . . . . . . . . . . . . . . . . . . . . . . . 206 draw post script (→ circle). . . . . . . . . . . . . . . . . . . . . . . 211 draw post script (→ device). . . . . . . . . . . . . . . . . . . . . . 197 draw post script (→ ellipse). . . . . . . . . . . . . . . . . . . . . . 208 draw post script (→ figure) . . . . . . . . . . . . . . . . . . . . . . 201 draw post script (→ graphical). . . . . . . . . . . . . . . . . . . 187 draw post script (→ image) . . . . . . . . . . . . . . . . . . . . . . 442 draw post script (→ line) . . . . . . . . . . . . . . . . . . . . . . . . 227 draw post script (→ path) . . . . . . . . . . . . . . . . . . . . . . . 235 draw post script (→ text) . . . . . . . . . . . . . . . . . . . . . . . . 218 error (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 execute (←?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 execute (←binary expression) . . . . . . . . . . . . . . . . . . . . 557 execute (←code) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 execute (←create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 execute (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 execute (←progn). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 execute (←var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 execute (←when) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553 execute (→ =) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 execute (→ ==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 execute (→ =<). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535 execute (→ @=). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542 execute (→ >) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 execute (→ >=). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536 execute (→ \==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 execute (→ <) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 execute (→ and) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528 execute (→ assign). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 execute (→ code) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 520 execute (→ if) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 execute (→ message). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 execute (→ not) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 execute (→ or). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 execute (→ while) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 fetch function (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . 336 fetch function (←list browser). . . . . . . . . . . . . . . . . . . . 154 flags (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 flags (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 forward (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 free (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545 free (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 global value (← var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 insert editor (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 335 insert item (→ list browser) . . . . . . . . . . . . . . . . . . . . . . 153 inspect (←function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 inspect (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 inspect (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 inspect (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 instance of (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . 546 instance of (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 isearch (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 man id (←function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 man id (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 margin function (←editor) . . . . . . . . . . . . . . . . . . . . . . . 336 margin function (←list browser) . . . . . . . . . . . . . . . . . 154 margin function (- text image) . . . . . . . . . . . . . . . . . . . 371 name (← var). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 name reference (→ function) . . . . . . . . . . . . . . . . . . . . . 546 postscript (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 postscript (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 postscript (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . 187 redraw area (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 redraw area (→ arrow). . . . . . . . . . . . . . . . . . . . . . . . . . . 240 redraw area (→ bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . 222 redraw area (→ box). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 redraw area (→ button). . . . . . . . . . . . . . . . . . . . . . . . . . . 80 redraw area (→ circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 redraw area (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . 197 redraw area (→ dialog group) . . . . . . . . . . . . . . . . . . . . 131 redraw area (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 335 redraw area (→ ellipse) . . . . . . . . . . . . . . . . . . . . . . . . . . 209 redraw area (→ figure). . . . . . . . . . . . . . . . . . . . . . . . . . . 201 redraw area (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . 187 redraw area (→ label). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 redraw area (→ line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 redraw area (→ list browser) . . . . . . . . . . . . . . . . . . . . . 153 redraw area (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 redraw area (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . 126 redraw area (→ path). . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 redraw area (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . 62 redraw area (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 redraw area (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 redraw area (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . 136 redraw area (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 redraw area (→ text cursor) . . . . . . . . . . . . . . . . . . . . . 375 redraw area (→ text image). . . . . . . . . . . . . . . . . . . . . . 370 redraw area (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . 94 redraw area (→ text margin). . . . . . . . . . . . . . . . . . . . . 373 redraw area (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 redraw area (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . 34 references (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 references (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 rewind function (←editor) . . . . . . . . . . . . . . . . . . . . . . . 336 rewind function (←list browser). . . . . . . . . . . . . . . . . . 154 rewind function (- text image) . . . . . . . . . . . . . . . . . . . 371 same reference (→ function) . . . . . . . . . . . . . . . . . . . . . 546 same reference (→ object) . . . . . . . . . . . . . . . . . . . . . . . 508 save relation (→ hyper) . . . . . . . . . . . . . . . . . . . . . . . . . . 515 scan function (←editor). . . . . . . . . . . . . . . . . . . . . . . . . . 336 scan function (←list browser) . . . . . . . . . . . . . . . . . . . . 154 seek function (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 336 seek function (←list browser) . . . . . . . . . . . . . . . . . . . . 154 selection (- text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 size (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 size (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 slot (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 slot (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 start isearch (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 331 type (↔ var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 value (←var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 value (→ name). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 value (- var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 wants keyboard focus (→ button) . . . . . . . . . . . . . . . . . 79 wants keyboard focus (→ dialog group) . . . . . . . . . . 130 wants keyboard focus (→ editor) . . . . . . . . . . . . . . . . . 332 wants keyboard focus (→ graphical). . . . . . . . . . . . . . 185 wants keyboard focus (→ list browser) . . . . . . . . . . . 151 wants keyboard focus (→ text item). . . . . . . . . . . . . . . 90 xclose (→ colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 xclose (→ cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 xclose (→ font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 xclose (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 xopen (→ colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 xopen (→ cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 xopen (→ font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 xopen (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

A

above (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 above (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 above (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 above (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 above (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 absolute path (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 absolute path (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 absolute position (←graphical). . . . . . . . . . . . . . . . . . . . 174 absolute x (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 174 absolute y (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 174 accelerator (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . 73 accelerator (↔ menu item) . . . . . . . . . . . . . . . . . . . . . . . 115 accelerator (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . 73 accelerator font (← menu) . . . . . . . . . . . . . . . . . . . . . . . . 106 accept message (↔ socket). . . . . . . . . . . . . . . . . . . . . . . . 397 access (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 access (← variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 access (→ directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 access (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 access arrow (←method). . . . . . . . . . . . . . . . . . . . . . . . . . 627 access arrow (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . 621 activate (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 active (← graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 active (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 active (←dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 active (↔ recogniser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 active (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 active (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 active (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 active all items (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . 105 active item (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 active item (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 active member (→ menu bar) . . . . . . . . . . . . . . . . . . . . . 123 add (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 add (→ chain table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 add syntax (→ syntax table). . . . . . . . . . . . . . . . . . . . . . 637 address (← socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 address (↔ display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 adjustment (↔ format) . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 advance (↔ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 advance (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 advance (→ tab). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 after (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 after (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 alert (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 align (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 align line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 align region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 alignment (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . 172 alignment (↔ dialog group). . . . . . . . . . . . . . . . . . . . . . . 129 alignment (↔ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . 73 alignment (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 172 all active (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . 123 all attributes (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . 500 all constraints (←object) . . . . . . . . . . . . . . . . . . . . . . . . . 500 all get methods (←object) . . . . . . . . . . . . . . . . . . . . . . . . 500 all hypers (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 all off (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 all off (→ menu bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 all on (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 all on (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 all recognisers (←graphical). . . . . . . . . . . . . . . . . . . . . . . 170 all send methods (←object). . . . . . . . . . . . . . . . . . . . . . . 500 alloc value (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 alloc value (↔ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . 618 alloc value (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . 618 allocated (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 amount (- scroll bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 and (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

angle (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
answer stack size (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . 596
append (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
append (→ application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
append (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
append (→ chain table). . . . . . . . . . . . . . . . . . . . . . . . . . . 463
append (→ code vector) . . . . . . . . . . . . . . . . . . . . . . . . . . 577
append (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
append (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . 131
append (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
append (→ display manager) . . . . . . . . . . . . . . . . . . . . . . 53
append (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
append (→ file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
append (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
append (→ handler group). . . . . . . . . . . . . . . . . . . . . . . . 304
append (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
append (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
append (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
append (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
append (→ progn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
append (→ sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
append (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
append (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
append (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
append (→ table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
append (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
append (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454
append dialog item (→ device). . . . . . . . . . . . . . . . . . . . 195
append line (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . 390
appendf (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
application (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
application (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . 185
application (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
apply (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
apply (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
apply (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
apply (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
apply (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
apply (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
area (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
area (← tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
area (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
area (←region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
area (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
area (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
area (→ tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
area (- graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
area height (←region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
area position (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
area width (←region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
area x (←region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
area y (←region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
arg count (← message) . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
argument (← key binding) . . . . . . . . . . . . . . . . . . . . . . . . 362
argument (←create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
argument (←message) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
argument (↔ create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554
argument (↔ not) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530

argument (→ create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 argument (→ message) . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 argument count (←method) . . . . . . . . . . . . . . . . . . . . . . 626 argument name (← type) . . . . . . . . . . . . . . . . . . . . . . . . . 574 argument type (←attribute) . . . . . . . . . . . . . . . . . . . . . . 512 argument type (←method). . . . . . . . . . . . . . . . . . . . . . . . 626 argument type (←variable) . . . . . . . . . . . . . . . . . . . . . . . 620 arguments (← message). . . . . . . . . . . . . . . . . . . . . . . . . . . 522 arguments (← process) . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 arguments (- ?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 arrows (←joint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 arrows (→ joint). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 ascent (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 assign (→ var). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 assign accelerators (→ dialog). . . . . . . . . . . . . . . . . . . . . . 68 assign accelerators (→ menu) . . . . . . . . . . . . . . . . . . . . . 110 assign accelerators (→ menu bar) . . . . . . . . . . . . . . . . . 124 attach (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 attach hyper (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . 498 attribute (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 attribute (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 attribute names (←sheet). . . . . . . . . . . . . . . . . . . . . . . . . 458 attributes (- fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 attributes (- style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 authority (← socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 auto align (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 172 auto align (↔ dialog group) . . . . . . . . . . . . . . . . . . . . . . 129 auto align (↔ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . 74 auto align (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 172 auto fill mode (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 321 auto hide (← scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 auto hide (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 auto label align (←graphical) . . . . . . . . . . . . . . . . . . . . . 172 auto label align (↔ dialog item) . . . . . . . . . . . . . . . . . . . 74 auto label align (→ graphical) . . . . . . . . . . . . . . . . . . . . 172 auto layout (← tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 auto layout (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 auto newline (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 321 auto value align (←graphical). . . . . . . . . . . . . . . . . . . . . 172 auto value align (↔ dialog item) . . . . . . . . . . . . . . . . . . . 74 auto value align (→ graphical) . . . . . . . . . . . . . . . . . . . . 172

B

b16 (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 b16 (- font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 background (← cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 background (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . 73 background (← display) . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 background (← elevation). . . . . . . . . . . . . . . . . . . . . . . . . 427 background (← figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 background (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 background (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 background (← text image) . . . . . . . . . . . . . . . . . . . . . . . 367 background (← text margin). . . . . . . . . . . . . . . . . . . . . . 372 background (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 background (↔ image). . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 background (↔ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 background (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . 73 background (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 background (→ elevation). . . . . . . . . . . . . . . . . . . . . . . . . 427 background (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 background (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 background (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 background (→ text margin). . . . . . . . . . . . . . . . . . . . . . 372 background (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 backup (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 backup file name (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . 379 backward char (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . 326 backward char (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . 215 backward delete char (→ editor) . . . . . . . . . . . . . . . . . . 329 backward delete char (→ list browser) . . . . . . . . . . . . 150 backward delete char (→ text) . . . . . . . . . . . . . . . . . . . . 216 backward kill word (→ editor) . . . . . . . . . . . . . . . . . . . . 329 backward kill word (→ text) . . . . . . . . . . . . . . . . . . . . . . 216 backward name (↔ hyper). . . . . . . . . . . . . . . . . . . . . . . . 514 backward paragraph (→ editor) . . . . . . . . . . . . . . . . . . . 326 backward sentence (→ editor). . . . . . . . . . . . . . . . . . . . . 326 backward term (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 326 backward word (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 326 backward word (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . 215 backwards (→ identity) . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 backwards (→ relation) . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 backwards (→ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 bad bounding box (- device) . . . . . . . . . . . . . . . . . . . . . . 193 bad format (- device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 banner (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 base name (←directory) . . . . . . . . . . . . . . . . . . . . . . . . . . 385 base name (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 before (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 before (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 beginning of line (→ editor) . . . . . . . . . . . . . . . . . . . . . . 326 beginning of line (→ text) . . . . . . . . . . . . . . . . . . . . . . . . 215 bell (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 bell (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 bell (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 below (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 below (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 below (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 below (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 below (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 bench (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 binding (←key binding). . . . . . . . . . . . . . . . . . . . . . . . . . . 362 bindings (← key binding) . . . . . . . . . . . . . . . . . . . . . . . . . 365 bindings (↔ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 bitmap (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 bits per character (→ string) . . . . . . . . . . . . . . . . . . . . . 481 blue (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 blue (- colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 body (↔ while). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 bold (←style). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 bold (→ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 boot (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 border (← dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . 128 border (← figure). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 border (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 border (← label). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 border (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 border (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 border (↔ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 border (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . 128 border (→ figure). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 border (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 border (→ label). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 border (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 border (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 bottom side (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 bottom side (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . 175 bottom side (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . 175 bound get method (→ class) . . . . . . . . . . . . . . . . . . . . . . 611 bound send method (→ class) . . . . . . . . . . . . . . . . . . . . 611 bounding box (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . 48 bounding box (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 bounding box (←graphical) . . . . . . . . . . . . . . . . . . . . . . . 187 bounding box (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . 442 bounding box (←window). . . . . . . . . . . . . . . . . . . . . . . . . . 28 bounding box (- window) . . . . . . . . . . . . . . . . . . . . . . . . . . 28 break (←program object) . . . . . . . . . . . . . . . . . . . . . . . . . 645 break (→ program object) . . . . . . . . . . . . . . . . . . . . . . . . 645 break condition (←program object) . . . . . . . . . . . . . . . 645 break condition (→ program object) . . . . . . . . . . . . . . 646 broken pipe (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 browser (←dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 browser (- dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 bubble (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 bubble length (- scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . 63 bubble scroll bar (→ editor) . . . . . . . . . . . . . . . . . . . . . . 325 bubble scroll bar (→ window). . . . . . . . . . . . . . . . . . . . . . 28 bubble start (- scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . 63 bucket value (←name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 buckets (←hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 buckets (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 buckets (- hash table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 buffer (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 busy cursor (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 busy cursor (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 button (← gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 button (← popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 button (←event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 button (- menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 buttons (← event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 buttons (← menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

C

c declarations (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 c function name (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . 591 c symbol file (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 cache (↔ display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 call (←c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 call (←host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 call (→ c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 call (→ host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 call back (↔ host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 call c plus plus (←c). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 call c plus plus (→ c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 call c plus plus method (←c) . . . . . . . . . . . . . . . . . . . . . 583 call c plus plus method (→ c). . . . . . . . . . . . . . . . . . . . . 583 can delete (↔ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 cancel (→ click gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . 280 cancel (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 cancel (→ gesture). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 cancel message (↔ click gesture) . . . . . . . . . . . . . . . . . . 279 cancel search (→ list browser) . . . . . . . . . . . . . . . . . . . . 150 capitalise (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . 475 capitalise (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . 343 capitalise previous word (→ editor) . . . . . . . . . . . . . . . 330 capitalise region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 330 capitalise word (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 330 caret (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 caret (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 caret (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 caret (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 caret (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 catch all (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 catch all (←class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 catch all (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 catch all (←frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 catch all (←host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 catch all (←number). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 catch all (←real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 catch all (←sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 catch all (→ class stub). . . . . . . . . . . . . . . . . . . . . . . . . . . 616 catch all (→ host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 catch all (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 catch all (→ sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 catch all (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 catch error (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 catch error signals (← pce) . . . . . . . . . . . . . . . . . . . . . . . 591 catch error signals (→ pce) . . . . . . . . . . . . . . . . . . . . . . . 591 catch pop (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 catched (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 catched errors (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 cd (→ directory). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 cell value (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 cell value (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 center (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 center (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 center (→ area). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 center (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 center (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 center (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 center (→ tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 center x (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 center x (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 center y (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 center y (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 change end (- text image). . . . . . . . . . . . . . . . . . . . . . . . . 370 change selection (→ list browser) . . . . . . . . . . . . . . . . . 145 change start (- text image) . . . . . . . . . . . . . . . . . . . . . . . 370 changed end (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . 344 changed function (- class) . . . . . . . . . . . . . . . . . . . . . . . . . 613 changed message (→ class) . . . . . . . . . . . . . . . . . . . . . . . 609 changed messages (↔ class). . . . . . . . . . . . . . . . . . . . . . . 609 changed start (- text buffer) . . . . . . . . . . . . . . . . . . . . . . 344 changed union (→ device) . . . . . . . . . . . . . . . . . . . . . . . . 191 changed union (→ window) . . . . . . . . . . . . . . . . . . . . . . . . 28 changes data (- window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 character (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . 471 character (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 character (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . 339 character (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 character (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . 342 character position (←text) . . . . . . . . . . . . . . . . . . . . . . . . 215 check (←type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 check object (→ file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 check point undo (→ text buffer) . . . . . . . . . . . . . . . . . 339 class (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 class (↔ create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 class name (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 clear (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 clear (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 clear (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 clear (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 clear (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 clear (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 clear (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 clear (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 clear (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 clear (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 clear (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 clear (→ menu bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 clear (→ path). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 clear (→ table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 clear (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 clear (→ text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 clear (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 clear (→ view). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 clear cache (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 clear pixel (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 clear selection (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . 103 click displacement (←event) . . . . . . . . . . . . . . . . . . . . . . 296 click time (←event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 clients (← socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 clip (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 clip (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 clip area (←figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 clip area (→ figure). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 clip area (- device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 clone (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 clone function (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 clone style (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 clone style (↔ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 clone style (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . 619 clone style variable (→ class) . . . . . . . . . . . . . . . . . . . . . 606 close (← arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 close (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 close (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 close (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 close (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 close (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 close input (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . 389

close output (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . 389
closed (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
closed (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
closed (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
closed (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
code (← process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
code references (←object) . . . . . . . . . . . . . . . . . . . . . . . . 505
collapsed (← node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
collapsed (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
collapsed handler (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . 247
collapsed handlers (← tree) . . . . . . . . . . . . . . . . . . . . . . . 247
colour (← elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
colour (← graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
colour (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
colour (↔ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
colour (→ elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
colour (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
colour (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
colour (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
colour map (← display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
colour map (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
colour map (←image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
colour map (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
colour map (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
column (←editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
column (←text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
column (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
column sep (↔ format) . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
columns (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
columns (↔ format) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
columns (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
comment end (←syntax table) . . . . . . . . . . . . . . . . . . . . 637
comment start (←syntax table) . . . . . . . . . . . . . . . . . . . 637
common device (←graphical) . . . . . . . . . . . . . . . . . . . . . 185
compare (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
compare (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
compare (←number). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
compare (←real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
compile (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
compiled (- regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
complete (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
complete name (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . 450
completions (←text item) . . . . . . . . . . . . . . . . . . . . . . . . . . 92
compute (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
compute (→ arrow). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
compute (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
compute (→ connection) . . . . . . . . . . . . . . . . . . . . . . . . . . 257
compute (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
compute (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . 130
compute (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
compute (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
compute (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
compute (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
compute (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 149
compute (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
compute (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
compute (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
compute (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

compute (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 compute (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 compute (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 compute (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . 368 compute (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 compute (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 compute (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 compute (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 compute layout (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . 252 compute level (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . 254 compute size (←node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 computed (- node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 condition (↔ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 condition (↔ if) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 condition (↔ key binding) . . . . . . . . . . . . . . . . . . . . . . . . 363 condition (↔ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . 115 condition (↔ when) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 condition (↔ while) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 confirm (←frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 confirm (←window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 confirm (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 confirm (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 confirm centered (←frame). . . . . . . . . . . . . . . . . . . . . . . . . 19 confirm centered (←window). . . . . . . . . . . . . . . . . . . . . . . 32 confirm done (↔ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 connect (→ connect gesture) . . . . . . . . . . . . . . . . . . . . . . 289 connect (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 connect (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 connect angle (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 connected (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 168 connection (←link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 connection class (↔ link) . . . . . . . . . . . . . . . . . . . . . . . . . 259 connection fd (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . 43 connections (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . 168 connections (- graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 168 console label (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 contained in (←dict). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 contained in (←dict item) . . . . . . . . . . . . . . . . . . . . . . . . 161 contained in (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 contained in (←fragment). . . . . . . . . . . . . . . . . . . . . . . . . 356 contained in (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 contained in (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . 185 contained in (←image). . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 contained in (←menu item) . . . . . . . . . . . . . . . . . . . . . . . 116 contained in (←node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 contained in (←visual). . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 contained in (←window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 contained in (→ visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 container (←visual). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 contains (←application). . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 contains (←bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 contains (←browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 contains (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 contains (←dict). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 contains (←display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 contains (←display manager) . . . . . . . . . . . . . . . . . . . . . . 53 contains (←editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 contains (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

contains (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . 152
contains (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
contains (←menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
contains (←node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
contains (←tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
contains (←visual). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
contents (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
contents (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . 342
context (← behaviour). . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
context (← resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
context (← type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571
context (←syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . 637
context (↔ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
context (↔ popup gesture) . . . . . . . . . . . . . . . . . . . . . . . 291
context (→ resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
context (→ syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . 638
context (- syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
context name (←variable) . . . . . . . . . . . . . . . . . . . . . . . . 621
control (↔ modifier) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
convert (←attribute) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
convert (←bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
convert (←bool) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
convert (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470
convert (←class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
convert (←class stub). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
convert (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
convert (←cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
convert (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
convert (←dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
convert (←directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
convert (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
convert (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
convert (←elevation). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
convert (←error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
convert (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
convert (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
convert (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
convert (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
convert (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
convert (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
convert (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
convert (←key binding). . . . . . . . . . . . . . . . . . . . . . . . . . . 362
convert (←menu item). . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
convert (←modifier) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
convert (←name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
convert (←node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
convert (←number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
convert (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494
convert (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
convert (←pixmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
convert (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
convert (←real). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
convert (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
convert (←size). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
convert (←source location) . . . . . . . . . . . . . . . . . . . . . . . 633
convert (←string). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
convert (←syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . 637
convert (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

convert (←type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 convert (←var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 convert (←window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 convert (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 convert loaded object (→ device) . . . . . . . . . . . . . . . . . 198 convert loaded object (→ function) . . . . . . . . . . . . . . . 544 convert loaded object (→ object) . . . . . . . . . . . . . . . . . 501 convert loaded object (→ scroll bar) . . . . . . . . . . . . . . . 61 convert method (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . 611 convert old slot (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . 201 convert old slot (→ fragment). . . . . . . . . . . . . . . . . . . . . 356 convert old slot (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . 11 convert old slot (→ hash table) . . . . . . . . . . . . . . . . . . . 462 convert old slot (→ number) . . . . . . . . . . . . . . . . . . . . . . 484 convert old slot (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . 219 convert string (←resource) . . . . . . . . . . . . . . . . . . . . . . . . 402 copy (←bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 copy (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 copy (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 copy (←name). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 copy (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 copy (←string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 copy (←type). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 copy (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 copy (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 copy (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 copy (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 copy (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 copy (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 copy (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 copy (→ line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 copy (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 copy (→ size). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 copy (→ source location) . . . . . . . . . . . . . . . . . . . . . . . . . 633 copy (→ syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 copy (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 core usage (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 core wasted (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 corner (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 corner (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 corner (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 corner (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 corner (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 corner x (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 corner x (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 corner y (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 corner y (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 cpu time (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 create (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 create (→ identity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 create (→ relation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 create (→ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 create (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 create editor (←view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 created message (→ class) . . . . . . . . . . . . . . . . . . . . . . . . 609 created messages (↔ class) . . . . . . . . . . . . . . . . . . . . . . . 609 creator (← class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 current (← menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 current (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 current (←display manager) . . . . . . . . . . . . . . . . . . . . . . . 53 current (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 current (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 current (→ display manager). . . . . . . . . . . . . . . . . . . . . . . 53 current (- chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 current (- display manager) . . . . . . . . . . . . . . . . . . . . . . . . 53 current (- popup gesture) . . . . . . . . . . . . . . . . . . . . . . . . . 291 current event (← window) . . . . . . . . . . . . . . . . . . . . . . . . . 30 current no (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 current no (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 cursor (← graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 cursor (↔ gesture). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 cursor (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 cursor (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 cursor (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 cut (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 cut (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 cut buffer (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 cut buffer (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 cut or delete char (→ editor) . . . . . . . . . . . . . . . . . . . . . 329 cut or delete char (→ text) . . . . . . . . . . . . . . . . . . . . . . . 216

D

dabbrev expand (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 333 dabbrev origin (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 336 dabbrev pos (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 dabbrev reject (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 336 dabbrev target (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 336 date (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 date (- date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 day (←date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 day (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 day name (←date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 debug subject (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 debugging (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 debugging (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 decorate (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 decoration (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 decrease (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 default (← resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 default (←dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 default (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 default (←slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 default (←text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 default (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 default (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 default (→ slider). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 default (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 default (- menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 default (- slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 default (- text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 default arrow (←joint). . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 default button (← button) . . . . . . . . . . . . . . . . . . . . . . . . . 79 default button (←dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . 68 default button (←dialog group) . . . . . . . . . . . . . . . . . . . 131 default button (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . 79 default button (→ dialog). . . . . . . . . . . . . . . . . . . . . . . . . . 68 default character (←font) . . . . . . . . . . . . . . . . . . . . . . . . . 434 default function (↔ key binding) . . . . . . . . . . . . . . . . . 365 default item (↔ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . 119 default label (←menu item). . . . . . . . . . . . . . . . . . . . . . . 113 defaults (↔ key binding) . . . . . . . . . . . . . . . . . . . . . . . . . 362 deferred unalloced (←pce) . . . . . . . . . . . . . . . . . . . . . . . . 597 define class (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 delay (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 delegate (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 delegate (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 delegate (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 delegate (→ text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 delete (→ application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 delete (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 delete (→ chain table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 delete (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 delete (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 delete (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 delete (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 delete (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 delete (→ handler group) . . . . . . . . . . . . . . . . . . . . . . . . . 304 delete (→ hash table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 delete (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 delete (→ menu bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 delete (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 delete (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 delete (→ sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 delete (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 delete (→ table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 delete (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 delete all (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 delete attribute (→ object) . . . . . . . . . . . . . . . . . . . . . . . 511 delete blank lines (→ editor). . . . . . . . . . . . . . . . . . . . . . 329 delete char (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 delete char (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 delete current (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . 451 delete get method (→ class) . . . . . . . . . . . . . . . . . . . . . . 611 delete head (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 delete head (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 delete horizontal space (→ editor) . . . . . . . . . . . . . . . . 329 delete hyper (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . 498 delete hypers (→ object). . . . . . . . . . . . . . . . . . . . . . . . . . 498 delete line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 delete prefix (←char array) . . . . . . . . . . . . . . . . . . . . . . . 471 delete recogniser (→ graphical) . . . . . . . . . . . . . . . . . . . 182 delete selection (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 329 delete send method (→ class) . . . . . . . . . . . . . . . . . . . . . 611 delete suffix (←char array) . . . . . . . . . . . . . . . . . . . . . . . 471 delete tail (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 delete tree (→ node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 delete wm protocol (→ frame) . . . . . . . . . . . . . . . . . . . . . 10 depth (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 depth (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 descent (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 deselect (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . . 145 destroy (→ visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 destroy (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 destroying (- frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

detach (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
device (← graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
device (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
device (↔ connect gesture) . . . . . . . . . . . . . . . . . . . . . . . 288
device (→ dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
device (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
device (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
dflags (↔ program object) . . . . . . . . . . . . . . . . . . . . . . . . 646
diameter (←circle). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
diameter (→ circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
dict (← dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
dict (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
dict (→ dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
dict (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
dict item (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 151
die (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595
difference (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
difference (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
direction (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
direction (↔ format) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
direction (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
direction (- scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
directories (←directory) . . . . . . . . . . . . . . . . . . . . . . . . . . 386
directory (← process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
directory (←directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
directory (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
directory name (←file). . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
disconnect (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . 168
dispatch (→ display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
dispatch (→ display manager) . . . . . . . . . . . . . . . . . . . . . 52
display (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
display (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
display (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
display (↔ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
display (→ device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
display (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
display (→ error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
display (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
display colour (←graphical). . . . . . . . . . . . . . . . . . . . . . . 171
display manager (← display) . . . . . . . . . . . . . . . . . . . . . . . 47
display on (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . 186
display position (←graphical) . . . . . . . . . . . . . . . . . . . . . 176
display root (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
displayed (← graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . 179
displayed (← node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
displayed (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . 179
displayed (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
displayed (→ window decorator) . . . . . . . . . . . . . . . . . . . 38
displayed cursor (←device) . . . . . . . . . . . . . . . . . . . . . . . 193
displayed cursor (←graphical) . . . . . . . . . . . . . . . . . . . . 182
displayed cursor (←text image) . . . . . . . . . . . . . . . . . . . 368
displayed cursor (←window) . . . . . . . . . . . . . . . . . . . . . . . 29
displayed cursor (- window) . . . . . . . . . . . . . . . . . . . . . . . . 35
displayed value (← slider). . . . . . . . . . . . . . . . . . . . . . . . . . 96
displayed value (←text item) . . . . . . . . . . . . . . . . . . . . . . 93
displayed value (→ slider). . . . . . . . . . . . . . . . . . . . . . . . . . 96
displayed value (→ text item). . . . . . . . . . . . . . . . . . . . . . 93
distance (← scroll bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

distance (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 distance (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 distance (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 distance (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 distance (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 distance x (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 distance x (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 186 distance y (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 distance y (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 186 divide (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 divide (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 do set (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 does include (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . 355 domain (← socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 domain (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 done (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 done message (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 down position (← click gesture). . . . . . . . . . . . . . . . . . . 280 downcase (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . 475 downcase (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 downcase (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . 343 downcase previous word (→ editor) . . . . . . . . . . . . . . . 330 downcase region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 330 downcase word (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 330 drag (↔ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 drag (↔ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 drag (→ click gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 drag (→ connect gesture) . . . . . . . . . . . . . . . . . . . . . . . . . 290 drag (→ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 drag (→ move gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 drag (→ move outline gesture) . . . . . . . . . . . . . . . . . . . . 282 drag (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 drag (→ popup gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . 292 drag (→ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 drag (→ resize outline gesture) . . . . . . . . . . . . . . . . . . . 285 draw (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 draw arc (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 draw box (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 179 draw fill (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 draw image (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . 180 draw in (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 draw in (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 draw line (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . 180 draw poly (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 180 draw text (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 180 dump map (→ text image) . . . . . . . . . . . . . . . . . . . . . . . 369

E

editable (← text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 editable (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 editable (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 editor (← text margin) . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 editor (← view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 editor (→ view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 editors (← text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 electric caret (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 333 element (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 element (→ code vector) . . . . . . . . . . . . . . . . . . . . . . . . . . 577 element (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 elements (- vector). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 elevation (← dialog group). . . . . . . . . . . . . . . . . . . . . . . . 128 elevation (← figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 elevation (→ dialog group). . . . . . . . . . . . . . . . . . . . . . . . 128 elevation (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 else (↔ if). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 else (↔ when) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 emptied (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 empty (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 empty (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 end (← text image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 end (←arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 end (←fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 end (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 end (←path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 end (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 end (→ line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 end angle (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 end group (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . 116 end group (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . 116 end group (→ popup). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 end of file (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 end of file (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 end of file (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 end of line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 end of line (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 end x (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 end x (→ line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 end y (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 end y (→ line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 enforce (→ tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 enforced (← tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 ensure nl (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 ensure suffix (←char array) . . . . . . . . . . . . . . . . . . . . . . . 472 ensure suffix (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 enter (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 enter (→ text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 environment (←process) . . . . . . . . . . . . . . . . . . . . . . . . . . 394 environment (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . 394 environment (- process) . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 environment variable (←pce) . . . . . . . . . . . . . . . . . . . . . 594 eof in window (← text image) . . . . . . . . . . . . . . . . . . . . 370 equal (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 equal (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 equal (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 equal (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 equal (→ name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 equal (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 equal (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 equal (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 equal (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 equal (→ size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 erase (→ device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 error (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 error message (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 333 event (← handler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 event (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 event (→ connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 event (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 event (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 event (→ dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 event (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 event (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 event (→ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 event (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 event (→ handler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 event (→ handler group). . . . . . . . . . . . . . . . . . . . . . . . . . 304 event (→ key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 event (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 event (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 event (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 event (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 event (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 event (→ popup gesture) . . . . . . . . . . . . . . . . . . . . . . . . . 292 event (→ recogniser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 event (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 event (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 event (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 event (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 event (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 event (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 event (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 event (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 event (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 event queued (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . 46 ex (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 ex (- font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 exact case (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 exception (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 590 exception handlers (← pce) . . . . . . . . . . . . . . . . . . . . . . . 590 exchange point and mark (→ editor) . . . . . . . . . . . . . . 326 execute (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 execute (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 execute (→ code) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 execute (→ key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . 363 execute (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 execute (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 execute (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 execute (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 execute (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 execute cursor (↔ click gesture) . . . . . . . . . . . . . . . . . . 279 execute message (↔ click gesture) . . . . . . . . . . . . . . . . 279 exists (→ directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 exists (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 exit message (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 exit messages (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 exited (→ process). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 expose (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 expose (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 expose (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 expose console (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 exposed (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 extend prefix (→ list browser) . . . . . . . . . . . . . . . . . . . . 150 extend prefix or next (→ list browser) . . . . . . . . . . . . 150 extend to current (→ list browser) . . . . . . . . . . . . . . . . 151

F

fail (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 family (← font). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 fd (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 fd (- file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 feature (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 feature (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 feature (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 features (← pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 features (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 feedback (← error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 feedback (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 feedback (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 fetch (- text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 file (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 file (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 file (←directory). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 file name (↔ source location) . . . . . . . . . . . . . . . . . . . . . 633 files (←directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 fill (→ code vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 fill (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 fill (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 fill (→ pixmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 fill (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 fill arguments and execute (→ key binding) . . . . . . . 363 fill mode (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 fill paragraph (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . 331 fill pattern (← arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 fill pattern (← arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 fill pattern (← box). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 fill pattern (← circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 fill pattern (← ellipse) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 fill pattern (← path). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 fill pattern (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 fill pattern (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 fill pattern (→ box). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 fill pattern (→ circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 fill pattern (→ ellipse) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 fill pattern (→ path). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 fill region (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 fill selection (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 filter (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 filter (↔ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 find (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 find (←device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 find (←dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 find (←node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 find (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 find (←vector). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 find (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 find (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 find all (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 find all (←dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 find all (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 find all fragments (←text buffer). . . . . . . . . . . . . . . . . . 343 find all send methods (←object) . . . . . . . . . . . . . . . . . . 500 find cut buffer (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . 327 find fragment (←text buffer). . . . . . . . . . . . . . . . . . . . . . 343 find hyper (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 find key (←hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 find node (←node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 find prefix (←dict). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 find value (←hash table). . . . . . . . . . . . . . . . . . . . . . . . . . 462 first (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 first (↔ tuple) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 first arrow (← joint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 first arrow (→ joint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 first fragment (← text buffer) . . . . . . . . . . . . . . . . . . . . . 343 first line (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 fit (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 fixed from (← connection) . . . . . . . . . . . . . . . . . . . . . . . . 257 fixed to (← connection). . . . . . . . . . . . . . . . . . . . . . . . . . . 257 fixed width (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 fixed width (- font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 flash (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 flash (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 flash (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 flash (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 flush (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 flush (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 flush (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 flush (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 flush (→ window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 focus (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 focus (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 focus (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 focus button (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . 32 focus cursor (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . 30 focus cursor (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . 185 focus cursor (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . 30 focus event (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 focus function (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 331 focus recogniser (← window) . . . . . . . . . . . . . . . . . . . . . . . 32 font (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 font (← label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 font (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 font (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 font (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 font (↔ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 font (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 font (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 font (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 font (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 font (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 font (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 font (→ text cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 font alias (←display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 font alias (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 font id (← cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 font table (↔ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 for all (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 for all (→ device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 for all (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 for all (→ hash table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 for all (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 for all (→ regex). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

for all (→ sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
for all (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
for all (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
for all (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
for all fragments (→ text buffer) . . . . . . . . . . . . . . . . . . 339
for name (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587
for name reference (→ pce) . . . . . . . . . . . . . . . . . . . . . . . 598
for slot reference (→ object) . . . . . . . . . . . . . . . . . . . . . . 505
for some (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
for some (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
for some (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
for some (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . 461
for some (→ node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
for some (→ sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
for some (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
for some (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
foreground (← cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
foreground (← display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
foreground (←window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
foreground (↔ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440
foreground (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
foreground (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
foreground (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
format (← device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
format (← error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
format (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
format (← menu bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
format (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
format (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
format (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
format (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
format (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
format (→ label). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
format (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
format (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
format (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
format (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
format (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
format (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
format (→ text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
format (→ view). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
format center (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
format left (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
format right (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
forward (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
forward (→ block) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
forward (→ code). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
forward char (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 326
forward char (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
forward name (↔ hyper) . . . . . . . . . . . . . . . . . . . . . . . . . 515
forward paragraph (→ editor). . . . . . . . . . . . . . . . . . . . . 326
forward sentence (→ editor) . . . . . . . . . . . . . . . . . . . . . . 326
forward term (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 326
forward vars (→ code) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
forward vector (→ code) . . . . . . . . . . . . . . . . . . . . . . . . . . 519
forward word (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 326
forward word (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
forwards (→ identity). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

forwards (→ relation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 forwards (→ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 fragment (←text margin) . . . . . . . . . . . . . . . . . . . . . . . . . 372 fragment cache (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . 336 frame (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 frame (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 frame (←visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 frame (←window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 frame (- window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 frames (← display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 free (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 free (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 freed message (→ class). . . . . . . . . . . . . . . . . . . . . . . . . . . 610 freed messages (↔ class). . . . . . . . . . . . . . . . . . . . . . . . . . 610 from (← connection). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 from (← constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 from (← hyper) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 from (↔ identity). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 from (↔ link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 from (→ constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 from handle (← connect gesture) . . . . . . . . . . . . . . . . . 289 from handle (← connection) . . . . . . . . . . . . . . . . . . . . . . 257 from indicators (← connect gesture) . . . . . . . . . . . . . . 289 fullname (← type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 function (←key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . 362 function (↔ quote function) . . . . . . . . . . . . . . . . . . . . . . 547 function (→ key binding) . . . . . . . . . . . . . . . . . . . . . . . . . 365 function (- method). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 functor (←function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546 functor (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

G

gap (← dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 gap (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 gap (← menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 gap (← text margin). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 gap (↔ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 gap (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 gap (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 gap (→ text margin). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 gap end (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 gap start (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 generate event (→ graphical) . . . . . . . . . . . . . . . . . . . . . 183 geometry (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 geometry (→ arc). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 geometry (→ bitmap). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 geometry (→ circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 geometry (→ connection) . . . . . . . . . . . . . . . . . . . . . . . . . 257 geometry (→ device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 geometry (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . 129 geometry (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 geometry (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 geometry (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . 173 geometry (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . 148 geometry (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . 124 geometry (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 geometry (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 geometry (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 geometry (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 geometry (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . 367 geometry (→ text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 geometry (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 geometry (→ window decorator) . . . . . . . . . . . . . . . . . . . 37 geometry (- frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 get (←attribute). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 get (←get method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 get (←variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 get access (→ variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 get catch all (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 get class (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 get function (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 get hyper (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 get method (←class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 get method (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 get method (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 get method (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 get methods (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 get methods (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 get sub (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 get super (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 get table (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 get vector (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 gosmacs transpose (→ editor) . . . . . . . . . . . . . . . . . . . . . 330 gosmacs transpose (→ text). . . . . . . . . . . . . . . . . . . . . . . 217 grab (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 grab keyboard (→ window) . . . . . . . . . . . . . . . . . . . . . . . . 31 grab pointer (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 grab pointer (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . 31 grab server (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 graphicals (← device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 graphics state (→ graphical) . . . . . . . . . . . . . . . . . . . . . . 180 green (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 green (- colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 grey (←style). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 grey (→ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 group (←method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 group (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 group (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 group (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 group (- method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 group (- variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621

H

h mode (↔ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . . 283 h to (↔ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 handle (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 handle (→ class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 handle (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 handle position (←graphical) . . . . . . . . . . . . . . . . . . . . . 169 handles (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 handles (↔ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 handles (- graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 has completions (←text item). . . . . . . . . . . . . . . . . . . . . . 92 has feature (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 has feature (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 has get method (→ object) . . . . . . . . . . . . . . . . . . . . . . . 501 has init functions (← class) . . . . . . . . . . . . . . . . . . . . . . . 612 has modifier (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 has pointer (↔ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 has send method (→ object) . . . . . . . . . . . . . . . . . . . . . . 501 has source (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 has source (→ method) . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 has source (→ resource) . . . . . . . . . . . . . . . . . . . . . . . . . . 403 has source (→ variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 has syntax (→ syntax table) . . . . . . . . . . . . . . . . . . . . . . 637 has value (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 hash value (←name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 head (←chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 head (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 head (- chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 head cell (←chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 header (- char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 height (← elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 height (←display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 height (←editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 height (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 height (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 height (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 height (←text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 height (↔ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 height (↔ region). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 height (↔ size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 height (→ elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 height (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 height (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 height (→ tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 height (- text image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 hidden (←style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 hidden (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 hidden (→ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 hide (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 hide (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 hide (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 high (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 high (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 high index (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 highlight (←style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 highlight (→ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 hilite (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 home (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 home (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 hor shrink (↔ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 hor stretch (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . 172 hor stretch (←menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . 123 hor stretch (↔ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . 89 hor stretch (↔ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 horizontal scrollbar (← window decorator) . . . . . . . . . 37 horizontal scrollbar (→ window decorator) . . . . . . . . . 37 hostname (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 hot spot (← cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 hot spot (← text cursor). . . . . . . . . . . . . . . . . . . . . . . . . . 374 hot spot (↔ image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 hour (←date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 hour (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 hypered (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499

I

icon (↔ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 icon (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon image (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon label (←frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon label (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon label (- frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon position (← frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon position (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 icon position (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 iconify console (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 id (← error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 id (← event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 ideal height (↔ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 ideal width (↔ tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 ignore case (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 ignore case (→ regex). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 image (← bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 image (← cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 image (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 image (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 image (← node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 image (← text cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 image (←dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 image (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 image (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 image (→ bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 image (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 image (→ text cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 in (→ area). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 in comment (→ text buffer). . . . . . . . . . . . . . . . . . . . . . . 340 in event area (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . 183 in event area (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 in string (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . 340 include (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 includes (→ type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 increase (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 indent increment (↔ editor) . . . . . . . . . . . . . . . . . . . . . . 323 indent line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 indent region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 323 indent selection (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 323 indentation (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 index (← dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 index (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 index (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 index (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 index (←text image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 index (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 indicate (→ connect gesture). . . . . . . . . . . . . . . . . . . . . . 289 indicate directory (→ text item) . . . . . . . . . . . . . . . . . . . 92 indicate handle (→ connect gesture) . . . . . . . . . . . . . . 289 info (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 info (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 592 inform (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 inform (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 inherited from (←method) . . . . . . . . . . . . . . . . . . . . . . . . 626 init function (↔ variable). . . . . . . . . . . . . . . . . . . . . . . . . 618 init function (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . 618 initial value (→ variable) . . . . . . . . . . . . . . . . . . . . . . . . . 618 initialise (→ -). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559 initialise (→ :=) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 initialise (→ ==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 initialise (→ ?) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 initialise (→ @=) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 initialise (→ \==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 initialise (→ and) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 initialise (→ application). . . . . . . . . . . . . . . . . . . . . . . . . . . 50 initialise (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 initialise (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 initialise (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 initialise (→ assign) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 initialise (→ attribute). . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 initialise (→ behaviour). . . . . . . . . . . . . . . . . . . . . . . . . . . 617 initialise (→ binary condition) . . . . . . . . . . . . . . . . . . . . 531 initialise (→ binary expression) . . . . . . . . . . . . . . . . . . . 556 initialise (→ bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 initialise (→ block) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 initialise (→ bool) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 initialise (→ box) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 initialise (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 initialise (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 initialise (→ c) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 initialise (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 initialise (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . 470 initialise (→ circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 initialise (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 initialise (→ class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 initialise (→ click gesture) . . . . . . . . . . . . . . . . . . . . . . . . 278 initialise (→ code vector) . . . . . . . . . . . . . . . . . . . . . . . . . 577 initialise (→ colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 initialise (→ connect gesture) . . . . . . . . . . . . . . . . . . . . . 288 initialise (→ connection) . . . . . . . . . . . . . . . . . . . . . . . . . . 256 initialise (→ constant) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 initialise (→ constraint). . . . . . . . . . . . . . . . . . . . . . . . . . . 264 initialise (→ create) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 initialise (→ cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 initialise (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 initialise (→ delegate variable) . . . . . . . . . . . . . . . . . . . . 623 initialise (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 initialise (→ dialog). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 initialise (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . 127 initialise (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . 72 initialise (→ dict). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 initialise (→ dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 initialise (→ directory). . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 initialise (→ display). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 initialise (→ display manager) . . . . . . . . . . . . . . . . . . . . . 52 initialise (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 initialise (→ elevation). . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 initialise (→ ellipse) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 initialise (→ error). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 initialise (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 initialise (→ event node). . . . . . . . . . . . . . . . . . . . . . . . . . 302 initialise (→ event tree). . . . . . . . . . . . . . . . . . . . . . . . . . . 301

initialise (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
initialise (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
initialise (→ font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432
initialise (→ format) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
initialise (→ fragment). . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
initialise (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
initialise (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
initialise (→ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
initialise (→ get method) . . . . . . . . . . . . . . . . . . . . . . . . . 631
initialise (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
initialise (→ handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
initialise (→ handler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
initialise (→ handler group). . . . . . . . . . . . . . . . . . . . . . . 304
initialise (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . 460
initialise (→ host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580
initialise (→ hyper) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
initialise (→ identity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
initialise (→ if) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524
initialise (→ image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
initialise (→ joint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
initialise (→ key binding) . . . . . . . . . . . . . . . . . . . . . . . . . 361
initialise (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
initialise (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
initialise (→ link). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
initialise (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 144
initialise (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
initialise (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
initialise (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . 113
initialise (→ message) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
initialise (→ method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
initialise (→ modifier) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
initialise (→ move gesture) . . . . . . . . . . . . . . . . . . . . . . . 281
initialise (→ move outline gesture) . . . . . . . . . . . . . . . . 282
initialise (→ name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
initialise (→ node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
initialise (→ not) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530
initialise (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
initialise (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
initialise (→ or) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529
initialise (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
initialise (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
initialise (→ picture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
initialise (→ pixmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
initialise (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
initialise (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
initialise (→ popup gesture) . . . . . . . . . . . . . . . . . . . . . . 291
initialise (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
initialise (→ progn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
initialise (→ program object) . . . . . . . . . . . . . . . . . . . . . 645
initialise (→ quote function) . . . . . . . . . . . . . . . . . . . . . . 547
initialise (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486
initialise (→ recogniser). . . . . . . . . . . . . . . . . . . . . . . . . . . 273
initialise (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
initialise (→ region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
initialise (→ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . 283
initialise (→ resize outline gesture). . . . . . . . . . . . . . . . 285
initialise (→ resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
initialise (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

initialise (→ sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 initialise (→ size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 initialise (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 initialise (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 initialise (→ source location). . . . . . . . . . . . . . . . . . . . . . 633 initialise (→ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 initialise (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 initialise (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 initialise (→ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 initialise (→ syntax table) . . . . . . . . . . . . . . . . . . . . . . . . 636 initialise (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 initialise (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 initialise (→ table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 initialise (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 initialise (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . 338 initialise (→ text cursor). . . . . . . . . . . . . . . . . . . . . . . . . . 374 initialise (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . 367 initialise (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 initialise (→ text margin) . . . . . . . . . . . . . . . . . . . . . . . . . 372 initialise (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 initialise (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 initialise (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 initialise (→ tuple) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 initialise (→ type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 initialise (→ var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 initialise (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 initialise (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 initialise (→ view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 initialise (→ vmi). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 initialise (→ when) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 initialise (→ while) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 initialise (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 initialise (→ window decorator) . . . . . . . . . . . . . . . . . . . . 36 initialise method (- class) . . . . . . . . . . . . . . . . . . . . . . . . . 611 initialise new slot (→ frame) . . . . . . . . . . . . . . . . . . . . . . . 11 initialise new slot (→ function) . . . . . . . . . . . . . . . . . . . 544 initialise new slot (→ graphical) . . . . . . . . . . . . . . . . . . 170 initialise new slot (→ object) . . . . . . . . . . . . . . . . . . . . . 501 initialise new slot (→ path) . . . . . . . . . . . . . . . . . . . . . . . 236 initialise new slot (→ program object) . . . . . . . . . . . . 647 initiate (→ click gesture) . . . . . . . . . . . . . . . . . . . . . . . . . 279 initiate (→ connect gesture) . . . . . . . . . . . . . . . . . . . . . . 290 initiate (→ gesture). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 initiate (→ move gesture) . . . . . . . . . . . . . . . . . . . . . . . . . 281 initiate (→ move outline gesture) . . . . . . . . . . . . . . . . . 282 initiate (→ popup gesture). . . . . . . . . . . . . . . . . . . . . . . . 292 initiate (→ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . . 284 initiate (→ resize outline gesture) . . . . . . . . . . . . . . . . . 286 input (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 input allocated (- stream). . . . . . . . . . . . . . . . . . . . . . . . . 390 input buffer (- stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 input focus (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 input focus (← window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 input focus (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 input focus (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 input message (↔ stream) . . . . . . . . . . . . . . . . . . . . . . . . 389 input p (- stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 input window (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . 18

insert (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
insert (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
insert (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
insert (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
insert (→ path). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
insert (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
insert (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
insert (→ text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
insert after (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
insert after (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
insert before (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
insert character (→ string). . . . . . . . . . . . . . . . . . . . . . . . 480
insert cut buffer (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 328
insert file (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . 340
insert quoted (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 328
insert self (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
insert self (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . 151
insert self (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
insert self fill (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 328
inserted (- text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
inside (←device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
inside (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
inside (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
inside (→ region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
inside sub window (←event) . . . . . . . . . . . . . . . . . . . . . . 295
inspect (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
inspect (→ object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505
inspect handler (→ display) . . . . . . . . . . . . . . . . . . . . . . . . 46
inspect handlers (← display) . . . . . . . . . . . . . . . . . . . . . . . 46
install (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607
instance (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
instance (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586
instance of (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
instance size (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
instance variable (←class) . . . . . . . . . . . . . . . . . . . . . . . . 608
instance variable (→ class). . . . . . . . . . . . . . . . . . . . . . . . 607
instance variables (← class) . . . . . . . . . . . . . . . . . . . . . . . 607
instances (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609
instantiate template (←method) . . . . . . . . . . . . . . . . . . 627
intensity (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
internal mark (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
interpolation (← path). . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
intersection (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
intersection (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
intersection (←line). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
intersection (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
intersection (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
intersects (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
interval (← timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
interval (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
intervals (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
intervals (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
invert (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
invert pixel (→ image). . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
inverted (← graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
inverted (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
is a (→ class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
is a (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

is a (→ event node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 is absolute (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 is attribute (→ sheet). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 is displayed (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . 179 is down (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 is drag (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 is off (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 is off (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 is on (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 is on (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 is parent (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 is runtime system (←pce). . . . . . . . . . . . . . . . . . . . . . . . . 595 is son (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 is up (→ event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 isearch backward (→ editor) . . . . . . . . . . . . . . . . . . . . . . 327 isearch forward (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 327 item from event (←menu) . . . . . . . . . . . . . . . . . . . . . . . . 110 item offset (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 item size (← menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

J

just one space (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 323 justify paragraph (→ editor) . . . . . . . . . . . . . . . . . . . . . . 331 justify region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 331

K

key (← dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 key (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 key (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 key (→ dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 key (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 key (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 key (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 key (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 key binding (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 key binding (↔ list browser) . . . . . . . . . . . . . . . . . . . . . . 152 key binding (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 keyboard focus (← window) . . . . . . . . . . . . . . . . . . . . . . . 32 keyboard focus (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . 18 keyboard focus (←graphical). . . . . . . . . . . . . . . . . . . . . . 185 keyboard focus (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . 18 keyboard focus (→ graphical) . . . . . . . . . . . . . . . . . . . . . 183 keyboard focus (→ window) . . . . . . . . . . . . . . . . . . . . . . . 32 keyboard quit (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 334 keyboard quit (→ list browser) . . . . . . . . . . . . . . . . . . . 151 keyboard quit (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . 110 keyboard quit (→ text item) . . . . . . . . . . . . . . . . . . . . . . . 92 keys (← table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 kill (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 kill (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 kill line (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 kill line (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 kill location (- editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 kill or grab region (→ editor) . . . . . . . . . . . . . . . . . . . . . 329 kill paragraph (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 329 kill sentence (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 kill term (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 kill word (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 kill word (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 killed (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 kind (← elevation). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 kind (← file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 kind (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 kind (← image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 kind (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 kind (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 kind (← type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 kind (↔ application). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 kind (↔ error). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 kind (↔ handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 kind (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 kind (→ elevation). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 kind (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 kind (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 kind (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 kind (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 kind (→ type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 572 kind (- colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

L

label (← dialog group). . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 label (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 label (← frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 label (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 label (←dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 label (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 label (←window decorator) . . . . . . . . . . . . . . . . . . . . . . . . 36 label (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 label (→ dialog group). . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 label (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 label (→ dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 label (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 label (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 label (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 label (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 label (→ window decorator). . . . . . . . . . . . . . . . . . . . . . . . 36 label (- dict item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 label area (← menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 label font (← dialog group) . . . . . . . . . . . . . . . . . . . . . . . 129 label font (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . 72 label font (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . 129 label font (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . 72 label format (← dialog group) . . . . . . . . . . . . . . . . . . . . 129 label format (← dialog item). . . . . . . . . . . . . . . . . . . . . . . 74 label format (← tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 label format (→ dialog group) . . . . . . . . . . . . . . . . . . . . 129 label format (→ dialog item). . . . . . . . . . . . . . . . . . . . . . . 74 label format (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 label name (←char array) . . . . . . . . . . . . . . . . . . . . . . . . 475 label name (←dialog group) . . . . . . . . . . . . . . . . . . . . . . 128 label name (←dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . 72 label offset (← tab). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 label offset (→ tab). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 label size (← tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 label text (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 label text (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . 145 label text (← window decorator) . . . . . . . . . . . . . . . . . . . 36 label width (←dialog item) . . . . . . . . . . . . . . . . . . . . . . . . 74 label width (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 label width (←slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 label width (←text item) . . . . . . . . . . . . . . . . . . . . . . . . . . 89 label width (→ dialog item). . . . . . . . . . . . . . . . . . . . . . . . 74 label width (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 label width (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 label width (→ text item). . . . . . . . . . . . . . . . . . . . . . . . . . 89 label width (- dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . 74 language (↔ host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 larger (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 larger (→ number). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 larger (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 larger equal (→ number). . . . . . . . . . . . . . . . . . . . . . . . . . 484 larger equal (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 last error (↔ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 last fragment (← text buffer) . . . . . . . . . . . . . . . . . . . . . 343 layout (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 layout (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 layout (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 layout (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 layout (→ tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 layout (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 layout dialog (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . 191 layout dialog (→ dialog group). . . . . . . . . . . . . . . . . . . . 129 layout dialog (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . 173 layout dialog (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . 135 layout dialog (→ window decorator). . . . . . . . . . . . . . . . 37 layout labels (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . 135 lazy binding (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 lazy binding (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 leaf handler (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 leaf handlers (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 left (← dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 left (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 left (↔ ==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 left (↔ \==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 left (↔ binary condition) . . . . . . . . . . . . . . . . . . . . . . . . . 531 left (↔ binary expression) . . . . . . . . . . . . . . . . . . . . . . . . 556 left (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 left (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 left (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 left (- arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 left margin (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 left margin (↔ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 left offset (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 left side (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 left side (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 left side (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 length (← arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 length (← label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 length (← scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 length (← text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 length (←editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 length (←fragment). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 length (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

length (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
length (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
length (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
length (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
length (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
length (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
length (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
length (→ text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
length (- fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
less equal (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
less equal (→ real). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487
less sides (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
level (← device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
level (← node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
level gap (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
level gap (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
line (← connect gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . 289
line (← link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
line (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
line (←text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
line no (←char array). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
line no (↔ source location) . . . . . . . . . . . . . . . . . . . . . . . 633
line number (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
line number (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . 343
line number (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
line to top of window (→ editor). . . . . . . . . . . . . . . . . . 325
lines (←text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
lines (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
lines visible (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
link (← connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
link (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
link (↔ connect gesture). . . . . . . . . . . . . . . . . . . . . . . . . . 289
link gap (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
link gap (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
list browser (← browser). . . . . . . . . . . . . . . . . . . . . . . . . . 140
list wasted core (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . 592
listen (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
load (→ bitmap). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
load (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
load (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
load font aliases (→ display) . . . . . . . . . . . . . . . . . . . . . . . 44
load font family (→ display) . . . . . . . . . . . . . . . . . . . . . . . 44
load fonts (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
load function (- class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
load resource file (→ display) . . . . . . . . . . . . . . . . . . . . . . 45
local table (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612
lock object (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
lock object (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
locked (- constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
look (← dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
look (← scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
look (→ dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
look (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
lookup (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604
lookup (←class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616
lookup (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
lookup (←cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
lookup (←elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427

lookup (←error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 lookup (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 lookup (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 lookup (←key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 lookup (←name). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 lookup (←pixmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 lookup (←syntax table). . . . . . . . . . . . . . . . . . . . . . . . . . . 636 lookup (←type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 lookup method (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 lost text buffer (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 320 low (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 low (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 low index (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

M

machine (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 make (→ directory). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 make class function (- class) . . . . . . . . . . . . . . . . . . . . . . 614 make class method (← class) . . . . . . . . . . . . . . . . . . . . . 612 man attribute (←object). . . . . . . . . . . . . . . . . . . . . . . . . . 509 man attribute (←resource). . . . . . . . . . . . . . . . . . . . . . . . 403 man attribute (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . 509 man card (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 man card class (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . 610 man card class (←error) . . . . . . . . . . . . . . . . . . . . . . . . . . 644 man card class (←method) . . . . . . . . . . . . . . . . . . . . . . . 627 man card class (←resource) . . . . . . . . . . . . . . . . . . . . . . . 404 man card class (←variable) . . . . . . . . . . . . . . . . . . . . . . . 621 man create card (←object) . . . . . . . . . . . . . . . . . . . . . . . 509 man creator (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 man creator (←error). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 man creator (←method) . . . . . . . . . . . . . . . . . . . . . . . . . . 627 man creator (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 man creator (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . 404 man creator (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . 621 man delegate header (←class) . . . . . . . . . . . . . . . . . . . . 610 man description (←object) . . . . . . . . . . . . . . . . . . . . . . . 500 man description source (←object). . . . . . . . . . . . . . . . . 500 man documented (→ method) . . . . . . . . . . . . . . . . . . . . 627 man documented (→ object). . . . . . . . . . . . . . . . . . . . . . 509 man header (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 man header (←get method). . . . . . . . . . . . . . . . . . . . . . . 631 man header (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 man header (←send method) . . . . . . . . . . . . . . . . . . . . . 630 man header (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . 621 man id (←class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 man id (←error). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 man id (←method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 man id (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 man id (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 man id (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 man indicator (←class stub) . . . . . . . . . . . . . . . . . . . . . . 616 man indicator (←method) . . . . . . . . . . . . . . . . . . . . . . . . 627 man indicator (←object). . . . . . . . . . . . . . . . . . . . . . . . . . 510 man indicator (←resource). . . . . . . . . . . . . . . . . . . . . . . . 404 man indicator (←variable) . . . . . . . . . . . . . . . . . . . . . . . . 621 man inherit object (←get method) . . . . . . . . . . . . . . . . 631 man inherit object (←object) . . . . . . . . . . . . . . . . . . . . . 510 man inherit object (←send method) . . . . . . . . . . . . . . 630 man inherit object (←variable) . . . . . . . . . . . . . . . . . . . 622 man inherited attribute (←object) . . . . . . . . . . . . . . . . 510 man inherited attribute (←resource) . . . . . . . . . . . . . . 404 man module (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 man module name (←class). . . . . . . . . . . . . . . . . . . . . . . 611 man module name (←error) . . . . . . . . . . . . . . . . . . . . . . 644 man module name (←method). . . . . . . . . . . . . . . . . . . . 627 man module name (←object) . . . . . . . . . . . . . . . . . . . . . 510 man module name (←resource) . . . . . . . . . . . . . . . . . . . 404 man module name (←variable) . . . . . . . . . . . . . . . . . . . 622 man name (←class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 man name (←error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 man name (←get method) . . . . . . . . . . . . . . . . . . . . . . . . 632 man name (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 man name (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 man name (←send method) . . . . . . . . . . . . . . . . . . . . . . 630 man name (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 man relate (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 man related (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 man related (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . 510 man summary (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 man summary (←error) . . . . . . . . . . . . . . . . . . . . . . . . . . 644 man summary (←method) . . . . . . . . . . . . . . . . . . . . . . . . 628 man summary (←resource) . . . . . . . . . . . . . . . . . . . . . . . 404 man summary (←variable). . . . . . . . . . . . . . . . . . . . . . . . 622 man unrelate (→ object). . . . . . . . . . . . . . . . . . . . . . . . . . 510 map (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450 map (- text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 mapped (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 margin (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 margin (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 margin (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 margin (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 margin (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 margin width (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 318 margin width (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . 318 mark (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 mark (↔ connect gesture) . . . . . . . . . . . . . . . . . . . . . . . . 289 mark (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 mark (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 mark undo (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . 340 mask (← cursor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 mask (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 mask (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 master (← socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 master (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 master (←event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 master (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 master (←visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 match (←dict). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 match (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 match (←table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 match (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 matching bracket (←text buffer) . . . . . . . . . . . . . . . . . . 341 matching quote (←text buffer). . . . . . . . . . . . . . . . . . . . 341 max drag distance (↔ click gesture) . . . . . . . . . . . . . . 280 max goal depth (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . . 593 max goal depth (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . 593 max integer (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 max size (↔ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . 283 max size (→ resize outline gesture) . . . . . . . . . . . . . . . 285 maximum (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 mclock (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 measure (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 member (←application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 member (←browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 member (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 member (←dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 member (←dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 member (←display manager). . . . . . . . . . . . . . . . . . . . . . . 53 member (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 member (←hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 member (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . 152 member (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 member (←menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 member (←sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 member (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 member (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 member (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 member (→ font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 member (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 members (← and) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 members (← application) . . . . . . . . . . . . . . . . . . . . . . . . . . 51 members (← dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 members (← display manager) . . . . . . . . . . . . . . . . . . . . . 53 members (← handler group) . . . . . . . . . . . . . . . . . . . . . . 304 members (← menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 members (← menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . 125 members (← or) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 members (← progn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 members (← sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 members (← tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 members (←dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 members (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 members (←table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 members (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 members (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 members (- frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 menu (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 merge (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 merge (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 message (←host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 message (←menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 message (↔ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 message (↔ handler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 message (↔ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . 114 message (↔ method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 message (↔ scroll bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 message (↔ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 message (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . 114 messages (← host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 582 meta (↔ modifier). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 method calls (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 min integer (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 min size (↔ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . 283 min size (→ resize outline gesture) . . . . . . . . . . . . . . . . 285 minimum (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 minus (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 minus (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 minus (→ point). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 minus (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 minute (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 minute (→ date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 mirror (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 mirror (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 modal (← application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 modal (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 modal (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 modified (← text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . 340 modified (←dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 modified (←menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 modified (←slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 modified (←text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 modified (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . 73 modified (→ directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 modified (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 modified (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 modified (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . 340 modified (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 modified (- directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 modified item (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . 197 modified item (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . 67 modified item (→ dialog group) . . . . . . . . . . . . . . . . . . . 128 modified message (↔ editor) . . . . . . . . . . . . . . . . . . . . . . 334 modifier (↔ gesture). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 modify (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 modify (←elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 modify (←name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 modify (←string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 monochrome (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 month (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 month (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 month name (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 move (→ device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 move (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 move (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 move (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 move (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 move after (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 move after (→ node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 move before (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 multiclick (←event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297 multiclick (↔ click gesture) . . . . . . . . . . . . . . . . . . . . . . . 279 multiple selection (← list browser) . . . . . . . . . . . . . . . . 145 multiple selection (← menu) . . . . . . . . . . . . . . . . . . . . . . 103 multiple selection (→ list browser) . . . . . . . . . . . . . . . . 145 multiple selection (→ menu) . . . . . . . . . . . . . . . . . . . . . . 103 my size (- node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

N

name (← behaviour). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 name (← class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 name (← colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 name (← cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 name (← directory). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 name (← elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 name (← file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 name (← image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 name (← key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 name (← process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 name (← resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 name (← syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 name (← vmi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 name (←error) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 name (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 name (←type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 name (↔ :=) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 name (↔ application). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 name (↔ attribute). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 name (↔ constant) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 name (↔ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 name (↔ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 name (↔ handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 name (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 name (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 name (→ file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 name reference (→ object) . . . . . . . . . . . . . . . . . . . . . . . . 508 names (← table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 near sides (←area). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 negate (←bool) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 neighbour gap (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 neighbour gap (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 neighbour index (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . 612 network (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 newline (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 newline (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 newline (→ stream). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 newline (→ string). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 newline (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 newline and indent (→ editor) . . . . . . . . . . . . . . . . . . . . 324 next (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 next (←fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 next (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 next (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 next (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 next (- fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 next cell (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 next line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 next line (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . 146 next line (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 next status (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 no created (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 no freed (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 node (←event tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 node (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 node handler (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 node handlers (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 nodebug subject (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . 592 normalise (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 normalise (→ browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 normalise (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 normalise (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 176 normalise (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 normalise (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . 149 normalise (→ view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 normalise (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 normalised (←area). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 not equal (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 not equal (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 not has value (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . 499 nth0 (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 nth0 (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 nth1 (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 nth1 (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447

O

object (← tile). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 object (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 object (↔ ¯). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 object (↔ dict item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 object (↔ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 object from reference (←pce) . . . . . . . . . . . . . . . . . . . . . 587 object reference (←object) . . . . . . . . . . . . . . . . . . . . . . . . 509 objects allocated (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . 597 objects freed (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597 obtain (→ resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 obtain resources (→ object). . . . . . . . . . . . . . . . . . . . . . . 502 off (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 off (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 off (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 off image (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 off image (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 offset (← move gesture). . . . . . . . . . . . . . . . . . . . . . . . . . . 281 offset (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 offset (← variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 offset (← vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 offset (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 offset (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 offset (→ size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 offset (- device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 offset (- scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 on (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 on (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 on (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 on image (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 on image (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 on top (←tab stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 on top (→ tab stack) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 open (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 open (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 open (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 open (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 open (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 open (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 open (→ window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 open centered (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 open centered (→ window). . . . . . . . . . . . . . . . . . . . . . . . . 24 open line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 open line (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 open message (↔ list browser) . . . . . . . . . . . . . . . . . . . . 146 operating system (← pce) . . . . . . . . . . . . . . . . . . . . . . . . 599 opposite (←connection). . . . . . . . . . . . . . . . . . . . . . . . . . . 257 or (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 orientation (← scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . 61 orientation (← tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 orientation (←area). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 orientation (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . 177 orientation (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 orientation (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . 177 orientation (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 orientation (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . 61 os error (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 outline (← move outline gesture) . . . . . . . . . . . . . . . . . 282 outline (← resize outline gesture) . . . . . . . . . . . . . . . . . 285 outline gesture (← resize outline gesture) . . . . . . . . . 286 overlap (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 overlap (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 overlap (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

P

paint selected (→ graphical) . . . . . . . . . . . . . . . . . . . . . . 188 paint selected (→ path). . . . . . . . . . . . . . . . . . . . . . . . . . . 233 paragraph end (↔ syntax table) . . . . . . . . . . . . . . . . . . 638 parameters (↔ block). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 parent (← event node). . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 parent (←directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 parent goal (→ vmi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 parent handle (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 parents (← node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 paste (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 paste (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 paste (→ text). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 paste (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 path (← directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 path (←source location) . . . . . . . . . . . . . . . . . . . . . . . . . . 633 path (↔ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 pattern (← regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 pattern (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 peer name (←socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 pen (← graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 pen (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 pen (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 pid (← process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 pid (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 pixel (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 pixel (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 place (→ scroll bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 placement (← scroll bar). . . . . . . . . . . . . . . . . . . . . . . . . . . 61 plus (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 plus (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 plus (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 plus (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 point (←path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 point to bottom of file (→ editor). . . . . . . . . . . . . . . . . 327 point to bottom of window (→ editor) . . . . . . . . . . . . 327 point to mark (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 327 point to top of file (→ editor). . . . . . . . . . . . . . . . . . . . . 327 point to top of window (→ editor) . . . . . . . . . . . . . . . . 327 pointed (← device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 pointed (← text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 pointed (←connect gesture). . . . . . . . . . . . . . . . . . . . . . . 290 pointed (←text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 pointed (←text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 pointed objects (←device) . . . . . . . . . . . . . . . . . . . . . . . . 194 pointer (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 pointer (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 points (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 points (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 points (→ arc). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 points (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 points (→ connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 points (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 points (- font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 pop (→ directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 pop current (→ display manager) . . . . . . . . . . . . . . . . . . 53 popup (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 popup (←browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 popup (←button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 popup (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 popup (↔ dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 popup (↔ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 popup (↔ popup gesture) . . . . . . . . . . . . . . . . . . . . . . . . 291 popup (↔ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 popup (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 popup (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 popup (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 popup (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 popup from event (←menu bar) . . . . . . . . . . . . . . . . . . 124 popup image (← button) . . . . . . . . . . . . . . . . . . . . . . . . . . 78 popup image (← menu). . . . . . . . . . . . . . . . . . . . . . . . . . . 108 popup image (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . 78 popup image (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . 108 position (← arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 position (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 position (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 position (←dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . 129 position (←dict item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 position (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 position (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 position (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 position (←handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 position (←tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 position (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 position (→ area). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 position (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 position (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . 130 position (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 position (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 position (→ tab). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 position (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 position (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 position (- event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 position (- text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 post (→ event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 postscript (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 postscript (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 postscript (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . 187 postscript (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 postscript depth (←image) . . . . . . . . . . . . . . . . . . . . . . . 442 postscript font (↔ font) . . . . . . . . . . . . . . . . . . . . . . . . . . 435 postscript header (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . 598 postscript size (↔ font) . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 prefix (← key binding). . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 prefix (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 prefix (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 prepend (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 prepend (→ chain table) . . . . . . . . . . . . . . . . . . . . . . . . . . 463 prepend (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 prepend (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 prepend delegate (→ class) . . . . . . . . . . . . . . . . . . . . . . . 606 prepend recogniser (→ graphical) . . . . . . . . . . . . . . . . . 183 preview (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 preview (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 preview feedback (↔ menu). . . . . . . . . . . . . . . . . . . . . . . 108 preview message (↔ click gesture) . . . . . . . . . . . . . . . . 279 previous (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 previous (←fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 previous (- fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 previous line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 327 previous line (→ list browser) . . . . . . . . . . . . . . . . . . . . . 146 previous line (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 print (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 print name (←char array) . . . . . . . . . . . . . . . . . . . . . . . . 475 print name (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 print name (←directory). . . . . . . . . . . . . . . . . . . . . . . . . . 386 print name (←menu item) . . . . . . . . . . . . . . . . . . . . . . . . 114 print name (←method) . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 print name (←number) . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 print name (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 print name (←point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 print name (←real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 print name (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 print name (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . 403 print name (←size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 print name (←socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 print name (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 print name (- text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 print name of value (←text item) . . . . . . . . . . . . . . . . . . 93 print stack (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 print trace message (→ method) . . . . . . . . . . . . . . . . . . 626 protect (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 protect (→ object). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 proto (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 pullright (- popup). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 push (→ directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387

Q

quick and dirty (↔ display). . . . . . . . . . . . . . . . . . . . . . . . 49 quit (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 quit completer (→ text item) . . . . . . . . . . . . . . . . . . . . . . 93 quote (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350

R

radius (← box) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 radius (← button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 radius (← dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . 129 radius (← figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 radius (← menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 radius (← path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 radius (←arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 radius (←circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 radius (→ arc). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 radius (→ box) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 radius (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 radius (→ circle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 radius (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . 129 radius (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 radius (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 radius or interval (←path) . . . . . . . . . . . . . . . . . . . . . . . . 236 rcs revision (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 rdfd (- stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 rdstream (- stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 read (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 read as file (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . 343 read line (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 read line (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 read line (←stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 realise (←class stub). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 realise (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 realised (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 rearrange (→ window decorator) . . . . . . . . . . . . . . . . . . . 37 receiver (← event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 receiver (←key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . 362 receiver (↔ message) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 receiver (→ key binding). . . . . . . . . . . . . . . . . . . . . . . . . . 362 receiver (- ?). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 recenter (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 recenter (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 149 recogniser (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 183 recompute (- device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 record instances (→ class) . . . . . . . . . . . . . . . . . . . . . . . . 609 record separator (← stream) . . . . . . . . . . . . . . . . . . . . . . 389 record separator (→ stream) . . . . . . . . . . . . . . . . . . . . . . 389 red (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 red (- colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 redraw (→ bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 redraw (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 redraw (→ window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 redraw function (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . 614 reduce (←colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 refer (- hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 reference (← arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 reference (←button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 reference (←dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 reference (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 reference (←label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 reference (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 reference (←menu bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 reference (←slider). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 reference (←text item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 reference (↔ ¯) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 reference (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 reference (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 reference (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . 74 reference (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 reference (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 reference (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . 152 reference (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 reference x (←arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 reference x (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 reference y (←arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 reference y (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 references (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 region (↔ handler) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 register (→ name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 register end (←regex). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 register size (←regex). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 register start (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 register value (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 register value (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . 352 registers (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 registers (- regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 relate (→ connection). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 relation (← constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 relation (→ constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 relative move (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 relative move (→ graphical) . . . . . . . . . . . . . . . . . . . . . . 177 relief (← elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 relief (→ elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 remove (→ directory) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 remove (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 rename reference (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . 598 reparent (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 reparent (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 reparent (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 repeat (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 repeat search (→ list browser) . . . . . . . . . . . . . . . . . . . . 151 replace (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 replace (→ regex). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 replace line (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 report (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 report (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 report (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 report (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 report (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 report (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 report (→ visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 report to (←dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 report to (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 report to (←visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 request compute (← graphical) . . . . . . . . . . . . . . . . . . . 181 request compute (→ graphical) . . . . . . . . . . . . . . . . . . . 181 request geometry (→ browser) . . . . . . . . . . . . . . . . . . . . 141 request geometry (→ editor) . . . . . . . . . . . . . . . . . . . . . . 324 request geometry (→ graphical). . . . . . . . . . . . . . . . . . . 174 request geometry (→ list browser) . . . . . . . . . . . . . . . . 148 request geometry (→ view) . . . . . . . . . . . . . . . . . . . . . . . 313 request geometry (→ window) . . . . . . . . . . . . . . . . . . . . . 27 request geometry (→ window decorator) . . . . . . . . . . . 37 reset (→ application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 reset (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 reset (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 reset (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 reset (→ key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 reset (→ menu bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 reset (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 reset (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 reset (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 reset (→ visual) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409 reset (→ window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 reset undo (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . 340 resize (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 resize (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 resize (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 resize (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 resize (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 resize (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 resize (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 resize (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 resize (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 resize (→ window decorator) . . . . . . . . . . . . . . . . . . . . . . . 37 resize message (← window) . . . . . . . . . . . . . . . . . . . . . . . . 27 resize message (→ window) . . . . . . . . . . . . . . . . . . . . . . . . 27 resolve method message (↔ class). . . . . . . . . . . . . . . . . 612 resource (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 resource (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 resource class (← display). . . . . . . . . . . . . . . . . . . . . . . . . . 45 resource class (← resource) . . . . . . . . . . . . . . . . . . . . . . . 401 resource class name (←resource) . . . . . . . . . . . . . . . . . . 401 resource table (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . 612 resource value (←object) . . . . . . . . . . . . . . . . . . . . . . . . . 503 resource value (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . 608 resources (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 restore (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 restore (→ dialog group). . . . . . . . . . . . . . . . . . . . . . . . . . 128 restore (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 restore (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 restore (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 restore (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 restore graphics state (→ graphical) . . . . . . . . . . . . . . 181 return (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 return type (← get method) . . . . . . . . . . . . . . . . . . . . . . 631 return type (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . 620 return value (- frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 right (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 right (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 right (↔ ==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 right (↔ \==) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 right (↔ binary condition). . . . . . . . . . . . . . . . . . . . . . . . 531 right (↔ binary expression) . . . . . . . . . . . . . . . . . . . . . . . 556 right (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 right (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 right (→ window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 right (- arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 right margin (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 331 right margin (↔ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 right offset (← menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 right side (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 right side (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 right side (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 177 rindex (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 rindex (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 room (→ device). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 root (← event tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 root (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 root (←tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 root (→ event tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 root (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 root handler (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 root handlers (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 rotate (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 rotate (→ circle). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 rotate (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 row sep (↔ format). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 running (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

S

same (→ file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 same class (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 same reference (→ object) . . . . . . . . . . . . . . . . . . . . . . . . 499 same sides (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417 save (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 save (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 save (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 save buffer (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 save function (- class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 save graphics state (→ graphical) . . . . . . . . . . . . . . . . . 181 save in file (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 save message (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 save style (←variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 save style (↔ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 save style (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 save style variable (→ class) . . . . . . . . . . . . . . . . . . . . . . 608 saved column (← key binding) . . . . . . . . . . . . . . . . . . . . 363 scale (←image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 scan (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 scan (←text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 scan (→ directory). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 scan (- text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 scan syntax (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . 341 scope (↔ assign) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 screen saver (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 scroll bar (← editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 scroll bar (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . 145 scroll down (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 scroll down (→ list browser) . . . . . . . . . . . . . . . . . . . . . . 149 scroll horizontal (→ window). . . . . . . . . . . . . . . . . . . . . . . 28 scroll offset (- window). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 scroll one line down (→ editor) . . . . . . . . . . . . . . . . . . . 325 scroll one line up (→ editor) . . . . . . . . . . . . . . . . . . . . . . 325 scroll to (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 scroll to (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 scroll to (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 149 scroll to (→ view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 scroll to (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 scroll up (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 scroll up (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 149 scroll vertical (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . 325 scroll vertical (→ list browser) . . . . . . . . . . . . . . . . . . . . 149 scroll vertical (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . 29 scrollbars (←window decorator) . . . . . . . . . . . . . . . . . . . . 38 scrollbars (→ window decorator) . . . . . . . . . . . . . . . . . . . 38 search (←regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 search (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 search base (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 search direction (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . 337 search hit (- list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 151 search origin (- editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 search origin (- list browser) . . . . . . . . . . . . . . . . . . . . . . 151 search string (↔ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 337 search string (- list browser) . . . . . . . . . . . . . . . . . . . . . . 151 second (←date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 second (↔ tuple) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 second (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 second arrow (← joint) . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 second arrow (→ joint) . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 seek (→ file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 seek (- text image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 segment (←path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 select (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 select completion (→ text item). . . . . . . . . . . . . . . . . . . . 92 select line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 select message (↔ list browser) . . . . . . . . . . . . . . . . . . . 146 select middle message (↔ list browser). . . . . . . . . . . . 147 selected (← graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 selected (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . 114 selected (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 selected (←menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 selected (←text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 selected (←view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 selected (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 selected (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 selected (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . . 146 selected (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 selected (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . 114 selected completion (→ menu) . . . . . . . . . . . . . . . . . . . . 111 selected completion (→ text item) . . . . . . . . . . . . . . . . . 92 selected fragment (← editor). . . . . . . . . . . . . . . . . . . . . . 319 selected fragment (→ editor). . . . . . . . . . . . . . . . . . . . . . 319 selected fragment style (← editor) . . . . . . . . . . . . . . . . 322 selected fragment style (→ editor) . . . . . . . . . . . . . . . . 322 selected item (← popup). . . . . . . . . . . . . . . . . . . . . . . . . . 118 selection (← label). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 selection (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 selection (←browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 selection (←button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 selection (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 selection (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 selection (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 selection (←list browser). . . . . . . . . . . . . . . . . . . . . . . . . . 146 selection (←menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 selection (←slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 selection (←text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 selection (←text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 selection (←view). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 selection (→ browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 selection (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 selection (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 selection (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 selection (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 selection (→ label). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 selection (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . 146 selection (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 selection (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 selection (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 selection (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 selection (→ view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 selection (- list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . 146 selection (- menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 selection (- text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 selection end (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 selection end (- editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 selection extend (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 320 selection feedback (← window). . . . . . . . . . . . . . . . . . . . . 25 selection feedback (→ window). . . . . . . . . . . . . . . . . . . . . 25 selection origin (← editor) . . . . . . . . . . . . . . . . . . . . . . . . 320 selection origin (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 320 selection owner (←display). . . . . . . . . . . . . . . . . . . . . . . . . 41 selection owner (→ display) . . . . . . . . . . . . . . . . . . . . . . . . 41 selection start (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . 320 selection start (- editor). . . . . . . . . . . . . . . . . . . . . . . . . . . 320 selection style (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . 322 selection style (← list browser). . . . . . . . . . . . . . . . . . . . 147 selection style (↔ class) . . . . . . . . . . . . . . . . . . . . . . . . . . 606 selection timeout (←display) . . . . . . . . . . . . . . . . . . . . . . . 42 selection timeout (→ display) . . . . . . . . . . . . . . . . . . . . . . 42 selection to cut buffer (→ editor) . . . . . . . . . . . . . . . . . 320 selection unit (↔ editor). . . . . . . . . . . . . . . . . . . . . . . . . . 320 selector (↔ message) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 selector (- ?). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 self (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 send (→ attribute) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 send (→ send method). . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 send (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 send access (→ variable) . . . . . . . . . . . . . . . . . . . . . . . . . . 620 send catch all (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 send class (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 send function (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 send hyper (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 send method (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 send method (←object). . . . . . . . . . . . . . . . . . . . . . . . . . . 501 send method (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 send method (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . 506 send methods (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 send methods (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607 send sub (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 send super (→ function) . . . . . . . . . . . . . . . . . . . . . . . . . . 545 send super (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 send super vector (→ object) . . . . . . . . . . . . . . . . . . . . . 507 send table (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 send vector (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 sensitive (↔ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 sentence end (↔ syntax table) . . . . . . . . . . . . . . . . . . . . 638 set (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 set (→ date). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 set (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 set (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 set (→ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 set (→ size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 set (→ text cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 set (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 set fill column (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 331 set mark (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 set pixel (→ image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 set point (→ path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 shadow (← box) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 shadow (← button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 shadow (← elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 shadow (← ellipse) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 shadow (←figure). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 shadow (→ box) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 shadow (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 shadow (→ elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 shadow (→ ellipse) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 shadow (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 shift (↔ modifier) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 shift (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 show (←dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 show (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 show (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 show (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 show caret (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 show caret (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 show caret at (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . 334 show combo box (→ text item) . . . . . . . . . . . . . . . . . . . . 92 show console (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 show current (← popup) . . . . . . . . . . . . . . . . . . . . . . . . . . 120 show current (→ popup) . . . . . . . . . . . . . . . . . . . . . . . . . . 120 show label (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 show label (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 show label (← text item) . . . . . . . . . . . . . . . . . . . . . . . . . . 88 show label (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 show label (←list browser). . . . . . . . . . . . . . . . . . . . . . . . 147 show label (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 show label (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 show label (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . 147 show label (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 show label (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 show label (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . 88 show matching bracket (→ editor) . . . . . . . . . . . . . . . . 334 show popup (→ menu bar) . . . . . . . . . . . . . . . . . . . . . . . 124 show pullright menu (→ popup) . . . . . . . . . . . . . . . . . . 120 show scroll bar (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 325 show scroll bar (→ list browser) . . . . . . . . . . . . . . . . . . 149 show scroll bar (→ window decorator) . . . . . . . . . . . . . 38 show value (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 show value (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 size (← arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 size (← chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 size (← dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 size (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 size (← hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 size (← image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 size (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 size (← syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 size (← vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 size (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 size (←browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 size (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 size (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 size (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 size (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 size (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 size (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 size (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 size (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 size (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 size (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 size (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 size (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 size (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 size (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 size (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 size (- display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 size (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 size angle (← arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 size angle (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 size as file (←text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . 344 size given (- dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 skip comment (←text buffer) . . . . . . . . . . . . . . . . . . . . . 341 slot (←object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 slot (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 slots (← class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 604 smaller (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 smaller (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 smaller (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 solid (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 son (→ event node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 son (→ node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 son handle (← tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 sons (← event node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 sons (← node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 sons size (- node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 sort (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 sort (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 sort (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 sort (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 sort (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 sort (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 sort by (← dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 sort by (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 source (←pixmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 source (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 source (←variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 source (↔ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 source (↔ method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628

specialised (→ type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574
split completion (←text item). . . . . . . . . . . . . . . . . . . . . . 93
spy (→ method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628
start (← list browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
start (← scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
start (←arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
start (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
start (←fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
start (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
start (←path) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
start (←text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
start (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
start (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
start (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
start (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
start (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
start (- fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
start (- text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
start angle (← arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
start angle (→ arc) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
start cell (- list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . 153
start x (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
start x (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
start y (←line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
start y (→ line) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
status (← dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
status (← figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
status (← file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
status (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
status (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
status (← process). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
status (← scroll bar). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
status (← socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
status (← tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
status (← timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
status (↔ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
status (→ button) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
status (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
status (→ figure) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
status (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
status (→ label) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
status (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
status (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
status (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
status (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
status (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
status (- key binding) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
stop (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
stopped (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
storage reference (←colour) . . . . . . . . . . . . . . . . . . . . . . . 425
storage reference (←function) . . . . . . . . . . . . . . . . . . . . . 544
storage reference (←object) . . . . . . . . . . . . . . . . . . . . . . . 502
string (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
string (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
string (←fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
string (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
string (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
string header (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . 345

string value (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . 402 strip (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 style (← arrow). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 style (← dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 style (← font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 style (← fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 style (← text cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 style (← text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 style (→ arrow). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 style (→ dict item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 style (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 style (→ fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 style (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 style (→ text cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 style (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 styles (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 styles (← list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 styles (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322 sub (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 sub (←fragment) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 sub (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 sub (←text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 sub (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 sub class (←class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 sub classes (←class stub) . . . . . . . . . . . . . . . . . . . . . . . . . 615 sub classes (- class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . 615 sub tile to resize (←tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 subtract (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 succeed (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 suffix (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 summary (←error). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 summary (←method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 summary (↔ class stub) . . . . . . . . . . . . . . . . . . . . . . . . . . 616 summary (↔ constant) . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 summary (↔ resource). . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 summary (↔ variable) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622 summary (- method). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 628 super (← tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 super class (← class stub) . . . . . . . . . . . . . . . . . . . . . . . . 615 super class name (←class) . . . . . . . . . . . . . . . . . . . . . . . . 605 supers (← type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 swap (→ chain). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448 swap (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 swap (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 swap (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 swap tree (→ node). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 switch case mode (→ editor) . . . . . . . . . . . . . . . . . . . . . . 321 symbols (- hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 synchronise (→ display). . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 synchronise (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 synchronise (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . 170 synchronous (→ display) . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 syntax (←syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . . 638 syntax (↔ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341 syntax (→ name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 syntax (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 syntax (→ syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . 638 system (←program object). . . . . . . . . . . . . . . . . . . . . . . . 645 system (↔ host) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581 system (→ program object) . . . . . . . . . . . . . . . . . . . . . . . 645

T

tab distance (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 tab distance (← text image) . . . . . . . . . . . . . . . . . . . . . . 367 tab distance (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 tab distance (→ text image) . . . . . . . . . . . . . . . . . . . . . . 367 tab stops (← text image) . . . . . . . . . . . . . . . . . . . . . . . . . 367 tab stops (←editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 tab stops (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 tab stops (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . 148 tab stops (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . 367 table (←dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 table (- dict). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 table (- event tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 table (- syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639 tables (← table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 tail (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 tail (←vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 tail (- chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452 term names (↔ class). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 terminate (→ click gesture) . . . . . . . . . . . . . . . . . . . . . . . 280 terminate (→ connect gesture) . . . . . . . . . . . . . . . . . . . . 290 terminate (→ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 terminate (→ move gesture) . . . . . . . . . . . . . . . . . . . . . . 281 terminate (→ move outline gesture). . . . . . . . . . . . . . . 282 terminate (→ popup gesture) . . . . . . . . . . . . . . . . . . . . . 292 terminate (→ resize gesture) . . . . . . . . . . . . . . . . . . . . . . 284 terminate (→ resize outline gesture) . . . . . . . . . . . . . . 286 terminate message (↔ process) . . . . . . . . . . . . . . . . . . . 392 texi description (←object) . . . . . . . . . . . . . . . . . . . . . . . . 500 text (← text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 text (- char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 text buffer (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 text buffer (← fragment) . . . . . . . . . . . . . . . . . . . . . . . . . 356 text buffer (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 text cursor (← editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 texture (← graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 texture (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 then (↔ if) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 then (↔ when) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 tile (←frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 tile (←window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 tile (- window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 time (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 time (←file) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 time (- event). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 times (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 times (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 tip (← arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 tip (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 tip x (←arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 tip x (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 tip y (←arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 tip y (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 to (← connect gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 to (← connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 to (← constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 to (← hyper) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 to (↔ identity) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 to (↔ link) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 to (→ constraint) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 to handle (← connect gesture) . . . . . . . . . . . . . . . . . . . . 290 to handle (← connection) . . . . . . . . . . . . . . . . . . . . . . . . . 257 to indicators (← connect gesture) . . . . . . . . . . . . . . . . . 289 toggle char case (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 330 toggle selected (→ graphical) . . . . . . . . . . . . . . . . . . . . . 169 top side (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 top side (←graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 top side (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 trace (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 trace (←program object) . . . . . . . . . . . . . . . . . . . . . . . . . 646 trace (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 trace (→ program object). . . . . . . . . . . . . . . . . . . . . . . . . 646 trace condition (←program object) . . . . . . . . . . . . . . . 647 trace condition (→ program object). . . . . . . . . . . . . . . 647 trace function (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614 transient for (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 transient for (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 transients (← frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 translate (←type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 translate (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 translate function (- type) . . . . . . . . . . . . . . . . . . . . . . . . 575 transparent (← bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . 221 transparent (←text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 transparent (→ bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . 221 transparent (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 transpose (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . 342 transpose chars (→ editor). . . . . . . . . . . . . . . . . . . . . . . . 330 transpose chars (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . 217 transpose lines (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 330 transpose terms (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 330 transpose word (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . 330 trap errors (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 trap errors (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593 tree (← node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 tree (←event node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 tree index (- class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 truncate (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 truncate as file (→ text buffer) . . . . . . . . . . . . . . . . . . . 344 tty (← process). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 type (← resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 type (← variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 type (↔ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 type (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 type (→ variable). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 typed (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 typed (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 typed (→ dialog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 typed (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 typed (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 typed (→ key binding). . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 typed (→ list browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 typed (→ text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 typed (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 typed (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 types (← method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625 types (→ method) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625

U

un answer (↔ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 unclip (→ graphical). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 uncreate (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 uncreate (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 undefined (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 undent line (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 undent region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 323 undent selection (→ editor) . . . . . . . . . . . . . . . . . . . . . . . 323 underline (←style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 underline (→ style) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358 undo (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 undo (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340 undo buffer (- text buffer) . . . . . . . . . . . . . . . . . . . . . . . . 345 undo buffer size (← text buffer) . . . . . . . . . . . . . . . . . . 340 undo buffer size (→ text buffer) . . . . . . . . . . . . . . . . . . 340 union (←area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 union (←chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 union (→ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 union (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 union (→ size). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 unique (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 unit (- scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 unlink (→ application) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 unlink (→ bitmap) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 unlink (→ bool) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 unlink (→ browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 unlink (→ chain) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 unlink (→ char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 unlink (→ class) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 unlink (→ code vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 unlink (→ colour) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 unlink (→ connection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 unlink (→ constraint). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 unlink (→ cursor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 unlink (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 unlink (→ dialog item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 unlink (→ dict) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 unlink (→ dict item). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 unlink (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 unlink (→ elevation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 unlink (→ file). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 unlink (→ fragment). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 unlink (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 unlink (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 unlink (→ hash table) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 unlink (→ hyper) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 unlink (→ image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 unlink (→ list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 unlink (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 unlink (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 unlink (→ name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 unlink (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 unlink (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 unlink (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 unlink (→ regex) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 unlink (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 unlink (→ socket) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 unlink (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 unlink (→ syntax table) . . . . . . . . . . . . . . . . . . . . . . . . . . 637 unlink (→ table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 unlink (→ text buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 unlink (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 unlink (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 unlink (→ timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 unlink (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 unlink (→ var) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 unlink (→ vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 unlink (→ view) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 unlink (→ when) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 unlink (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 unlink (→ window decorator) . . . . . . . . . . . . . . . . . . . . . . 36 unlink from (→ hyper). . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 unlink to (→ hyper) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 unlinking (→ object) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 unrelate (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 unresolved types (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . 593 untabify (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 unzoom (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 unzoom (→ tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 upcase (←char array). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 upcase (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 upcase (→ text buffer). . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 upcase previous word (→ editor). . . . . . . . . . . . . . . . . . 330 upcase region (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . 330 upcase word (→ editor). . . . . . . . . . . . . . . . . . . . . . . . . . . 330 update (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 update (→ popup). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 update link attributes (→ connection) . . . . . . . . . . . . 258 update message (↔ popup) . . . . . . . . . . . . . . . . . . . . . . . 119 update pointed (→ device). . . . . . . . . . . . . . . . . . . . . . . . 194 use tty (← process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 use tty (→ process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394 user (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 user info (←pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 594

V

v mode (↔ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . . 284 validate (→ type). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 validate function (- type) . . . . . . . . . . . . . . . . . . . . . . . . . 575 value (← event node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 value (← menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 value (←binary expression) . . . . . . . . . . . . . . . . . . . . . . . 557 value (←char array) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 value (←number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 value (←real). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 value (←resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 value (←sheet) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 value (↔ :=) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 value (↔ assign). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 value (↔ attribute) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513 value (→ menu item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 value (→ number) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 value (→ real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 value (→ resource). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 value (→ sheet). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 value (→ string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 value (- number). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 value (- resource) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 value font (← menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 value font (← slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 value font (← text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 value font (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 value font (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 value font (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 value set (← text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 value set (←type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 value set (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 value text (← text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 value width (← menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 value width (←dialog item) . . . . . . . . . . . . . . . . . . . . . . . . 75 value width (←menu). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 value width (→ dialog item) . . . . . . . . . . . . . . . . . . . . . . . 75 value width (→ menu) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 value width (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . 90 value width (- text item). . . . . . . . . . . . . . . . . . . . . . . . . . . 89 value1 (- real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 value2 (- real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 var (←=). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 var (↔ assign). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 var in (←binary expression) . . . . . . . . . . . . . . . . . . . . . . 557 vector (← type) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575 vectors (←table). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 ver shrink (↔ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 ver stretch (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . 173 ver stretch (↔ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 verify (→ click gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 verify (→ connect gesture) . . . . . . . . . . . . . . . . . . . . . . . . 290 verify (→ gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 verify (→ move gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . 281 verify (→ popup gesture) . . . . . . . . . . . . . . . . . . . . . . . . . 292 verify (→ resize gesture) . . . . . . . . . . . . . . . . . . . . . . . . . . 284 version (←pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 version (- pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 599 vertical format (← menu). . . . . . . . . . . . . . . . . . . . . . . . . 108 vertical format (→ menu). . . . . . . . . . . . . . . . . . . . . . . . . 108 vertical scrollbar (← window decorator) . . . . . . . . . . . . 37 vertical scrollbar (→ window decorator) . . . . . . . . . . . . 37 view (← scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 view (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 view (←list browser). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 view (←text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 view (→ scroll bar) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 visible (←window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 visual type (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

W

w to (↔ spatial). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 wait (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 wait (→ stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 week day (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 width (←display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 width (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 width (←font) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435 width (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 width (←list browser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 width (←slider). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 width (←text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 width (↔ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 width (↔ format) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205 width (↔ region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 width (↔ size) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 width (→ frame). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 width (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 width (→ slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 width (→ text item) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 width (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 width (- slider) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 width (- text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 window (← event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 window (← window decorator) . . . . . . . . . . . . . . . . . . . . . 36 window (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 window manager (←display) . . . . . . . . . . . . . . . . . . . . . . . 42 window manager (→ display) . . . . . . . . . . . . . . . . . . . . . . 42 window system (← pce) . . . . . . . . . . . . . . . . . . . . . . . . . . 599 window system revision (← pce) . . . . . . . . . . . . . . . . . . 599 window system version (← pce). . . . . . . . . . . . . . . . . . . 599 wing (← arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 wing (→ arrow) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 wm delete (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 wm protocol (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 wm protocols (← frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 wm protocols attached (← frame). . . . . . . . . . . . . . . . . . 21 word (←editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 wrap (← text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 wrap (← text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 wrap (→ text image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 wrapper (↔ delegate variable) . . . . . . . . . . . . . . . . . . . . 623 wrfd (- stream) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 write (→ pce) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 write as file (→ text buffer). . . . . . . . . . . . . . . . . . . . . . . 344 write ln (→ pce). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 ws ref (← timer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 ws ref (- display) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 ws ref (- frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 ws ref (- image) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 ws ref (- stream). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 ws ref (- window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

X

x (← event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 x (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 x (←dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 x (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 x (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 x (←handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 x (←tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 x (↔ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 x (↔ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 x (↔ region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 x (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 x (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 x (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 x (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 x (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 x (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 x (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 x caret (- text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 x from (↔ spatial). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 x name (← font). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 x offset (- text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 x position (↔ handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 x to (↔ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 xor (→ image). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442

Y

y (← event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 y (←device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 y (←dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 y (←event) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 y (←graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 y (←handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 y (←tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 y (↔ area) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 y (↔ point) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 y (↔ region) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 y (→ device) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 y (→ dialog group) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 y (→ frame) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 y (→ graphical) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 y (→ tab) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 y (→ tile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 y (→ window) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 y caret (- text) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 y from (↔ spatial). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 y position (↔ handle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 y to (↔ spatial) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 yank (→ editor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 year (←date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 year (→ date) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

Z

zoom (→ node) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 zoom (→ tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

788 Appendix E: Behaviour Index XPCE Reference Manual

Short Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 Displays, Windows and Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4 Dialogs and Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5 Lists, Dictionaries and Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 6 General Purpose Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 7 Displaying Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 8 Relations Between (Graphical) Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 9 Making Graphicals Sensitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 10 Animation Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307 11 Text Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311 12 Operating System Interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 13 Customising PCE Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399 14 Organisation of Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 15 Graphics Support Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411 16 Data Organisation Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443 17 Primitive Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 18 Objects, Relations and Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 19 Executable Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517 20 Variables and Assigment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563 21 Message Passing, Types and Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 22 Interaction with the Host System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579 23 The PCE object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585 24 Meta Objects — Classes, Behaviour, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 601 25 Language Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635 26 Errors and Debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 27 Predefined Global Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649 Appendix A Summary of Functional Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 Appendix B Group Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745 Appendix C Class Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749 Appendix D Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753 Appendix E Behaviour Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757

ii XPCE Reference Manual

Table of Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Displays, Windows and Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.1 Class frame — Collection of tiled windows. . . . . . . . . . . . . . . . . . . . 5

3.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.3 Name — Naming objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.4 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.1.5 Icon — Iconising Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.6 Open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.7 Transient — Support windows (e.g. prompters). . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.8 WindowManager — Interaction with the X-window manager . . . . . . . . . . . 10 3.1.9 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.10 Animate — Behavariour to support animation . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1.11 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1.12 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . . 13 3.1.13 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1.14 Stacking — Overlapping frames and graphicals . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1.15 Visibility — Making object (in-)visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.16 Permission — Access rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.17 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.18 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.19 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.20 Focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.21 Modal — Event sub-loops: modal windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.22 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 19 3.1.23 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . . 21 3.1.24 WindowSystem — Connection to the underlying window system. . . . . . . 21 3.1.25 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

3.2 Class window — Interface between X-window and device . . 22

3.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.2 Conversion — Conversion (for type checking). . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.3 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.4 Open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.5 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.2.6 Animate — Behavariour to support animation. . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2.7 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.2.8 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 26 3.2.9 Resize — Controlling and trapping resizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.10 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.2.11 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.2.12 Stacking — Overlapping frames and graphicals . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.13 Visibility — Making object (in-)visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.14 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.15 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.16 Cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . . 29 3.2.17 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.2.18 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2.19 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2.20 Focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.2.21 Modal — Event sub-loops: modal windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.22 Pointer — Pointer related methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.2.23 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 33 3.2.24 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.2.25 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.2.26 WindowSystem — Connection to the underlying window system. . . . . . . 34 3.2.27 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.3 Class window decorator — Attach scrollbars and label to a window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

3.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.3.2 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.3.3 Client — Controlled object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.3.4 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 37 3.3.5 Resize — Controlling and trapping resizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.3.6 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.3.7 Scroll — Controlling the ‘viewport’. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.3.8 Visibility — Making object (in-)visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.4 Class display — Global management of display . . . . . . . . . . . . . 39

3.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.4.2 Conversion — Conversion (for type checking). . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.4.3 Address — Address specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.4.4 Open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.4.5 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . . 41 3.4.6 WindowManager — Interaction with the X-window manager . . . . . . . . . . . 42 3.4.7 X — X-window interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.4.8 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.4.9 Host — Communication with the host language . . . . . . . . . . . . . . . . . . . . . . . . 43 3.4.10 Animate — Behavariour to support animation . . . . . . . . . . . . . . . . . . . . . . . . 43 3.4.11 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 43 3.4.12 Font — Available fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.4.13 Colour — Defining and managing colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.4.14 Resource — Interface to ~/.Xdefault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.4.15 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . . 45 3.4.16 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.4.17 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.4.18 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 47 3.4.19 Root — Manipulation of the root window (background) . . . . . . . . . . . . . . . 48 3.4.20 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.4.21 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.4.22 Quit — Exiting from PCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 3.4.23 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . . 48 3.4.24 Cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 3.4.25 WindowSystem — Connection to the underlying window system. . . . . . . 49 3.4.26 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

3.5 Class application — Collection of frames . . . . . . . . . . . . . . . . . . . . 50

3.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.5.2 Name — Naming objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.5.3 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.5.4 Organisation — Organisation of (graphical) objects. . . . . . . . . . . . . . . . . . . . . 51 3.5.5 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 3.5.6 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

3.6 Class display manager — Manager of available displays … 52

3.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.6.2 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.6.3 Organisation — Organisation of (graphical) objects. . . . . . . . . . . . . . . . . . . . . 53 3.6.4 Display — X-Screen oriented behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 3.6.5 Current — Operations on ‘current’ object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

3.7 Class tile — Manage non-overlapping areas . . . . . . . . . . . . . . . . . 54

3.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.7.2 Client — Controlled object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.7.3 Iterate — Run code on each element of a collection . . . . . . . . . . . . . . . . . . . . . 55 3.7.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.7.5 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 55 3.7.6 Resize — Controlling and trapping resizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 3.7.7 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . . . 57 3.7.8 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.7.9 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.7.10 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 58

3.8 Class scroll bar — Scroll windows, text or other objects… 59

3.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.8.2 Client — Controlled object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.8.3 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 3.8.4 Action — Associated action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.8.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.8.6 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 61 3.8.7 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.8.8 Scroll — Controlling the ‘viewport’. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 3.8.9 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.8.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 3.8.11 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

4 Dialogs and Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

4.1 Class dialog — Window with dialog items . . . . . . . . . . . . . . . . . . . 66

4.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.1.2 Apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.1.3 Active — Activation (greying) of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . 67 4.1.4 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 67 4.1.5 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.1.6 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.1.7 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.1.8 Focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4.1.9 Organisation — Organisation of (graphical) objects. . . . . . . . . . . . . . . . . . . . . 69

4.2 Class dialog item — Item (menu) in a dialog window . . . . . . 71

4.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4.2.2 Name — Naming objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.2.3 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.2.4 Action — Associated action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.2.5 Apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.2.6 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 73 4.2.7 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 73 4.2.8 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.2.9 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.2.10 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 75 4.2.11 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

4.3 Class button — Push button to invoke a command . . . . . . . . 77

4.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.3.2 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 4.3.3 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4.3.4 Action — Associated action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4.3.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 78 4.3.6 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 78 4.3.7 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.3.8 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.3.9 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.3.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

4.4 Class label — Provide feedback in a dialog window . . . . . . . . 81

4.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.4.2 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.4.3 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . . 81 4.4.4 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.4.5 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.4.6 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 82 4.4.7 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 82 4.4.8 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.4.9 Format — Formatted write (as C printf()). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.4.10 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.4.11 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . . 83 4.4.12 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

4.5 Class text item — Text entry field. . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

4.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.5.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.5.3 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.5.4 Visualisation — Making data visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 4.5.5 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . . 86 4.5.6 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 4.5.7 Action — Associated action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 4.5.8 Apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.5.9 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 88 4.5.10 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . . 89 4.5.11 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.5.12 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.5.13 Caret — Moving the insertion point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.5.14 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.5.15 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 4.5.16 Complete — Automatic completion of textual constants . . . . . . . . . . . . . . . 91 4.5.17 Textual — Textual representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4.5.18 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 4.5.19 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4.6 Class slider — DialogItem to select from a numeric range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 4.6.2 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . . 96 4.6.3 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.6.4 Apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.6.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . 97 4.6.6 Layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . 97 4.6.7 Resize — Controlling and trapping resizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.6.8 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.6.9 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.6.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

4.7 Class menu — Dialog item for lists of options . . . . . . . . . . . . . 100

4.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.7.2 Items — Manipulation and query items of a browser or menu. . . . . . . . . . 102 4.7.3 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 103 4.7.4 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.7.5 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 4.7.6 Apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 4.7.7 Active — Activation (greying) of dialog objects . . . . . . . . . . . . . . . . . . . . . . . 105 4.7.8 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 106 4.7.9 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . . 108 4.7.10 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 4.7.11 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.7.12 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.7.13 Complete — Automatic completion of textual constants . . . . . . . . . . . . . . 110 4.7.14 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 110 4.7.15 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 4.7.16 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

4.8 Class menu item — Item in a menu or popup . . . . . . . . . . . . . 112

4.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 4.8.2 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 4.8.3 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 4.8.4 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 114 4.8.5 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 4.8.6 Action — Associated action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 4.8.7 Active — Activation (greying) of dialog objects . . . . . . . . . . . . . . . . . . . . . . . 114 4.8.8 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 115 4.8.9 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 4.8.10 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 4.8.11 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 116 4.8.12 Group — Functional grouping of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . 116

4.9 Class popup — Popup menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

4.9.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 4.9.2 Open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 4.9.3 Context — Context I belong too, I am executed in . . . . . . . . . . . . . . . . . . . . 118 4.9.4 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 118 4.9.5 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 4.9.6 Active — Activation (greying) of dialog objects . . . . . . . . . . . . . . . . . . . . . . . 119 4.9.7 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 119 4.9.8 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 4.9.9 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 4.9.10 Part — Managed objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 4.9.11 Reset — Aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

4.10 Class menu bar — List of pulldown menus. . . . . . . . . . . . . . . . 122

4.10.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.10.2 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.10.3 Active — Activation (greying) of dialog objects . . . . . . . . . . . . . . . . . . . . . . 123 4.10.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 123 4.10.5 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . 123 4.10.6 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 4.10.7 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 4.10.8 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 4.10.9 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 125 4.10.10 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . 126 4.10.11 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 126

4.11 Class dialog group — Group of dialog items . . . . . . . . . . . . . . 127

4.11.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 4.11.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 4.11.3 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 4.11.4 Apply — Applying dialog windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 4.11.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 128 4.11.6 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . 129 4.11.7 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 4.11.8 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 4.11.9 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 4.11.10 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 4.11.11 Accelerator — Binding the keyboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 4.11.12 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . 131 4.11.13 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 131

4.12 Class tab — Tab-sheet for tabbed dialog window . . . . . . . . 132

4.12.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 4.12.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 132 4.12.3 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . 132 4.12.4 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.12.5 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.12.6 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.12.7 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.12.8 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . 133 4.12.9 Focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 4.12.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 134

4.13 Class tab stack — Stack of tabbed control-windows . . . . . 135

4.13.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 4.13.2 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . 135 4.13.3 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 4.13.4 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 136 4.13.5 Stack — Stacking order (object, goals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 4.13.6 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

5 Lists, Dictionaries and Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

5.1 Class browser — Window version of list browser . . . . . . . . . . 140

5.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.1.2 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.1.3 Lookup — (Table) lookup methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 5.1.4 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 140 5.1.5 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 5.1.6 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 5.1.7 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 5.1.8 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 5.1.9 Cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . . 142 5.1.10 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 5.1.11 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 5.1.12 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 142

5.2 Class list browser — Select object, visualisation of dict . . 143

5.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 5.2.2 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 5.2.3 Components — Parts I’m built from . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 5.2.4 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 5.2.5 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 145 5.2.6 Behaviour — Definition of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 5.2.7 Action — Associated action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 5.2.8 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 147 5.2.9 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 5.2.10 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 5.2.11 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 5.2.12 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 5.2.13 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 5.2.14 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 5.2.15 Caret — Moving the insertion point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 5.2.16 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . 150 5.2.17 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 5.2.18 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 5.2.19 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 152 5.2.20 Member — Find objects (by name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 5.2.21 DialogItem — Dialog Item placement for graphicals . . . . . . . . . . . . . . . . . . 152 5.2.22 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 5.2.23 Cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 5.2.24 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

5.3 Class dict — Dictionary of objects (also for browser) . . . . . 155

5.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 5.3.2 Visualisation — Making data visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 5.3.3 Add — Adding elements to a list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 5.3.4 Set — Set operations (no duplicates) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 5.3.5 Order — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 5.3.6 Lookup — (Table) lookup methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 5.3.7 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . . 157 5.3.8 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . . 157 5.3.9 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 5.3.10 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 158 5.3.11 Hashing — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . 158

5.4 Class dict item — Item (element) of a dictionary . . . . . . . . . 159

5.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 5.4.2 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 5.4.3 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 5.4.4 Order — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 5.4.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 160 5.4.6 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 5.4.7 Popup — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 5.4.8 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 161

6 General Purpose Graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

6.1 Class picture — Graphics window . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

6.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

6.2 Class graphical — Displayable graphical object. . . . . . . . . . . . 165

6.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166 6.2.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . . 167 6.2.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 6.2.4 Nodes — Nodes in a hierarchy (tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 6.2.5 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . . 167 6.2.6 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 169 6.2.7 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.2.8 Apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 6.2.9 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . . 170 6.2.10 Animate — Behavariour to support animation . . . . . . . . . . . . . . . . . . . . . . . 170 6.2.11 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 171 6.2.12 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . 171 6.2.13 Rotate — Rotating objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 6.2.14 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 6.2.15 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 6.2.16 Stacking — Overlapping frames and graphicals . . . . . . . . . . . . . . . . . . . . . . . 178 6.2.17 Visibility — Making object (in-)visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.2.18 Draw — Methods for user-defined graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . 179 6.2.19 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 6.2.20 Menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 6.2.21 Cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . 182 6.2.22 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 6.2.23 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 6.2.24 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . 184 6.2.25 Focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 6.2.26 Pointer — Pointer related methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 6.2.27 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 185 6.2.28 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 187 6.2.29 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

6.3 Class device — Collection of graphicals. . . . . . . . . . . . . . . . . . . . . 189

6.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 6.3.2 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 189 6.3.3 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . . 190 6.3.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 190 6.3.5 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . . 190 6.3.6 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 6.3.7 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 6.3.8 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 6.3.9 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 6.3.10 Cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . 193 6.3.11 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . 193 6.3.12 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 6.3.13 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 6.3.14 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . 195 6.3.15 Focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 6.3.16 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 195 6.3.17 Virtual — Dummy methods on super-classes . . . . . . . . . . . . . . . . . . . . . . . . . 197 6.3.18 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 197 6.3.19 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 6.3.20 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . . 198

6.4 Class figure — Collection of graphicals . . . . . . . . . . . . . . . . . . . . . 199

6.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 6.4.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 199 6.4.3 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 6.4.4 Visibility — Making object (in-)visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 6.4.5 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 6.4.6 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 200 6.4.7 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . . 201 6.4.8 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 6.4.9 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . . . 201

6.5 Class format — Tabular specification for device . . . . . . . . . . . 203

6.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 6.5.2 Table — Tabular layout of graphical objects. . . . . . . . . . . . . . . . . . . . . . . . . . . 204 6.5.3 Orientation — Horizontal or vertical orientation. . . . . . . . . . . . . . . . . . . . . . . 204 6.5.4 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . . 205

6.6 Class box — Rectangle with rounded corners and shadow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

6.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 6.6.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 206 6.6.3 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . . 206 6.6.4 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207

6.7 Class ellipse — Ellipse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

6.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 6.7.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 208 6.7.3 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . . 208 6.7.4 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

6.8 Class circle — Circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

6.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 6.8.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 210 6.8.3 Rotate — Rotating objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 6.8.4 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 6.8.5 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . . 211 6.8.6 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

6.9 Class text — Draw text on graphical devices . . . . . . . . . . . . . . 212

6.9.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 6.9.2 Delegate — Delegation of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 6.9.3 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . 213 6.9.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 213 6.9.5 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 6.9.6 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 6.9.7 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 6.9.8 Caret — Moving the insertion point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 6.9.9 Insert — Text insertion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 6.9.10 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 6.9.11 Transpose — Transposition of text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 6.9.12 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 6.9.13 Binding — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 6.9.14 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 218 6.9.15 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 6.9.16 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . . 219 6.9.17 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 6.9.18 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

6.10 Class bitmap — 2-dimensional map of (coloured) pixels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

6.10.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 6.10.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 220 6.10.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 6.10.4 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 221 6.10.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 221 6.10.6 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 6.10.7 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 221 6.10.8 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 221 6.10.9 Change — Trapping object modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 6.10.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 222

6.11 Class pixmap — Coloured image . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

6.11.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 6.11.2 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

6.11.3 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224

6.12 Class line — Line segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225

6.12.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 6.12.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 6.12.3 Tip — End-points of a joint (line, arc, path) or arrow . . . . . . . . . . . . . . . . 225 6.12.4 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 6.12.5 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 6.12.6 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 226 6.12.7 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

6.13 Class arc — Ellipse part (pie-slice). . . . . . . . . . . . . . . . . . . . . . . . . 228

6.13.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 6.13.2 Tip — End-points of a joint (line, arc, path) or arrow . . . . . . . . . . . . . . . . 228 6.13.3 Pie — Angles, pie-slices, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 6.13.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 229 6.13.5 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 6.13.6 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 6.13.7 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 230 6.13.8 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 6.13.9 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 230 6.13.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 231

6.14 Class path — (Smooth) line through chain of points …. 232

6.14.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 6.14.2 Points — Reference points for a smooth line (path) . . . . . . . . . . . . . . . . . . 232 6.14.3 Tip — End-points of a joint (line, arc, path) or arrow . . . . . . . . . . . . . . . . 233 6.14.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 233 6.14.5 Interpolation — Interpolation points for smooth lines . . . . . . . . . . . . . . . . 234 6.14.6 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 6.14.7 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 6.14.8 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 234 6.14.9 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 6.14.10 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 6.14.11 Postscript — Generating PostScript for printing . . . . . . . . . . . . . . . . . . . . 235 6.14.12 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 235 6.14.13 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 6.14.14 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . 236

6.15 Class joint — Various kinds of lines with arrows . . . . . . . . . 237

6.15.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 6.15.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 237

6.16 Class arrow — Arrow head (normally for joints) . . . . . . . . . 238

6.16.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 6.16.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 238 6.16.3 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 6.16.4 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 6.16.5 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 240 6.16.6 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 6.16.7 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241

7 Displaying Hierarchies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243

7.1 Class tree — Hierarchy of graphicals. . . . . . . . . . . . . . . . . . . . . . . . 244

7.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 7.1.2 Nodes — Nodes in a hierarchy (tree) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 7.1.3 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . . 245 7.1.4 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . . 245 7.1.5 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . . 245 7.1.6 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 7.1.7 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 7.1.8 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 7.1.9 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 248 7.1.10 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

7.2 Class node — Node in a tree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

7.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 7.2.2 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . . 251 7.2.3 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 251 7.2.4 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 7.2.5 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 7.2.6 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 7.2.7 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . 253 7.2.8 Hierarchy — Hierarchical structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 7.2.9 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

8 Relations Between (Graphical) Objects . . . . . . . . . . . . . . . . . . . . . 255

8.1 Class connection — Link between two graphicals. . . . . . . . . . 256

8.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256 8.1.2 Tip — End-points of a joint (line, arc, path) or arrow . . . . . . . . . . . . . . . . . 256 8.1.3 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . . 257 8.1.4 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 8.1.5 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 8.1.6 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

8.2 Class link — Generic part of a connection. . . . . . . . . . . . . . . . . . 259

8.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 8.2.2 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . . 259 8.2.3 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . 260

8.3 Class handle — Connection point on graphical . . . . . . . . . . . . 261

8.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 8.3.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 8.3.3 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . . 261 8.3.4 Location — Locating points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262

8.4 Class constraint — Binary constraint . . . . . . . . . . . . . . . . . . . . . . . 263

8.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 8.4.2 Client — Controlled object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 8.4.3 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . . 264 8.4.4 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264

8.5 Class relation — Superclass for all relations. . . . . . . . . . . . . . . . 265

8.5.1 Constraint — Maintaining constraints and relations . . . . . . . . . . . . . . . . . . . 265

8.6 Class identity — Identity between attributes . . . . . . . . . . . . . . 266

8.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 8.6.2 Selector — Naming behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 8.6.3 Constraint — Maintaining constraints and relations . . . . . . . . . . . . . . . . . . . 266

8.7 Class spatial — Spatial relation between grahicals . . . . . . . . 267

8.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268 8.7.2 Constraint — Maintaining constraints and relations . . . . . . . . . . . . . . . . . . . 268 8.7.3 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . . 268 8.7.4 Position — Position of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269

9 Making Graphicals Sensitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

9.1 Class recogniser — Mapping from event to message (action) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

9.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 9.1.2 Status — Flags indicating current status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 9.1.3 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273

9.2 Class gesture — Handler for sequence down ... up . . . . . . . . 274

9.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 9.2.2 Status — Flags indicating current status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 9.2.3 Cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . . 275 9.2.4 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 9.2.5 Cancel — Cancel event handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

9.3 Class click gesture — Gesture to handle a click . . . . . . . . . . . 278

9.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278 9.3.2 Modifier — Test Meta-, Shift- and Control-keys . . . . . . . . . . . . . . . . . . . . . . . 278 9.3.3 Action — Associated action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 9.3.4 Feedback — Feedback for event-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 9.3.5 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 9.3.6 Cancel — Cancel event handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 9.3.7 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

9.4 Class move gesture — Gesture to move an object by dragging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

9.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 9.4.2 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 9.4.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

9.5 Class move outline gesture — Gesture to move an object by outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

9.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 9.5.2 Feedback — Feedback for event-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 9.5.3 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282

9.6 Class resize gesture — Gesture to resize by dragging . . . . . 283

9.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 9.6.2 Constraint — Maintaining constraints and relations . . . . . . . . . . . . . . . . . . . 283 9.6.3 Mode — Modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 9.6.4 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

9.7 Class resize outline gesture — Gesture to resize an object by outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

9.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 9.7.2 Constraint — Maintaining constraints and relations . . . . . . . . . . . . . . . . . . . 285 9.7.3 Feedback — Feedback for event-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 9.7.4 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 9.7.5 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286

9.8 Class connect gesture — Gesture to connect two objects by dragging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287

9.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 9.8.2 Context — Context I belong too, I am executed in . . . . . . . . . . . . . . . . . . . . 288 9.8.3 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 9.8.4 Feedback — Feedback for event-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 9.8.5 Connection — Line connection graphicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 9.8.6 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290

9.9 Class popup gesture — Gesture to display a popup menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

9.9.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 9.9.2 Context — Context I belong too, I am executed in . . . . . . . . . . . . . . . . . . . . 291 9.9.3 Popup — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 9.9.4 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292 9.9.5 Accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

9.10 Class event — PCE’s notion of a user event . . . . . . . . . . . . . . 293

9.10.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 9.10.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 9.10.3 Context — Context I belong too, I am executed in . . . . . . . . . . . . . . . . . . . 294 9.10.4 Forward — Execute code, forwarding context parameters. . . . . . . . . . . . . 294 9.10.5 Position — Position of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295 9.10.6 Classify — Classify events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 9.10.7 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 9.10.8 Timing — Controlling real-time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298

9.11 Class modifier — Condition on shift, control and meta-keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299

9.11.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 9.11.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 299 9.11.3 Modifier — Test Meta-, Shift- and Control-keys . . . . . . . . . . . . . . . . . . . . . . 300

9.12 Class event tree — Hierarchy of event types. . . . . . . . . . . . . . 301

9.12.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 9.12.2 Lookup — (Table) lookup methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 9.12.3 Hierarchy — Hierarchical structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 9.12.4 Hashing — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . 301

9.13 Class event node — Node in event-type hierarchy . . . . . . . 302

9.13.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 9.13.2 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 9.13.3 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 9.13.4 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 9.13.5 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 302 9.13.6 Hierarchy — Hierarchical structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

9.14 Class handler — Map event to message . . . . . . . . . . . . . . . . . . . 303

9.14.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 9.14.2 Condition — Specifying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 9.14.3 Action — Associated action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 9.14.4 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303

9.15 Class handler group — Collection of recognisers . . . . . . . . . 304

9.15.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 9.15.2 List — List operations (add, delete). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 9.15.3 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 9.15.4 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305

10 Animation Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

10.1 Class timer — Generate messages at intervals. . . . . . . . . . . . 309

10.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 10.1.2 Status — Flags indicating current status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 10.1.3 Action — Associated action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 10.1.4 Time — Controlling real-time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 10.1.5 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

11 Text Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

11.1 Class view — Window version of an editor . . . . . . . . . . . . . . . 312

11.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 11.1.2 Delegate — Delegation of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 11.1.3 Create — Realising constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 11.1.4 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . 313 11.1.5 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 11.1.6 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 11.1.7 Format — Formatted write (as C printf()) . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 11.1.8 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314

11.2 Class editor — EMACS look-alike text editor . . . . . . . . . . . . 315

11.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 11.2.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 317 11.2.3 Delegate — Delegation of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 11.2.4 Components — Parts I’m built from . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 11.2.5 Label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 11.2.6 Visualisation — Making data visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318 11.2.7 Sort — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 11.2.8 Read — Reading text from objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 11.2.9 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . 319 11.2.10 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 11.2.11 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . 321 11.2.12 Mode — Modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321 11.2.13 Appearance — “Look-and-feel” related aspects. . . . . . . . . . . . . . . . . . . . . . 322 11.2.14 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . 323 11.2.15 Indentation — Create/analyse text indentation . . . . . . . . . . . . . . . . . . . . . 323 11.2.16 Resize — Controlling and trapping resizes . . . . . . . . . . . . . . . . . . . . . . . . . . 324 11.2.17 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 11.2.18 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 11.2.19 Caret — Moving the insertion point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 11.2.20 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . 327 11.2.21 Format — Formatted write (as C printf()) . . . . . . . . . . . . . . . . . . . . . . . . . . 327 11.2.22 Insert — Text insertion commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 11.2.23 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 11.2.24 Transpose — Transposition of text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 11.2.25 Case — Case (UPPER/lower) translation . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 11.2.26 Fill — Breaking (long) text into lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 11.2.27 Undo — Undoing (edit) operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 11.2.28 EditContinue — Temporary re-binding keys. . . . . . . . . . . . . . . . . . . . . . . . . 331 11.2.29 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 11.2.30 Accelerator — Binding the keyboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 11.2.31 Line — Line oriented operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 11.2.32 Complete — Automatic completion of textual constants. . . . . . . . . . . . . 333 11.2.33 Report — Reporting events, status and errors. . . . . . . . . . . . . . . . . . . . . . . 333 11.2.34 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . 334 11.2.35 DialogItem — Dialog Item placement for graphicals . . . . . . . . . . . . . . . . . 334 11.2.36 Reset — Aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 11.2.37 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 335 11.2.38 Cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 11.2.39 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336

11.3 Class text buffer — Editable text with fragments . . . . . . . . 338

11.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 11.3.2 Cardinality — Number of elements, characters, ... . . . . . . . . . . . . . . . . . . . . 339 11.3.3 Sort — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 11.3.4 Read — Reading text from objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 11.3.5 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . 339 11.3.6 Modified — Modification of dialog and text . . . . . . . . . . . . . . . . . . . . . . . . . . 339 11.3.7 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 340 11.3.8 Language — Specialisation for specific languages . . . . . . . . . . . . . . . . . . . . . 340 11.3.9 Parse — Specialisation for specific languages . . . . . . . . . . . . . . . . . . . . . . . . . 341 11.3.10 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342 11.3.11 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . 342 11.3.12 Format — Formatted write (as C printf()) . . . . . . . . . . . . . . . . . . . . . . . . . . 342 11.3.13 Case — Case (UPPER/lower) translation . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 11.3.14 Fragment — Text fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 11.3.15 Line — Line oriented operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343 11.3.16 Stream — Handling objects as Prolog I/O streams . . . . . . . . . . . . . . . . . . 343 11.3.17 Report — Reporting events, status and errors. . . . . . . . . . . . . . . . . . . . . . . 344 11.3.18 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . 344 11.3.19 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 344 11.3.20 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344

11.4 Class regex — Regular expression for string matching . . 346

11.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346 11.4.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 347 11.4.3 Pattern — Regular expression patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 11.4.4 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . 351 11.4.5 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . 351 11.4.6 Registers — Regular expression registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 11.4.7 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 11.4.8 Compilation — Compiling representations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 352

11.5 Class fragment — Fragment (range) of a text buffer. . . . . 353

11.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353 11.5.2 Contents — Modify/query contents of object. . . . . . . . . . . . . . . . . . . . . . . . . 354 11.5.3 List — List operations (add, delete). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354 11.5.4 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 11.5.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 355 11.5.6 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 355 11.5.7 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355 11.5.8 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 355 11.5.9 Whole — Managing object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 11.5.10 Virtual — Dummy methods on super-classes . . . . . . . . . . . . . . . . . . . . . . . . 356 11.5.11 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . 356 11.5.12 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

11.6 Class style — Definition of character attributes . . . . . . . . . . 357

11.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 11.6.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 358

11.7 Class key binding — Parse keyboard events . . . . . . . . . . . . . . 360

11.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 11.7.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 362 11.7.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 11.7.4 Client — Controlled object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 11.7.5 Default — Resource default values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 11.7.6 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 11.7.7 Argument — Argument processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 11.7.8 Caret — Moving the insertion point. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 11.7.9 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 11.7.10 Binding — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 11.7.11 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . 365

11.8 Class text image — (Re)display large text fields . . . . . . . . . 366

11.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 11.8.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 367 11.8.3 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 11.8.4 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367 11.8.5 Scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 11.8.6 Update — Update Dependant properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 11.8.7 Cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . 368 11.8.8 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368 11.8.9 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 11.8.10 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . 369 11.8.11 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 370 11.8.12 Cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 11.8.13 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 11.8.14 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371

11.9 Class text margin — Annotation margin for editors . . . . . 372

11.9.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 11.9.2 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 372 11.9.3 Layout — Spatial relations between graphical objects . . . . . . . . . . . . . . . . 372 11.9.4 Fragment — Text fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 11.9.5 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 11.9.6 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

11.10 Class text cursor — Caret in an editor. . . . . . . . . . . . . . . . . . . 374

11.10.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 11.10.2 Appearance — “Look-and-feel” related aspects. . . . . . . . . . . . . . . . . . . . . . 374 11.10.3 Area — Handling size and position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 11.10.4 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 375

12 Operating System Interaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

12.1 Class file — Unix file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

12.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378 12.1.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 12.1.3 Path — File/directory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379 12.1.4 Open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380 12.1.5 Read — Reading text from objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 12.1.6 Write — Writing to files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381 12.1.7 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382 12.1.8 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 382 12.1.9 FileType — File properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 12.1.10 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . 383 12.1.11 Location — Locating points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383 12.1.12 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 12.1.13 Time — Controlling real-time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 12.1.14 Filter — Filtering file I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 12.1.15 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

12.2 Class directory — Unix directory . . . . . . . . . . . . . . . . . . . . . . . . . . 385

12.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 12.2.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 385 12.2.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 12.2.4 Contents — Modify/query contents of object. . . . . . . . . . . . . . . . . . . . . . . . . 386 12.2.5 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 12.2.6 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 12.2.7 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386 12.2.8 Time — Controlling real-time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 12.2.9 Hierarchy — Hierarchical structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 12.2.10 WorkingDirectory — Process’ or PCE working directory . . . . . . . . . . . . 387

12.3 Class stream — (Unix) I/O stream . . . . . . . . . . . . . . . . . . . . . . . . 388

12.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388 12.3.2 Open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 12.3.3 Input — Handling (process) input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 12.3.4 Output — Handling (process) output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 12.3.5 Control — Control autonomous processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390 12.3.6 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

12.4 Class process — Unix process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391

12.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 12.4.2 Command — Process’ command specification . . . . . . . . . . . . . . . . . . . . . . . . 392 12.4.3 Input — Handling (process) input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 12.4.4 Output — Handling (process) output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392 12.4.5 Status — Flags indicating current status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 12.4.6 Control — Control autonomous processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 12.4.7 Environment — Handling the process’ environment . . . . . . . . . . . . . . . . . . 394 12.4.8 Tty — Controlling the terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

12.5 Class socket — Unix socket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

12.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 12.5.2 Address — Address specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 12.5.3 Connect — Establish socket connection (IPC). . . . . . . . . . . . . . . . . . . . . . . . 397 12.5.4 Input — Handling (process) input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 12.5.5 Output — Handling (process) output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 12.5.6 Status — Flags indicating current status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 12.5.7 Authority — Access rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 12.5.8 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397 12.5.9 Server — Unix socket organisation (server). . . . . . . . . . . . . . . . . . . . . . . . . . . 398 12.5.10 Control — Control autonomous processes . . . . . . . . . . . . . . . . . . . . . . . . . . . 398

13 Customising PCE Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399

13.1 Class resource — Access to the X11 resource manager . . 400

13.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 13.1.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 401 13.1.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401 13.1.4 Context — Context I belong too, I am executed in . . . . . . . . . . . . . . . . . . . 402 13.1.5 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402 13.1.6 Resource — Interface to ~/.Xdefault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 13.1.7 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 13.1.8 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 403 13.1.9 Cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404

14 Organisation of Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

14.1 Class visual — Superclass of everything that is visible . . 406

14.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 14.1.2 Event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 14.1.3 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . 407 14.1.4 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . 408 14.1.5 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

15 Graphics Support Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411

15.1 Class point — Position in a two-dimensional space . . . . . . 412

15.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 15.1.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 15.1.3 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 15.1.4 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 412 15.1.5 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412 15.1.6 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

15.2 Class size — Width and Height of a square area . . . . . . . . . 414

15.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 15.2.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 15.2.3 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 15.2.4 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 414 15.2.5 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414 15.2.6 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

15.3 Class area — Rectangular set of pixels . . . . . . . . . . . . . . . . . . . . 416

15.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 15.3.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 15.3.3 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . 416 15.3.4 Equality — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 15.3.5 Orientation — Horizontal or vertical orientation. . . . . . . . . . . . . . . . . . . . . . 418 15.3.6 Resize — Controlling and trapping resizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 15.3.7 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 419 15.3.8 Position — Position of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 15.3.9 Side — Edges of graphicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420

15.4 Class region — Region of an area . . . . . . . . . . . . . . . . . . . . . . . . . . 421

15.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 15.4.2 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421 15.4.3 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 421 15.4.4 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422

15.5 Class colour — Colour (RGB) definition . . . . . . . . . . . . . . . . . . 423

15.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423 15.5.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 424 15.5.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 15.5.4 Kind — Category of the instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 15.5.5 X — X-window interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424 15.5.6 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 424 15.5.7 Colour — Defining and managing colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 15.5.8 3d — 3-D effect related methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 15.5.9 Grey — Colour to greylevel transformation . . . . . . . . . . . . . . . . . . . . . . . . . . 425

15.6 Class elevation — Description of an elevation . . . . . . . . . . . . 426

15.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426 15.6.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 15.6.3 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 15.6.4 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 427

15.7 Class cursor — Cursor for the pointer. . . . . . . . . . . . . . . . . . . . . 429

15.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429 15.7.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 430 15.7.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 15.7.4 X — X-window interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430 15.7.5 Appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . 431

15.8 Class font — Text font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432

15.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432 15.8.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 433 15.8.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 15.8.4 Set — Set operations (no duplicates). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 15.8.5 X — X-window interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 15.8.6 Property — Font properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434 15.8.7 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 434 15.8.8 Encoding — Character-set related behaviour . . . . . . . . . . . . . . . . . . . . . . . . . 435 15.8.9 Postscript — Generating PostScript for printing. . . . . . . . . . . . . . . . . . . . . . 435

15.9 Class image — 2-dimensional map of (coloured) pixels . . 436

15.9.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 15.9.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437 15.9.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 15.9.4 Pixel — Pixel manipulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438 15.9.5 X — X-window interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439 15.9.6 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 439 15.9.7 Colour — Defining and managing colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440 15.9.8 Area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 15.9.9 Dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . 441 15.9.10 Permission — Access rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 15.9.11 Edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 15.9.12 Organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . 442 15.9.13 Postscript — Generating PostScript for printing . . . . . . . . . . . . . . . . . . . . 442 15.9.14 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442

16 Data Organisation Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443

16.1 Class chain — Single linked list of objects . . . . . . . . . . . . . . . . 444

16.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 16.1.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 16.1.3 Cardinality — Number of elements, characters, ... . . . . . . . . . . . . . . . . . . . . 444 16.1.4 List — List operations (add, delete). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 16.1.5 Set — Set operations (no duplicates). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446 16.1.6 Index — Position in a sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 16.1.7 Order — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 16.1.8 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449 16.1.9 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . 449 16.1.10 Completion — Automatic completion of textual constants. . . . . . . . . . . 450 16.1.11 Current — Operations on ‘current’ object. . . . . . . . . . . . . . . . . . . . . . . . . . . 450 16.1.12 Cell — Direct operations on chain cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 16.1.13 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451 16.1.14 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

16.2 Class vector — Dynamic array of objects . . . . . . . . . . . . . . . . . 453

16.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 16.2.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 16.2.3 Range — Range of a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 16.2.4 List — List operations (add, delete). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 16.2.5 Element — Vector elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 16.2.6 Order — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455 16.2.7 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . 455 16.2.8 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . 455 16.2.9 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456 16.2.10 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

16.3 Class sheet — Collection of attributes . . . . . . . . . . . . . . . . . . . . . 457

16.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 16.3.2 Attributes — Object- and sheet attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 16.3.3 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457 16.3.4 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 16.3.5 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . 458 16.3.6 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 16.3.7 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459

16.4 Class hash table — One-way association table. . . . . . . . . . . . 460

16.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 16.4.2 Cardinality — Number of elements, characters, ... . . . . . . . . . . . . . . . . . . . . 460 16.4.3 Add — Adding elements to a list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 16.4.4 Lookup — (Table) lookup methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 16.4.5 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 16.4.6 Iterate — Run code on each element of a collection. . . . . . . . . . . . . . . . . . . 461 16.4.7 Search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . 461 16.4.8 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 16.4.9 Statistics — Timing, memory usage, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 16.4.10 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . 462 16.4.11 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462

16.5 Class chain table — Association with multiple values … 463

16.5.1 Add — Adding elements to a list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 16.5.2 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463

16.6 Class table — Table of association vectors . . . . . . . . . . . . . . . . 464

16.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 16.6.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 16.6.3 Add — Adding elements to a list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 16.6.4 Lookup — (Table) lookup methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 16.6.5 Delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465 16.6.6 Hashing — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . 465 16.6.7 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465

16.7 Class tuple — Pair of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

16.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 16.7.2 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

17 Primitive Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

17.1 Class constant — Constant value. . . . . . . . . . . . . . . . . . . . . . . . . . . 468

17.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 17.1.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 17.1.3 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 468

17.2 Class bool — Boolean constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

17.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 17.2.2 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469

17.3 Class char array — Array of characters . . . . . . . . . . . . . . . . . . . 470

17.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 17.3.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 470 17.3.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 17.3.4 Cardinality — Number of elements, characters, ... . . . . . . . . . . . . . . . . . . . . 471 17.3.5 Content — String content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 17.3.6 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 17.3.7 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 17.3.8 Parse — Specialisation for specific languages . . . . . . . . . . . . . . . . . . . . . . . . . 473 17.3.9 Case — Case (UPPER/lower) translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 17.3.10 Line — Line oriented operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 17.3.11 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 17.3.12 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

17.4 Class name — Atom (unique representation of a string) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

17.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 17.4.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 477 17.4.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 17.4.4 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 17.4.5 Statistics — Timing, memory usage, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 17.4.6 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478

17.5 Class string — Modifyable version of char array . . . . . . . . . 479

17.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 17.5.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 479 17.5.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 17.5.4 Content — String content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 17.5.5 Indentation — Create/analyse text indentation. . . . . . . . . . . . . . . . . . . . . . . 481 17.5.6 Format — Formatted write (as C printf()) . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 17.5.7 Case — Case (UPPER/lower) translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 17.5.8 Encoding — Character-set related behaviour . . . . . . . . . . . . . . . . . . . . . . . . . 481 17.5.9 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481

17.6 Class number — Object version of integer . . . . . . . . . . . . . . . . 483

17.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 17.6.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 17.6.3 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 17.6.4 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 17.6.5 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 484 17.6.6 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 17.6.7 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 17.6.8 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

17.7 Class real — Floating point number . . . . . . . . . . . . . . . . . . . . . . . 486

17.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 17.7.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 17.7.3 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 17.7.4 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 17.7.5 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 17.7.6 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 17.7.7 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487

17.8 Class date — Represent point in time . . . . . . . . . . . . . . . . . . . . . 488

17.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 17.8.2 DateComponent — Manipulate/query components of a date. . . . . . . . . . 488 17.8.3 Set — Set operations (no duplicates). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489 17.8.4 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 17.8.5 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 17.8.6 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 17.8.7 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

18 Objects, Relations and Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . 493

18.1 Class object — Root of inheritance tree. . . . . . . . . . . . . . . . . . . 494

18.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 18.1.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 496 18.1.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 18.1.4 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . 498 18.1.5 Compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 18.1.6 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 18.1.7 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 18.1.8 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 18.1.9 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 501 18.1.10 Resource — Interface to ~/.Xdefault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 18.1.11 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 18.1.12 Report — Reporting events, status and errors. . . . . . . . . . . . . . . . . . . . . . . 504 18.1.13 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 18.1.14 Programming — Methods to write methods . . . . . . . . . . . . . . . . . . . . . . . . . 505 18.1.15 Function — Object management for functions. . . . . . . . . . . . . . . . . . . . . . . 508 18.1.16 Reference — Object reference manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 508 18.1.17 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 18.1.18 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . 509 18.1.19 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510

18.2 Class attribute — Name-value pair for sheet or object . . 512

18.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 18.2.2 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 18.2.3 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 18.2.4 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513

18.3 Class hyper — Named binary association (hyper link) . . 514

18.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 18.3.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 18.3.3 Client — Controlled object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515 18.3.4 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 515 18.3.5 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

19 Executable Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517

19.1 Class code — Activation of code objects . . . . . . . . . . . . . . . . . . 518

19.1.1 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 19.1.2 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519

19.2 Class message — Invoke a send method . . . . . . . . . . . . . . . . . . . 521

19.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521 19.2.2 Argument — Argument processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 19.2.3 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 19.2.4 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522 19.2.5 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522

19.3 Class if — Conditional branch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524

19.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 19.3.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 19.3.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524

19.4 Class while — While-loop control structure. . . . . . . . . . . . . . . 526

19.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 19.4.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526 19.4.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

19.5 Class and — Logical connective: and . . . . . . . . . . . . . . . . . . . . . . 527

19.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 19.5.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 19.5.3 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 19.5.4 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528

19.6 Class or — Logical connective: or . . . . . . . . . . . . . . . . . . . . . . . . . . 529

19.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 19.6.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 19.6.3 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529 19.6.4 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529

19.7 Class not — Logical connective: negation . . . . . . . . . . . . . . . . . 530

19.7.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 19.7.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530 19.7.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 530

19.8 Class binary condition — Arithmetic binary conditional expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

19.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 19.8.2 Operant — Operant of expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531

19.9 Class = — Identity between two expressions . . . . . . . . . . . . . 532

19.9.1 Calculate — Compute properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 19.9.2 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

19.10 Class < — Compare expressions on less-then . . . . . . . . . . . . 533

19.10.1 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

19.11 Class > — Test equivalence of arguments . . . . . . . . . . . . . . . . 534

19.11.1 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534

19.12 Class =< — Compare expressions on less-or-equal . . . . . . 535

19.12.1 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 535

19.13 Class >= — Compare expressions on greater-or-equal . . 536

19.13.1 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

19.14 Class block — Sequence with local variables . . . . . . . . . . . . 537

19.14.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 19.14.2 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 19.14.3 Argument — Argument processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537 19.14.4 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538

19.15 Class == — Test equivalence of arguments . . . . . . . . . . . . . 539

19.15.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 19.15.2 Operant — Operant of expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 19.15.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539

19.16 Class \== — Test non-equivalence of arguments . . . . . . . 540

19.16.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 19.16.2 Operant — Operant of expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540 19.16.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 540

19.17 Class @= — Assign named reference to object . . . . . . . . . . 541

19.17.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541 19.17.2 Reference — Object reference manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 541 19.17.3 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542

19.18 Class function — Activation of function objects . . . . . . . . 543

19.18.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 19.18.2 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 19.18.3 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . 544 19.18.4 Report — Reporting events, status and errors. . . . . . . . . . . . . . . . . . . . . . . 544 19.18.5 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544 19.18.6 Programming — Methods to write methods . . . . . . . . . . . . . . . . . . . . . . . . . 545 19.18.7 Function — Object management for functions. . . . . . . . . . . . . . . . . . . . . . . 545 19.18.8 Reference — Object reference manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 546 19.18.9 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546

19.19 Class quote function — Quote functions . . . . . . . . . . . . . . . . . 547

19.19.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547 19.19.2 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547

19.20 Class ? — Invoke a get method . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

19.20.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 19.20.2 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 19.20.3 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548 19.20.4 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

19.21 Class progn — Sequence (as function) . . . . . . . . . . . . . . . . . . . 550

19.21.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 19.21.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 19.21.3 List — List operations (add, delete) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 19.21.4 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550 19.21.5 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550

19.22 Class when — Conditional function . . . . . . . . . . . . . . . . . . . . . . 552

19.22.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 19.22.2 Statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552 19.22.3 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 553

19.23 Class create — Create instance of a class . . . . . . . . . . . . . . . . 554

19.23.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 19.23.2 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 19.23.3 Argument — Argument processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554 19.23.4 Class — Defining classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555 19.23.5 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555

19.24 Class binary expression — Binary arithmetic expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556

19.24.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 19.24.2 Operant — Operant of expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556 19.24.3 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 19.24.4 Execute — Execution of dialog objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557 19.24.5 Calculate — Compute properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557

19.25 Class + — Addition expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . 558 19.26 Class - — Subtraction expression . . . . . . . . . . . . . . . . . . . . . . . . . 559

19.26.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559

19.27 Class * — Multiplication expression. . . . . . . . . . . . . . . . . . . . . . 560 19.28 Class / — Division expression. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561

20 Variables and Assigment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563

20.1 Class var — Variable (as a function). . . . . . . . . . . . . . . . . . . . . . . 564

20.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 20.1.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 565 20.1.3 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 565 20.1.4 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 20.1.5 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 20.1.6 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 566 20.1.7 Abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . 566

20.2 Class assign — Assignment statement for a var . . . . . . . . . . 567

20.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 20.2.2 Scope — Scope of variable assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 20.2.3 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 20.2.4 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568

21 Message Passing, Types and Arguments . . . . . . . . . . . . . . . . . . . 569

21.1 Class type — Argument-type specifier. . . . . . . . . . . . . . . . . . . . . 570

21.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570 21.1.2 Check — Type definition and checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 571 21.1.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 21.1.4 Components — Parts I’m built from . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 21.1.5 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 21.1.6 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 21.1.7 Argument — Argument processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 21.1.8 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 575

21.2 Class := — Name-value pair for argument-list . . . . . . . . . . . 576

21.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576 21.2.2 Value — Related value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

21.2.3 Argument — Argument processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 576

21.3 Class code vector — Argument vector. . . . . . . . . . . . . . . . . . . . . 577

21.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 21.3.2 List — List operations (add, delete). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 21.3.3 Element — Vector elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577

22 Interaction with the Host System . . . . . . . . . . . . . . . . . . . . . . . . . . 579

22.1 Class host — Host language (for communication) . . . . . . . . 580

22.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 580 22.1.2 Host — Communication with the host language . . . . . . . . . . . . . . . . . . . . . . 581 22.1.3 Callback — Calling the host-language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581

22.2 Class c — C language (for communication) . . . . . . . . . . . . . . . 583

22.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583 22.2.2 Callback — Calling the host-language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583

23 The PCE object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 585

23.1 Class pce — Environment control . . . . . . . . . . . . . . . . . . . . . . . . . . 586

23.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 586 23.1.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 587 23.1.3 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 23.1.4 Initialise — Realising constraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 587 23.1.5 Limit — Query PCE limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588 23.1.6 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 588 23.1.7 Host — Communication with the host language . . . . . . . . . . . . . . . . . . . . . . 588 23.1.8 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . 588 23.1.9 Time — Controlling real-time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589 23.1.10 Exception — Trapping and generation exceptions . . . . . . . . . . . . . . . . . . . 589 23.1.11 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591 23.1.12 Control — Control autonomous processes . . . . . . . . . . . . . . . . . . . . . . . . . . . 594 23.1.13 Environment — Handling the process’ environment . . . . . . . . . . . . . . . . . 594 23.1.14 Runtime — Runtime version relate methods . . . . . . . . . . . . . . . . . . . . . . . . 595 23.1.15 Quit — Exiting from PCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 595 23.1.16 Console — Controlling the host-language console. . . . . . . . . . . . . . . . . . . . 595 23.1.17 Statistics — Timing, memory usage, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596 23.1.18 Class — Defining classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 23.1.19 Reference — Object reference manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 598 23.1.20 Process — Process identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598 23.1.21 Postscript — Generating PostScript for printing . . . . . . . . . . . . . . . . . . . . 598 23.1.22 Version — Versions of XPCE, OS, X, ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598

24 Meta Objects — Classes, Behaviour, etc. . . . . . . . . . . . . . . . . . . 601

24.1 Class class — Represent classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 602

24.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603 24.1.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 605 24.1.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605 24.1.4 Relation — Relations, constraints, (graphical) connections. . . . . . . . . . . . 606 24.1.5 Selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . 606 24.1.6 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 606 24.1.7 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 24.1.8 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 608 24.1.9 Resource — Interface to ~/.Xdefault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 24.1.10 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 24.1.11 Statistics — Timing, memory usage, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 24.1.12 Change — Trapping object modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 609 24.1.13 Repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . 610 24.1.14 Term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610 24.1.15 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . 610 24.1.16 Cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . 611 24.1.17 Realise — Realising class definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612 24.1.18 Version — Versions of XPCE, OS, X, ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613 24.1.19 Internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613

24.2 Class class stub — Autoload stub for a class . . . . . . . . . . . . . 615

24.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615 24.2.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 615 24.2.3 Delegate — Delegation of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 24.2.4 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 24.2.5 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 24.2.6 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 616 24.2.7 Autoload — Autoloading classes and methods. . . . . . . . . . . . . . . . . . . . . . . . 616

24.3 Class behaviour — Methods, variables and attributes … 617

24.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 24.3.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 24.3.3 Whole — Managing object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617

24.4 Class variable — Instance- or local-variable. . . . . . . . . . . . . . . 618

24.4.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618 24.4.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 619 24.4.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 24.4.4 Behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 24.4.5 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 24.4.6 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620 24.4.7 File — Saving and loading files, file operations . . . . . . . . . . . . . . . . . . . . . . . 620 24.4.8 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 24.4.9 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 621 24.4.10 Storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622

24.5 Class delegate variable — Instance-variable for delegation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

24.5.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623 24.5.2 Change — Trapping object modifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623

24.6 Class method — Mapping from selector to implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624

24.6.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 24.6.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 625 24.6.3 Implementation — Implementation of behaviour . . . . . . . . . . . . . . . . . . . . . 625 24.6.4 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 24.6.5 Textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 24.6.6 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626 24.6.7 Template — Template support methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627 24.6.8 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 627

24.7 Class send method — Manipulation method. . . . . . . . . . . . . . 629

24.7.1 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629 24.7.2 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 630

24.8 Class get method — Query status method . . . . . . . . . . . . . . . . 631

24.8.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 24.8.2 Type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . 631 24.8.3 Execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631 24.8.4 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 631

24.9 Class source location — Position in a sourcefile . . . . . . . . . . 633

24.9.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 24.9.2 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 24.9.3 Path — File/directory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633 24.9.4 Location — Locating points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633

25 Language Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635

25.1 Class syntax table — Table of character types . . . . . . . . . . . 636

25.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636 25.1.2 Conversion — Conversion (for type checking) . . . . . . . . . . . . . . . . . . . . . . . . 637 25.1.3 Copy — Copying instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 25.1.4 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 25.1.5 Test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 25.1.6 Syntax — Defining a syntax (editor, parser). . . . . . . . . . . . . . . . . . . . . . . . . . 637 25.1.7 Storage — Definition of storage details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639

26 Errors and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 641

26.1 Class error — Description of some (internal) problem… 642

26.1.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642 26.1.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 26.1.3 Report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . 643 26.1.4 Manual — Support for the online reference manual. . . . . . . . . . . . . . . . . . . 644

26.2 Class program object — Object of PCE’s program world . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645

26.2.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 26.2.2 Meta — Analysing behaviour and objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 26.2.3 Debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645 26.2.4 Compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . . 647

26.3 Class vmi — Virtual machine instruction . . . . . . . . . . . . . . . . . 648

26.3.1 Oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 26.3.2 Name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648 26.3.3 Stack — Stacking order (object, goals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648

27 Predefined Global Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649

Appendix A Summary of Functional Groups . . . . . . . . . . . . . . . . . 655

A.1 3d — 3-D effect related methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 A.2 abort — Cleanup after aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 A.3 accelerator — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 655 A.4 action — Associated action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 A.5 active — Activation (greying) of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 656 A.6 add — Adding elements to a list. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 A.7 address — Address specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 A.8 animate — Behavariour to support animation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657 A.9 appearance — “Look-and-feel” related aspects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 658 A.10 apply — Applying dialog windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663 A.11 area — Handling size and position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 A.12 argument — Argument processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 A.13 attributes — Object- and sheet attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 A.14 authority — Access rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 A.15 autoload — Autoloading classes and methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667 A.16 behaviour — Definition of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 A.17 binding — Binding the keyboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 A.18 cache — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 668 A.19 calculate — Compute properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 669 A.20 callback — Calling the host-language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 A.21 cancel — Cancel event handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 A.22 cardinality — Number of elements, characters, ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 A.23 caret — Moving the insertion point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 670 A.24 case — Case (UPPER/lower) translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671 A.25 cell — Direct operations on chain cells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 A.26 change — Trapping object modifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 A.27 check — Type definition and checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 A.28 class — Defining classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 A.29 classify — Classify events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672 A.30 client — Controlled object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 A.31 colour — Defining and managing colours . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 A.32 command — Process’ command specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 A.33 compare — Comparing objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 673 A.34 compatibility — Methods for backward compatibility . . . . . . . . . . . . . . . . . . . . . . . . . 674 A.35 compilation — Compiling representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 674 A.36 complete — Automatic completion of textual constants . . . . . . . . . . . . . . . . . . . . . . . 675 A.37 completion — Automatic completion of textual constants . . . . . . . . . . . . . . . . . . . . . 675 A.38 components — Parts I’m built from . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 A.39 condition — Specifying conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 A.40 connect — Establish socket connection (IPC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 A.41 connection — Line connection graphicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675 A.42 console — Controlling the host-language console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 A.43 constraint — Maintaining constraints and relations . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 A.44 content — String content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 676 A.45 contents — Modify/query contents of object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 A.46 context — Context I belong too, I am executed in . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 A.47 control — Control autonomous processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 A.48 conversion — Conversion (for type checking). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 677 A.49 copy — Copying instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 A.50 create — Realising constraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 A.51 current — Operations on ‘current’ object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 A.52 cursor — Image of the pointer (mouse) cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679 A.53 date component — Manipulate/query components of a date . . . . . . . . . . . . . . . . . . 679 A.54 debugging — Debugging PCE programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680 A.55 default — Resource default values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 A.56 delegate — Delegation of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 A.57 delete — Text deletion commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681 A.58 dialog item — Dialog Item placement for graphicals . . . . . . . . . . . . . . . . . . . . . . . . . . 682 A.59 dimension — Dimensions of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 682 A.60 display — X-Screen oriented behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 A.61 draw — Methods for user-defined graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683 A.62 edit — Modify object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 A.63 edit continue — Temporary re-binding keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 A.64 element — Vector elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 A.65 encoding — Character-set related behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 A.66 environment — Handling the process’ environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 A.67 equality — Comparing objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 A.68 event — Event processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685 A.69 exception — Trapping and generation exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 A.70 execute — Execution of dialog objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688 A.71 feedback — Feedback for event-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 A.72 file — Saving and loading files, file operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 689 A.73 file type — File properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 A.74 fill — Breaking (long) text into lines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 A.75 filter — Filtering file I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690 A.76 focus — Focussing events to objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 A.77 font — Available fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 A.78 format — Formatted write (as C printf()) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 691 A.79 forward — Execute code, forwarding context parameters . . . . . . . . . . . . . . . . . . . . . . 692 A.80 fragment — Text fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 A.81 function — Object management for functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 A.82 grey — Colour to greylevel transformation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 A.83 group — Functional grouping of behaviour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 A.84 hashing — Caching information (speed up) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 692 A.85 hierarchy — Hierarchical structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 A.86 host — Communication with the host language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 A.87 icon — Iconising Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 A.88 implementation — Implementation of behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 A.89 indentation — Create/analyse text indentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693 A.90 index — Position in a sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 A.91 initialise — Realising constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 A.92 input — Handling (process) input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 A.93 insert — Text insertion commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694 A.94 internal — Private behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 695 A.95 interpolation — Interpolation points for smooth lines . . . . . . . . . . . . . . . . . . . . . . . . . 697 A.96 items — Manipulation and query items of a browser or menu . . . . . . . . . . . . . . . . . 697 A.97 iterate — Run code on each element of a collection . . . . . . . . . . . . . . . . . . . . . . . . . . . 697 A.98 kind — Category of the instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 A.99 label — Visible name of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698 A.100 language — Specialisation for specific languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699 A.101 layout — Spatial relations between graphical objects. . . . . . . . . . . . . . . . . . . . . . . . . 699 A.102 limit — Query PCE limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 A.103 line — Line oriented operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 701 A.104 list — List operations (add, delete) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 A.105 location — Locating points. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 702 A.106 lookup — (Table) lookup methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703 A.107 manual — Support for the online reference manual . . . . . . . . . . . . . . . . . . . . . . . . . . 703 A.108 member — Find objects (by name) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 A.109 menu — Associating (Popup) menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 A.110 meta — Analysing behaviour and objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705 A.111 modal — Event sub-loops: modal windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 A.112 mode — Modes of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 A.113 modified — Modification of dialog and text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706 A.114 modifier — Test Meta-, Shift- and Control-keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 A.115 name — Naming objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707 A.116 nodes — Nodes in a hierarchy (tree). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708 A.117 oms — Object management operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 708 A.118 open — Making objects visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 A.119 operant — Operant of expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 A.120 order — Sorting sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715 A.121 organisation — Organisation of (graphical) objects . . . . . . . . . . . . . . . . . . . . . . . . . . 716 A.122 orientation — Horizontal or vertical orientation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 A.123 output — Handling (process) output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 A.124 parse — Specialisation for specific languages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 A.125 part — Managed objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718 A.126 path — File/directory path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 A.127 pattern — Regular expression patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 A.128 permission — Access rights. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 A.129 pie — Angles, pie-slices, etc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 A.130 pixel — Pixel manipulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 A.131 pointer — Pointer related methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719 A.132 points — Reference points for a smooth line (path) . . . . . . . . . . . . . . . . . . . . . . . . . . 720 A.133 popup — Associating (Popup) menus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 A.134 position — Position of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 A.135 postscript — Generating PostScript for printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720 A.136 process — Process identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 A.137 programming — Methods to write methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 A.138 property — Font properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 A.139 quit — Exiting from PCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 A.140 range — Range of a vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 A.141 read — Reading text from objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 A.142 realise — Realising class definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 A.143 reference — Object reference manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722 A.144 registers — Regular expression registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723 A.145 relation — Relations, constraints, (graphical) connections . . . . . . . . . . . . . . . . . . . . 723 A.146 repaint — Behaviour dealing with repaint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 724 A.147 report — Reporting events, status and errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725 A.148 reset — Aborting execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 A.149 resize — Controlling and trapping resizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 726 A.150 resource — Interface to ~/.Xdefault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 A.151 root — Manipulation of the root window (background) . . . . . . . . . . . . . . . . . . . . . . 727 A.152 rotate — Rotating objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 A.153 runtime — Runtime version relate methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727 A.154 scope — Scope of variable assignments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 A.155 scroll — Controlling the ‘viewport’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 728 A.156 search — Finding plain text, regex or objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 729 A.157 selection — Manipulation and query of selections . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730 A.158 selector — Naming behaviour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 A.159 server — Unix socket organisation (server) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 A.160 set — Set operations (no duplicates) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 A.161 side — Edges of graphicals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 A.162 sort — Sorting sequences. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732 A.163 stack — Stacking order (object, goals) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 A.164 stacking — Overlapping frames and graphicals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 A.165 statement — Argument code object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 A.166 statistics — Timing, memory usage, etc.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733 A.167 status — Flags indicating current status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 A.168 storage — Definition of storage details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 734 A.169 stream — Handling objects as Prolog I/O streams . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 A.170 syntax — Defining a syntax (editor, parser) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 A.171 table — Tabular layout of graphical objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 735 A.172 template — Template support methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 A.173 term — Conversion to (Prolog) term . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 A.174 test — Test object properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736 A.175 textual — Textual representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 A.176 time — Controlling real-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 737 A.177 timing — Controlling real-time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 A.178 tip — End-points of a joint (line, arc, path) or arrow . . . . . . . . . . . . . . . . . . . . . . . . 738 A.179 transient — Support windows (e.g. prompters) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 A.180 transpose — Transposition of text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 A.181 tty — Controlling the terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 738 A.182 type — Type definition, test and conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 A.183 undo — Undoing (edit) operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 A.184 update — Update Dependant properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739 A.185 value — Related value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 740 A.186 version — Versions of XPCE, OS, X, ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 A.187 virtual — Dummy methods on super-classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 A.188 visibility — Making object (in-)visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 A.189 visualisation — Making data visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 741 A.190 whole — Managing object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 A.191 window manager — Interaction with the X-window manager. . . . . . . . . . . . . . . . . 742 A.192 window system — Connection to the underlying window system . . . . . . . . . . . . . 742 A.193 working directory — Process’ or PCE working directory . . . . . . . . . . . . . . . . . . . . . 742 A.194 write — Writing to files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742 A.195 x — X-window interaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742

Appendix B Group Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 745

Appendix C Class Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 749

Appendix D Concept Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 753

Appendix E Behaviour Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757

xxxiv XPCE Reference Manual