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.CenterLayout

Contents

- Exported types
- Methods
  - getBaselinePosition
  - getCenterWidget
  - getEndWidget
  - getOrientation
  - getShrinkCenterLast
  - getStartWidget
  - new
  - setBaselinePosition
  - setCenterWidget
  - setEndWidget
  - setOrientation
  - setShrinkCenterLast
  - setStartWidget
- Properties
  - shrinkCenterLast

Description

Manages up to three children.

The start widget is allocated at the start of the layout (left in left-to-right locales and right in right-to-left ones), and the end widget at the end.

The center widget is centered regarding the full width of the layout's.

Synopsis

- newtype CenterLayout = CenterLayout (ManagedPtr CenterLayout)
- class (GObject o, IsDescendantOf CenterLayout o) => IsCenterLayout o
- toCenterLayout :: (MonadIO m, IsCenterLayout o) => o -> m CenterLayout
- centerLayoutGetBaselinePosition :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> m BaselinePosition
- centerLayoutGetCenterWidget :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> m (Maybe Widget)
- centerLayoutGetEndWidget :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> m (Maybe Widget)
- centerLayoutGetOrientation :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> m Orientation
- centerLayoutGetShrinkCenterLast :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> m Bool
- centerLayoutGetStartWidget :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> m (Maybe Widget)
- centerLayoutNew :: (HasCallStack, MonadIO m) => m CenterLayout
- centerLayoutSetBaselinePosition :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> BaselinePosition -> m ()
- centerLayoutSetCenterWidget :: (HasCallStack, MonadIO m, IsCenterLayout a, IsWidget b) => a -> Maybe b -> m ()
- centerLayoutSetEndWidget :: (HasCallStack, MonadIO m, IsCenterLayout a, IsWidget b) => a -> Maybe b -> m ()
- centerLayoutSetOrientation :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> Orientation -> m ()
- centerLayoutSetShrinkCenterLast :: (HasCallStack, MonadIO m, IsCenterLayout a) => a -> Bool -> m ()
- centerLayoutSetStartWidget :: (HasCallStack, MonadIO m, IsCenterLayout a, IsWidget b) => a -> Maybe b -> m ()
- constructCenterLayoutShrinkCenterLast :: (IsCenterLayout o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCenterLayoutShrinkCenterLast :: (MonadIO m, IsCenterLayout o) => o -> m Bool
- setCenterLayoutShrinkCenterLast :: (MonadIO m, IsCenterLayout o) => o -> Bool -> m ()

# Exported types

newtype CenterLayout Source #

Memory-managed wrapper type.

Constructors

CenterLayout (ManagedPtr CenterLayout) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf CenterLayout o) => IsCenterLayout o Source #

Type class for types which can be safely cast to `CenterLayout`, for instance with `toCenterLayout`.

#### Instances

Instances details

(GObject o, IsDescendantOf CenterLayout o) => IsCenterLayout o Source # |
Instance details Defined in GI.Gtk.Objects.CenterLayout

toCenterLayout :: (MonadIO m, IsCenterLayout o) => o -> m CenterLayout Source #

Cast to `CenterLayout`, 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

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

#### Getters

getBaselinePosition, getCenterWidget, getData, getEndWidget, getLayoutChild, getOrientation, getProperty, getQdata, getRequestMode, getShrinkCenterLast, getStartWidget, getWidget.

#### Setters

setBaselinePosition, setCenterWidget, setData, setDataFull, setEndWidget, setOrientation, setProperty, setShrinkCenterLast, setStartWidget.

## getBaselinePosition

centerLayoutGetBaselinePosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> m BaselinePosition | Returns: The current baseline position of `self`.

Returns the baseline position of the layout.

## getCenterWidget

centerLayoutGetCenterWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> m (Maybe Widget) | Returns: the current center widget of `self`

Returns the center widget of the layout.

## getEndWidget

centerLayoutGetEndWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> m (Maybe Widget) | Returns: the current end widget of `self`

Returns the end widget of the layout.

## getOrientation

centerLayoutGetOrientation Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> m Orientation | Returns: The current orientation of `self`

Gets the current orienration of the layout manager.

## getShrinkCenterLast

centerLayoutGetShrinkCenterLast Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> m Bool | Returns: whether to shrink the center widget after others

Gets whether `self` shrinks the center widget after other children.

Since: 4.12

## getStartWidget

centerLayoutGetStartWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> m (Maybe Widget) | Returns: The current start widget of `self`

Returns the start widget of the layout.

## new

centerLayoutNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m CenterLayout | Returns: the newly created `GtkCenterLayout`

Creates a new `GtkCenterLayout`.

## setBaselinePosition

centerLayoutSetBaselinePosition Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> BaselinePosition | `baselinePosition`: the new baseline position
-> m () |

Sets the new baseline position of `self`

## setCenterWidget

centerLayoutSetCenterWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a, IsWidget b) |
=> a | `self`: a `GtkCenterLayout`
-> Maybe b | `widget`: the new center widget
-> m () |

Sets the new center widget of `self`.

To remove the existing center widget, pass `Nothing`.

## setEndWidget

centerLayoutSetEndWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a, IsWidget b) |
=> a | `self`: a `GtkCenterLayout`
-> Maybe b | `widget`: the new end widget
-> m () |

Sets the new end widget of `self`.

To remove the existing center widget, pass `Nothing`.

## setOrientation

centerLayoutSetOrientation Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> Orientation | `orientation`: the new orientation
-> m () |

Sets the orientation of `self`.

## setShrinkCenterLast

centerLayoutSetShrinkCenterLast Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a) |
=> a | `self`: a `GtkCenterLayout`
-> Bool | `shrinkCenterLast`: whether to shrink the center widget after others
-> m () |

Sets whether to shrink the center widget after other children.

By default, when there's no space to give all three children their natural widths, the start and end widgets start shrinking and the center child keeps natural width until they reach minimum width.

If set to `FALSE`, start and end widgets keep natural width and the center widget starts shrinking instead.

Since: 4.12

## setStartWidget

centerLayoutSetStartWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsCenterLayout a, IsWidget b) |
=> a | `self`: a `GtkCenterLayout`
-> Maybe b | `widget`: the new start widget
-> m () |

Sets the new start widget of `self`.

To remove the existing start widget, pass `Nothing`.

# Properties

## shrinkCenterLast

Whether to shrink the center widget after other children.

By default, when there's no space to give all three children their natural widths, the start and end widgets start shrinking and the center child keeps natural width until they reach minimum width.

If set to `FALSE`, start and end widgets keep natural width and the center widget starts shrinking instead.

Since: 4.12

constructCenterLayoutShrinkCenterLast :: (IsCenterLayout o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getCenterLayoutShrinkCenterLast :: (MonadIO m, IsCenterLayout o) => o -> m Bool Source #

Get the value of the “`shrink-center-last`” property. When overloading is enabled, this is equivalent to

    get centerLayout #shrinkCenterLast

setCenterLayoutShrinkCenterLast :: (MonadIO m, IsCenterLayout o) => o -> Bool -> m () Source #

Set the value of the “`shrink-center-last`” property. When overloading is enabled, this is equivalent to

    set centerLayout [ #shrinkCenterLast := value ]