gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Box

Description

The GtkBox widget arranges child widgets into a single row or column, depending upon the value of its Orientable:orientation property. Within the other dimension, all children are allocated the same size. Of course, the Widget:halign and Widget:valign properties can be used on the children to influence their allocation.

Use repeated calls to boxAppend to pack widgets into a GtkBox from start to end. Use boxRemove to remove widgets from the GtkBox. boxInsertChildAfter can be used to add a child at a particular position.

Use boxSetHomogeneous to specify whether or not all children of the GtkBox are forced to get the same amount of space.

Use boxSetSpacing to determine how much space will be minimally placed between all children in the GtkBox. Note that spacing is added between the children.

Use boxReorderChildAfter to move a child to a different place in the box.

CSS nodes

GtkBox uses a single CSS node with name box.

Synopsis

Exported types

newtype Box Source #

Memory-managed wrapper type.

Constructors

Box (ManagedPtr Box) 

Instances

Instances details
Eq Box Source # 
Instance details

Defined in GI.Gtk.Objects.Box

Methods

(==) :: Box -> Box -> Bool #

(/=) :: Box -> Box -> Bool #

IsGValue Box Source #

Convert Box to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Box

ManagedPtrNewtype Box Source # 
Instance details

Defined in GI.Gtk.Objects.Box

TypedObject Box Source # 
Instance details

Defined in GI.Gtk.Objects.Box

Methods

glibType :: IO GType #

GObject Box Source # 
Instance details

Defined in GI.Gtk.Objects.Box

HasParentTypes Box Source # 
Instance details

Defined in GI.Gtk.Objects.Box

type ParentTypes Box Source # 
Instance details

Defined in GI.Gtk.Objects.Box

type ParentTypes Box = '[Widget, Object, ImplementorIface, Buildable, ConstraintTarget, Orientable]

class (GObject o, IsDescendantOf Box o) => IsBox o Source #

Type class for types which can be safely cast to Box, for instance with toBox.

Instances

Instances details
(GObject o, IsDescendantOf Box o) => IsBox o Source # 
Instance details

Defined in GI.Gtk.Objects.Box

toBox :: (MonadIO m, IsBox o) => o -> m Box Source #

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

Methods

Overloaded methods

append

boxAppend Source #

Arguments

:: (HasCallStack, MonadIO m, IsBox a, IsWidget b) 
=> a

box: a Box

-> b

child: the Widget to append

-> m () 

Adds child as the last child to box.

getBaselinePosition

boxGetBaselinePosition Source #

Arguments

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

box: a Box

-> m BaselinePosition

Returns: the baseline position

Gets the value set by boxSetBaselinePosition.

getHomogeneous

boxGetHomogeneous Source #

Arguments

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

box: a Box

-> m Bool

Returns: True if the box is homogeneous.

Returns whether the box is homogeneous (all children are the same size). See boxSetHomogeneous.

getSpacing

boxGetSpacing Source #

Arguments

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

box: a Box

-> m Int32

Returns: spacing between children

Gets the value set by boxSetSpacing.

insertChildAfter

boxInsertChildAfter Source #

Arguments

:: (HasCallStack, MonadIO m, IsBox a, IsWidget b, IsWidget c) 
=> a

box: a Box

-> b

child: the Widget to insert

-> Maybe c

sibling: the sibling to move child after, or Nothing

-> m () 

Inserts child in the position after sibling in the list of box children. If sibling is Nothing, insert child at the first position.

new

boxNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Orientation

orientation: the box’s orientation.

-> Int32

spacing: the number of pixels to place by default between children.

-> m Box

Returns: a new Box.

Creates a new Box.

prepend

boxPrepend Source #

Arguments

:: (HasCallStack, MonadIO m, IsBox a, IsWidget b) 
=> a

box: a Box

-> b

child: the Widget to prepend

-> m () 

Adds child as the first child to box.

remove

boxRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsBox a, IsWidget b) 
=> a

box: a Box

-> b

child: the child to remove

-> m () 

Removes a child widget from box, after it has been added with boxAppend, boxPrepend, or boxInsertChildAfter.

reorderChildAfter

boxReorderChildAfter Source #

Arguments

:: (HasCallStack, MonadIO m, IsBox a, IsWidget b, IsWidget c) 
=> a

box: a Box

-> b

child: the Widget to move, must be a child of box

-> Maybe c

sibling: the sibling to move child after, or Nothing

-> m () 

Moves child to the position after sibling in the list of box children. If sibling is Nothing, move child to the first position.

setBaselinePosition

boxSetBaselinePosition Source #

Arguments

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

box: a Box

-> BaselinePosition

position: a BaselinePosition

-> m () 

Sets the baseline position of a box. This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline wrt the extra space available.

setHomogeneous

boxSetHomogeneous Source #

Arguments

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

box: a Box

-> Bool

homogeneous: a boolean value, True to create equal allotments, False for variable allotments

-> m () 

Sets the Box:homogeneous property of box, controlling whether or not all children of box are given equal space in the box.

setSpacing

boxSetSpacing Source #

Arguments

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

box: a Box

-> Int32

spacing: the number of pixels to put between children

-> m () 

Sets the Box:spacing property of box, which is the number of pixels to place between children of box.

Properties

baselinePosition

No description available in the introspection data.

constructBoxBaselinePosition :: (IsBox o, MonadIO m) => BaselinePosition -> m (GValueConstruct o) Source #

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

getBoxBaselinePosition :: (MonadIO m, IsBox o) => o -> m BaselinePosition Source #

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

get box #baselinePosition

setBoxBaselinePosition :: (MonadIO m, IsBox o) => o -> BaselinePosition -> m () Source #

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

set box [ #baselinePosition := value ]

homogeneous

No description available in the introspection data.

constructBoxHomogeneous :: (IsBox o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

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

getBoxHomogeneous :: (MonadIO m, IsBox o) => o -> m Bool Source #

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

get box #homogeneous

setBoxHomogeneous :: (MonadIO m, IsBox o) => o -> Bool -> m () Source #

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

set box [ #homogeneous := value ]

spacing

No description available in the introspection data.

constructBoxSpacing :: (IsBox o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

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

getBoxSpacing :: (MonadIO m, IsBox o) => o -> m Int32 Source #

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

get box #spacing

setBoxSpacing :: (MonadIO m, IsBox o) => o -> Int32 -> m () Source #

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

set box [ #spacing := value ]