Module Murder_generator.InOut

The different kinds of link styles

type layout =
| Normal

No special layout.

| Centered

Its content is centered.

| Inlined

The block is inlined.

The different kinds of div elements.

type cell_option = {
row : int;

This integer enables rows to be merged: for each cells, it indicates how many rows are merged with the current cell. If the integer is 1, the cell is a normal cell, but if it is more than 1, the cell has been merged with cells below.*

col : int;

Similar than row, but merging columns instead of rows.

classes : string list;

Some CSS-specific classes.

}

Specific options for cells in tables.

val default : cell_option

The options for a normal cell.

type 'node block =
| Div of layout * 'node block list

A div node, with its layout.

| P of 'node block list

A paragraph node.

| List of bool * 'node block list

A list of items. The boolean indicates whether bullets should be drawn.

| Space

Some space between texts.

| Text of string

A simple text.

| FoldableBlock of bool * string * 'node block

A title that can hide a node. The boolean states whether the block should be unfolded by default.

| LinkExtern of link * string * string

A style, the link text, and its associated address.

| LinkContinuation of bool * link * string * unit -> unit

A link and its associated continuation. The boolean indicates whether the arrow is forwards.

| LinkFile of link * string * string * string * bool * unit -> string

Creates a link to a file whose content is computed. The first argument is the link text, the second the file name, the third the mime type, and the fifth its content. The fourth indicates whether newlines should be adapted to the host’s operating system or not.

| Table of string list * ('node block * cell_option) list * (string list * ('node block * cell_option) list) list

A table, with its headers and its content (given line by line). It is also provided with some specific cell options for each content cell. Each line is also provided with a list of CSS classes, given as string. Finally, the whole table is associated with another list of CSS classes.

| Node of 'node

For all cases where more control is needed, we can directly send a node.

A simplified representation of DOM’s nodes.

val add_spaces : 'node block -> 'node block

Adds the expected spaces between block elements.

module type T = sig ... end

This is the signature specified in this file. It is satisfied by the various files lib/inOut_*.ml.