3.1 Global objects

3.1.1 @_not_returned

Internally used constant. See frame<-confirm.

3.1.2 @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.

See also
- class ?
- @event
- @receiver
- @arg10
- @arg9
- @arg8
- @arg7
- @arg6
- @arg5
- @arg4
- @arg3
- @arg2

3.1.3 @arg10

Inherits description from: @arg1

See also
@arg1

3.1.4 @arg2

Inherits description from: @arg1

See also
@arg1

3.1.5 @arg3

Inherits description from: @arg1

See also
@arg1

3.1.6 @arg4

Inherits description from: @arg1

See also
@arg1

3.1.7 @arg5

Inherits description from: @arg1

See also
@arg1

3.1.8 @arg6

Inherits description from: @arg1

See also
@arg1

3.1.9 @arg7

Inherits description from: @arg1

See also
@arg1

3.1.10 @arg8

Inherits description from: @arg1

See also
@arg1

3.1.11 @arg9

Inherits description from: @arg1

See also
@arg1

3.1.12 @black_image

Image filled with only 1's

Predefined images of image<-kind of 16x16 pixels. These bitmaps are frequently used to fill graphicals. See‘graphical ->fill’.

See also
topic Fill Patterns

3.1.13 @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.

3.1.14 @class_default

Instance of class constant used for access to instance variables guarded by a class_variable object. The object-allocation will any slot for which a class-variable is defined to this slot. First access to the slot will replace the value with the current binding of the class-variable. See also object<-class_variable_value, object->obtain_class_variables.

3.1.15 @classes

Hash-table of class-name --> Class

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.

3.1.16 @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 Default specifications:

text_cursor.colour: when(@colour_display, red, black)

See also display<-visual_type, display<-depth.

3.1.17 @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.

3.1.18 @cursor_names

Map X-cursor names on X-cursor id's

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.

See also
- display-cursors
- class cursor

3.1.19 @cursors

A hash_table object that maps cursor names onto cursor objects. Used by cursor<-lookup and cursor<-convert.

3.1.20 @default

Represents default value

The constant 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).
See also
- @nil
- topic Types

3.1.21 @display

Access to the X-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.

See also
- class visual
- class display

3.1.22 @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.

3.1.23 @elevations

Hash_table object maintained by class elevation. It maps elevation<-names onto elevation objects.

3.1.24 @end_of_file

Used by class tokeniser to signal end-of-file.

3.1.25 @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

See also
tool Errors

3.1.26 @event

Currently processed 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.

See also
- event->post
- @arg1
- window-current_event
- class event

3.1.27 @event_tree

SubsuMption hierarchy of event-types

@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.

See also
- class handler
- event->is_a
- class event_tree

3.1.28 @fonts

Hash-table with defined 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 display.font_families using the method display->load_fonts.
See also
- class font
- display.font_list

3.1.29 @grabbed_windows

Chain object holding windows that claimed the pointer using window->grab_pointer. New windows are added to the front of this chain. A call to window->grab_pointer re-enables the grabbing on the previous window.

3.1.30 @grey12_image

Image filled with 12% 1's

Inherits description from: @black_image

See also
topic Fill Patterns

3.1.31 @grey25_image

Image filled with 25% 1's

Inherits description from: @black_image

See also
topic Fill Patterns

3.1.32 @grey50_image

Image filled with 50% 1's

Inherits description from: @black_image

See also
topic Fill Patterns

3.1.33 @grey75_image

Image filled with 75% 1's

Inherits description from: @black_image

See also
topic Fill Patterns

3.1.34 @images

Table of reusable images

The hash_table @images maps names of images into images. It is used by image->initialise. 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.

See also
- image-name
- image->initialise

3.1.35 @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.

See also
key_binding<-convert

3.1.36 @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.

3.1.37 @nil

Represents nothing

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.

See also
@default

3.1.38 @not_obtained

Used by class_variable objects to indicate the real value has not yet been resolved.

3.1.39 @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.

See also
image-kind

3.1.40 @on

Inherits description from: @off

3.1.41 @open_sockets

This chain represents all sockets that are currently open. It is maintained by socket->listen, socket->connect and socket->close.

Its primary usage is to enable XPCE to do a graceful shutdown of all active network connections at pce->die.

3.1.42 @pce

Access to the overall PCE environment

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.

See also
class pce

3.1.43 @prolog

Access to Prolog (notably callback)

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. See also @pce.

See also
- class host
- topic Calling Prolog

3.1.44 @receiver

Receiver of event/message

The var object @receiver refers to the object that is receiving an event. A new value of receiver is pushed if a message is invoked from a gesture object or handler object. In this case, @receiver refers to the (graphical) object that received the event. See handler->event, @event and constant<-receiver.

@receiver is commonly used to create reusable gestures. For example:

?- new(@clicked,
           click_gesture(left, '', single,
                                         message(@receiver,
                                                         clicked))).

If this recogniser object is associated to a graphical object, the object will receive a ->clicked message when the user left-clicks the object.

See also
@arg1

3.1.45 @reportee

The var object @reportee is managed by visual->report for avoiding cycles, as well as be able to graphical->alert the origin of the message. It contans a chain object. The chain<-head is the original receiver of the visual->report, the other elements are visuals visited while trying to deliver the message.

See also
visual->report

3.1.46 @running_processes

Chain holding all running inferior 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.

See also
process->kill

3.1.47 @space_rubber

Rubber object normally used to render spaces. Attributes:

`rubber<-stretch`: 100
`rubber<-shrink`: 1
`rubber<-level`: 1
`rubber<-linebreak`: allow.

Used by tbox<-space.

3.1.48 @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.

3.1.49 @white_image

Image filled with only 0's

Inherits description from: @black_image

See also
topic Fill Patterns