7 ck: T.text list; (* contents *)
8 cc: T.css; (* css classes *)
10 cx: T.ext; (* extension *)
11 cb: T.border; (* border *)
17 m: cell array array; (* matrix *)
21 ck = []; cc = []; cu = ""; cx = ""; cb = T.border false;
25 r = ts.T.rf; c = ts.T.cf;
26 m = A.make_matrix ts.T.rf ts.T.cf empty;
29 let set_key m y x kl =
30 m.m.(y).(x) <- {m.m.(y).(x) with ck = kl}
32 let set_attrs m y x c u e =
33 m.m.(y).(x) <- {m.m.(y).(x) with
34 cc = c @ m.m.(y).(x).cc;
35 cu = u ^ m.m.(y).(x).cu;
36 cx = m.m.(y).(x).cx ^ e;
39 let set_west m y x b =
40 let c = m.m.(y).(x) in
41 let cb = {c.cb with T.w = c.cb.T.w || b.T.w} in
42 m.m.(y).(x) <- {c with cb = cb}
44 let set_north m y x b =
45 let c = m.m.(y).(x) in
46 let cb = {c.cb with T.n = c.cb.T.n || b.T.n} in
47 m.m.(y).(x) <- {c with cb = cb}
49 let set_east m y x b =
50 if x < pred m.c then set_west m y (succ x) {b with T.w = b.T.e} else
51 let c = m.m.(y).(x) in
52 let cb = {c.cb with T.e = c.cb.T.e || b.T.e} in
53 m.m.(y).(x) <- {c with cb = cb}
55 let set_south m y x b =
56 if y < pred m.r then set_north m (succ y) x {b with T.n = b.T.s} else
57 let c = m.m.(y).(x) in
58 let cb = {c.cb with T.s = c.cb.T.s || b.T.s} in
59 m.m.(y).(x) <- {c with cb = cb}