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

GI.Gtk.Objects.CustomLayout

Description

CustomLayout is a convenience type meant to be used as a transition mechanism between GtkWidgets implementing a layout policy, and LayoutManager classes.

A CustomLayout uses closures matching to the old Widget virtual functions for size negotiation, as a convenience API to ease the porting towards the corresponding LayoutManager virtual functions.

Synopsis

Exported types

newtype CustomLayout Source #

Memory-managed wrapper type.

Constructors

CustomLayout (ManagedPtr CustomLayout) 

Instances

Instances details
Eq CustomLayout Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

GObject CustomLayout Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

ManagedPtrNewtype CustomLayout Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

Methods

toManagedPtr :: CustomLayout -> ManagedPtr CustomLayout

TypedObject CustomLayout Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

Methods

glibType :: IO GType

HasParentTypes CustomLayout Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

IsGValue (Maybe CustomLayout) Source #

Convert CustomLayout to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.CustomLayout

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe CustomLayout -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe CustomLayout)

type ParentTypes CustomLayout Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

type ParentTypes CustomLayout = '[LayoutManager, Object]

class (GObject o, IsDescendantOf CustomLayout o) => IsCustomLayout o Source #

Type class for types which can be safely cast to CustomLayout, for instance with toCustomLayout.

Instances

Instances details
(GObject o, IsDescendantOf CustomLayout o) => IsCustomLayout o Source # 
Instance details

Defined in GI.Gtk.Objects.CustomLayout

toCustomLayout :: (MonadIO m, IsCustomLayout o) => o -> m CustomLayout Source #

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

Methods

new

customLayoutNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe CustomRequestModeFunc

requestMode: a function to retrieve the SizeRequestMode of the widget using the layout; the default request mode is SizeRequestModeConstantSize

-> CustomMeasureFunc

measure: a function to measure the widget using the layout manager

-> CustomAllocateFunc

allocate: a function to allocate the children of the widget using the layout manager

-> m CustomLayout

Returns: the newly created CustomLayout

Creates a new legacy layout manager.

Legacy layout managers map to the old Widget size negotiation virtual functions, and are meant to be used during the transition from layout containers to layout manager delegates.