gi-gtk-3.0.14: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Stack

Contents

Description

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

Exported types

newtype Stack Source #

Constructors

Stack (ManagedPtr Stack) 

Methods

addNamed

data StackAddNamedMethodInfo Source #

Instances

((~) * signature (b -> Text -> m ()), MonadIO m, IsStack a, IsWidget b) => MethodInfo * StackAddNamedMethodInfo a signature Source # 

stackAddNamed Source #

Arguments

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

stack: a Stack

-> b

child: the widget to add

-> Text

name: the name for child

-> m () 

Adds a child to stack. The child is identified by the name.

Since: 3.10

addTitled

data StackAddTitledMethodInfo Source #

Instances

((~) * signature (b -> Text -> Text -> m ()), MonadIO m, IsStack a, IsWidget b) => MethodInfo * StackAddTitledMethodInfo a signature Source # 

stackAddTitled Source #

Arguments

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

stack: a Stack

-> b

child: the widget to add

-> Text

name: the name for child

-> Text

title: a human-readable title for child

-> 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

stackGetChildByName Source #

Arguments

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

stack: a Stack

-> Text

name: the name of the child to find

-> m (Maybe Widget)

Returns: the requested child of the Stack

Finds the child of the Stack with the name given as the argument. Returns Nothing if there is no child with this name.

Since: 3.12

getHhomogeneous

stackGetHhomogeneous Source #

Arguments

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

stack: a Stack

-> m Bool

Returns: whether stack is horizontally homogeneous.

Gets whether stack is horizontally homogeneous. See stackSetHhomogeneous.

Since: 3.16

getHomogeneous

stackGetHomogeneous Source #

Arguments

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

stack: a Stack

-> m Bool

Returns: whether stack is homogeneous.

Gets whether stack is homogeneous. See stackSetHomogeneous.

Since: 3.10

getInterpolateSize

stackGetInterpolateSize Source #

Arguments

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

stack: A Stack

-> m Bool

Returns: True if child sizes are interpolated

Returns wether the Stack is set up to interpolate between the sizes of children on page switch.

Since: 3.18

getTransitionDuration

stackGetTransitionDuration Source #

Arguments

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

stack: a Stack

-> 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 #

Arguments

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

stack: a Stack

-> m Bool

Returns: True if the transition is currently running, False otherwise.

Returns whether the stack is currently in a transition from one page to another.

Since: 3.12

getTransitionType

stackGetTransitionType Source #

Arguments

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

stack: a Stack

-> m StackTransitionType

Returns: the current transition type of stack

Gets the type of animation that will be used for transitions between pages in stack.

Since: 3.10

getVhomogeneous

stackGetVhomogeneous Source #

Arguments

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

stack: a Stack

-> m Bool

Returns: whether stack is vertically homogeneous.

Gets whether stack is vertically homogeneous. See stackSetVhomogeneous.

Since: 3.16

getVisibleChild

stackGetVisibleChild Source #

Arguments

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

stack: a Stack

-> m (Maybe Widget)

Returns: the visible child of the Stack

Gets the currently visible child of stack, or Nothing if there are no visible children.

Since: 3.10

getVisibleChildName

stackGetVisibleChildName Source #

Arguments

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

stack: a Stack

-> m (Maybe Text)

Returns: the name of the visible child of the Stack

Returns the name of the currently visible child of stack, or Nothing if there is no visible child.

Since: 3.10

new

stackNew Source #

Arguments

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

Returns: a new Stack

Creates a new Stack container.

Since: 3.10

setHhomogeneous

stackSetHhomogeneous Source #

Arguments

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

stack: a Stack

-> Bool

hhomogeneous: True to make stack horizontally homogeneous

-> m () 

Sets the Stack to be horizontally homogeneous or not. If it is homogeneous, the Stack will request the same width for all its children. If it isn't, the stack may change width when a different child becomes visible.

Since: 3.16

setHomogeneous

data StackSetHomogeneousMethodInfo Source #

Instances

((~) * signature (Bool -> m ()), MonadIO m, IsStack a) => MethodInfo * StackSetHomogeneousMethodInfo a signature Source # 

stackSetHomogeneous Source #

Arguments

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

stack: a Stack

-> Bool

homogeneous: True to make stack homogeneous

-> 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 #

Arguments

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

stack: A Stack

-> Bool

interpolateSize: the new value

-> 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 #

Arguments

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

stack: a Stack

-> Word32

duration: the new duration, in milliseconds

-> m () 

Sets the duration that transitions between pages in stack will take.

Since: 3.10

setTransitionType

stackSetTransitionType Source #

Arguments

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

stack: a Stack

-> StackTransitionType

transition: the new transition type

-> 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

stackSetVhomogeneous Source #

Arguments

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

stack: a Stack

-> Bool

vhomogeneous: True to make stack vertically homogeneous

-> m () 

Sets the Stack to be vertically homogeneous or not. If it is homogeneous, the Stack will request the same height for all its children. If it isn't, the stack may change height when a different child becomes visible.

Since: 3.16

setVisibleChild

data StackSetVisibleChildMethodInfo Source #

Instances

((~) * signature (b -> m ()), MonadIO m, IsStack a, IsWidget b) => MethodInfo * StackSetVisibleChildMethodInfo a signature Source # 

stackSetVisibleChild Source #

Arguments

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

stack: a Stack

-> b

child: a child of stack

-> 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 #

Arguments

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

stack: a Stack

-> Text

name: the name of the child to make visible

-> StackTransitionType

transition: the transition type to use

-> 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 #

Arguments

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

stack: a Stack

-> Text

name: the name of the child to make visible

-> 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 #

Instances

AttrInfo StackHhomogeneousPropertyInfo Source # 
type AttrOrigin StackHhomogeneousPropertyInfo Source # 
type AttrLabel StackHhomogeneousPropertyInfo Source # 
type AttrGetType StackHhomogeneousPropertyInfo Source # 
type AttrBaseTypeConstraint StackHhomogeneousPropertyInfo Source # 
type AttrSetTypeConstraint StackHhomogeneousPropertyInfo Source # 
type AttrAllowedOps StackHhomogeneousPropertyInfo Source # 

setStackHhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #

homogeneous

data StackHomogeneousPropertyInfo Source #

Instances

AttrInfo StackHomogeneousPropertyInfo Source # 
type AttrOrigin StackHomogeneousPropertyInfo Source # 
type AttrLabel StackHomogeneousPropertyInfo Source # 
type AttrGetType StackHomogeneousPropertyInfo Source # 
type AttrBaseTypeConstraint StackHomogeneousPropertyInfo Source # 
type AttrSetTypeConstraint StackHomogeneousPropertyInfo Source # 
type AttrAllowedOps StackHomogeneousPropertyInfo Source # 

setStackHomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #

interpolateSize

data StackInterpolateSizePropertyInfo Source #

Instances

AttrInfo StackInterpolateSizePropertyInfo Source # 
type AttrOrigin StackInterpolateSizePropertyInfo Source # 
type AttrLabel StackInterpolateSizePropertyInfo Source # 
type AttrGetType StackInterpolateSizePropertyInfo Source # 
type AttrBaseTypeConstraint StackInterpolateSizePropertyInfo Source # 
type AttrSetTypeConstraint StackInterpolateSizePropertyInfo Source # 
type AttrAllowedOps StackInterpolateSizePropertyInfo Source # 

transitionDuration

data StackTransitionDurationPropertyInfo Source #

Instances

AttrInfo StackTransitionDurationPropertyInfo Source # 
type AttrOrigin StackTransitionDurationPropertyInfo Source # 
type AttrLabel StackTransitionDurationPropertyInfo Source # 
type AttrLabel StackTransitionDurationPropertyInfo = "transition-duration"
type AttrGetType StackTransitionDurationPropertyInfo Source # 
type AttrBaseTypeConstraint StackTransitionDurationPropertyInfo Source # 
type AttrSetTypeConstraint StackTransitionDurationPropertyInfo Source # 
type AttrAllowedOps StackTransitionDurationPropertyInfo Source # 

transitionRunning

data StackTransitionRunningPropertyInfo Source #

Instances

AttrInfo StackTransitionRunningPropertyInfo Source # 
type AttrOrigin StackTransitionRunningPropertyInfo Source # 
type AttrLabel StackTransitionRunningPropertyInfo Source # 
type AttrLabel StackTransitionRunningPropertyInfo = "transition-running"
type AttrGetType StackTransitionRunningPropertyInfo Source # 
type AttrBaseTypeConstraint StackTransitionRunningPropertyInfo Source # 
type AttrSetTypeConstraint StackTransitionRunningPropertyInfo Source # 
type AttrAllowedOps StackTransitionRunningPropertyInfo Source # 

transitionType

data StackTransitionTypePropertyInfo Source #

Instances

AttrInfo StackTransitionTypePropertyInfo Source # 
type AttrOrigin StackTransitionTypePropertyInfo Source # 
type AttrLabel StackTransitionTypePropertyInfo Source # 
type AttrGetType StackTransitionTypePropertyInfo Source # 
type AttrBaseTypeConstraint StackTransitionTypePropertyInfo Source # 
type AttrSetTypeConstraint StackTransitionTypePropertyInfo Source # 
type AttrAllowedOps StackTransitionTypePropertyInfo Source # 

vhomogeneous

data StackVhomogeneousPropertyInfo Source #

Instances

AttrInfo StackVhomogeneousPropertyInfo Source # 
type AttrOrigin StackVhomogeneousPropertyInfo Source # 
type AttrLabel StackVhomogeneousPropertyInfo Source # 
type AttrGetType StackVhomogeneousPropertyInfo Source # 
type AttrBaseTypeConstraint StackVhomogeneousPropertyInfo Source # 
type AttrSetTypeConstraint StackVhomogeneousPropertyInfo Source # 
type AttrAllowedOps StackVhomogeneousPropertyInfo Source # 

setStackVhomogeneous :: (MonadIO m, IsStack o) => o -> Bool -> m () Source #

visibleChild

data StackVisibleChildPropertyInfo Source #

Instances

AttrInfo StackVisibleChildPropertyInfo Source # 
type AttrOrigin StackVisibleChildPropertyInfo Source # 
type AttrLabel StackVisibleChildPropertyInfo Source # 
type AttrGetType StackVisibleChildPropertyInfo Source # 
type AttrBaseTypeConstraint StackVisibleChildPropertyInfo Source # 
type AttrSetTypeConstraint StackVisibleChildPropertyInfo Source # 
type AttrAllowedOps StackVisibleChildPropertyInfo Source # 

setStackVisibleChild :: (MonadIO m, IsStack o, IsWidget a) => o -> a -> m () Source #

visibleChildName

data StackVisibleChildNamePropertyInfo Source #

Instances

AttrInfo StackVisibleChildNamePropertyInfo Source # 
type AttrOrigin StackVisibleChildNamePropertyInfo Source # 
type AttrLabel StackVisibleChildNamePropertyInfo Source # 
type AttrLabel StackVisibleChildNamePropertyInfo = "visible-child-name"
type AttrGetType StackVisibleChildNamePropertyInfo Source # 
type AttrBaseTypeConstraint StackVisibleChildNamePropertyInfo Source # 
type AttrSetTypeConstraint StackVisibleChildNamePropertyInfo Source # 
type AttrAllowedOps StackVisibleChildNamePropertyInfo Source #