From 7cfc4e5146be5666419451bdd516f1f3f264d24a Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Sun, 25 Jan 2015 14:42:51 +0100 Subject: Imported Upstream version 8.5~beta1+dfsg --- ide/wg_Notebook.ml | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 ide/wg_Notebook.ml (limited to 'ide/wg_Notebook.ml') diff --git a/ide/wg_Notebook.ml b/ide/wg_Notebook.ml new file mode 100644 index 00000000..0611c3f3 --- /dev/null +++ b/ide/wg_Notebook.ml @@ -0,0 +1,67 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* if i = real_pos then term else x) 0 term_list; + super#set_page ?tab_label ?menu_label page + + method get_nth_term i = + List.nth term_list i + + method term_num f p = + Util.List.index0 f p term_list + + method pages = term_list + + method remove_page index = + term_list <- Util.List.filteri (fun i x -> if i = index then kill_page x; i <> index) term_list; + super#remove_page index + + method current_term = + List.nth term_list super#current_page +end + +let create make kill = + GtkPack.Notebook.make_params [] + ~cont:(GContainer.pack_container + ~create:(fun pl -> + let nb = GtkPack.Notebook.create pl in + (new typed_notebook make kill nb))) + -- cgit v1.2.3