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 |
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.
- newtype Viewport = Viewport (ManagedPtr Viewport)
- class GObject o => IsViewport o
- toViewport :: IsViewport o => o -> IO Viewport
- noViewport :: Maybe Viewport
- data ViewportGetBinWindowMethodInfo
- viewportGetBinWindow :: (HasCallStack, MonadIO m, IsViewport a) => a -> m Window
- data ViewportGetHadjustmentMethodInfo
- viewportGetHadjustment :: (HasCallStack, MonadIO m, IsViewport a) => a -> m Adjustment
- data ViewportGetShadowTypeMethodInfo
- viewportGetShadowType :: (HasCallStack, MonadIO m, IsViewport a) => a -> m ShadowType
- data ViewportGetVadjustmentMethodInfo
- viewportGetVadjustment :: (HasCallStack, MonadIO m, IsViewport a) => a -> m Adjustment
- data ViewportGetViewWindowMethodInfo
- viewportGetViewWindow :: (HasCallStack, MonadIO m, IsViewport a) => a -> m Window
- viewportNew :: (HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) => Maybe a -> Maybe b -> m Viewport
- data ViewportSetHadjustmentMethodInfo
- viewportSetHadjustment :: (HasCallStack, MonadIO m, IsViewport a, IsAdjustment b) => a -> Maybe b -> m ()
- data ViewportSetShadowTypeMethodInfo
- viewportSetShadowType :: (HasCallStack, MonadIO m, IsViewport a) => a -> ShadowType -> m ()
- data ViewportSetVadjustmentMethodInfo
- viewportSetVadjustment :: (HasCallStack, MonadIO m, IsViewport a, IsAdjustment b) => a -> Maybe b -> m ()
- data ViewportShadowTypePropertyInfo
- constructViewportShadowType :: IsViewport o => ShadowType -> IO (GValueConstruct o)
- getViewportShadowType :: (MonadIO m, IsViewport o) => o -> m ShadowType
- setViewportShadowType :: (MonadIO m, IsViewport o) => o -> ShadowType -> m ()
- viewportShadowType :: AttrLabelProxy "shadowType"
Exported types
Constructors
Viewport (ManagedPtr Viewport) |
Instances
GObject Viewport Source # | |
IsImplementorIface Viewport Source # | |
IsObject Viewport Source # | |
IsWidget Viewport Source # | |
IsContainer Viewport Source # | |
IsBin Viewport Source # | |
IsScrollable Viewport Source # | |
IsBuildable Viewport Source # | |
IsViewport Viewport Source # | |
((~) * info (ResolveViewportMethod t Viewport), MethodInfo * info Viewport p) => IsLabel t (Viewport -> p) Source # | |
((~) * info (ResolveViewportMethod t Viewport), MethodInfo * info Viewport p) => IsLabelProxy t (Viewport -> p) Source # | |
HasAttributeList * Viewport Source # | |
type AttributeList Viewport Source # | |
type SignalList Viewport Source # | |
class GObject o => IsViewport o Source #
Instances
(GObject a, UnknownAncestorError Constraint Viewport a) => IsViewport a Source # | |
IsViewport Viewport Source # | |
toViewport :: IsViewport o => o -> IO Viewport Source #
Methods
getBinWindow
data ViewportGetBinWindowMethodInfo Source #
Instances
((~) * signature (m Window), MonadIO m, IsViewport a) => MethodInfo * ViewportGetBinWindowMethodInfo a signature Source # | |
Arguments
:: (HasCallStack, MonadIO m, IsViewport a) | |
=> a |
|
-> m Window | Returns: a |
Gets the bin window of the Viewport
.
Since: 2.20
getHadjustment
data ViewportGetHadjustmentMethodInfo Source #
Instances
((~) * signature (m Adjustment), MonadIO m, IsViewport a) => MethodInfo * ViewportGetHadjustmentMethodInfo a signature Source # | |
viewportGetHadjustment Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a) | |
=> a |
|
-> m Adjustment | Returns: the horizontal adjustment of |
Deprecated: (Since version 3.0)Use scrollableGetHadjustment
Returns the horizontal adjustment of the viewport.
getShadowType
data ViewportGetShadowTypeMethodInfo Source #
Instances
((~) * signature (m ShadowType), MonadIO m, IsViewport a) => MethodInfo * ViewportGetShadowTypeMethodInfo a signature Source # | |
viewportGetShadowType Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a) | |
=> a |
|
-> m ShadowType | Returns: the shadow type |
Gets the shadow type of the Viewport
. See
viewportSetShadowType
.
getVadjustment
data ViewportGetVadjustmentMethodInfo Source #
Instances
((~) * signature (m Adjustment), MonadIO m, IsViewport a) => MethodInfo * ViewportGetVadjustmentMethodInfo a signature Source # | |
viewportGetVadjustment Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a) | |
=> a |
|
-> m Adjustment | Returns: the vertical adjustment of |
Deprecated: (Since version 3.0)Use scrollableGetVadjustment
Returns the vertical adjustment of the viewport.
getViewWindow
data ViewportGetViewWindowMethodInfo Source #
Instances
((~) * signature (m Window), MonadIO m, IsViewport a) => MethodInfo * ViewportGetViewWindowMethodInfo a signature Source # | |
viewportGetViewWindow Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a) | |
=> a |
|
-> m Window | Returns: a |
Gets the view window of the Viewport
.
Since: 2.22
new
Arguments
:: (HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) | |
=> Maybe a |
|
-> Maybe b |
|
-> m Viewport | Returns: a new |
Creates a new Viewport
with the given adjustments, or with default
adjustments if none are given.
setHadjustment
data ViewportSetHadjustmentMethodInfo Source #
Instances
((~) * signature (Maybe b -> m ()), MonadIO m, IsViewport a, IsAdjustment b) => MethodInfo * ViewportSetHadjustmentMethodInfo a signature Source # | |
viewportSetHadjustment Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Deprecated: (Since version 3.0)Use scrollableSetHadjustment
Sets the horizontal adjustment of the viewport.
setShadowType
data ViewportSetShadowTypeMethodInfo Source #
Instances
((~) * signature (ShadowType -> m ()), MonadIO m, IsViewport a) => MethodInfo * ViewportSetShadowTypeMethodInfo a signature Source # | |
viewportSetShadowType Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a) | |
=> a |
|
-> ShadowType |
|
-> m () |
Sets the shadow type of the viewport.
setVadjustment
data ViewportSetVadjustmentMethodInfo Source #
Instances
((~) * signature (Maybe b -> m ()), MonadIO m, IsViewport a, IsAdjustment b) => MethodInfo * ViewportSetVadjustmentMethodInfo a signature Source # | |
viewportSetVadjustment Source #
Arguments
:: (HasCallStack, MonadIO m, IsViewport a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Deprecated: (Since version 3.0)Use scrollableSetVadjustment
Sets the vertical adjustment of the viewport.
Properties
shadowType
data ViewportShadowTypePropertyInfo Source #
Instances
constructViewportShadowType :: IsViewport o => ShadowType -> IO (GValueConstruct o) Source #
getViewportShadowType :: (MonadIO m, IsViewport o) => o -> m ShadowType Source #
setViewportShadowType :: (MonadIO m, IsViewport o) => o -> ShadowType -> m () Source #
viewportShadowType :: AttrLabelProxy "shadowType" Source #