| Maintainer | gtk2hs-users@lists.sourceforge.net |
|---|---|
| Stability | provisional |
| Portability | portable (depends on GHC) |
| Safe Haskell | None |
| Language | Haskell98 |
Graphics.UI.Gtk.Layout.Layout
Description
Infinite scrollable area containing child widgets and/or custom drawing
- data Layout
- class ContainerClass o => LayoutClass o
- castToLayout :: GObjectClass obj => obj -> Layout
- gTypeLayout :: GType
- toLayout :: LayoutClass o => o -> Layout
- layoutNew :: Maybe Adjustment -> Maybe Adjustment -> IO Layout
- layoutPut :: (LayoutClass self, WidgetClass childWidget) => self -> childWidget -> Int -> Int -> IO ()
- layoutMove :: (LayoutClass self, WidgetClass childWidget) => self -> childWidget -> Int -> Int -> IO ()
- layoutSetSize :: LayoutClass self => self -> Int -> Int -> IO ()
- layoutGetSize :: LayoutClass self => self -> IO (Int, Int)
- layoutGetHAdjustment :: LayoutClass self => self -> IO Adjustment
- layoutGetVAdjustment :: LayoutClass self => self -> IO Adjustment
- layoutSetHAdjustment :: LayoutClass self => self -> Adjustment -> IO ()
- layoutSetVAdjustment :: LayoutClass self => self -> Adjustment -> IO ()
- layoutGetDrawWindow :: Layout -> IO DrawWindow
- layoutHAdjustment :: LayoutClass self => Attr self Adjustment
- layoutVAdjustment :: LayoutClass self => Attr self Adjustment
- layoutWidth :: LayoutClass self => Attr self Int
- layoutHeight :: LayoutClass self => Attr self Int
- layoutChildX :: (LayoutClass self, WidgetClass child) => child -> Attr self Int
- layoutChildY :: (LayoutClass self, WidgetClass child) => child -> Attr self Int
- onSetScrollAdjustments :: LayoutClass self => self -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId self)
- afterSetScrollAdjustments :: LayoutClass self => self -> (Adjustment -> Adjustment -> IO ()) -> IO (ConnectId self)
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
Types
class ContainerClass o => LayoutClass o Source
Instances
castToLayout :: GObjectClass obj => obj -> Layout Source
toLayout :: LayoutClass o => o -> Layout Source
Constructors
Arguments
| :: Maybe Adjustment |
|
| -> Maybe Adjustment |
|
| -> 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
Arguments
| :: (LayoutClass self, WidgetClass childWidget) | |
| => self | |
| -> childWidget |
|
| -> Int |
|
| -> Int |
|
| -> IO () |
Adds childWidget to layout, at position (x,y). layout becomes
the new parent container of childWidget.
Arguments
| :: (LayoutClass self, WidgetClass childWidget) | |
| => self | |
| -> childWidget |
|
| -> Int |
|
| -> Int |
|
| -> IO () |
Moves a current child of layout to a new position.
Arguments
| :: LayoutClass self | |
| => self | |
| -> Int |
|
| -> Int |
|
| -> IO () |
Sets the size of the scrollable area of the layout.
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.
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.
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.
Arguments
| :: LayoutClass self | |
| => self | |
| -> Adjustment |
|
| -> IO () |
Sets the horizontal scroll adjustment for the layout.
See ScrolledWindow, Scrollbar, Adjustment for details.
Arguments
| :: LayoutClass self | |
| => self | |
| -> 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
layoutHeight :: LayoutClass self => Attr self Int Source
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.