package chamo

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Chamo.LayoutSource

Storing and loading layout of windows.

Sourceval layout_file : string ref

The file used to store the layout.

Sourcetype 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.

Sourcetype 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.

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

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

Sourceval load_layout : string -> layout_window list

load_layout file loads the layout description from the given file.

Sourceval layout_of_windows : Gui.gui_windows -> layout

Create a layout description from the given list of windows.

Sourceval create_windows_of_layout : layout -> unit

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