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 (** A widget to render sequents **)
38 val use_stylesheets: bool ref;; (* false performs the transformations in OCaml*)
40 class sequent_viewer :
41 Gtk_mathview.math_view Gtk.obj ->
43 inherit GMathViewAux.multi_selection_math_view
45 (* returns the list of selected terms *)
46 (* selections which are not terms are ignored *)
47 method get_selected_terms : Cic.term list
49 (* returns the list of selected hypotheses *)
50 (* selections which are not hypotheses are ignored *)
51 method get_selected_hypotheses : Cic.hypothesis list
53 method load_sequent : Cic.metasenv -> Cic.conjecture -> unit
57 ?hadjustment:GData.adjustment ->
58 ?vadjustment:GData.adjustment ->
64 ?packing:(GObj.widget -> unit) ->
66 unit -> sequent_viewer
68 (** A widget to render proofs **)
71 Gtk_mathview.math_view Gtk.obj ->
73 inherit GMathViewAux.single_selection_math_view
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
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
83 (* load_proof also returns the annotated cic term and the *)
84 (* ids_to_inner_types and ids_to_inner_sorts maps. *)
86 UriManager.uri -> Cic.obj ->
87 Cic.annobj * (Cic.id, Cic2acic.anntypes) Hashtbl.t *
88 (Cic.id, string) Hashtbl.t
93 ?hadjustment:GData.adjustment ->
94 ?vadjustment:GData.adjustment ->
100 ?packing:(GObj.widget -> unit) ->