package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Stack/index.html
Module Wrappers.Stack
type t = [ `stack | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new Stack
val set_visible_child_name : t -> string -> unitMakes 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 method@Gtk.Widget.show) in order to become the visible child of @stack.
val set_visible_child_full :
t ->
string ->
Gtk_enums.stacktransitiontype ->
unitMakes the child with the given name visible.
Note that the child widget has to be visible itself (see method@Gtk.Widget.show) in order to become the visible child of @stack.
val set_visible_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitMakes @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 method@Gtk.Widget.show) in order to become the visible child of @stack.
val set_vhomogeneous : t -> bool -> unitSets 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 different child becomes visible.
val set_transition_type : t -> Gtk_enums.stacktransitiontype -> unitSets 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.
val set_transition_duration : t -> int -> unitSets the duration that transitions between pages in @stack will take.
val set_interpolate_size : t -> bool -> unitSets whether or not @stack will interpolate its size when changing the visible child.
If the property@Gtk.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.
val set_hhomogeneous : t -> bool -> unitSets 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 different child becomes visible.
val remove :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves a child widget from @stack.
val get_visible_child_name : t -> string optionReturns the name of the currently visible child of @stack.
Returns %NULL if there is no visible child.
val get_visible_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the currently visible child of @stack.
Returns %NULL if there are no visible children.
val get_vhomogeneous : t -> boolGets whether @stack is vertically homogeneous.
val get_transition_type : t -> Gtk_enums.stacktransitiontypeGets the type of animation that will be used for transitions between pages in @stack.
val get_transition_running : t -> boolReturns whether the @stack is currently in a transition from one page to another.
val get_transition_duration : t -> intReturns the amount of time (in milliseconds) that transitions between pages in @stack will take.
val get_pages : t -> [ `selection_model ] Gobject.objReturns a `GListModel` that contains the pages of the stack.
This can be used to keep an up-to-date view. The model also implements iface@Gtk.SelectionModel and can be used to track and modify the visible page.
val get_page :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
[ `stack_page | `object_ ] Gobject.objReturns the `GtkStackPage` object for @child.
val get_interpolate_size : t -> boolReturns whether the `GtkStack` is set up to interpolate between the sizes of children on page switch.
val get_hhomogeneous : t -> boolGets whether @stack is horizontally homogeneous.
val get_child_by_name :
t ->
string ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionFinds the child with the name given as the argument.
Returns %NULL if there is no child with this name.
val add_titled :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
string option ->
string ->
[ `stack_page | `object_ ] Gobject.objAdds 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.
val add_named :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
string option ->
[ `stack_page | `object_ ] Gobject.objAdds a child to @stack.
The child is identified by the @name.
val add_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
[ `stack_page | `object_ ] Gobject.objAdds a child to @stack.