gtk.stack
Module for [Stack] class
Types 3
classStack : gtk.container.Container
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 #GtkStackSwitcher 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 [gtk.stack.Stack.setTransitionType]. These animations respect the #GtkSettings:gtk-enable-animations setting.
The GtkStack widget was added in GTK+ 3.10.
CSS nodes
GtkStack has a single CSS node named stack.
Methods
StackGidBuilder builder()Get builder for [gtk.stack.Stack] Returns: New builder objectbool hhomogeneous() @propertyGet `hhomogeneous` property. Returns: true if the stack allocates the same width for all children.void hhomogeneous(bool propval) @propertySet `hhomogeneous` property. Params: propval = true if the stack allocates the same width for all children.bool homogeneous() @propertyvoid homogeneous(bool propval) @propertybool interpolateSize() @propertyvoid interpolateSize(bool propval) @propertyuint transitionDuration() @propertyvoid transitionDuration(uint propval) @propertybool transitionRunning() @propertygtk.types.StackTransitionType transitionType() @propertyvoid transitionType(gtk.types.StackTransitionType propval) @propertybool vhomogeneous() @propertyGet `vhomogeneous` property. Returns: true if the stack allocates the same height for all children.void vhomogeneous(bool propval) @propertySet `vhomogeneous` property. Params: propval = true if the stack allocates the same height for all children.gtk.widget.Widget visibleChild() @propertyvoid visibleChild(gtk.widget.Widget propval) @propertystring visibleChildName() @propertyvoid visibleChildName(string propval) @propertyvoid addNamed(gtk.widget.Widget child, string name)Adds a child to stack. The child is identified by the name.void addTitled(gtk.widget.Widget child, string name, string title)Adds a child to stack. The child is identified by the name. The title will be used by #GtkStackSwitcher to represent child in a tab bar, so it should be short.gtk.widget.Widget getChildByName(string name)Finds the child of the #GtkStack with the name given as the argument. Returns null if there is no child with this name.bool getHhomogeneous()Gets whether stack is horizontally homogeneous. See [gtk.stack.Stack.setHhomogeneous]. Returns: whether stack is horizontally homogeneous.bool getHomogeneous()Gets whether stack is homogeneous. See [gtk.stack.Stack.setHomogeneous]. Returns: whether stack is homogeneous.bool getInterpolateSize()Returns wether the #GtkStack is set up to interpolate between the sizes of children on page switch. Returns: true if child sizes are interpolateduint getTransitionDuration()Returns the amount of time (in milliseconds) that transitions between pages in stack will take. Returns: the transition durationbool getTransitionRunning()Returns whether the stack is currently in a transition from one page to another. Returns: true if the transition is currently running, false otherwise.gtk.types.StackTransitionType getTransitionType()Gets the type of animation that will be used for transitions between pages in stack. Returns: the current transition type of stackbool getVhomogeneous()Gets whether stack is vertically homogeneous. See [gtk.stack.Stack.setVhomogeneous]. Returns: whether stack is vertically homogeneous.gtk.widget.Widget getVisibleChild()Gets the currently visible child of stack, or null if there are no visible children. Returns: the visible child of the #GtkStackstring getVisibleChildName()Returns the name of the currently visible child of stack, or null if there is no visible child. Returns: the name of the visible child of the #GtkStackvoid setHhomogeneous(bool hhomogeneous)Sets the #GtkStack to be horizontally homogeneous or not. If it is homogeneous, the #GtkStack will request the same width for all its children. If it isn't, the stack may change width when a differ...void setHomogeneous(bool homogeneous)Sets the #GtkStack to be homogeneous or not. If it is homogeneous, the #GtkStack will request the same size for all its children. If it isn't, the stack may change size when a different child becom...void setInterpolateSize(bool interpolateSize)Sets whether or not stack will interpolate its size when changing the visible child. If the #GtkStack:interpolate-size property is set to true, stack will interpolate its size between the current o...void setTransitionDuration(uint duration)Sets the duration that transitions between pages in stack will take.void setTransitionType(gtk.types.StackTransitionType transition)Sets the type of animation that will be used for transitions between pages in stack. Available types include various kinds of fades and slides.void setVhomogeneous(bool vhomogeneous)Sets the #GtkStack to be vertically homogeneous or not. If it is homogeneous, the #GtkStack will request the same height for all its children. If it isn't, the stack may change height when a differ...void setVisibleChild(gtk.widget.Widget child)Makes child the visible child of stack.void setVisibleChildFull(string name, gtk.types.StackTransitionType transition)Makes the child with the given name visible.void setVisibleChildName(string name)Makes the child with the given name visible.Methods
T hhomogeneous(bool propval)Set `hhomogeneous` property. Params: propval = true if the stack allocates the same width for all children. Returns: Builder instance for fluent chainingT homogeneous(bool propval)T interpolateSize(bool propval)T transitionDuration(uint propval)T transitionType(gtk.types.StackTransitionType propval)T vhomogeneous(bool propval)Set `vhomogeneous` property. Params: propval = true if the stack allocates the same height for all children. Returns: Builder instance for fluent chainingT visibleChild(gtk.widget.Widget propval)T visibleChildName(string propval)