A constraint snapping two actors together
<clutter-snap-constraint>
is a constraint the snaps the edges of
two actors together, expanding the actor's allocation if necessary.
An offset can be applied to the constraint, to provide spacing.
<clutter-snap-constraint>
is available since Clutter 1.6
<clutter-actor>
) (from_edge <clutter-snap-edge>
) (to_edge <clutter-snap-edge>
) (offset float
) ⇒ (ret <clutter-constraint>
)Creates a new
<clutter-snap-constraint>
that will snap a<clutter-actor>
to the edge of source, with the given offset.
- source
- the
<clutter-actor>
to use as the source of the constraint, or ‘#f
’.- from-edge
- the edge of the actor to use in the constraint
- to-edge
- the edge of source to use in the constraint
- offset
- the offset to apply to the constraint, in pixels
- ret
- the newly created
<clutter-snap-constraint>
Since 1.6
<clutter-snap-constraint>
) (source <clutter-actor>
)Sets the source
<clutter-actor>
for the constraint
- constraint
- a
<clutter-snap-constraint>
- source
- a
<clutter-actor>
, or ‘#f
’ to unset the source.Since 1.6
<clutter-snap-constraint>
) ⇒ (ret <clutter-actor>
)Retrieves the
<clutter-actor>
set usingclutter-snap-constraint-set-source
- constraint
- a
<clutter-snap-constraint>
- ret
- a pointer to the source actor.
Since 1.6
<clutter-snap-constraint>
) (from_edge <clutter-snap-edge>
) (to_edge <clutter-snap-edge>
)Sets the edges to be used by the constraint
The from-edge is the edge on the
<clutter-actor>
to which constraint has been added. The to-edge is the edge of the<clutter-actor>
inside the<"source">
property.
- constraint
- a
<clutter-snap-constraint>
- from-edge
- the edge on the actor
- to-edge
- the edge on the source
Since 1.6
<clutter-snap-constraint>
) ⇒ (from_edge <clutter-snap-edge>
) (to_edge <clutter-snap-edge>
)Retrieves the edges used by the constraint
- constraint
- a
<clutter-snap-constraint>
- from-edge
- return location for the actor's edge, or ‘
#f
’.- to-edge
- return location for the source's edge, or ‘
#f
’.Since 1.6