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

GI.Handy.Objects.Paginator

Description

No description available in the introspection data.

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

Methods

(==) :: Paginator -> Paginator -> Bool

(/=) :: Paginator -> Paginator -> Bool

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

IsGValue Paginator Source #

Convert Paginator to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Handy.Objects.Paginator

Methods

toGValue :: Paginator -> IO GValue

fromGValue :: GValue -> IO Paginator

HasParentTypes Paginator Source # 
Instance details

Defined in GI.Handy.Objects.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

Overloaded methods

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