gi-clutter-1.0.2: clutter GObject bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Clutter.Objects.AlignConstraint

Description

AlignConstraint is an opaque structure whose members cannot be directly accesses

Since: 1.4

Synopsis

Exported types

class (GObject o, IsDescendantOf AlignConstraint o) => IsAlignConstraint o Source #

Type class for types which can be safely cast to AlignConstraint, for instance with toAlignConstraint.

Instances

Instances details
(GObject o, IsDescendantOf AlignConstraint o) => IsAlignConstraint o Source # 
Instance details

Defined in GI.Clutter.Objects.AlignConstraint

toAlignConstraint :: (MonadIO m, IsAlignConstraint o) => o -> m AlignConstraint Source #

Cast to AlignConstraint, for types for which this is known to be safe. For general casts, use castTo.

Methods

getAlignAxis

alignConstraintGetAlignAxis Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignConstraint a) 
=> a

align: a AlignConstraint

-> m AlignAxis

Returns: the alignment axis

Retrieves the value set using alignConstraintSetAlignAxis

Since: 1.4

getFactor

alignConstraintGetFactor Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignConstraint a) 
=> a

align: a AlignConstraint

-> m Float

Returns: the alignment factor

Retrieves the factor set using alignConstraintSetFactor

Since: 1.4

getSource

alignConstraintGetSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignConstraint a) 
=> a

align: a AlignConstraint

-> m Actor

Returns: the Actor used as the source of the alignment

Retrieves the source of the alignment

Since: 1.4

new

alignConstraintNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsActor a) 
=> Maybe a

source: the Actor to use as the source of the alignment, or Nothing

-> AlignAxis

axis: the axis to be used to compute the alignment

-> Float

factor: the alignment factor, between 0.0 and 1.0

-> m AlignConstraint

Returns: the newly created AlignConstraint

Creates a new constraint, aligning a Actor's position with regards of the size of the actor to source, with the given alignment factor

Since: 1.4

setAlignAxis

alignConstraintSetAlignAxis Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignConstraint a) 
=> a

align: a AlignConstraint

-> AlignAxis

axis: the axis to which the alignment refers to

-> m () 

Sets the axis to which the alignment refers to

Since: 1.4

setFactor

alignConstraintSetFactor Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignConstraint a) 
=> a

align: a AlignConstraint

-> Float

factor: the alignment factor, between 0.0 and 1.0

-> m () 

Sets the alignment factor of the constraint

The factor depends on the AlignConstraint:align-axis property and it is a value between 0.0 (meaning left, when AlignConstraint:align-axis is set to AlignAxisXAxis; or meaning top, when AlignConstraint:align-axis is set to AlignAxisYAxis) and 1.0 (meaning right, when AlignConstraint:align-axis is set to AlignAxisXAxis; or meaning bottom, when AlignConstraint:align-axis is set to AlignAxisYAxis). A value of 0.5 aligns in the middle in either cases

Since: 1.4

setSource

alignConstraintSetSource Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlignConstraint a, IsActor b) 
=> a

align: a AlignConstraint

-> Maybe b

source: a Actor, or Nothing to unset the source

-> m () 

Sets the source of the alignment constraint

Since: 1.4

Properties

alignAxis

The axis to be used to compute the alignment

Since: 1.4

constructAlignConstraintAlignAxis :: (IsAlignConstraint o, MonadIO m) => AlignAxis -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “align-axis” property. This is rarely needed directly, but it is used by new.

getAlignConstraintAlignAxis :: (MonadIO m, IsAlignConstraint o) => o -> m AlignAxis Source #

Get the value of the “align-axis” property. When overloading is enabled, this is equivalent to

get alignConstraint #alignAxis

setAlignConstraintAlignAxis :: (MonadIO m, IsAlignConstraint o) => o -> AlignAxis -> m () Source #

Set the value of the “align-axis” property. When overloading is enabled, this is equivalent to

set alignConstraint [ #alignAxis := value ]

factor

The alignment factor, as a normalized value between 0.0 and 1.0

The factor depends on the AlignConstraint:align-axis property: with an align-axis value of AlignAxisXAxis, 0.0 means left and 1.0 means right; with a value of AlignAxisYAxis, 0.0 means top and 1.0 means bottom.

Since: 1.4

constructAlignConstraintFactor :: (IsAlignConstraint o, MonadIO m) => Float -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “factor” property. This is rarely needed directly, but it is used by new.

getAlignConstraintFactor :: (MonadIO m, IsAlignConstraint o) => o -> m Float Source #

Get the value of the “factor” property. When overloading is enabled, this is equivalent to

get alignConstraint #factor

setAlignConstraintFactor :: (MonadIO m, IsAlignConstraint o) => o -> Float -> m () Source #

Set the value of the “factor” property. When overloading is enabled, this is equivalent to

set alignConstraint [ #factor := value ]

source

The Actor used as the source for the alignment.

The Actor must not be a child or a grandchild of the actor using the constraint.

Since: 1.4

clearAlignConstraintSource :: (MonadIO m, IsAlignConstraint o) => o -> m () Source #

Set the value of the “source” property to Nothing. When overloading is enabled, this is equivalent to

clear #source

constructAlignConstraintSource :: (IsAlignConstraint o, MonadIO m, IsActor a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “source” property. This is rarely needed directly, but it is used by new.

getAlignConstraintSource :: (MonadIO m, IsAlignConstraint o) => o -> m Actor Source #

Get the value of the “source” property. When overloading is enabled, this is equivalent to

get alignConstraint #source

setAlignConstraintSource :: (MonadIO m, IsAlignConstraint o, IsActor a) => o -> a -> m () Source #

Set the value of the “source” property. When overloading is enabled, this is equivalent to

set alignConstraint [ #source := value ]