gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Layout

Contents

Description

Layout is similar to DrawingArea in that it’s a “blank slate” and doesn’t do anything but paint a blank background by default. It's different in that it supports scrolling natively (you can add it to a ScrolledWindow), and it can contain child widgets, since it’s a Container. However if you’re just going to draw, a DrawingArea is a better choice since it has lower overhead.

When handling expose events on a Layout, you must draw to GTK_LAYOUT (layout)->bin_window, rather than to GTK_WIDGET (layout)->window, as you would for a drawing area.

Synopsis

Exported types

Methods

getBinWindow

layoutGetBinWindow Source #

Arguments

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

layout: a Layout

-> m Window

Returns: a Window

Retrieve the bin window of the layout used for drawing operations.

Since: 2.14

getHadjustment

layoutGetHadjustment Source #

Arguments

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

layout: a Layout

-> m Adjustment

Returns: horizontal scroll adjustment

Deprecated: (Since version 3.0)Use scrollableGetHadjustment

This function should only be called after the layout has been placed in a ScrolledWindow or otherwise configured for scrolling. It returns the Adjustment used for communication between the horizontal scrollbar and layout.

See ScrolledWindow, Scrollbar, Adjustment for details.

getSize

data LayoutGetSizeMethodInfo Source #

Instances

((~) * signature (m (Word32, Word32)), MonadIO m, IsLayout a) => MethodInfo * LayoutGetSizeMethodInfo a signature Source # 

layoutGetSize Source #

Arguments

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

layout: a Layout

-> m (Word32, Word32) 

Gets the size that has been set on the layout, and that determines the total extents of the layout’s scrollbar area. See gtk_layout_set_size ().

getVadjustment

layoutGetVadjustment Source #

Arguments

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

layout: a Layout

-> m Adjustment

Returns: vertical scroll adjustment

Deprecated: (Since version 3.0)Use scrollableGetVadjustment

This function should only be called after the layout has been placed in a ScrolledWindow or otherwise configured for scrolling. It returns the Adjustment used for communication between the vertical scrollbar and layout.

See ScrolledWindow, Scrollbar, Adjustment for details.

move

data LayoutMoveMethodInfo Source #

Instances

((~) * signature (b -> Int32 -> Int32 -> m ()), MonadIO m, IsLayout a, IsWidget b) => MethodInfo * LayoutMoveMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy LayoutMoveMethodInfo a -> signature -> s #

layoutMove Source #

Arguments

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

layout: a Layout

-> b

childWidget: a current child of layout

-> Int32

x: X position to move to

-> Int32

y: Y position to move to

-> m () 

Moves a current child of layout to a new position.

new

layoutNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) 
=> Maybe a

hadjustment: horizontal scroll adjustment, or Nothing

-> Maybe b

vadjustment: vertical scroll adjustment, or Nothing

-> m Layout

Returns: a new Layout

Creates a new Layout. Unless you have a specific adjustment you’d like the layout to use for scrolling, pass Nothing for hadjustment and vadjustment.

put

data LayoutPutMethodInfo Source #

Instances

((~) * signature (b -> Int32 -> Int32 -> m ()), MonadIO m, IsLayout a, IsWidget b) => MethodInfo * LayoutPutMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy LayoutPutMethodInfo a -> signature -> s #

layoutPut Source #

Arguments

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

layout: a Layout

-> b

childWidget: child widget

-> Int32

x: X position of child widget

-> Int32

y: Y position of child widget

-> m () 

Adds childWidget to layout, at position (x,y). layout becomes the new parent container of childWidget.

setHadjustment

layoutSetHadjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsLayout a, IsAdjustment b) 
=> a

layout: a Layout

-> Maybe b

adjustment: new scroll adjustment

-> m () 

Deprecated: (Since version 3.0)Use scrollableSetHadjustment

Sets the horizontal scroll adjustment for the layout.

See ScrolledWindow, Scrollbar, Adjustment for details.

setSize

data LayoutSetSizeMethodInfo Source #

Instances

((~) * signature (Word32 -> Word32 -> m ()), MonadIO m, IsLayout a) => MethodInfo * LayoutSetSizeMethodInfo a signature Source # 

layoutSetSize Source #

Arguments

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

layout: a Layout

-> Word32

width: width of entire scrollable area

-> Word32

height: height of entire scrollable area

-> m () 

Sets the size of the scrollable area of the layout.

setVadjustment

layoutSetVadjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsLayout a, IsAdjustment b) 
=> a

layout: a Layout

-> Maybe b

adjustment: new scroll adjustment

-> m () 

Deprecated: (Since version 3.0)Use scrollableSetVadjustment

Sets the vertical scroll adjustment for the layout.

See ScrolledWindow, Scrollbar, Adjustment for details.

Properties

height

data LayoutHeightPropertyInfo Source #

Instances

AttrInfo LayoutHeightPropertyInfo Source # 
type AttrOrigin LayoutHeightPropertyInfo Source # 
type AttrLabel LayoutHeightPropertyInfo Source # 
type AttrGetType LayoutHeightPropertyInfo Source # 
type AttrBaseTypeConstraint LayoutHeightPropertyInfo Source # 
type AttrSetTypeConstraint LayoutHeightPropertyInfo Source # 
type AttrAllowedOps LayoutHeightPropertyInfo Source # 

setLayoutHeight :: (MonadIO m, IsLayout o) => o -> Word32 -> m () Source #

width

data LayoutWidthPropertyInfo Source #

Instances

AttrInfo LayoutWidthPropertyInfo Source # 
type AttrOrigin LayoutWidthPropertyInfo Source # 
type AttrLabel LayoutWidthPropertyInfo Source # 
type AttrGetType LayoutWidthPropertyInfo Source # 
type AttrBaseTypeConstraint LayoutWidthPropertyInfo Source # 
type AttrSetTypeConstraint LayoutWidthPropertyInfo Source # 
type AttrAllowedOps LayoutWidthPropertyInfo Source # 

setLayoutWidth :: (MonadIO m, IsLayout o) => o -> Word32 -> m () Source #