Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- newtype Layout = Layout (ManagedPtr Layout)
- class GObject o => IsLayout o
- toLayout :: IsLayout o => o -> IO Layout
- noLayout :: Maybe Layout
- data LayoutGetBinWindowMethodInfo
- layoutGetBinWindow :: (HasCallStack, MonadIO m, IsLayout a) => a -> m Window
- data LayoutGetHadjustmentMethodInfo
- layoutGetHadjustment :: (HasCallStack, MonadIO m, IsLayout a) => a -> m Adjustment
- data LayoutGetSizeMethodInfo
- layoutGetSize :: (HasCallStack, MonadIO m, IsLayout a) => a -> m (Word32, Word32)
- data LayoutGetVadjustmentMethodInfo
- layoutGetVadjustment :: (HasCallStack, MonadIO m, IsLayout a) => a -> m Adjustment
- data LayoutMoveMethodInfo
- layoutMove :: (HasCallStack, MonadIO m, IsLayout a, IsWidget b) => a -> b -> Int32 -> Int32 -> m ()
- layoutNew :: (HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) => Maybe a -> Maybe b -> m Layout
- data LayoutPutMethodInfo
- layoutPut :: (HasCallStack, MonadIO m, IsLayout a, IsWidget b) => a -> b -> Int32 -> Int32 -> m ()
- data LayoutSetHadjustmentMethodInfo
- layoutSetHadjustment :: (HasCallStack, MonadIO m, IsLayout a, IsAdjustment b) => a -> Maybe b -> m ()
- data LayoutSetSizeMethodInfo
- layoutSetSize :: (HasCallStack, MonadIO m, IsLayout a) => a -> Word32 -> Word32 -> m ()
- data LayoutSetVadjustmentMethodInfo
- layoutSetVadjustment :: (HasCallStack, MonadIO m, IsLayout a, IsAdjustment b) => a -> Maybe b -> m ()
- data LayoutHeightPropertyInfo
- constructLayoutHeight :: IsLayout o => Word32 -> IO (GValueConstruct o)
- getLayoutHeight :: (MonadIO m, IsLayout o) => o -> m Word32
- layoutHeight :: AttrLabelProxy "height"
- setLayoutHeight :: (MonadIO m, IsLayout o) => o -> Word32 -> m ()
- data LayoutWidthPropertyInfo
- constructLayoutWidth :: IsLayout o => Word32 -> IO (GValueConstruct o)
- getLayoutWidth :: (MonadIO m, IsLayout o) => o -> m Word32
- layoutWidth :: AttrLabelProxy "width"
- setLayoutWidth :: (MonadIO m, IsLayout o) => o -> Word32 -> m ()
Exported types
GObject Layout Source # | |
IsImplementorIface Layout Source # | |
IsObject Layout Source # | |
IsWidget Layout Source # | |
IsContainer Layout Source # | |
IsScrollable Layout Source # | |
IsBuildable Layout Source # | |
IsLayout Layout Source # | |
((~) * info (ResolveLayoutMethod t Layout), MethodInfo * info Layout p) => IsLabel t (Layout -> p) Source # | |
((~) * info (ResolveLayoutMethod t Layout), MethodInfo * info Layout p) => IsLabelProxy t (Layout -> p) Source # | |
HasAttributeList * Layout Source # | |
type AttributeList Layout Source # | |
type SignalList Layout Source # | |
Methods
getBinWindow
data LayoutGetBinWindowMethodInfo Source #
((~) * signature (m Window), MonadIO m, IsLayout a) => MethodInfo * LayoutGetBinWindowMethodInfo a signature Source # | |
Retrieve the bin window of the layout used for drawing operations.
Since: 2.14
getHadjustment
data LayoutGetHadjustmentMethodInfo Source #
((~) * signature (m Adjustment), MonadIO m, IsLayout a) => MethodInfo * LayoutGetHadjustmentMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsLayout a) | |
=> a |
|
-> 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 #
((~) * signature (m (Word32, Word32)), MonadIO m, IsLayout a) => MethodInfo * LayoutGetSizeMethodInfo a signature Source # | |
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
data LayoutGetVadjustmentMethodInfo Source #
((~) * signature (m Adjustment), MonadIO m, IsLayout a) => MethodInfo * LayoutGetVadjustmentMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsLayout a) | |
=> a |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsLayout a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Moves a current child of layout
to a new position.
new
:: (HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) | |
=> Maybe a |
|
-> Maybe b |
|
-> m Layout | Returns: a new |
put
data LayoutPutMethodInfo Source #
:: (HasCallStack, MonadIO m, IsLayout a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Adds childWidget
to layout
, at position (x
,y
).
layout
becomes the new parent container of childWidget
.
setHadjustment
data LayoutSetHadjustmentMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsLayout a, IsAdjustment b) => MethodInfo * LayoutSetHadjustmentMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsLayout a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> 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 #
((~) * signature (Word32 -> Word32 -> m ()), MonadIO m, IsLayout a) => MethodInfo * LayoutSetSizeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsLayout a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> m () |
Sets the size of the scrollable area of the layout.
setVadjustment
data LayoutSetVadjustmentMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsLayout a, IsAdjustment b) => MethodInfo * LayoutSetVadjustmentMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsLayout a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> 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 #
constructLayoutHeight :: IsLayout o => Word32 -> IO (GValueConstruct o) Source #
layoutHeight :: AttrLabelProxy "height" Source #
width
data LayoutWidthPropertyInfo Source #
constructLayoutWidth :: IsLayout o => Word32 -> IO (GValueConstruct o) Source #
layoutWidth :: AttrLabelProxy "width" Source #