| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.Gtk.Objects.Viewport
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.
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.
Accessibility
GtkViewport uses the AccessibleRoleGroup role.
Synopsis
- newtype Viewport = Viewport (ManagedPtr Viewport)
- class (GObject o, IsDescendantOf Viewport o) => IsViewport o
- toViewport :: (MonadIO m, IsViewport o) => o -> m Viewport
- viewportGetChild :: (HasCallStack, MonadIO m, IsViewport a) => a -> m (Maybe Widget)
- viewportGetScrollToFocus :: (HasCallStack, MonadIO m, IsViewport a) => a -> m Bool
- viewportNew :: (HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) => Maybe a -> Maybe b -> m Viewport
- viewportSetChild :: (HasCallStack, MonadIO m, IsViewport a, IsWidget b) => a -> Maybe b -> m ()
- viewportSetScrollToFocus :: (HasCallStack, MonadIO m, IsViewport a) => a -> Bool -> m ()
- clearViewportChild :: (MonadIO m, IsViewport o) => o -> m ()
- constructViewportChild :: (IsViewport o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getViewportChild :: (MonadIO m, IsViewport o) => o -> m (Maybe Widget)
- setViewportChild :: (MonadIO m, IsViewport o, IsWidget a) => o -> a -> m ()
- constructViewportScrollToFocus :: (IsViewport o, MonadIO m) => Bool -> m (GValueConstruct o)
- getViewportScrollToFocus :: (MonadIO m, IsViewport o) => o -> m Bool
- setViewportScrollToFocus :: (MonadIO m, IsViewport o) => o -> Bool -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Viewport Source # | |
| GObject Viewport Source # | |
| Defined in GI.Gtk.Objects.Viewport | |
| ManagedPtrNewtype Viewport Source # | |
| Defined in GI.Gtk.Objects.Viewport Methods toManagedPtr :: Viewport -> ManagedPtr Viewport | |
| TypedObject Viewport Source # | |
| Defined in GI.Gtk.Objects.Viewport | |
| HasParentTypes Viewport Source # | |
| Defined in GI.Gtk.Objects.Viewport | |
| IsGValue (Maybe Viewport) Source # | Convert  | 
| Defined in GI.Gtk.Objects.Viewport Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Viewport -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Viewport) | |
| type ParentTypes Viewport Source # | |
| Defined in GI.Gtk.Objects.Viewport | |
class (GObject o, IsDescendantOf Viewport o) => IsViewport o Source #
Type class for types which can be safely cast to Viewport, for instance with toViewport.
Instances
| (GObject o, IsDescendantOf Viewport o) => IsViewport o Source # | |
| Defined in GI.Gtk.Objects.Viewport | |
toViewport :: (MonadIO m, IsViewport o) => o -> m Viewport Source #
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBorder, getBuildableId, getCanFocus, getCanTarget, getChild, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHadjustment, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getHscrollPolicy, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getScrollToFocus, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getVadjustment, getValign, getVexpand, getVexpandSet, getVisible, getVscrollPolicy, getWidth.
Setters
setCanFocus, setCanTarget, setChild, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHadjustment, setHalign, setHasTooltip, setHexpand, setHexpandSet, setHscrollPolicy, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setScrollToFocus, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setVadjustment, setValign, setVexpand, setVexpandSet, setVisible, setVscrollPolicy.
getChild
Arguments
| :: (HasCallStack, MonadIO m, IsViewport a) | |
| => a | 
 | 
| -> m (Maybe Widget) | Returns: the child widget of  | 
Gets the child widget of viewport.
getScrollToFocus
viewportGetScrollToFocus Source #
Arguments
| :: (HasCallStack, MonadIO m, IsViewport a) | |
| => a | 
 | 
| -> m Bool | Returns:  | 
Gets whether the viewport is scrolling to keep the focused
 child in view. See viewportSetScrollToFocus.
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.
setChild
Arguments
| :: (HasCallStack, MonadIO m, IsViewport a, IsWidget b) | |
| => a | 
 | 
| -> Maybe b | 
 | 
| -> m () | 
Sets the child widget of viewport.
setScrollToFocus
viewportSetScrollToFocus Source #
Arguments
| :: (HasCallStack, MonadIO m, IsViewport a) | |
| => a | 
 | 
| -> Bool | 
 | 
| -> m () | 
Sets whether the viewport should automatically scroll to keep the focused child in view.
Properties
child
No description available in the introspection data.
clearViewportChild :: (MonadIO m, IsViewport o) => o -> m () Source #
Set the value of the “child” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #child
constructViewportChild :: (IsViewport o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “child” property. This is rarely needed directly, but it is used by new.
getViewportChild :: (MonadIO m, IsViewport o) => o -> m (Maybe Widget) Source #
Get the value of the “child” property.
 When overloading is enabled, this is equivalent to
get viewport #child
setViewportChild :: (MonadIO m, IsViewport o, IsWidget a) => o -> a -> m () Source #
Set the value of the “child” property.
 When overloading is enabled, this is equivalent to
setviewport [ #child:=value ]
scrollToFocus
No description available in the introspection data.
constructViewportScrollToFocus :: (IsViewport o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “scroll-to-focus” property. This is rarely needed directly, but it is used by new.
getViewportScrollToFocus :: (MonadIO m, IsViewport o) => o -> m Bool Source #
Get the value of the “scroll-to-focus” property.
 When overloading is enabled, this is equivalent to
get viewport #scrollToFocus
setViewportScrollToFocus :: (MonadIO m, IsViewport o) => o -> Bool -> m () Source #
Set the value of the “scroll-to-focus” property.
 When overloading is enabled, this is equivalent to
setviewport [ #scrollToFocus:=value ]