gtk.stack

Module for [Stack] class

Types 3

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
GType _getGType() static nothrow
GType _gType() @property nothrow
Stack self() nothrowReturns `this`, for use in `with` statements.
StackGidBuilder builder() static nothrowGet builder for [gtk.stack.Stack] Returns: New builder object
bool 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 homogeneous() @property nothrow
void homogeneous(bool propval) @property nothrow
bool interpolateSize() @property nothrow
void interpolateSize(bool propval) @property nothrow
uint transitionDuration() @property nothrow
void transitionDuration(uint propval) @property nothrow
bool transitionRunning() @property nothrow
void transitionType(gtk.types.StackTransitionType propval) @property nothrow
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.
gtk.widget.Widget visibleChild() @property nothrow
void visibleChild(gtk.widget.Widget propval) @property nothrow
string visibleChildName() @property nothrow
void visibleChildName(string propval) @property nothrow
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 interpolated
uint getTransitionDuration() nothrowReturns the amount of time (in milliseconds) that transitions between pages in stack will take. Returns: the transition duration
bool 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 stack
bool 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 #GtkStack
string 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 #GtkStack
void 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 setVisibleChild(gtk.widget.Widget child) nothrowMakes child the visible child of stack.
void setVisibleChildFull(string name, gtk.types.StackTransitionType transition) nothrowMakes the child with the given name visible.
void setVisibleChildName(string name) nothrowMakes the child with the given name visible.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkStack container. Returns: a new #GtkStack

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 chaining
T homogeneous(bool propval) nothrow
T interpolateSize(bool propval) nothrow
T transitionDuration(uint propval) nothrow
T vhomogeneous(bool propval) nothrowSet `vhomogeneous` property. Params: propval = true if the stack allocates the same height for all children. Returns: Builder instance for fluent chaining
T visibleChild(gtk.widget.Widget propval) nothrow
T visibleChildName(string propval) nothrow

Fluent builder for gtk.stack.Stack

Methods
Stack build() nothrowCreate object from builder. Returns: New object