Module Chamo.Layout

Storing and loading layout of windows.

val layout_file : string Stdlib.ref

The file used to store the layout.

type layout_view = {
  1. lv_kind : string;
  2. lv_file : string;
  3. lv_atts : (string * string) list;
  4. lv_subs : Xml.t list;
}

Representing a view.

type layout_contents = [
  1. | `Notebook of layout_notebook
  2. | `Paned of layout_paned
  3. | `View of layout_view
]

Representing windows and boxes used to split windows.

and layout_paned = {
  1. lp_orientation : Stk.Props.orientation;
  2. lp_position : int;
  3. lp_children : layout_contents * layout_contents;
}
and layout_notebook = {
  1. ln_tabs : layout_contents list;
}
type layout_window = {
  1. lw_x : int;
  2. lw_y : int;
  3. lw_w : int;
  4. lw_h : int;
  5. lw_contents : layout_contents option;
}
type layout = layout_window list
val store_layout : string -> layout -> unit

store_layout file layout stores the given layout in the given file.

val load_layout : string -> layout_window list

load_layout file loads the layout description from the given file.

val layout_of_windows : Gui.gui_windows -> layout

Create a layout description from the given list of windows.

val create_windows_of_layout : layout -> unit

Create the windows and their contents from a given layout description.