package ocgtk

  1. Overview
  2. Docs
OCaml bindings for GTK 4

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1-preview2.tar.gz
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054

doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Assistant/index.html

Module Wrappers.Assistant

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

Create a new Assistant

val update_buttons_state : t -> unit

Forces @assistant to recompute the buttons state.

GTK automatically takes care of this in most situations, e.g. when the user goes to a different page, or when the visibility or completeness of a page changes.

One situation where it can be necessary to call this function is when changing a value on the current page affects the future page flow of the assistant.

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

Sets the page type for @page.

The page type determines the page behavior in the @assistant.

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

Sets a title for @page.

The title is displayed in the header area of the assistant when @page is the current page.

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

Sets whether @page contents are complete.

This will make @assistant update the buttons state to be able to continue the task.

val set_current_page : t -> int -> unit

Switches the page to @page_num.

Note that this will only be necessary in custom buttons, as the @assistant flow can be set with gtk_assistant_set_forward_page_func().

val remove_page : t -> int -> unit

Removes the @page_num’s page from @assistant.

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

Removes a widget from the action area of a `GtkAssistant`.

val previous_page : t -> unit

Navigate to the previous visited page.

It is a programming error to call this function when no previous page is available.

This function is for use when creating pages of the %GTK_ASSISTANT_PAGE_CUSTOM type.

val prepend_page : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> int

Prepends a page to the @assistant.

val next_page : t -> unit

Navigate to the next page.

It is a programming error to call this function when there is no next page.

This function is for use when creating pages of the %GTK_ASSISTANT_PAGE_CUSTOM type.

val insert_page : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> int -> int

Inserts a page in the @assistant at a given position.

Gets a list model of the assistant pages.

val get_page_type : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> Gtk_enums.assistantpagetype

Gets the page type of @page.

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

Gets the title for @page.

val get_page_complete : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> bool

Gets whether @page is complete.

val get_page : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> [ `assistant_page | `object_ ] Gobject.obj

Returns the `GtkAssistantPage` object for @child.

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

Returns the child widget contained in page number @page_num.

val get_n_pages : t -> int

Returns the number of pages in the @assistant

val get_current_page : t -> int

Returns the page number of the current page.

val commit : t -> unit

Erases the visited page history.

GTK will then hide the back button on the current page, and removes the cancel button from subsequent pages.

Use this when the information provided up to the current page is hereafter deemed permanent and cannot be modified or undone. For example, showing a progress page to track a long-running, unreversible operation after the user has clicked apply on a confirmation page.

val append_page : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj -> int

Appends a page to the @assistant.

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

Adds a widget to the action area of a `GtkAssistant`.

val get_use_header_bar : t -> int

Get property: use-header-bar

val on_apply : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_cancel : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_close : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_escape : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id
val on_prepare : ?after:bool -> t -> callback: (page:[ `widget | `initially_unowned | `object_ ] Gobject.obj -> unit) -> Gobject.Signal.handler_id