1 (* Copyright (C) 2000-2002, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://cs.unibo.it/helm/.
26 (******************************************************************************)
30 (* Claudio Sacerdoti Coen <sacerdot@cs.unibo.it> *)
34 (******************************************************************************)
36 type mml_of_cic_sequent =
38 int * Cic.context * Cic.term ->
41 ((Cic.id, Cic.term) Hashtbl.t *
42 (Cic.id, Cic.id option) Hashtbl.t *
43 (string, Cic.hypothesis) Hashtbl.t *
44 (Cic.id, string) Hashtbl.t))
47 type mml_of_cic_object =
52 ((Cic.id, Cic.term) Hashtbl.t *
53 (Cic.id, Cic.id option) Hashtbl.t *
54 (Cic.id, Cic.conjecture) Hashtbl.t *
55 (Cic.id, Cic.hypothesis) Hashtbl.t *
56 (Cic.id, string) Hashtbl.t *
57 (Cic.id, Cic2acic.anntypes) Hashtbl.t))
59 (** A widget to render sequents **)
61 class sequent_viewer :
62 mml_of_cic_sequent:mml_of_cic_sequent ->
63 Gtk_mathview.math_view Gtk.obj ->
65 inherit GMathViewAux.multi_selection_math_view
67 (* returns the list of selected terms *)
68 (* selections which are not terms are ignored *)
69 method get_selected_terms : Cic.term list
71 (* returns the list of selected hypotheses *)
72 (* selections which are not hypotheses are ignored *)
73 method get_selected_hypotheses : Cic.hypothesis list
75 method load_sequent : Cic.metasenv -> Cic.conjecture -> unit
79 mml_of_cic_sequent:mml_of_cic_sequent ->
80 ?hadjustment:GData.adjustment ->
81 ?vadjustment:GData.adjustment ->
86 ?packing:(GObj.widget -> unit) ->
88 unit -> sequent_viewer
90 (** A widget to render proofs **)
93 mml_of_cic_object:mml_of_cic_object ->
94 Gtk_mathview.math_view Gtk.obj ->
96 inherit GMathViewAux.single_selection_math_view
98 (* the new current sequent becomes the one obtained *)
99 (* perforating the proof where the selection is *)
100 method make_sequent_of_selected_term : unit
102 (* the new current sequent becomes the one obtained *)
103 (* focusing the proof on the selected metavariable *)
104 method focus_sequent_of_selected_term : unit
106 (* load_proof also returns the annotated cic term and the *)
107 (* ids_to_inner_types and ids_to_inner_sorts maps. *)
109 UriManager.uri -> Cic.obj ->
110 Cic.annobj * (Cic.id, Cic2acic.anntypes) Hashtbl.t *
111 (Cic.id, string) Hashtbl.t
116 mml_of_cic_object:mml_of_cic_object ->
117 ?hadjustment:GData.adjustment ->
118 ?vadjustment:GData.adjustment ->
120 ?log_verbosity:int ->
123 ?packing:(GObj.widget -> unit) ->