]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/cic_notation/box.mli
ocaml 3.09 transition
[helm.git] / helm / ocaml / cic_notation / box.mli
1 (* Copyright (C) 2000, 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 (*                Andrea Asperti <asperti@cs.unibo.it>                   *)
31 (*                             13/2/2004                                 *)
32 (*                                                                       *)
33 (*************************************************************************)
34
35 type 
36   'expr box =
37     Text of attr * string
38   | Space of attr
39   | Ink of attr
40   | H of attr * ('expr box) list
41   | V of attr * ('expr box) list
42   | HV of attr * ('expr box) list
43   | HOV of attr * ('expr box) list
44   | Object of attr * 'expr
45   | Action of attr * ('expr box) list
46
47 and attr = (string option * string * string) list
48
49 val get_attr: 'a box -> attr
50 val set_attr: attr -> 'a box -> 'a box
51
52 val smallskip : 'expr box
53 val skip: 'expr box
54 val indent : 'expr box -> 'expr box
55
56 val box2xml:
57   obj2xml:('a -> Xml.token Stream.t) -> 'a box ->
58     Xml.token Stream.t
59
60 val map: ('a -> 'b) -> 'a box -> 'b box
61
62 (*
63 val document_of_box :
64   ~obj2xml:('a -> Xml.token Stream.t) -> 'a box -> Xml.token Stream.t
65 *)
66
67 val b_h: attr -> 'expr box list -> 'expr box
68 val b_v: attr -> 'expr box list -> 'expr box
69 val b_hv: attr -> 'expr box list -> 'expr box  (** default indent and spacing *)
70 val b_hov: attr -> 'expr box list -> 'expr box (** default indent and spacing *)
71 val b_text: attr -> string -> 'expr box
72 val b_object: 'expr -> 'expr box
73 val b_indent: 'expr box -> 'expr box
74 val b_space: 'expr box
75 val b_kw: string -> 'expr box
76
77 val pp_attr: attr -> string
78