gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.ConstraintGuide

Description

A GtkConstraintGuide is an invisible layout element in a GtkConstraintLayout.

The GtkConstraintLayout treats guides like widgets. They can be used as the source or target of a GtkConstraint.

Guides have a minimum, maximum and natural size. Depending on the constraints that are applied, they can act like a guideline that widgets can be aligned to, or like *flexible space*.

Unlike a GtkWidget, a GtkConstraintGuide will not be drawn.

Synopsis

Exported types

class (GObject o, IsDescendantOf ConstraintGuide o) => IsConstraintGuide o Source #

Type class for types which can be safely cast to ConstraintGuide, for instance with toConstraintGuide.

Instances

Instances details
(GObject o, IsDescendantOf ConstraintGuide o) => IsConstraintGuide o Source # 
Instance details

Defined in GI.Gtk.Objects.ConstraintGuide

toConstraintGuide :: (MonadIO m, IsConstraintGuide o) => o -> m ConstraintGuide Source #

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

Methods

getMaxSize

constraintGuideGetMaxSize Source #

Arguments

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

guide: a GtkConstraintGuide object

-> Int32

width: return location for the maximum width

-> Int32

height: return location for the maximum height

-> m () 

Gets the maximum size of guide.

getMinSize

constraintGuideGetMinSize Source #

Arguments

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

guide: a GtkConstraintGuide object

-> Int32

width: return location for the minimum width

-> Int32

height: return location for the minimum height

-> m () 

Gets the minimum size of guide.

getName

constraintGuideGetName Source #

Arguments

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

guide: a GtkConstraintGuide

-> m (Maybe Text)

Returns: the name of the guide

Retrieves the name set using constraintGuideSetName.

getNatSize

constraintGuideGetNatSize Source #

Arguments

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

guide: a GtkConstraintGuide object

-> Int32

width: return location for the natural width

-> Int32

height: return location for the natural height

-> m () 

Gets the natural size of guide.

getStrength

constraintGuideGetStrength Source #

Arguments

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

guide: a GtkConstraintGuide

-> m ConstraintStrength

Returns: the strength of the constraint on the natural size

Retrieves the strength set using constraintGuideSetStrength.

new

constraintGuideNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ConstraintGuide

Returns: a new GtkConstraintGuide object.

Creates a new GtkConstraintGuide object.

setMaxSize

constraintGuideSetMaxSize Source #

Arguments

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

guide: a GtkConstraintGuide object

-> Int32

width: the new maximum width, or -1 to not change it

-> Int32

height: the new maximum height, or -1 to not change it

-> m () 

Sets the maximum size of guide.

If guide is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

setMinSize

constraintGuideSetMinSize Source #

Arguments

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

guide: a GtkConstraintGuide object

-> Int32

width: the new minimum width, or -1 to not change it

-> Int32

height: the new minimum height, or -1 to not change it

-> m () 

Sets the minimum size of guide.

If guide is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

setName

constraintGuideSetName Source #

Arguments

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

guide: a GtkConstraintGuide

-> Maybe Text

name: a name for the guide

-> m () 

Sets a name for the given GtkConstraintGuide.

The name is useful for debugging purposes.

setNatSize

constraintGuideSetNatSize Source #

Arguments

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

guide: a GtkConstraintGuide object

-> Int32

width: the new natural width, or -1 to not change it

-> Int32

height: the new natural height, or -1 to not change it

-> m () 

Sets the natural size of guide.

If guide is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

setStrength

constraintGuideSetStrength Source #

Arguments

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

guide: a GtkConstraintGuide

-> ConstraintStrength

strength: the strength of the constraint

-> m () 

Sets the strength of the constraint on the natural size of the given GtkConstraintGuide.

Properties

maxHeight

The maximum height of the guide.

constructConstraintGuideMaxHeight :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getConstraintGuideMaxHeight :: (MonadIO m, IsConstraintGuide o) => o -> m Int32 Source #

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

get constraintGuide #maxHeight

setConstraintGuideMaxHeight :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m () Source #

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

set constraintGuide [ #maxHeight := value ]

maxWidth

The maximum width of the guide.

constructConstraintGuideMaxWidth :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getConstraintGuideMaxWidth :: (MonadIO m, IsConstraintGuide o) => o -> m Int32 Source #

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

get constraintGuide #maxWidth

setConstraintGuideMaxWidth :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m () Source #

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

set constraintGuide [ #maxWidth := value ]

minHeight

The minimum height of the guide.

constructConstraintGuideMinHeight :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getConstraintGuideMinHeight :: (MonadIO m, IsConstraintGuide o) => o -> m Int32 Source #

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

get constraintGuide #minHeight

setConstraintGuideMinHeight :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m () Source #

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

set constraintGuide [ #minHeight := value ]

minWidth

The minimum width of the guide.

constructConstraintGuideMinWidth :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getConstraintGuideMinWidth :: (MonadIO m, IsConstraintGuide o) => o -> m Int32 Source #

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

get constraintGuide #minWidth

setConstraintGuideMinWidth :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m () Source #

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

set constraintGuide [ #minWidth := value ]

name

A name that identifies the GtkConstraintGuide, for debugging.

clearConstraintGuideName :: (MonadIO m, IsConstraintGuide o) => o -> m () Source #

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

clear #name

constructConstraintGuideName :: (IsConstraintGuide o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getConstraintGuideName :: (MonadIO m, IsConstraintGuide o) => o -> m (Maybe Text) Source #

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

get constraintGuide #name

setConstraintGuideName :: (MonadIO m, IsConstraintGuide o) => o -> Text -> m () Source #

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

set constraintGuide [ #name := value ]

natHeight

The preferred, or natural, height of the guide.

constructConstraintGuideNatHeight :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getConstraintGuideNatHeight :: (MonadIO m, IsConstraintGuide o) => o -> m Int32 Source #

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

get constraintGuide #natHeight

setConstraintGuideNatHeight :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m () Source #

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

set constraintGuide [ #natHeight := value ]

natWidth

The preferred, or natural, width of the guide.

constructConstraintGuideNatWidth :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getConstraintGuideNatWidth :: (MonadIO m, IsConstraintGuide o) => o -> m Int32 Source #

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

get constraintGuide #natWidth

setConstraintGuideNatWidth :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m () Source #

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

set constraintGuide [ #natWidth := value ]

strength

The GtkConstraintStrength to be used for the constraint on the natural size of the guide.

constructConstraintGuideStrength :: (IsConstraintGuide o, MonadIO m) => ConstraintStrength -> m (GValueConstruct o) Source #

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

getConstraintGuideStrength :: (MonadIO m, IsConstraintGuide o) => o -> m ConstraintStrength Source #

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

get constraintGuide #strength

setConstraintGuideStrength :: (MonadIO m, IsConstraintGuide o) => o -> ConstraintStrength -> m () Source #

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

set constraintGuide [ #strength := value ]