Class: Clutter::SnapConstraint

Inherits:
Constraint show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from ActorMeta

#actor, #actor=, #enabled, #enabled=, #enabled?, #name, #name=

Constructor Details

#initialize(source, from_edge, to_edge, offset) ⇒ Clutter::Constraint

Creates a new Clutter::SnapConstraint that will snap a #ClutterActor to the edge of source, with the given offset.

Parameters:

  • source (Clutter::Actor)

    the Clutter::Actor to use as the source of the constraint, or nil

  • from_edge (Clutter::SnapEdge)

    the edge of the actor to use in the constraint

  • to_edge (Clutter::SnapEdge)

    the edge of source to use in the constraint

  • offset (Clutter::gfloat)

    the offset to apply to the constraint, in pixels

Instance Method Details

#from_edgeClutter::SnapEdge

The edge of the Clutter::Actor that should be snapped

Returns:

#from_edge=(from_edge) ⇒ Clutter::SnapEdge

The edge of the Clutter::Actor that should be snapped

Parameters:

Returns:

#get_edges(from_edge, to_edge) ⇒ nil

Retrieves the edges used by the constraint

Parameters:

Returns:

  • (nil)

#offsetClutter::gfloat

The offset, in pixels, between Clutter::SnapConstraint:from-edge and Clutter::SnapConstraint:to-edge

Returns:

  • (Clutter::gfloat)

    offset

#offset=(offset) ⇒ Clutter::gfloat

The offset, in pixels, between Clutter::SnapConstraint:from-edge and Clutter::SnapConstraint:to-edge

Parameters:

  • offset (Clutter::gfloat)

Returns:

  • (Clutter::gfloat)

    offset

  • (Clutter::gfloat)

    offset

#set_edges(from_edge, to_edge) ⇒ nil

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 Clutter::SnapConstraint:source property.

Parameters:

Returns:

  • (nil)

#sourceClutter::Actor

The Clutter::Actor used as the source for the constraint

Returns:

#source=(source) ⇒ Clutter::Actor

The Clutter::Actor used as the source for the constraint

Parameters:

Returns:

#to_edgeClutter::SnapEdge

The edge of the Clutter::SnapConstraint:source that should be snapped

Returns:

#to_edge=(to_edge) ⇒ Clutter::SnapEdge

The edge of the Clutter::SnapConstraint:source that should be snapped

Parameters:

Returns: