gtk-0.13.9: Binding to the Gtk+ graphical user interface library.

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.Layout.Layout

Contents

Description

Infinite scrollable area containing child widgets and/or custom drawing

Synopsis

Detail

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.

Class Hierarchy

| GObject
| +----Object
| +----Widget
| +----Container
| +----Layout

Types

Constructors

layoutNew Source

Arguments

:: Maybe Adjustment

hadjustment - horizontal scroll adjustment, or Nothing

-> Maybe Adjustment

vadjustment - vertical scroll adjustment, or Nothing

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

Methods

layoutPut Source

Arguments

:: (LayoutClass self, WidgetClass childWidget) 
=> self 
-> childWidget

childWidget - child widget

-> Int

x - X position of child widget

-> Int

y - Y position of child widget

-> IO () 

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

layoutMove Source

Arguments

:: (LayoutClass self, WidgetClass childWidget) 
=> self 
-> childWidget

childWidget - a current child of layout

-> Int

x - X position to move to

-> Int

y - Y position to move to

-> IO () 

Moves a current child of layout to a new position.

layoutSetSize Source

Arguments

:: LayoutClass self 
=> self 
-> Int

width - width of entire scrollable area

-> Int

height - height of entire scrollable area

-> IO () 

Sets the size of the scrollable area of the layout.

layoutGetSize Source

Arguments

:: LayoutClass self 
=> self 
-> IO (Int, Int)
(width, height)

Gets the size that has been set on the layout, and that determines the total extents of the layout's scrollbar area. See layoutSetSize.

layoutGetHAdjustment Source

Arguments

:: LayoutClass self 
=> self 
-> IO Adjustment

returns horizontal scroll adjustment

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.

layoutGetVAdjustment Source

Arguments

:: LayoutClass self 
=> self 
-> IO Adjustment

returns vertical scroll adjustment

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.

layoutSetHAdjustment Source

Arguments

:: LayoutClass self 
=> self 
-> Adjustment

adjustment - new scroll adjustment

-> IO () 

Sets the horizontal scroll adjustment for the layout.

See ScrolledWindow, Scrollbar, Adjustment for details.

layoutSetVAdjustment Source

Arguments

:: LayoutClass self 
=> self 
-> Adjustment

adjustment - new scroll adjustment

-> IO () 

Sets the vertical scroll adjustment for the layout.

See ScrolledWindow, Scrollbar, Adjustment for details.

layoutGetDrawWindow :: Layout -> IO DrawWindow Source

Retrieves the Drawable part of the layout used for drawing operations.

Attributes

layoutHAdjustment :: LayoutClass self => Attr self Adjustment Source

The Adjustment for the horizontal position.

layoutVAdjustment :: LayoutClass self => Attr self Adjustment Source

The Adjustment for the vertical position.

layoutWidth :: LayoutClass self => Attr self Int Source

The width of the layout.

Allowed values: <= (maxBound :: Int)

Default value: 100

layoutHeight :: LayoutClass self => Attr self Int Source

The height of the layout.

Allowed values: <= (maxBound :: Int)

Default value: 100

Child Attributes

layoutChildX :: (LayoutClass self, WidgetClass child) => child -> Attr self Int Source

X position of child widget.

Default value: 0

layoutChildY :: (LayoutClass self, WidgetClass child) => child -> Attr self Int Source

Y position of child widget.

Default value: 0

Signals

onSetScrollAdjustments :: LayoutClass self => self -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId self) Source

In case the adjustments are replaced, this signal is emitted.

afterSetScrollAdjustments :: LayoutClass self => self -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId self) Source

In case the adjustments are replaced, this signal is emitted.