gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Interfaces.Scrollable

Contents

Description

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 and Adjustment:page-size properties and connect to the Adjustment::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.

Synopsis

Exported types

Methods

getBorder

scrollableGetBorder Source #

Arguments

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

scrollable: a Scrollable

-> m (Bool, Border)

Returns: True if border has been set

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

scrollableGetHadjustment Source #

Arguments

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

scrollable: a Scrollable

-> m Adjustment

Returns: horizontal Adjustment.

Retrieves the Adjustment used for horizontal scrolling.

Since: 3.0

getHscrollPolicy

scrollableGetHscrollPolicy Source #

Arguments

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

scrollable: a Scrollable

-> m ScrollablePolicy

Returns: The horizontal ScrollablePolicy.

Gets the horizontal ScrollablePolicy.

Since: 3.0

getVadjustment

scrollableGetVadjustment Source #

Arguments

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

scrollable: a Scrollable

-> m Adjustment

Returns: vertical Adjustment.

Retrieves the Adjustment used for vertical scrolling.

Since: 3.0

getVscrollPolicy

scrollableGetVscrollPolicy Source #

Arguments

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

scrollable: a Scrollable

-> m ScrollablePolicy

Returns: The vertical ScrollablePolicy.

Gets the vertical ScrollablePolicy.

Since: 3.0

setHadjustment

scrollableSetHadjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) 
=> a

scrollable: a Scrollable

-> Maybe b

hadjustment: a Adjustment

-> m () 

Sets the horizontal adjustment of the Scrollable.

Since: 3.0

setHscrollPolicy

scrollableSetHscrollPolicy Source #

Arguments

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

scrollable: a Scrollable

-> ScrollablePolicy

policy: the horizontal 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

scrollableSetVadjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) 
=> a

scrollable: a Scrollable

-> Maybe b

vadjustment: a Adjustment

-> m () 

Sets the vertical adjustment of the Scrollable.

Since: 3.0

setVscrollPolicy

scrollableSetVscrollPolicy Source #

Arguments

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

scrollable: a Scrollable

-> ScrollablePolicy

policy: the vertical 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 #

Instances

AttrInfo ScrollableHadjustmentPropertyInfo Source # 
type AttrOrigin ScrollableHadjustmentPropertyInfo Source # 
type AttrLabel ScrollableHadjustmentPropertyInfo Source # 
type AttrGetType ScrollableHadjustmentPropertyInfo Source # 
type AttrBaseTypeConstraint ScrollableHadjustmentPropertyInfo Source # 
type AttrSetTypeConstraint ScrollableHadjustmentPropertyInfo Source # 
type AttrAllowedOps ScrollableHadjustmentPropertyInfo Source # 

hscrollPolicy

data ScrollableHscrollPolicyPropertyInfo Source #

Instances

AttrInfo ScrollableHscrollPolicyPropertyInfo Source # 
type AttrOrigin ScrollableHscrollPolicyPropertyInfo Source # 
type AttrLabel ScrollableHscrollPolicyPropertyInfo Source # 
type AttrGetType ScrollableHscrollPolicyPropertyInfo Source # 
type AttrBaseTypeConstraint ScrollableHscrollPolicyPropertyInfo Source # 
type AttrSetTypeConstraint ScrollableHscrollPolicyPropertyInfo Source # 
type AttrAllowedOps ScrollableHscrollPolicyPropertyInfo Source # 

vadjustment

data ScrollableVadjustmentPropertyInfo Source #

Instances

AttrInfo ScrollableVadjustmentPropertyInfo Source # 
type AttrOrigin ScrollableVadjustmentPropertyInfo Source # 
type AttrLabel ScrollableVadjustmentPropertyInfo Source # 
type AttrGetType ScrollableVadjustmentPropertyInfo Source # 
type AttrBaseTypeConstraint ScrollableVadjustmentPropertyInfo Source # 
type AttrSetTypeConstraint ScrollableVadjustmentPropertyInfo Source # 
type AttrAllowedOps ScrollableVadjustmentPropertyInfo Source # 

vscrollPolicy

data ScrollableVscrollPolicyPropertyInfo Source #

Instances

AttrInfo ScrollableVscrollPolicyPropertyInfo Source # 
type AttrOrigin ScrollableVscrollPolicyPropertyInfo Source # 
type AttrLabel ScrollableVscrollPolicyPropertyInfo Source # 
type AttrGetType ScrollableVscrollPolicyPropertyInfo Source # 
type AttrBaseTypeConstraint ScrollableVscrollPolicyPropertyInfo Source # 
type AttrSetTypeConstraint ScrollableVscrollPolicyPropertyInfo Source # 
type AttrAllowedOps ScrollableVscrollPolicyPropertyInfo Source #