| Did you know ... | Search Documentation: |
| Get methods |
hello, type
?- get(Device, hello_member, Hello).
NOTE: Graphicals may also be found using device<-member.
Diagnostics: Asking for a graphical that does not exist will trap the no_behaviour error.
<-member<-graphicals’.
-graphicals <-contains|event],
condition=[code] -> graphicallocal graphical overlapping with at
for which
condition succeeds.
This methods uses a similar search technique as used by
device->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 drag-and-drop gesture.
device<-find
performs the following steps:
<-graphicals
from tail to head (i.e. starting at the
topmost graphical). For each graphical:at is given and graphical->in_event_area
fails Continue with the next graphical<-find
on the device. Return with the result if any.
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),
...
selection because it is commonly used to implement
selecting multiple graphicals by dragging a box around them. See
PceDraw.
->room ->inside<-graphicals
that has name
name. This mechanism is commonly used to address parts of a
device.
Diagnostics: Fails if no graphical with the requested name exists.
<-catch_all <-get_catch_all -name -graphicals-offset
<-y <-x <-position|event,
append_to=[chain] -> chain
If chain is supplied, this chain is filled with the matching
graphicals. This chain is chain->cleared
first. If it is @default,
a new
chain object with the
matching graphicals it returned.
The matching graphicals are the graphicals for which‘Graphical
graphical->in_event_area’succeeds.
The graphicals are stored in the chain, such that the top-most graphical
is the head of the chain.
-pointed ->in_event_area-offset
<-offset<-selected:
@on’. If
there are no such graphicals, an empty chain is returned.
->selection -selected<-offset.
<-offset<-offset.
<-offset