package stk

  1. Overview
  2. Docs
SDL-based GUI toolkit

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-stk-0.5.0.tar.bz2
md5=beeed5752ff67b3abeb1bcf8fb6b9098
sha512=c1603ae66956a674864ad875212fdbfc8d8016983202108d492b0d8722106b1e982e9fdc04b20d1b7adf5013343252fc5173851751906271731bc81d70dc789c

doc/stk/Stk/Notebook/class-notebook/index.html

Class Notebook.notebookSource

Notebook widget.

A notebook widget is a [Widget.widget] Container.container, i.e. a widget containing contents widgets (the pages), each one being associated to a widget representing this page in the list of displayed tabs.

A notebook can be oriented vertically (tabs are on the left and and are packed vertically) or horizontally (tabs are on top and and are packed horizontally).

method active_page : int option
method set_active_page : int -> bool

Make page p the active page (0-based index).

method get_nth : int option -> (Stk.Container.child_data option * Stk.Widget.widget) option

nb#get_page None returns None. nb#get_page (Some n) returns None if n-th page does not exist, or Some (label_widget, page_widget).

method pack : ?pos:int -> label:Stk.Widget.widget -> Stk.Widget.widget -> unit

#pack ~label w adds a new page with contents widget w and label widget label. Optional argument pos can be used to specify a 0-based position for the new page. Default is to append the page.

method unpack : Stk.Widget.widget -> unit

unpack w removes the page corresponding to the (contents) widget w.

method remove_page : int -> unit

remove_page i removes the page at index i.

method find_child : (Stk.Container.child -> bool) -> Stk.Container.child option

find_child p returns the first page widget c for which p c returns true, if any.

method widget_index : Stk.Widget.widget -> int option

widget_index w returns the page index corresponding to widget w, if any.

OCaml

Innovation. Community. Security.