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
- 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.
Synopsis
- newtype Stack = Stack (ManagedPtr Stack)
- class (GObject o, IsDescendantOf Stack o) => IsStack o
- toStack :: (MonadIO m, IsStack o) => o -> m Stack
- stackAddNamed :: (HasCallStack, MonadIO m, IsStack a, IsWidget b) => a -> b -> Text -> m ()
- stackAddTitled :: (HasCallStack, MonadIO m, IsStack a, IsWidget b) => a -> b -> Text -> Text -> m ()
- stackGetChildByName :: (HasCallStack, MonadIO m, IsStack a) => a -> Text -> m (Maybe Widget)
- stackGetHhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- stackGetHomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- stackGetInterpolateSize :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- stackGetTransitionDuration :: (HasCallStack, MonadIO m, IsStack a) => a -> m Word32
- stackGetTransitionRunning :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- stackGetTransitionType :: (HasCallStack, MonadIO m, IsStack a) => a -> m StackTransitionType
- stackGetVhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> m Bool
- stackGetVisibleChild :: (HasCallStack, MonadIO m, IsStack a) => a -> m (Maybe Widget)
- stackGetVisibleChildName :: (HasCallStack, MonadIO m, IsStack a) => a -> m (Maybe Text)
- stackNew :: (HasCallStack, MonadIO m) => m Stack
- stackSetHhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- stackSetHomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- stackSetInterpolateSize :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- stackSetTransitionDuration :: (HasCallStack, MonadIO m, IsStack a) => a -> Word32 -> m ()
- stackSetTransitionType :: (HasCallStack, MonadIO m, IsStack a) => a -> StackTransitionType -> m ()
- stackSetVhomogeneous :: (HasCallStack, MonadIO m, IsStack a) => a -> Bool -> m ()
- stackSetVisibleChild :: (HasCallStack, MonadIO m, IsStack a, IsWidget b) => a -> b -> m ()
- stackSetVisibleChildFull :: (HasCallStack, MonadIO m, IsStack a) => a -> Text -> StackTransitionType -> m ()
- stackSetVisibleChildName :: (HasCallStack, MonadIO m, IsStack a) => a -> Text -> m ()
- constructStackHhomogeneous :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStackHhomogeneous :: (MonadIO m, IsStack o) => o -> m Bool
- setStackHhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- constructStackHomogeneous :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStackHomogeneous :: (MonadIO m, IsStack o) => o -> m Bool
- setStackHomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- constructStackInterpolateSize :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStackInterpolateSize :: (MonadIO m, IsStack o) => o -> m Bool
- setStackInterpolateSize :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- constructStackTransitionDuration :: (IsStack o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getStackTransitionDuration :: (MonadIO m, IsStack o) => o -> m Word32
- setStackTransitionDuration :: (MonadIO m, IsStack o) => o -> Word32 -> m ()
- getStackTransitionRunning :: (MonadIO m, IsStack o) => o -> m Bool
- constructStackTransitionType :: (IsStack o, MonadIO m) => StackTransitionType -> m (GValueConstruct o)
- getStackTransitionType :: (MonadIO m, IsStack o) => o -> m StackTransitionType
- setStackTransitionType :: (MonadIO m, IsStack o) => o -> StackTransitionType -> m ()
- constructStackVhomogeneous :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o)
- getStackVhomogeneous :: (MonadIO m, IsStack o) => o -> m Bool
- setStackVhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m ()
- constructStackVisibleChild :: (IsStack o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getStackVisibleChild :: (MonadIO m, IsStack o) => o -> m (Maybe Widget)
- setStackVisibleChild :: (MonadIO m, IsStack o, IsWidget a) => o -> a -> m ()
- constructStackVisibleChildName :: (IsStack o, MonadIO m) => Text -> m (GValueConstruct o)
- getStackVisibleChildName :: (MonadIO m, IsStack o) => o -> m (Maybe Text)
- setStackVisibleChildName :: (MonadIO m, IsStack o) => o -> Text -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Stack Source # | |
IsGValue Stack Source # | Convert |
ManagedPtrNewtype Stack Source # | |
Defined in GI.Gtk.Objects.Stack toManagedPtr :: Stack -> ManagedPtr Stack # | |
TypedObject Stack Source # | |
Defined in GI.Gtk.Objects.Stack | |
GObject Stack Source # | |
Defined in GI.Gtk.Objects.Stack | |
HasParentTypes Stack Source # | |
Defined in GI.Gtk.Objects.Stack | |
type ParentTypes Stack Source # | |
Defined in GI.Gtk.Objects.Stack |
class (GObject o, IsDescendantOf Stack o) => IsStack o Source #
Instances
(GObject o, IsDescendantOf Stack o) => IsStack o Source # | |
Defined in GI.Gtk.Objects.Stack |
Methods
Overloaded methods
addNamed
:: (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
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether stack
is horizontally homogeneous.
See stackSetHhomogeneous
.
Since: 3.16
getHomogeneous
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether stack
is homogeneous.
See stackSetHomogeneous
.
Since: 3.10
getInterpolateSize
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
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
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
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
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> m Bool | Returns: whether |
Gets whether stack
is vertically homogeneous.
See stackSetVhomogeneous
.
Since: 3.16
getVisibleChild
:: (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
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
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Bool |
|
-> m () |
setHomogeneous
:: (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
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
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
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
:: (HasCallStack, MonadIO m, IsStack a) | |
=> a |
|
-> Bool |
|
-> m () |
setVisibleChild
:: (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
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
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
True
if the stack allocates the same width for all children.
Since: 3.16
constructStackHhomogeneous :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “hhomogeneous
” property. This is rarely needed directly, but it is used by new
.
getStackHhomogeneous :: (MonadIO m, IsStack o) => o -> m Bool Source #
Get the value of the “hhomogeneous
” property.
When overloading is enabled, this is equivalent to
get
stack #hhomogeneous
setStackHhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #
Set the value of the “hhomogeneous
” property.
When overloading is enabled, this is equivalent to
set
stack [ #hhomogeneous:=
value ]
homogeneous
No description available in the introspection data.
constructStackHomogeneous :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “homogeneous
” property. This is rarely needed directly, but it is used by new
.
getStackHomogeneous :: (MonadIO m, IsStack o) => o -> m Bool Source #
Get the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
get
stack #homogeneous
setStackHomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #
Set the value of the “homogeneous
” property.
When overloading is enabled, this is equivalent to
set
stack [ #homogeneous:=
value ]
interpolateSize
No description available in the introspection data.
constructStackInterpolateSize :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “interpolate-size
” property. This is rarely needed directly, but it is used by new
.
getStackInterpolateSize :: (MonadIO m, IsStack o) => o -> m Bool Source #
Get the value of the “interpolate-size
” property.
When overloading is enabled, this is equivalent to
get
stack #interpolateSize
setStackInterpolateSize :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #
Set the value of the “interpolate-size
” property.
When overloading is enabled, this is equivalent to
set
stack [ #interpolateSize:=
value ]
transitionDuration
No description available in the introspection data.
constructStackTransitionDuration :: (IsStack o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “transition-duration
” property. This is rarely needed directly, but it is used by new
.
getStackTransitionDuration :: (MonadIO m, IsStack o) => o -> m Word32 Source #
Get the value of the “transition-duration
” property.
When overloading is enabled, this is equivalent to
get
stack #transitionDuration
setStackTransitionDuration :: (MonadIO m, IsStack o) => o -> Word32 -> m () Source #
Set the value of the “transition-duration
” property.
When overloading is enabled, this is equivalent to
set
stack [ #transitionDuration:=
value ]
transitionRunning
No description available in the introspection data.
getStackTransitionRunning :: (MonadIO m, IsStack o) => o -> m Bool Source #
Get the value of the “transition-running
” property.
When overloading is enabled, this is equivalent to
get
stack #transitionRunning
transitionType
No description available in the introspection data.
constructStackTransitionType :: (IsStack o, MonadIO m) => StackTransitionType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “transition-type
” property. This is rarely needed directly, but it is used by new
.
getStackTransitionType :: (MonadIO m, IsStack o) => o -> m StackTransitionType Source #
Get the value of the “transition-type
” property.
When overloading is enabled, this is equivalent to
get
stack #transitionType
setStackTransitionType :: (MonadIO m, IsStack o) => o -> StackTransitionType -> m () Source #
Set the value of the “transition-type
” property.
When overloading is enabled, this is equivalent to
set
stack [ #transitionType:=
value ]
vhomogeneous
True
if the stack allocates the same height for all children.
Since: 3.16
constructStackVhomogeneous :: (IsStack o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “vhomogeneous
” property. This is rarely needed directly, but it is used by new
.
getStackVhomogeneous :: (MonadIO m, IsStack o) => o -> m Bool Source #
Get the value of the “vhomogeneous
” property.
When overloading is enabled, this is equivalent to
get
stack #vhomogeneous
setStackVhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #
Set the value of the “vhomogeneous
” property.
When overloading is enabled, this is equivalent to
set
stack [ #vhomogeneous:=
value ]
visibleChild
No description available in the introspection data.
constructStackVisibleChild :: (IsStack o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible-child
” property. This is rarely needed directly, but it is used by new
.
getStackVisibleChild :: (MonadIO m, IsStack o) => o -> m (Maybe Widget) Source #
Get the value of the “visible-child
” property.
When overloading is enabled, this is equivalent to
get
stack #visibleChild
setStackVisibleChild :: (MonadIO m, IsStack o, IsWidget a) => o -> a -> m () Source #
Set the value of the “visible-child
” property.
When overloading is enabled, this is equivalent to
set
stack [ #visibleChild:=
value ]
visibleChildName
No description available in the introspection data.
constructStackVisibleChildName :: (IsStack o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible-child-name
” property. This is rarely needed directly, but it is used by new
.
getStackVisibleChildName :: (MonadIO m, IsStack o) => o -> m (Maybe Text) Source #
Get the value of the “visible-child-name
” property.
When overloading is enabled, this is equivalent to
get
stack #visibleChildName
setStackVisibleChildName :: (MonadIO m, IsStack o) => o -> Text -> m () Source #
Set the value of the “visible-child-name
” property.
When overloading is enabled, this is equivalent to
set
stack [ #visibleChildName:=
value ]