(* Copyright (C) 2000-2002, HELM Team. * * This file is part of HELM, an Hypertextual, Electronic * Library of Mathematics, developed at the Computer Science * Department, University of Bologna, Italy. * * HELM is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * HELM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HELM; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * * For details, see the HELM World-Wide-Web page, * http://cs.unibo.it/helm/. *) (******************************************************************************) (* *) (* PROJECT HELM *) (* *) (* Claudio Sacerdoti Coen *) (* 29/01/2003 *) (* *) (* *) (******************************************************************************) type mml_of_cic_sequent = Cic.metasenv -> int * Cic.context * Cic.term -> Gdome.document * (Cic.annconjecture * ((Cic.id, Cic.term) Hashtbl.t * (Cic.id, Cic.id option) Hashtbl.t * (string, Cic.hypothesis) Hashtbl.t * (Cic.id, string) Hashtbl.t)) type mml_of_cic_object = Cic.obj -> Gdome.document * (Cic.annobj * ((Cic.id, Cic.term) Hashtbl.t * (Cic.id, Cic.id option) Hashtbl.t * (Cic.id, Cic.conjecture) Hashtbl.t * (Cic.id, Cic.hypothesis) Hashtbl.t * (Cic.id, string) Hashtbl.t * (Cic.id, Cic2acic.anntypes) Hashtbl.t)) (** A widget to render sequents **) class sequent_viewer : mml_of_cic_sequent:mml_of_cic_sequent -> Gtk_mathview.math_view Gtk.obj -> object inherit GMathViewAux.multi_selection_math_view (* returns the list of selected terms *) (* selections which are not terms are ignored *) method get_selected_terms : Cic.term list (* returns the list of selected hypotheses *) (* selections which are not hypotheses are ignored *) method get_selected_hypotheses : Cic.hypothesis list method load_sequent : Cic.metasenv -> Cic.conjecture -> unit end val sequent_viewer : mml_of_cic_sequent:mml_of_cic_sequent -> ?hadjustment:GData.adjustment -> ?vadjustment:GData.adjustment -> ?font_size:int -> ?log_verbosity:int -> ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> sequent_viewer (** A widget to render proofs **) class proof_viewer : mml_of_cic_object:mml_of_cic_object -> Gtk_mathview.math_view Gtk.obj -> object inherit GMathViewAux.single_selection_math_view (* the new current sequent becomes the one obtained *) (* perforating the proof where the selection is *) method make_sequent_of_selected_term : unit (* the new current sequent becomes the one obtained *) (* focusing the proof on the selected metavariable *) method focus_sequent_of_selected_term : unit (* load_proof also returns the annotated cic term and the *) (* ids_to_inner_types and ids_to_inner_sorts maps. *) method load_proof : Cic.obj -> Cic.annobj * (Cic.id, Cic2acic.anntypes) Hashtbl.t * (Cic.id, string) Hashtbl.t end val proof_viewer : mml_of_cic_object:mml_of_cic_object -> ?hadjustment:GData.adjustment -> ?vadjustment:GData.adjustment -> ?font_size:int -> ?log_verbosity:int -> ?width:int -> ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> proof_viewer