gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.ConstraintGuide

Contents

- Exported types
- Methods
  - getMaxSize
  - getMinSize
  - getName
  - getNatSize
  - getStrength
  - new
  - setMaxSize
  - setMinSize
  - setName
  - setNatSize
  - setStrength
- Properties
  - maxHeight
  - maxWidth
  - minHeight
  - minWidth
  - name
  - natHeight
  - natWidth
  - strength

Description

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

- newtype ConstraintGuide = ConstraintGuide (ManagedPtr ConstraintGuide)
- class (GObject o, IsDescendantOf ConstraintGuide o) => IsConstraintGuide o
- toConstraintGuide :: (MonadIO m, IsConstraintGuide o) => o -> m ConstraintGuide
- constraintGuideGetMaxSize :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> m (Int32, Int32)
- constraintGuideGetMinSize :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> m (Int32, Int32)
- constraintGuideGetName :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> m (Maybe Text)
- constraintGuideGetNatSize :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> m (Int32, Int32)
- constraintGuideGetStrength :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> m ConstraintStrength
- constraintGuideNew :: (HasCallStack, MonadIO m) => m ConstraintGuide
- constraintGuideSetMaxSize :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> Int32 -> Int32 -> m ()
- constraintGuideSetMinSize :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> Int32 -> Int32 -> m ()
- constraintGuideSetName :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> Maybe Text -> m ()
- constraintGuideSetNatSize :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> Int32 -> Int32 -> m ()
- constraintGuideSetStrength :: (HasCallStack, MonadIO m, IsConstraintGuide a) => a -> ConstraintStrength -> m ()
- constructConstraintGuideMaxHeight :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getConstraintGuideMaxHeight :: (MonadIO m, IsConstraintGuide o) => o -> m Int32
- setConstraintGuideMaxHeight :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m ()
- constructConstraintGuideMaxWidth :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getConstraintGuideMaxWidth :: (MonadIO m, IsConstraintGuide o) => o -> m Int32
- setConstraintGuideMaxWidth :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m ()
- constructConstraintGuideMinHeight :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getConstraintGuideMinHeight :: (MonadIO m, IsConstraintGuide o) => o -> m Int32
- setConstraintGuideMinHeight :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m ()
- constructConstraintGuideMinWidth :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getConstraintGuideMinWidth :: (MonadIO m, IsConstraintGuide o) => o -> m Int32
- setConstraintGuideMinWidth :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m ()
- clearConstraintGuideName :: (MonadIO m, IsConstraintGuide o) => o -> m ()
- constructConstraintGuideName :: (IsConstraintGuide o, MonadIO m) => Text -> m (GValueConstruct o)
- getConstraintGuideName :: (MonadIO m, IsConstraintGuide o) => o -> m (Maybe Text)
- setConstraintGuideName :: (MonadIO m, IsConstraintGuide o) => o -> Text -> m ()
- constructConstraintGuideNatHeight :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getConstraintGuideNatHeight :: (MonadIO m, IsConstraintGuide o) => o -> m Int32
- setConstraintGuideNatHeight :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m ()
- constructConstraintGuideNatWidth :: (IsConstraintGuide o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getConstraintGuideNatWidth :: (MonadIO m, IsConstraintGuide o) => o -> m Int32
- setConstraintGuideNatWidth :: (MonadIO m, IsConstraintGuide o) => o -> Int32 -> m ()
- constructConstraintGuideStrength :: (IsConstraintGuide o, MonadIO m) => ConstraintStrength -> m (GValueConstruct o)
- getConstraintGuideStrength :: (MonadIO m, IsConstraintGuide o) => o -> m ConstraintStrength
- setConstraintGuideStrength :: (MonadIO m, IsConstraintGuide o) => o -> ConstraintStrength -> m ()

# Exported types

newtype ConstraintGuide Source #

Memory-managed wrapper type.

Constructors

ConstraintGuide (ManagedPtr ConstraintGuide) |

#### Instances

Instances details

Eq ConstraintGuide Source # |
Instance details Defined in GI.Gtk.Objects.ConstraintGuide Methods (==) :: ConstraintGuide -> ConstraintGuide -> Bool Source # (/=) :: ConstraintGuide -> ConstraintGuide -> Bool Source #
GObject ConstraintGuide Source # |
Instance details Defined in GI.Gtk.Objects.ConstraintGuide
ManagedPtrNewtype ConstraintGuide Source # |
Instance details Defined in GI.Gtk.Objects.ConstraintGuide Methods toManagedPtr :: ConstraintGuide -> ManagedPtr ConstraintGuide Source #
TypedObject ConstraintGuide Source # |
Instance details Defined in GI.Gtk.Objects.ConstraintGuide Methods glibType :: IO GType Source #
HasParentTypes ConstraintGuide Source # |
Instance details Defined in GI.Gtk.Objects.ConstraintGuide
IsGValue (Maybe ConstraintGuide) Source # | Convert `ConstraintGuide` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.ConstraintGuide Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe ConstraintGuide -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe ConstraintGuide) Source #
type ParentTypes ConstraintGuide Source # |
Instance details Defined in GI.Gtk.Objects.ConstraintGuide type ParentTypes ConstraintGuide = '[Object, ConstraintTarget]

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

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getMaxSize, getMinSize, getName, getNatSize, getProperty, getQdata, getStrength.

#### Setters

setData, setDataFull, setMaxSize, setMinSize, setName, setNatSize, setProperty, setStrength.

## getMaxSize

constraintGuideGetMaxSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsConstraintGuide a) |
=> a | `guide`: a `GtkConstraintGuide` object
-> m (Int32, Int32) |

Gets the maximum size of `guide`.

## getMinSize

constraintGuideGetMinSize Source #

Arguments

:: (HasCallStack, MonadIO m, IsConstraintGuide a) |
=> a | `guide`: a `GtkConstraintGuide` object
-> m (Int32, Int32) |

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
-> m (Int32, Int32) |

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 ]