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 |
Scrollable
is an interface that is implemented by widgets with native
scrolling ability.
To implement this interface you should override the
Scrollable
:hadjustment
and Scrollable
:vadjustment
properties.
Creating a scrollable widget
All scrollable widgets should do the following.
- When a parent widget sets the scrollable child widget’s adjustments,
the widget should populate the adjustments’
Adjustment
:lower
,Adjustment
:upper
,Adjustment
:step-increment
,Adjustment
:page-increment
andAdjustment
:page-size
properties and connect to theAdjustment
::value-changed
signal. - Because its preferred size is the size for a fully expanded widget,
the scrollable widget must be able to cope with underallocations.
This means that it must accept any value passed to its
WidgetClass
.size_allocate
() function. - When the parent allocates space to the scrollable child widget, the widget should update the adjustments’ properties with new values.
- When any of the adjustments emits the
Adjustment
::value-changed
signal, the scrollable widget should scroll its contents.
- newtype Scrollable = Scrollable (ManagedPtr Scrollable)
- noScrollable :: Maybe Scrollable
- class GObject o => IsScrollable o
- toScrollable :: IsScrollable o => o -> IO Scrollable
- data ScrollableGetBorderMethodInfo
- scrollableGetBorder :: (HasCallStack, MonadIO m, IsScrollable a) => a -> m (Bool, Border)
- data ScrollableGetHadjustmentMethodInfo
- scrollableGetHadjustment :: (HasCallStack, MonadIO m, IsScrollable a) => a -> m Adjustment
- data ScrollableGetHscrollPolicyMethodInfo
- scrollableGetHscrollPolicy :: (HasCallStack, MonadIO m, IsScrollable a) => a -> m ScrollablePolicy
- data ScrollableGetVadjustmentMethodInfo
- scrollableGetVadjustment :: (HasCallStack, MonadIO m, IsScrollable a) => a -> m Adjustment
- data ScrollableGetVscrollPolicyMethodInfo
- scrollableGetVscrollPolicy :: (HasCallStack, MonadIO m, IsScrollable a) => a -> m ScrollablePolicy
- data ScrollableSetHadjustmentMethodInfo
- scrollableSetHadjustment :: (HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) => a -> Maybe b -> m ()
- data ScrollableSetHscrollPolicyMethodInfo
- scrollableSetHscrollPolicy :: (HasCallStack, MonadIO m, IsScrollable a) => a -> ScrollablePolicy -> m ()
- data ScrollableSetVadjustmentMethodInfo
- scrollableSetVadjustment :: (HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) => a -> Maybe b -> m ()
- data ScrollableSetVscrollPolicyMethodInfo
- scrollableSetVscrollPolicy :: (HasCallStack, MonadIO m, IsScrollable a) => a -> ScrollablePolicy -> m ()
- data ScrollableHadjustmentPropertyInfo
- clearScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m ()
- constructScrollableHadjustment :: (IsScrollable o, IsAdjustment a) => a -> IO (GValueConstruct o)
- getScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m Adjustment
- scrollableHadjustment :: AttrLabelProxy "hadjustment"
- setScrollableHadjustment :: (MonadIO m, IsScrollable o, IsAdjustment a) => o -> a -> m ()
- data ScrollableHscrollPolicyPropertyInfo
- constructScrollableHscrollPolicy :: IsScrollable o => ScrollablePolicy -> IO (GValueConstruct o)
- getScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m ScrollablePolicy
- scrollableHscrollPolicy :: AttrLabelProxy "hscrollPolicy"
- setScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> ScrollablePolicy -> m ()
- data ScrollableVadjustmentPropertyInfo
- clearScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m ()
- constructScrollableVadjustment :: (IsScrollable o, IsAdjustment a) => a -> IO (GValueConstruct o)
- getScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m Adjustment
- scrollableVadjustment :: AttrLabelProxy "vadjustment"
- setScrollableVadjustment :: (MonadIO m, IsScrollable o, IsAdjustment a) => o -> a -> m ()
- data ScrollableVscrollPolicyPropertyInfo
- constructScrollableVscrollPolicy :: IsScrollable o => ScrollablePolicy -> IO (GValueConstruct o)
- getScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m ScrollablePolicy
- scrollableVscrollPolicy :: AttrLabelProxy "vscrollPolicy"
- setScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> ScrollablePolicy -> m ()
Exported types
newtype Scrollable Source #
GObject Scrollable Source # | |
IsObject Scrollable Source # | |
IsScrollable Scrollable Source # | |
((~) * info (ResolveScrollableMethod t Scrollable), MethodInfo * info Scrollable p) => IsLabel t (Scrollable -> p) Source # | |
((~) * info (ResolveScrollableMethod t Scrollable), MethodInfo * info Scrollable p) => IsLabelProxy t (Scrollable -> p) Source # | |
HasAttributeList * Scrollable Source # | |
type AttributeList Scrollable Source # | |
type SignalList Scrollable Source # | |
class GObject o => IsScrollable o Source #
toScrollable :: IsScrollable o => o -> IO Scrollable Source #
Methods
getBorder
data ScrollableGetBorderMethodInfo Source #
((~) * signature (m (Bool, Border)), MonadIO m, IsScrollable a) => MethodInfo * ScrollableGetBorderMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> m (Bool, Border) | Returns: |
Returns the size of a non-scrolling border around the outside of the scrollable. An example for this would be treeview headers. GTK+ can use this information to display overlayed graphics, like the overshoot indication, at the right position.
Since: 3.16
getHadjustment
data ScrollableGetHadjustmentMethodInfo Source #
((~) * signature (m Adjustment), MonadIO m, IsScrollable a) => MethodInfo * ScrollableGetHadjustmentMethodInfo a signature Source # | |
scrollableGetHadjustment Source #
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> m Adjustment | Returns: horizontal |
Retrieves the Adjustment
used for horizontal scrolling.
Since: 3.0
getHscrollPolicy
data ScrollableGetHscrollPolicyMethodInfo Source #
((~) * signature (m ScrollablePolicy), MonadIO m, IsScrollable a) => MethodInfo * ScrollableGetHscrollPolicyMethodInfo a signature Source # | |
scrollableGetHscrollPolicy Source #
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> m ScrollablePolicy | Returns: The horizontal |
Gets the horizontal ScrollablePolicy
.
Since: 3.0
getVadjustment
data ScrollableGetVadjustmentMethodInfo Source #
((~) * signature (m Adjustment), MonadIO m, IsScrollable a) => MethodInfo * ScrollableGetVadjustmentMethodInfo a signature Source # | |
scrollableGetVadjustment Source #
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> m Adjustment | Returns: vertical |
Retrieves the Adjustment
used for vertical scrolling.
Since: 3.0
getVscrollPolicy
data ScrollableGetVscrollPolicyMethodInfo Source #
((~) * signature (m ScrollablePolicy), MonadIO m, IsScrollable a) => MethodInfo * ScrollableGetVscrollPolicyMethodInfo a signature Source # | |
scrollableGetVscrollPolicy Source #
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> m ScrollablePolicy | Returns: The vertical |
Gets the vertical ScrollablePolicy
.
Since: 3.0
setHadjustment
data ScrollableSetHadjustmentMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsScrollable a, IsAdjustment b) => MethodInfo * ScrollableSetHadjustmentMethodInfo a signature Source # | |
scrollableSetHadjustment Source #
:: (HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the horizontal adjustment of the Scrollable
.
Since: 3.0
setHscrollPolicy
data ScrollableSetHscrollPolicyMethodInfo Source #
((~) * signature (ScrollablePolicy -> m ()), MonadIO m, IsScrollable a) => MethodInfo * ScrollableSetHscrollPolicyMethodInfo a signature Source # | |
scrollableSetHscrollPolicy Source #
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> ScrollablePolicy |
|
-> m () |
Sets the ScrollablePolicy
to determine whether
horizontal scrolling should start below the minimum width or
below the natural width.
Since: 3.0
setVadjustment
data ScrollableSetVadjustmentMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsScrollable a, IsAdjustment b) => MethodInfo * ScrollableSetVadjustmentMethodInfo a signature Source # | |
scrollableSetVadjustment Source #
:: (HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the vertical adjustment of the Scrollable
.
Since: 3.0
setVscrollPolicy
data ScrollableSetVscrollPolicyMethodInfo Source #
((~) * signature (ScrollablePolicy -> m ()), MonadIO m, IsScrollable a) => MethodInfo * ScrollableSetVscrollPolicyMethodInfo a signature Source # | |
scrollableSetVscrollPolicy Source #
:: (HasCallStack, MonadIO m, IsScrollable a) | |
=> a |
|
-> ScrollablePolicy |
|
-> m () |
Sets the ScrollablePolicy
to determine whether
vertical scrolling should start below the minimum height or
below the natural height.
Since: 3.0
Properties
hadjustment
data ScrollableHadjustmentPropertyInfo Source #
clearScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m () Source #
constructScrollableHadjustment :: (IsScrollable o, IsAdjustment a) => a -> IO (GValueConstruct o) Source #
getScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m Adjustment Source #
scrollableHadjustment :: AttrLabelProxy "hadjustment" Source #
setScrollableHadjustment :: (MonadIO m, IsScrollable o, IsAdjustment a) => o -> a -> m () Source #
hscrollPolicy
data ScrollableHscrollPolicyPropertyInfo Source #
constructScrollableHscrollPolicy :: IsScrollable o => ScrollablePolicy -> IO (GValueConstruct o) Source #
getScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m ScrollablePolicy Source #
scrollableHscrollPolicy :: AttrLabelProxy "hscrollPolicy" Source #
setScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> ScrollablePolicy -> m () Source #
vadjustment
data ScrollableVadjustmentPropertyInfo Source #
clearScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m () Source #
constructScrollableVadjustment :: (IsScrollable o, IsAdjustment a) => a -> IO (GValueConstruct o) Source #
getScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m Adjustment Source #
scrollableVadjustment :: AttrLabelProxy "vadjustment" Source #
setScrollableVadjustment :: (MonadIO m, IsScrollable o, IsAdjustment a) => o -> a -> m () Source #
vscrollPolicy
data ScrollableVscrollPolicyPropertyInfo Source #
constructScrollableVscrollPolicy :: IsScrollable o => ScrollablePolicy -> IO (GValueConstruct o) Source #
getScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m ScrollablePolicy Source #
scrollableVscrollPolicy :: AttrLabelProxy "vscrollPolicy" Source #
setScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> ScrollablePolicy -> m () Source #