]> matita.cs.unibo.it Git - helm.git/blob - matitaB/components/content_pres/box.mli
ground_2 released and permanently renamed as ground
[helm.git] / matitaB / components / content_pres / 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 type 
27   'expr box =
28     Text of attr * string
29   | Space of attr
30   | Ink of attr
31   | H of attr * ('expr box) list
32   | V of attr * ('expr box) list
33   | HV of attr * ('expr box) list
34   | HOV of attr * ('expr box) list
35   | Object of attr * 'expr
36   | Action of attr * ('expr box) list
37
38 and attr = (string option * string * string) list
39
40 val get_attr: 'a box -> attr
41 val set_attr: attr -> 'a box -> 'a box
42
43 val smallskip : 'expr box
44 val skip: 'expr box
45 val indent : 'expr box -> 'expr box
46
47 val box2xml:
48   obj2xml:('a -> Xml.token Stream.t) -> 'a box ->
49     Xml.token Stream.t
50
51 val map: ('a -> 'b) -> 'a box -> 'b box
52
53 (*
54 val document_of_box :
55   ~obj2xml:('a -> Xml.token Stream.t) -> 'a box -> Xml.token Stream.t
56 *)
57
58 val b_h: attr -> 'expr box list -> 'expr box
59 val b_v: attr -> 'expr box list -> 'expr box
60 val b_hv: attr -> 'expr box list -> 'expr box  (** default indent and spacing *)
61 val b_hov: attr -> 'expr box list -> 'expr box (** default indent and spacing *)
62 val b_text: attr -> string -> 'expr box
63 val b_object: 'expr -> 'expr box
64 val b_indent: 'expr box -> 'expr box
65 val b_space: 'expr box
66 (* val b_kw: string -> 'expr box *)
67 val b_toggle: 'expr box list -> 'expr box (** action which toggle among items *)
68
69 val pp_attr: attr -> string
70