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
graphical<-connected’and
class connect_gesture.
The drawing program PceDraw exploits connections.
<-fixed_from
and connection<-fixed_to
are used internally to represent that the handles the connection is
related to (connection<-from_handle
and
connection<-to_handle)
should not be reconsidered if the connection is updated. These values
are normally @off
and set to @on
by connection->initialise
if the corresponding handle is specified.-fixed_from<-connections, graphical<-connected,‘connection
connection<-opposite’.<-fixed_from/fixed_to,
this handle is or is not updated if either of the connected graphicals
is moved or changed otherwise.-from-from_handle
<-is_displayed
yields @off,
undisplay the connection.
<-from_handle
and connection<-to_handle
if these are not fixed
->points
if necessary.
->points.<-from;
the second connection<-to. Link
is a link object
describing the handles and characteristics of the line (graphical<-pen, joint<-arrows,
...). The two name arguments define the name of the handle to connect to
at the connection<-from
resp. connection<-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.
->compute. connection->points
is the only method to change a connection as all other methods are
discarded by a redefined connection->geometry
method.
connection->points
may be used to manage a label for the connection.
<-arrows, graphical<-texture
and graphical<-pen
from the connection<-link and update
accordingly.
<-from
or connection<-to,
return the other end. Fail silently otherwise.