]> matita.cs.unibo.it Git - helm.git/blob - helm/gTopLevel/termViewer.mli
- the mathql interpreter is not helm-dependent any more
[helm.git] / helm / gTopLevel / termViewer.mli
1 (* Copyright (C) 2000-2002, HELM Team.
2  * 
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.
6  * 
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.
11  * 
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.
16  *
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,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://cs.unibo.it/helm/.
24  *)
25
26 (******************************************************************************)
27 (*                                                                            *)
28 (*                               PROJECT HELM                                 *)
29 (*                                                                            *)
30 (*                Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>               *)
31 (*                                 29/01/2003                                 *)
32 (*                                                                            *)
33 (*                                                                            *)
34 (******************************************************************************)
35
36 (** A widget to render sequents **)
37
38 val use_stylesheets: bool ref;; (* false performs the transformations in OCaml*)
39
40 class sequent_viewer :
41   Gtk_mathview.math_view Gtk.obj ->
42   object
43     inherit GMathViewAux.multi_selection_math_view
44
45     (* returns the list of selected terms         *)
46     (* selections which are not terms are ignored *)
47     method get_selected_terms : Cic.term list
48
49     (* returns the list of selected hypotheses         *)
50     (* selections which are not hypotheses are ignored *)
51     method get_selected_hypotheses : Cic.hypothesis list
52
53     method load_sequent : Cic.metasenv -> Cic.conjecture -> unit
54   end
55
56 val sequent_viewer :
57   ?adjustmenth:GData.adjustment ->
58   ?adjustmentv:GData.adjustment ->
59   ?font_size:int ->
60   ?font_manager:[ `font_manager_gtk | `font_manager_t1] ->
61   ?border_width:int ->
62   ?width:int ->
63   ?height:int ->
64   ?packing:(GObj.widget -> unit) ->
65   ?show:bool ->
66   unit -> sequent_viewer
67
68 (** A widget to render proofs **)
69
70 class proof_viewer :
71   Gtk_mathview.math_view Gtk.obj ->
72   object
73     inherit GMathViewAux.single_selection_math_view
74
75     (* the new current sequent becomes the one obtained *)
76     (* perforating the proof where the selection is     *)
77     method make_sequent_of_selected_term : unit
78
79     (* the new current sequent becomes the one obtained *)
80     (* focusing the proof on the selected metavariable  *)
81     method focus_sequent_of_selected_term : unit
82
83     (* load_proof also returns the annotated cic term and the *)
84     (* ids_to_inner_types and ids_to_inner_sorts maps.        *)
85     method load_proof :
86      UriManager.uri -> Cic.obj ->
87       Cic.annobj * (Cic.id, Cic2acic.anntypes) Hashtbl.t *
88        (Cic.id, string) Hashtbl.t
89
90   end
91
92 val proof_viewer :
93   ?adjustmenth:GData.adjustment ->
94   ?adjustmentv:GData.adjustment ->
95   ?font_size:int ->
96   ?font_manager:[ `font_manager_gtk | `font_manager_t1] ->
97   ?border_width:int ->
98   ?width:int ->
99   ?height:int ->
100   ?packing:(GObj.widget -> unit) ->
101   ?show:bool ->
102   unit -> proof_viewer