gi-handy-0.0.8: libhandy bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Handy.Objects.Paginator

Description

The Paginator widget can be used to display a set of pages with swipe-based navigation between them and optional indicators.

Since: 0.0.11

Synopsis

Exported types

newtype Paginator Source #

Memory-managed wrapper type.

Constructors

Paginator (ManagedPtr Paginator) 

Instances

Instances details
Eq Paginator Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

GObject Paginator Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

ManagedPtrNewtype Paginator Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

Methods

toManagedPtr :: Paginator -> ManagedPtr Paginator

TypedObject Paginator Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

Methods

glibType :: IO GType

HasParentTypes Paginator Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

IsGValue (Maybe Paginator) Source #

Convert Paginator to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Handy.Objects.Paginator

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Paginator -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Paginator)

type ParentTypes Paginator Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

type ParentTypes Paginator = '[EventBox, Bin, Container, Widget, Object, ImplementorIface, Buildable, Orientable, Swipeable]

class (GObject o, IsDescendantOf Paginator o) => IsPaginator o Source #

Type class for types which can be safely cast to Paginator, for instance with toPaginator.

Instances

Instances details
(GObject o, IsDescendantOf Paginator o) => IsPaginator o Source # 
Instance details

Defined in GI.Handy.Objects.Paginator

toPaginator :: (MonadIO m, IsPaginator o) => o -> m Paginator Source #

Cast to Paginator, for types for which this is known to be safe. For general casts, use castTo.

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insert, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, prepend, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reorder, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, scrollTo, scrollToFull, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.

Getters

getAboveChild, getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAllowMouseDrag, getAncestor, getAnimationDuration, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getCenterContent, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getIndicatorSpacing, getIndicatorStyle, getInteractive, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getNPages, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPosition, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getSpacing, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisibleWindow, getVisual, getWindow.

Setters

setAboveChild, setAccelPath, setAllocation, setAllowMouseDrag, setAnimationDuration, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setCenterContent, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setIndicatorSpacing, setIndicatorStyle, setInteractive, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setSpacing, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisibleWindow, setVisual, setWindow.

getAllowMouseDrag

paginatorGetAllowMouseDrag Source #

Arguments

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

self: a Paginator

-> m Bool

Returns: True if self can be dragged with mouse

Sets whether self can be dragged with mouse pointer

Since: 0.0.12

getAnimationDuration

paginatorGetAnimationDuration Source #

Arguments

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

self: a Paginator

-> m Word32

Returns: Animation duration in milliseconds

Gets animation duration used by paginatorScrollTo.

Since: 0.0.11

getCenterContent

paginatorGetCenterContent Source #

Arguments

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

self: a Paginator

-> m Bool

Returns: True if self is centering pages

Sets whether self is centering pages.

Since: 0.0.11

getIndicatorSpacing

paginatorGetIndicatorSpacing Source #

Arguments

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

self: a Paginator

-> m Word32

Returns: Spacing between content and indicators

Gets spacing between content and page indicators.

Since: 0.0.11

getIndicatorStyle

paginatorGetIndicatorStyle Source #

Arguments

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

self: a Paginator

-> m PaginatorIndicatorStyle

Returns: the current indicator style

Gets the current page indicator style.

Since: 0.0.11

getInteractive

paginatorGetInteractive Source #

Arguments

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

self: a Paginator

-> m Bool

Returns: True if self can be swiped

Gets whether self can be navigated.

Since: 0.0.11

getNPages

paginatorGetNPages Source #

Arguments

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

self: a Paginator

-> m Word32

Returns: The number of pages in self

Gets the number of pages in self.

Since: 0.0.11

getPosition

paginatorGetPosition Source #

Arguments

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

self: a Paginator

-> m Double

Returns: The scroll position

Gets current scroll position in self. It's unitless, 1 matches 1 page.

Since: 0.0.11

getSpacing

paginatorGetSpacing Source #

Arguments

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

self: a Paginator

-> m Word32

Returns: Spacing between pages

Gets spacing between pages in pixels.

Since: 0.0.11

insert

paginatorInsert Source #

Arguments

:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) 
=> a

self: a Paginator

-> b

child: a widget to add

-> Int32

position: the position to insert child in.

-> m () 

Inserts child into self at position position.

If position is -1, or larger than the number of pages, child will be appended to the end.

Since: 0.0.11

new

paginatorNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m Paginator

Returns: The newly created Paginator widget

Create a new Paginator widget.

Since: 0.0.11

prepend

paginatorPrepend Source #

Arguments

:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) 
=> a

self: a Paginator

-> b

child: a widget to add

-> m () 

Prepends child to self

Since: 0.0.11

reorder

paginatorReorder Source #

Arguments

:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) 
=> a

self: a Paginator

-> b

child: a widget to add

-> Int32

position: the position to move child to.

-> m () 

Moves child into position position.

If position is -1, or larger than the number of pages, child will be moved to the end.

Since: 0.0.11

scrollTo

paginatorScrollTo Source #

Arguments

:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) 
=> a

self: a Paginator

-> b

widget: a child of self

-> m () 

Scrolls to widget position with an animation. Paginator:animation-duration property can be used for controlling the duration.

Since: 0.0.11

scrollToFull

paginatorScrollToFull Source #

Arguments

:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) 
=> a

self: a Paginator

-> b

widget: a child of self

-> Int64

duration: animation duration in milliseconds

-> m () 

Scrolls to widget position with an animation.

Since: 0.0.11

setAllowMouseDrag

paginatorSetAllowMouseDrag Source #

Arguments

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

self: a Paginator

-> Bool

allowMouseDrag: whether self can be dragged with mouse pointer

-> m () 

Sets whether self can be dragged with mouse pointer. If allowMouseDrag is False, dragging is only available on touch.

This should usually be False.

Since: 0.0.12

setAnimationDuration

paginatorSetAnimationDuration Source #

Arguments

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

self: a Paginator

-> Word32

duration: animation duration in milliseconds

-> m () 

Sets animation duration used by paginatorScrollTo.

Since: 0.0.11

setCenterContent

paginatorSetCenterContent Source #

Arguments

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

self: a Paginator

-> Bool

centerContent: whether self should center contents

-> m () 

Sets whether self is centering content. If Paginator:indicator-style is hDYPAGINATORINDICATORSTYLENONE, centering does nothing, otherwise it adds whitespace to the left or above the pages to compensate for the indicators.

Since: 0.0.11

setIndicatorSpacing

paginatorSetIndicatorSpacing Source #

Arguments

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

self: a Paginator

-> Word32

spacing: the new spacing value

-> m () 

Sets spacing between content and page indicators. Does nothing if Paginator:indicator-style is hDYPAGINATORINDICATORSTYLENONE.

Since: 0.0.11

setIndicatorStyle

paginatorSetIndicatorStyle Source #

Arguments

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

self: a Paginator

-> PaginatorIndicatorStyle

style: indicator style to use

-> m () 

Sets style of page indicators. Depending on orientation, they are displayed below or besides the pages. If the pages are meant to be centered, Paginator:center-content can be used to compensate for that.

Since: 0.0.11

setInteractive

paginatorSetInteractive Source #

Arguments

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

self: a Paginator

-> Bool

interactive: whether self can be swiped.

-> m () 

Sets whether self can be navigated. This can be used to temporarily disable a Paginator to only allow swiping in a certain state.

Since: 0.0.11

setSpacing

paginatorSetSpacing Source #

Arguments

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

self: a Paginator

-> Word32

spacing: the new spacing value

-> m () 

Sets spacing between pages in pixels.

Since: 0.0.11

Properties

allowMouseDrag

Sets whether the Paginator can be dragged with mouse pointer. If the value is False, dragging is only available on touch.

This should usually be False.

Since: 0.0.12

constructPaginatorAllowMouseDrag :: (IsPaginator o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “allow-mouse-drag” property. This is rarely needed directly, but it is used by new.

getPaginatorAllowMouseDrag :: (MonadIO m, IsPaginator o) => o -> m Bool Source #

Get the value of the “allow-mouse-drag” property. When overloading is enabled, this is equivalent to

get paginator #allowMouseDrag

setPaginatorAllowMouseDrag :: (MonadIO m, IsPaginator o) => o -> Bool -> m () Source #

Set the value of the “allow-mouse-drag” property. When overloading is enabled, this is equivalent to

set paginator [ #allowMouseDrag := value ]

animationDuration

Animation duration in milliseconds, used by paginatorScrollTo.

Since: 0.0.11

constructPaginatorAnimationDuration :: (IsPaginator o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “animation-duration” property. This is rarely needed directly, but it is used by new.

getPaginatorAnimationDuration :: (MonadIO m, IsPaginator o) => o -> m Word32 Source #

Get the value of the “animation-duration” property. When overloading is enabled, this is equivalent to

get paginator #animationDuration

setPaginatorAnimationDuration :: (MonadIO m, IsPaginator o) => o -> Word32 -> m () Source #

Set the value of the “animation-duration” property. When overloading is enabled, this is equivalent to

set paginator [ #animationDuration := value ]

centerContent

Whether the Paginator is centering pages. If Paginator:indicator-style is hDYPAGINATORINDICATORSTYLENONE, centering does nothing, otherwise it adds whitespace to the left or above the pages to compensate for the indicators.

Since: 0.0.11

constructPaginatorCenterContent :: (IsPaginator o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “center-content” property. This is rarely needed directly, but it is used by new.

getPaginatorCenterContent :: (MonadIO m, IsPaginator o) => o -> m Bool Source #

Get the value of the “center-content” property. When overloading is enabled, this is equivalent to

get paginator #centerContent

setPaginatorCenterContent :: (MonadIO m, IsPaginator o) => o -> Bool -> m () Source #

Set the value of the “center-content” property. When overloading is enabled, this is equivalent to

set paginator [ #centerContent := value ]

indicatorSpacing

Spacing between content and page indicators. Does nothing if Paginator:indicator-style is hDYPAGINATORINDICATORSTYLENONE.

Since: 0.0.11

constructPaginatorIndicatorSpacing :: (IsPaginator o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “indicator-spacing” property. This is rarely needed directly, but it is used by new.

getPaginatorIndicatorSpacing :: (MonadIO m, IsPaginator o) => o -> m Word32 Source #

Get the value of the “indicator-spacing” property. When overloading is enabled, this is equivalent to

get paginator #indicatorSpacing

setPaginatorIndicatorSpacing :: (MonadIO m, IsPaginator o) => o -> Word32 -> m () Source #

Set the value of the “indicator-spacing” property. When overloading is enabled, this is equivalent to

set paginator [ #indicatorSpacing := value ]

indicatorStyle

The style of page indicators. Depending on orientation, they are displayed below or besides the pages. If the pages are meant to be centered, Paginator:center-content can be used to compensate for that.

Since: 0.0.11

constructPaginatorIndicatorStyle :: (IsPaginator o, MonadIO m) => PaginatorIndicatorStyle -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “indicator-style” property. This is rarely needed directly, but it is used by new.

getPaginatorIndicatorStyle :: (MonadIO m, IsPaginator o) => o -> m PaginatorIndicatorStyle Source #

Get the value of the “indicator-style” property. When overloading is enabled, this is equivalent to

get paginator #indicatorStyle

setPaginatorIndicatorStyle :: (MonadIO m, IsPaginator o) => o -> PaginatorIndicatorStyle -> m () Source #

Set the value of the “indicator-style” property. When overloading is enabled, this is equivalent to

set paginator [ #indicatorStyle := value ]

interactive

Whether self can be navigated. This can be used to temporarily disable a Paginator to only allow navigating it in a certain state.

Since: 0.0.11

constructPaginatorInteractive :: (IsPaginator o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “interactive” property. This is rarely needed directly, but it is used by new.

getPaginatorInteractive :: (MonadIO m, IsPaginator o) => o -> m Bool Source #

Get the value of the “interactive” property. When overloading is enabled, this is equivalent to

get paginator #interactive

setPaginatorInteractive :: (MonadIO m, IsPaginator o) => o -> Bool -> m () Source #

Set the value of the “interactive” property. When overloading is enabled, this is equivalent to

set paginator [ #interactive := value ]

nPages

The number of pages in a Paginator

Since: 0.0.11

getPaginatorNPages :: (MonadIO m, IsPaginator o) => o -> m Word32 Source #

Get the value of the “n-pages” property. When overloading is enabled, this is equivalent to

get paginator #nPages

position

Current scrolling position, unitless. 1 matches 1 page. Use paginatorScrollTo for changing it.

Since: 0.0.11

getPaginatorPosition :: (MonadIO m, IsPaginator o) => o -> m Double Source #

Get the value of the “position” property. When overloading is enabled, this is equivalent to

get paginator #position

spacing

Spacing between pages in pixels.

Since: 0.0.11

constructPaginatorSpacing :: (IsPaginator o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “spacing” property. This is rarely needed directly, but it is used by new.

getPaginatorSpacing :: (MonadIO m, IsPaginator o) => o -> m Word32 Source #

Get the value of the “spacing” property. When overloading is enabled, this is equivalent to

get paginator #spacing

setPaginatorSpacing :: (MonadIO m, IsPaginator o) => o -> Word32 -> m () Source #

Set the value of the “spacing” property. When overloading is enabled, this is equivalent to

set paginator [ #spacing := value ]

Signals

pageChanged

type C_PaginatorPageChangedCallback = Ptr () -> Word32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

type PaginatorPageChangedCallback Source #

Arguments

 = Word32

index: Current page

-> IO () 

This signal is emitted after a page has been changed. This can be used to implement "infinite scrolling" by connecting to this signal and amending the pages.

Since: 0.0.12

afterPaginatorPageChanged :: (IsPaginator a, MonadIO m) => a -> PaginatorPageChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after paginator #pageChanged callback

onPaginatorPageChanged :: (IsPaginator a, MonadIO m) => a -> PaginatorPageChangedCallback -> m SignalHandlerId Source #

Connect a signal handler for the pageChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on paginator #pageChanged callback