package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Stack

type t = [ `stack | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new Stack

val set_visible_child_name : t -> string -> unit

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 method@Gtk.Widget.show) in order to become the visible child of @stack.

val set_visible_child_full : t -> string -> Gtk_enums.stacktransitiontype -> unit

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

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 method@Gtk.Widget.show) in order to become the visible child of @stack.

val set_vhomogeneous : t -> bool -> unit

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 different child becomes visible.

val set_transition_type : t -> Gtk_enums.stacktransitiontype -> unit

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.

val set_transition_duration : t -> int -> unit

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

val set_interpolate_size : t -> bool -> unit

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

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 different child becomes visible.

val remove : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> unit

Removes a child widget from @stack.

val get_visible_child_name : t -> string option

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

Gets the currently visible child of @stack.

Returns %NULL if there are no visible children.

val get_vhomogeneous : t -> bool

Gets whether @stack is vertically homogeneous.

val get_transition_type : t -> Gtk_enums.stacktransitiontype

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

val get_transition_running : t -> bool

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

val get_transition_duration : t -> int

Returns the amount of time (in milliseconds) that transitions between pages in @stack will take.

val get_pages : t -> [ `selection_model ] Gobject.obj

Returns 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.obj

Returns the `GtkStackPage` object for @child.

val get_interpolate_size : t -> bool

Returns whether the `GtkStack` is set up to interpolate between the sizes of children on page switch.

val get_hhomogeneous : t -> bool

Gets whether @stack is horizontally homogeneous.

val get_child_by_name : t -> string -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option

Finds 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.obj

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.

val add_named : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> string option -> [ `stack_page | `object_ ] Gobject.obj

Adds 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.obj

Adds a child to @stack.