Chamo.Layout
Storing and loading layout of windows.
type layout_view = {
lv_kind : string;
lv_file : string;
lv_atts : (string * string) list;
lv_subs : Xml.t list;
}
Representing a view.
type layout_contents = [
| `Notebook of layout_notebook
| `Paned of layout_paned
| `View of layout_view
]
Representing windows and boxes used to split windows.
and layout_paned = {
lp_orientation : Stk.Props.orientation;
lp_position : int;
lp_children : layout_contents * layout_contents;
}
type layout_window = {
lw_x : int;
lw_y : int;
lw_w : int;
lw_h : int;
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.