gi-gtk-3.0.32: 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.Layout

Contents

Description

tLayout is similar to tDrawingArea in that it’s a “blank slate” and doesn’t do anything except paint a blank background by default. It’s different in that it supports scrolling natively due to implementing tScrollable, and can contain child widgets since it’s a tContainer.

If you just want to draw, a tDrawingArea is a better choice since it has lower overhead. If you just need to position child widgets at specific points, then tFixed provides that functionality on its own.

When handling expose events on a tLayout, you must draw to the tWindow returned by layoutGetBinWindow, rather than to the one returned by widgetGetWindow as you would for a tDrawingArea.

Synopsis

Exported types

newtype Layout Source #

Memory-managed wrapper type.

Constructors

Layout (ManagedPtr Layout) 
Instances
Eq Layout Source # 
Instance details

Defined in GI.Gtk.Objects.Layout

Methods

(==) :: Layout -> Layout -> Bool

(/=) :: Layout -> Layout -> Bool

GObject Layout Source # 
Instance details

Defined in GI.Gtk.Objects.Layout

Methods

gobjectType :: IO GType

IsGValue Layout Source #

Convert Layout to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Layout

Methods

toGValue :: Layout -> IO GValue

fromGValue :: GValue -> IO Layout

HasParentTypes Layout Source # 
Instance details

Defined in GI.Gtk.Objects.Layout

type ParentTypes Layout Source # 
Instance details

Defined in GI.Gtk.Objects.Layout

type ParentTypes Layout = Container ': (Widget ': (Object ': (ImplementorIface ': (Buildable ': (Scrollable ': ([] :: [Type]))))))

class (GObject o, IsDescendantOf Layout o) => IsLayout o Source #

Type class for types which can be safely cast to Layout, for instance with toLayout.

Instances
(GObject o, IsDescendantOf Layout o) => IsLayout o Source # 
Instance details

Defined in GI.Gtk.Objects.Layout

toLayout :: (MonadIO m, IsLayout o) => o -> m Layout Source #

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

noLayout :: Maybe Layout Source #

A convenience alias for Nothing :: Maybe Layout.

Methods

Overloaded methods

getBinWindow

layoutGetBinWindow Source #

Arguments

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

layout: a tLayout

-> m Window

Returns: a tWindow

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 tLayout

-> 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 tScrolledWindow or otherwise configured for scrolling. It returns the tAdjustment used for communication between the horizontal scrollbar and layout.

See tScrolledWindow, tScrollbar, tAdjustment for details.

getSize

layoutGetSize Source #

Arguments

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

layout: a tLayout

-> 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 tLayout

-> 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 tScrolledWindow or otherwise configured for scrolling. It returns the tAdjustment used for communication between the vertical scrollbar and layout.

See tScrolledWindow, tScrollbar, tAdjustment for details.

move

layoutMove Source #

Arguments

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

layout: a tLayout

-> 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 tLayout

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

put

layoutPut Source #

Arguments

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

layout: a tLayout

-> 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 tLayout

-> Maybe b

adjustment: new scroll adjustment

-> m () 

Deprecated: (Since version 3.0)Use scrollableSetHadjustment

Sets the horizontal scroll adjustment for the layout.

See tScrolledWindow, tScrollbar, tAdjustment for details.

setSize

layoutSetSize Source #

Arguments

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

layout: a tLayout

-> 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 tLayout

-> Maybe b

adjustment: new scroll adjustment

-> m () 

Deprecated: (Since version 3.0)Use scrollableSetVadjustment

Sets the vertical scroll adjustment for the layout.

See tScrolledWindow, tScrollbar, tAdjustment for details.

Properties

height

No description available in the introspection data.

constructLayoutHeight :: IsLayout o => Word32 -> IO (GValueConstruct o) Source #

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

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

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

get layout #height

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

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

set layout [ #height := value ]

width

No description available in the introspection data.

constructLayoutWidth :: IsLayout o => Word32 -> IO (GValueConstruct o) Source #

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

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

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

get layout #width

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

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

set layout [ #width := value ]