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() static nothrowGet builder for [gtk.stack.Stack] Returns: New builder objectbool hhomogeneous() @property nothrowGet `hhomogeneous` property. Returns: true if the stack allocates the same width for all children.void hhomogeneous(bool propval) @property nothrowSet `hhomogeneous` property. Params: propval = true if the stack allocates the same width for all children.bool vhomogeneous() @property nothrowGet `vhomogeneous` property. Returns: true if the stack allocates the same height for all children.void vhomogeneous(bool propval) @property nothrowSet `vhomogeneous` property. Params: propval = true if the stack allocates the same height for all children.void addNamed(gtk.widget.Widget child, string name) nothrowAdds a child to stack. The child is identified by the name.void addTitled(gtk.widget.Widget child, string name, string title) nothrowAdds 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) nothrowFinds the child of the #GtkStack with the name given as the argument. Returns null if there is no child with this name.bool getHhomogeneous() nothrowGets whether stack is horizontally homogeneous. See [gtk.stack.Stack.setHhomogeneous]. Returns: whether stack is horizontally homogeneous.bool getHomogeneous() nothrowGets whether stack is homogeneous. See [gtk.stack.Stack.setHomogeneous]. Returns: whether stack is homogeneous.bool getInterpolateSize() nothrowReturns wether the #GtkStack is set up to interpolate between the sizes of children on page switch. Returns: true if child sizes are interpolateduint getTransitionDuration() nothrowReturns the amount of time (in milliseconds) that transitions between pages in stack will take. Returns: the transition durationbool getTransitionRunning() nothrowReturns 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() nothrowGets the type of animation that will be used for transitions between pages in stack. Returns: the current transition type of stackbool getVhomogeneous() nothrowGets whether stack is vertically homogeneous. See [gtk.stack.Stack.setVhomogeneous]. Returns: whether stack is vertically homogeneous.gtk.widget.Widget getVisibleChild() nothrowGets the currently visible child of stack, or null if there are no visible children. Returns: the visible child of the #GtkStackstring getVisibleChildName() nothrowReturns 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) nothrowSets 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) nothrowSets 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) nothrowSets 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) nothrowSets the duration that transitions between pages in stack will take.void setTransitionType(gtk.types.StackTransitionType transition) nothrowSets 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) nothrowSets 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 setVisibleChildFull(string name, gtk.types.StackTransitionType transition) nothrowMakes the child with the given name visible.Fluent builder implementation template for gtk.stack.Stack
Methods
T hhomogeneous(bool propval) nothrowSet `hhomogeneous` property. Params: propval = true if the stack allocates the same width for all children. Returns: Builder instance for fluent chainingT homogeneous(bool propval) nothrowT interpolateSize(bool propval) nothrowT transitionDuration(uint propval) nothrowT transitionType(gtk.types.StackTransitionType propval) nothrowT vhomogeneous(bool propval) nothrowSet `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) nothrowT visibleChildName(string propval) nothrowFluent builder for gtk.stack.Stack