Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- Overloaded methods
- getAllowMouseDrag
- getAnimationDuration
- getCenterContent
- getIndicatorSpacing
- getIndicatorStyle
- getInteractive
- getNPages
- getPosition
- getSpacing
- insert
- new
- prepend
- reorder
- scrollTo
- scrollToFull
- setAllowMouseDrag
- setAnimationDuration
- setCenterContent
- setIndicatorSpacing
- setIndicatorStyle
- setInteractive
- setSpacing
- Properties
- Signals
No description available in the introspection data.
Synopsis
- newtype Paginator = Paginator (ManagedPtr Paginator)
- class (GObject o, IsDescendantOf Paginator o) => IsPaginator o
- toPaginator :: (MonadIO m, IsPaginator o) => o -> m Paginator
- paginatorGetAllowMouseDrag :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Bool
- paginatorGetAnimationDuration :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Word32
- paginatorGetCenterContent :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Bool
- paginatorGetIndicatorSpacing :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Word32
- paginatorGetIndicatorStyle :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m PaginatorIndicatorStyle
- paginatorGetInteractive :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Bool
- paginatorGetNPages :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Word32
- paginatorGetPosition :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Double
- paginatorGetSpacing :: (HasCallStack, MonadIO m, IsPaginator a) => a -> m Word32
- paginatorInsert :: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) => a -> b -> Int32 -> m ()
- paginatorNew :: (HasCallStack, MonadIO m) => m Paginator
- paginatorPrepend :: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) => a -> b -> m ()
- paginatorReorder :: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) => a -> b -> Int32 -> m ()
- paginatorScrollTo :: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) => a -> b -> m ()
- paginatorScrollToFull :: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) => a -> b -> Int64 -> m ()
- paginatorSetAllowMouseDrag :: (HasCallStack, MonadIO m, IsPaginator a) => a -> Bool -> m ()
- paginatorSetAnimationDuration :: (HasCallStack, MonadIO m, IsPaginator a) => a -> Word32 -> m ()
- paginatorSetCenterContent :: (HasCallStack, MonadIO m, IsPaginator a) => a -> Bool -> m ()
- paginatorSetIndicatorSpacing :: (HasCallStack, MonadIO m, IsPaginator a) => a -> Word32 -> m ()
- paginatorSetIndicatorStyle :: (HasCallStack, MonadIO m, IsPaginator a) => a -> PaginatorIndicatorStyle -> m ()
- paginatorSetInteractive :: (HasCallStack, MonadIO m, IsPaginator a) => a -> Bool -> m ()
- paginatorSetSpacing :: (HasCallStack, MonadIO m, IsPaginator a) => a -> Word32 -> m ()
- constructPaginatorAllowMouseDrag :: (IsPaginator o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPaginatorAllowMouseDrag :: (MonadIO m, IsPaginator o) => o -> m Bool
- setPaginatorAllowMouseDrag :: (MonadIO m, IsPaginator o) => o -> Bool -> m ()
- constructPaginatorAnimationDuration :: (IsPaginator o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getPaginatorAnimationDuration :: (MonadIO m, IsPaginator o) => o -> m Word32
- setPaginatorAnimationDuration :: (MonadIO m, IsPaginator o) => o -> Word32 -> m ()
- constructPaginatorCenterContent :: (IsPaginator o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPaginatorCenterContent :: (MonadIO m, IsPaginator o) => o -> m Bool
- setPaginatorCenterContent :: (MonadIO m, IsPaginator o) => o -> Bool -> m ()
- constructPaginatorIndicatorSpacing :: (IsPaginator o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getPaginatorIndicatorSpacing :: (MonadIO m, IsPaginator o) => o -> m Word32
- setPaginatorIndicatorSpacing :: (MonadIO m, IsPaginator o) => o -> Word32 -> m ()
- constructPaginatorIndicatorStyle :: (IsPaginator o, MonadIO m) => PaginatorIndicatorStyle -> m (GValueConstruct o)
- getPaginatorIndicatorStyle :: (MonadIO m, IsPaginator o) => o -> m PaginatorIndicatorStyle
- setPaginatorIndicatorStyle :: (MonadIO m, IsPaginator o) => o -> PaginatorIndicatorStyle -> m ()
- constructPaginatorInteractive :: (IsPaginator o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPaginatorInteractive :: (MonadIO m, IsPaginator o) => o -> m Bool
- setPaginatorInteractive :: (MonadIO m, IsPaginator o) => o -> Bool -> m ()
- getPaginatorNPages :: (MonadIO m, IsPaginator o) => o -> m Word32
- getPaginatorPosition :: (MonadIO m, IsPaginator o) => o -> m Double
- constructPaginatorSpacing :: (IsPaginator o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getPaginatorSpacing :: (MonadIO m, IsPaginator o) => o -> m Word32
- setPaginatorSpacing :: (MonadIO m, IsPaginator o) => o -> Word32 -> m ()
- type C_PaginatorPageChangedCallback = Ptr () -> Word32 -> Ptr () -> IO ()
- type PaginatorPageChangedCallback = Word32 -> IO ()
- afterPaginatorPageChanged :: (IsPaginator a, MonadIO m) => a -> PaginatorPageChangedCallback -> m SignalHandlerId
- genClosure_PaginatorPageChanged :: MonadIO m => PaginatorPageChangedCallback -> m (GClosure C_PaginatorPageChangedCallback)
- mk_PaginatorPageChangedCallback :: C_PaginatorPageChangedCallback -> IO (FunPtr C_PaginatorPageChangedCallback)
- noPaginatorPageChangedCallback :: Maybe PaginatorPageChangedCallback
- onPaginatorPageChanged :: (IsPaginator a, MonadIO m) => a -> PaginatorPageChangedCallback -> m SignalHandlerId
- wrap_PaginatorPageChangedCallback :: PaginatorPageChangedCallback -> C_PaginatorPageChangedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Paginator Source # | |
GObject Paginator Source # | |
Defined in GI.Handy.Objects.Paginator | |
ManagedPtrNewtype Paginator Source # | |
Defined in GI.Handy.Objects.Paginator toManagedPtr :: Paginator -> ManagedPtr Paginator | |
TypedObject Paginator Source # | |
Defined in GI.Handy.Objects.Paginator glibType :: IO GType | |
IsGValue Paginator Source # | Convert |
Defined in GI.Handy.Objects.Paginator toGValue :: Paginator -> IO GValue fromGValue :: GValue -> IO Paginator | |
HasParentTypes Paginator Source # | |
Defined in GI.Handy.Objects.Paginator | |
type ParentTypes Paginator Source # | |
Defined in GI.Handy.Objects.Paginator |
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
(GObject o, IsDescendantOf Paginator o) => IsPaginator o Source # | |
Defined in GI.Handy.Objects.Paginator |
toPaginator :: (MonadIO m, IsPaginator o) => o -> m Paginator Source #
Methods
Overloaded methods
getAllowMouseDrag
paginatorGetAllowMouseDrag Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Bool | Returns: |
Sets whether self
can be dragged with mouse pointer
Since: 0.0.12
getAnimationDuration
paginatorGetAnimationDuration Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Word32 | Returns: Animation duration in milliseconds |
Gets animation duration used by paginatorScrollTo
.
Since: 0.0.11
getCenterContent
paginatorGetCenterContent Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Bool | Returns: |
Sets whether self
is centering pages.
Since: 0.0.11
getIndicatorSpacing
paginatorGetIndicatorSpacing Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Word32 | Returns: Spacing between content and indicators |
Gets spacing between content and page indicators.
Since: 0.0.11
getIndicatorStyle
paginatorGetIndicatorStyle Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m PaginatorIndicatorStyle | Returns: the current indicator style |
Gets the current page indicator style.
Since: 0.0.11
getInteractive
paginatorGetInteractive Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether self
can be navigated.
Since: 0.0.11
getNPages
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Word32 | Returns: The number of pages in |
Gets the number of pages in self
.
Since: 0.0.11
getPosition
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Double | Returns: The scroll position |
Gets current scroll position in self
. It's unitless, 1 matches 1 page.
Since: 0.0.11
getSpacing
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> m Word32 | Returns: Spacing between pages |
Gets spacing between pages in pixels.
Since: 0.0.11
insert
:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> 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
Create a new Paginator
widget.
Since: 0.0.11
prepend
:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Prepends child
to self
Since: 0.0.11
reorder
:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> 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
:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) | |
=> a |
|
-> b |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPaginator a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int64 |
|
-> m () |
Scrolls to widget
position with an animation.
Since: 0.0.11
setAllowMouseDrag
paginatorSetAllowMouseDrag Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> Bool |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets animation duration used by paginatorScrollTo
.
Since: 0.0.11
setCenterContent
paginatorSetCenterContent Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> Bool |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets spacing between content and page indicators. Does nothing if
Paginator
:indicator-style
is hDYPAGINATORINDICATORSTYLENONE
.
Since: 0.0.11
setIndicatorStyle
paginatorSetIndicatorStyle Source #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> PaginatorIndicatorStyle |
|
-> 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 #
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> Bool |
|
-> 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
:: (HasCallStack, MonadIO m, IsPaginator a) | |
=> a |
|
-> Word32 |
|
-> 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 #
= Word32 |
|
-> 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
genClosure_PaginatorPageChanged :: MonadIO m => PaginatorPageChangedCallback -> m (GClosure C_PaginatorPageChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_PaginatorPageChangedCallback :: C_PaginatorPageChangedCallback -> IO (FunPtr C_PaginatorPageChangedCallback) Source #
Generate a function pointer callable from C code, from a C_PaginatorPageChangedCallback
.
noPaginatorPageChangedCallback :: Maybe PaginatorPageChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
PaginatorPageChangedCallback
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