gi-gtk-3.0.13: 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.Objects.Viewport

Contents

Description

The Viewport widget acts as an adaptor class, implementing scrollability for child widgets that lack their own scrolling capabilities. Use GtkViewport to scroll child widgets such as Grid, Box, and so on.

If a widget has native scrolling abilities, such as TextView, TreeView or IconView, it can be added to a ScrolledWindow with containerAdd. If a widget does not, you must first add the widget to a Viewport, then add the viewport to the scrolled window. containerAdd does this automatically if a child that does not implement Scrollable is added to a ScrolledWindow, so you can ignore the presence of the viewport.

The GtkViewport will start scrolling content only if allocated less than the child widget’s minimum size in a given orientation.

CSS nodes

GtkViewport has a single CSS node with name viewport.

Synopsis

Exported types

Methods

getBinWindow

viewportGetBinWindow Source #

Arguments

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

viewport: a Viewport

-> m Window

Returns: a Window

Gets the bin window of the Viewport.

Since: 2.20

getHadjustment

viewportGetHadjustment Source #

Arguments

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

viewport: a Viewport.

-> m Adjustment

Returns: the horizontal adjustment of viewport.

Deprecated: (Since version 3.0)Use scrollableGetHadjustment

Returns the horizontal adjustment of the viewport.

getShadowType

viewportGetShadowType Source #

Arguments

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

viewport: a Viewport

-> m ShadowType

Returns: the shadow type

Gets the shadow type of the Viewport. See viewportSetShadowType.

getVadjustment

viewportGetVadjustment Source #

Arguments

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

viewport: a Viewport.

-> m Adjustment

Returns: the vertical adjustment of viewport.

Deprecated: (Since version 3.0)Use scrollableGetVadjustment

Returns the vertical adjustment of the viewport.

getViewWindow

viewportGetViewWindow Source #

Arguments

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

viewport: a Viewport

-> m Window

Returns: a Window

Gets the view window of the Viewport.

Since: 2.22

new

viewportNew Source #

Arguments

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

hadjustment: horizontal adjustment

-> Maybe b

vadjustment: vertical adjustment

-> m Viewport

Returns: a new Viewport

Creates a new Viewport with the given adjustments, or with default adjustments if none are given.

setHadjustment

viewportSetHadjustment Source #

Arguments

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

viewport: a Viewport.

-> Maybe b

adjustment: a Adjustment.

-> m () 

Deprecated: (Since version 3.0)Use scrollableSetHadjustment

Sets the horizontal adjustment of the viewport.

setShadowType

viewportSetShadowType Source #

Arguments

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

viewport: a Viewport.

-> ShadowType

type: the new shadow type.

-> m () 

Sets the shadow type of the viewport.

setVadjustment

viewportSetVadjustment Source #

Arguments

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

viewport: a Viewport.

-> Maybe b

adjustment: a Adjustment.

-> m () 

Deprecated: (Since version 3.0)Use scrollableSetVadjustment

Sets the vertical adjustment of the viewport.

Properties

shadowType

data ViewportShadowTypePropertyInfo Source #

Instances

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