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 |
- Exported types
- Methods
- addNamed
- addTitled
- getChildByName
- getHhomogeneous
- getHomogeneous
- getInterpolateSize
- getTransitionDuration
- getTransitionRunning
- getTransitionType
- getVhomogeneous
- getVisibleChild
- getVisibleChildName
- new
- setHhomogeneous
- setHomogeneous
- setInterpolateSize
- setTransitionDuration
- setTransitionType
- setVhomogeneous
- setVisibleChild
- setVisibleChildFull
- setVisibleChildName
- Properties
The GtkStack widget is a container which only shows
one of its children at a time. In contrast to GtkNotebook,
GtkStack does not provide a means for users to change the
visible child. Instead, the StackSwitcher
widget can be
used with GtkStack to provide this functionality.
Transitions between pages can be animated as slides or
fades. This can be controlled with stackSetTransitionType
.
These animations respect the Settings
:gtk-enable-animations
setting.
The GtkStack widget was added in GTK+ 3.10.
CSS nodes
GtkStack has a single CSS node named stack.
- newtype Stack = Stack (ManagedPtr Stack)
- class GObject o => IsStack o
- toStack :: IsStack o => o -> IO Stack
- noStack :: Maybe Stack
- data StackAddNamedMethodInfo
- stackAddNamed :: (HasCallStack, MonadIO m, IsStack a, IsWidget b) => a -> b -> Text -> m ()
- data StackAddTitledMethodInfo
- stackAddTitled :: (HasCallStack, MonadIO m, IsStack a, IsWidget b) => a -> b -> Text -> Text -> m ()
- data StackGetChildByNameMethodInfo
- stackGetChildByName :: (HasCallStack, MonadIO m, IsStack a) => a -> Text -> m (Maybe Widget)
- data StackGetHhomogeneousMethodInfo
- stackGetHhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- data StackGetHomogeneousMethodInfo
- stackGetHomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- data StackGetInterpolateSizeMethodInfo
- stackGetInterpolateSize :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- data StackGetTransitionDurationMethodInfo
- stackGetTransitionDuration :: (HasCallStack, MonadIO m, IsStack a) => a -> m Word32
- data StackGetTransitionRunningMethodInfo
- stackGetTransitionRunning :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- data StackGetTransitionTypeMethodInfo
- stackGetTransitionType :: (HasCallStack, MonadIO m, IsStack a) => a -> m StackTransitionType
- data StackGetVhomogeneousMethodInfo
- stackGetVhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- data StackGetVisibleChildMethodInfo
- stackGetVisibleChild :: (HasCallStack, MonadIO m, IsStack a) => a -> m (Maybe Widget)
- data StackGetVisibleChildNameMethodInfo
- stackGetVisibleChildName :: (HasCallStack, MonadIO m, IsStack a) => a -> m (Maybe Text)
- stackNew :: (HasCallStack, MonadIO m) => m Stack
- data StackSetHhomogeneousMethodInfo
- stackSetHhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- data StackSetHomogeneousMethodInfo
- stackSetHomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- data StackSetInterpolateSizeMethodInfo
- stackSetInterpolateSize :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- data StackSetTransitionDurationMethodInfo
- stackSetTransitionDuration :: (HasCallStack, MonadIO m, IsStack a) => a -> Word32 -> m ()
- data StackSetTransitionTypeMethodInfo
- stackSetTransitionType :: (HasCallStack, MonadIO m, IsStack a) => a -> StackTransitionType -> m ()
- data StackSetVhomogeneousMethodInfo
- stackSetVhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- data StackSetVisibleChildMethodInfo
- stackSetVisibleChild :: (HasCallStack, MonadIO m, IsStack a, IsWidget b) => a -> b -> m ()
- data StackSetVisibleChildFullMethodInfo
- stackSetVisibleChildFull :: (HasCallStack, MonadIO m, IsStack a) => a -> Text -> StackTransitionType -> m ()
- data StackSetVisibleChildNameMethodInfo
- stackSetVisibleChildName :: (HasCallStack, MonadIO m, IsStack a) => a -> Text -> m ()
- data StackHhomogeneousPropertyInfo
- constructStackHhomogeneous :: IsStack o => Bool -> IO (GValueConstruct o)
- getStackHhomogeneous :: (MonadIO m, IsStack o) => o -> m Bool
- setStackHhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- stackHhomogeneous :: AttrLabelProxy "hhomogeneous"
- data StackHomogeneousPropertyInfo
- constructStackHomogeneous :: IsStack o => Bool -> IO (GValueConstruct o)
- getStackHomogeneous :: (MonadIO m, IsStack o) => o -> m Bool
- setStackHomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- stackHomogeneous :: AttrLabelProxy "homogeneous"
- data StackInterpolateSizePropertyInfo
- constructStackInterpolateSize :: IsStack o => Bool -> IO (GValueConstruct o)
- getStackInterpolateSize :: (MonadIO m, IsStack o) => o -> m Bool
- setStackInterpolateSize :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- stackInterpolateSize :: AttrLabelProxy "interpolateSize"
- data StackTransitionDurationPropertyInfo
- constructStackTransitionDuration :: IsStack o => Word32 -> IO (GValueConstruct o)
- getStackTransitionDuration :: (MonadIO m, IsStack o) => o -> m Word32
- setStackTransitionDuration :: (MonadIO m, IsStack o) => o -> Word32 -> m ()
- stackTransitionDuration :: AttrLabelProxy "transitionDuration"
- data StackTransitionRunningPropertyInfo
- getStackTransitionRunning :: (MonadIO m, IsStack o) => o -> m Bool
- stackTransitionRunning :: AttrLabelProxy "transitionRunning"
- data StackTransitionTypePropertyInfo
- constructStackTransitionType :: IsStack o => StackTransitionType -> IO (GValueConstruct o)
- getStackTransitionType :: (MonadIO m, IsStack o) => o -> m StackTransitionType
- setStackTransitionType :: (MonadIO m, IsStack o) => o -> StackTransitionType -> m ()
- stackTransitionType :: AttrLabelProxy "transitionType"
- data StackVhomogeneousPropertyInfo
- constructStackVhomogeneous :: IsStack o => Bool -> IO (GValueConstruct o)
- getStackVhomogeneous :: (MonadIO m, IsStack o) => o -> m Bool
- setStackVhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- stackVhomogeneous :: AttrLabelProxy "vhomogeneous"
- data StackVisibleChildPropertyInfo
- constructStackVisibleChild :: (IsStack o, IsWidget a) => a -> IO (GValueConstruct o)
- getStackVisibleChild :: (MonadIO m, IsStack o) => o -> m (Maybe Widget)
- setStackVisibleChild :: (MonadIO m, IsStack o, IsWidget a) => o -> a -> m ()
- stackVisibleChild :: AttrLabelProxy "visibleChild"
- data StackVisibleChildNamePropertyInfo
- constructStackVisibleChildName :: IsStack o => Text -> IO (GValueConstruct o)
- getStackVisibleChildName :: (MonadIO m, IsStack o) => o -> m (Maybe Text)
- setStackVisibleChildName :: (MonadIO m, IsStack o) => o -> Text -> m ()
- stackVisibleChildName :: AttrLabelProxy "visibleChildName"
Exported types
GObject Stack Source # | |
IsImplementorIface Stack Source # | |
IsObject Stack Source # | |
IsWidget Stack Source # | |
IsStack Stack Source # | |
IsContainer Stack Source # | |
IsBuildable Stack Source # | |
((~) * info (ResolveStackMethod t Stack), MethodInfo * info Stack p) => IsLabel t (Stack -> p) Source # | |
((~) * info (ResolveStackMethod t Stack), MethodInfo * info Stack p) => IsLabelProxy t (Stack -> p) Source # | |
HasAttributeList * Stack Source # | |
type AttributeList Stack Source # | |
type SignalList Stack Source # | |
Methods
addNamed
data StackAddNamedMethodInfo Source #
((~) * signature (b -> Text -> m ()), MonadIO m, IsStack a, IsWidget b) => MethodInfo * StackAddNamedMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a, IsWidget b) | |
=> a |
|
-> b |
|
-> Text |
|
-> m () |
Adds a child to stack
.
The child is identified by the name
.
Since: 3.10
addTitled
:: (HasCallStack, MonadIO m, IsStack a, IsWidget b) | |
=> a |
|
-> b |
|
-> Text |
|
-> Text |
|
-> m () |
Adds a child to stack
.
The child is identified by the name
. The title
will be used by StackSwitcher
to represent
child
in a tab bar, so it should be short.
Since: 3.10
getChildByName
getHhomogeneous
data StackGetHhomogeneousMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsStack a) => MethodInfo * StackGetHhomogeneousMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether stack
is horizontally homogeneous.
See stackSetHhomogeneous
.
Since: 3.16
getHomogeneous
data StackGetHomogeneousMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsStack a) => MethodInfo * StackGetHomogeneousMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether stack
is homogeneous.
See stackSetHomogeneous
.
Since: 3.10
getInterpolateSize
data StackGetInterpolateSizeMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsStack a) => MethodInfo * StackGetInterpolateSizeMethodInfo a signature Source # | |
stackGetInterpolateSize Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: |
Returns wether the Stack
is set up to interpolate between
the sizes of children on page switch.
Since: 3.18
getTransitionDuration
data StackGetTransitionDurationMethodInfo Source #
((~) * signature (m Word32), MonadIO m, IsStack a) => MethodInfo * StackGetTransitionDurationMethodInfo a signature Source # | |
stackGetTransitionDuration Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Word32 | Returns: the transition duration |
Returns the amount of time (in milliseconds) that
transitions between pages in stack
will take.
Since: 3.10
getTransitionRunning
data StackGetTransitionRunningMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsStack a) => MethodInfo * StackGetTransitionRunningMethodInfo a signature Source # | |
stackGetTransitionRunning Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether the stack
is currently in a transition from one page to
another.
Since: 3.12
getTransitionType
data StackGetTransitionTypeMethodInfo Source #
((~) * signature (m StackTransitionType), MonadIO m, IsStack a) => MethodInfo * StackGetTransitionTypeMethodInfo a signature Source # | |
stackGetTransitionType Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m StackTransitionType | Returns: the current transition type of |
Gets the type of animation that will be used
for transitions between pages in stack
.
Since: 3.10
getVhomogeneous
data StackGetVhomogeneousMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsStack a) => MethodInfo * StackGetVhomogeneousMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether stack
is vertically homogeneous.
See stackSetVhomogeneous
.
Since: 3.16
getVisibleChild
data StackGetVisibleChildMethodInfo Source #
((~) * signature (m (Maybe Widget)), MonadIO m, IsStack a) => MethodInfo * StackGetVisibleChildMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the visible child of the |
Gets the currently visible child of stack
, or Nothing
if
there are no visible children.
Since: 3.10
getVisibleChildName
data StackGetVisibleChildNameMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsStack a) => MethodInfo * StackGetVisibleChildNameMethodInfo a signature Source # | |
stackGetVisibleChildName Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m (Maybe Text) | Returns: the name of the visible child of the |
Returns the name of the currently visible child of stack
, or
Nothing
if there is no visible child.
Since: 3.10
new
:: (HasCallStack, MonadIO m) | |
=> m Stack | Returns: a new |
Creates a new Stack
container.
Since: 3.10
setHhomogeneous
data StackSetHhomogeneousMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetHhomogeneousMethodInfo a signature Source # | |
setHomogeneous
data StackSetHomogeneousMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetHomogeneousMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the Stack
to be homogeneous or not. If it
is homogeneous, the Stack
will request the same
size for all its children. If it isn't, the stack
may change size when a different child becomes visible.
Since 3.16, homogeneity can be controlled separately
for horizontal and vertical size, with the
Stack
:hhomogeneous
and Stack
:vhomogeneous
.
Since: 3.10
setInterpolateSize
data StackSetInterpolateSizeMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetInterpolateSizeMethodInfo a signature Source # | |
stackSetInterpolateSize Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether or not stack
will interpolate its size when
changing the visible child. If the Stack
:interpolate-size
property is set to True
, stack
will interpolate its size between
the current one and the one it'll take after changing the
visible child, according to the set transition duration.
Since: 3.18
setTransitionDuration
data StackSetTransitionDurationMethodInfo Source #
((~) * signature (Word32 -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetTransitionDurationMethodInfo a signature Source # | |
stackSetTransitionDuration Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Word32 |
|
-> m () |
Sets the duration that transitions between pages in stack
will take.
Since: 3.10
setTransitionType
data StackSetTransitionTypeMethodInfo Source #
((~) * signature (StackTransitionType -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetTransitionTypeMethodInfo a signature Source # | |
stackSetTransitionType Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> StackTransitionType |
|
-> m () |
Sets the type of animation that will be used for
transitions between pages in stack
. Available
types include various kinds of fades and slides.
The transition type can be changed without problems at runtime, so it is possible to change the animation based on the page that is about to become current.
Since: 3.10
setVhomogeneous
data StackSetVhomogeneousMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetVhomogeneousMethodInfo a signature Source # | |
setVisibleChild
data StackSetVisibleChildMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsStack a, IsWidget b) => MethodInfo * StackSetVisibleChildMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsStack a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Makes child
the visible child of stack
.
If child
is different from the currently
visible child, the transition between the
two will be animated with the current
transition type of stack
.
Note that the child
widget has to be visible itself
(see widgetShow
) in order to become the visible
child of stack
.
Since: 3.10
setVisibleChildFull
data StackSetVisibleChildFullMethodInfo Source #
((~) * signature (Text -> StackTransitionType -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetVisibleChildFullMethodInfo a signature Source # | |
stackSetVisibleChildFull Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Text |
|
-> StackTransitionType |
|
-> m () |
Makes the child with the given name visible.
Note that the child widget has to be visible itself
(see widgetShow
) in order to become the visible
child of stack
.
Since: 3.10
setVisibleChildName
data StackSetVisibleChildNameMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetVisibleChildNameMethodInfo a signature Source # | |
stackSetVisibleChildName Source #
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Text |
|
-> m () |
Makes the child with the given name visible.
If child
is different from the currently
visible child, the transition between the
two will be animated with the current
transition type of stack
.
Note that the child widget has to be visible itself
(see widgetShow
) in order to become the visible
child of stack
.
Since: 3.10
Properties
hhomogeneous
data StackHhomogeneousPropertyInfo Source #
constructStackHhomogeneous :: IsStack o => Bool -> IO (GValueConstruct o) Source #
stackHhomogeneous :: AttrLabelProxy "hhomogeneous" Source #
homogeneous
data StackHomogeneousPropertyInfo Source #
constructStackHomogeneous :: IsStack o => Bool -> IO (GValueConstruct o) Source #
stackHomogeneous :: AttrLabelProxy "homogeneous" Source #
interpolateSize
data StackInterpolateSizePropertyInfo Source #
constructStackInterpolateSize :: IsStack o => Bool -> IO (GValueConstruct o) Source #
stackInterpolateSize :: AttrLabelProxy "interpolateSize" Source #
transitionDuration
data StackTransitionDurationPropertyInfo Source #
constructStackTransitionDuration :: IsStack o => Word32 -> IO (GValueConstruct o) Source #
stackTransitionDuration :: AttrLabelProxy "transitionDuration" Source #
transitionRunning
data StackTransitionRunningPropertyInfo Source #
stackTransitionRunning :: AttrLabelProxy "transitionRunning" Source #
transitionType
data StackTransitionTypePropertyInfo Source #
constructStackTransitionType :: IsStack o => StackTransitionType -> IO (GValueConstruct o) Source #
getStackTransitionType :: (MonadIO m, IsStack o) => o -> m StackTransitionType Source #
setStackTransitionType :: (MonadIO m, IsStack o) => o -> StackTransitionType -> m () Source #
stackTransitionType :: AttrLabelProxy "transitionType" Source #
vhomogeneous
data StackVhomogeneousPropertyInfo Source #
constructStackVhomogeneous :: IsStack o => Bool -> IO (GValueConstruct o) Source #
stackVhomogeneous :: AttrLabelProxy "vhomogeneous" Source #
visibleChild
data StackVisibleChildPropertyInfo Source #
constructStackVisibleChild :: (IsStack o, IsWidget a) => a -> IO (GValueConstruct o) Source #
stackVisibleChild :: AttrLabelProxy "visibleChild" Source #
visibleChildName
data StackVisibleChildNamePropertyInfo Source #
constructStackVisibleChildName :: IsStack o => Text -> IO (GValueConstruct o) Source #
stackVisibleChildName :: AttrLabelProxy "visibleChildName" Source #