This is G o o g l e 's cache of http://www.cl.uni-heidelberg.de/~klenner/xpce_userguide/sec-A.1.html as retrieved on May 30, 2005 17:02:23 GMT.
G o o g l e 's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only. To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:ymUNEXC6XZQJ:www.cl.uni-heidelberg.de/~klenner/xpce_userguide/sec-A.1.html Google is not affiliated with the authors of this page nor responsible for its content.
Programming in XPCE/Prolog: Section A.1
[Up] [Contents] [Index] [Summary]
A.1 Basic predicates
This section describes the basic interface predicates. These
predicates reside in the library module `pce', which is loaded when
Prolog is started with PCE loaded on top of it.
new ( ?Reference,
+TermDescription )
Create a PCE object from TermDescription and either unify an
integer reference (e.g. @2535252 )
with Reference or give the new object the provided atomic
reference (e.g. @my_diagram ).
The argument TermDescription is a complex term of the form
Functor(...InitArg...) . Functor denotes the class from which
to create an object and InitArg are the initialisation
arguments for the object creation. Each InitArg is translated
to a PCE data object and may be an integer, atom (translated into a PCE
name object), object reference (e.g. @2535252
or @pce ) or complex term. When
the latter is encountered, it is transformed into a PCE object just as TermDescription .
Finally, an argument may be of the form new(+TermDescription) or
new(?Reference, +TermDescription) . The first forces an atom to be
translated into an instance of the named class instead of a PCE name
object. The latter provides access to the reference of the object
provided as an argument. The following sequences illustrate this. Each
of them provides the same object structure in PCE.
1 ?- new(@icon_viewer, dialog('Icon Viewer 1')),
new(P, picture),
send(P, below, @icon_viewer),
new(TI, text_item(name, '',
and(message(P, display, @arg1),
message(@arg1, recogniser,
new(m