# Module LTerm_widget

    module LTerm_widget: sig .. end

###### Callbacks

    type switch

Switches are used to stop signals.

    val register : switch option -> 'a Lwt_sequence.t -> 'a -> unit

    val stop : switch -> unit

    val exec_callbacks : ('a -> unit) Lwt_sequence.t -> 'a -> unit

`apply_callbacks callbacks x`

    val exec_filters : ('a -> bool) Lwt_sequence.t -> 'a -> bool

###### Base class

    class t : string -> object .. end

The base class.

###### Labels

    class label : string -> object .. end

A widget displaying a text.

###### Containers

    exception Out_of_range

    class type box = object .. end

Type of widgets displaying a list of widget.

    class hbox : box

A widget displaying a list of widgets, listed horizontally.

    class vbox : box

A widget displaying a list of widgets, listed vertically.

    class frame : object .. end

A widget displayiing another widget in a box.

###### Lines

    class hline : t

A horizontal line.

    class vline : t

A vertical line.

###### Buttons

    class button : string -> object .. end

###### Running in a terminal

    val run : LTerm.t ->
           ?save_state:bool ->
           ?load_resources:bool ->
           ?resources_file:string -> #t -> 'a Lwt.t -> 'a Lwt.t

`run term ?save_state widget w` runs on the given terminal using `widget` as main widget. It returns when `w` terminates. If `save_state` is `true` (the default) then the state of the terminal is saved and restored when `w` terminates.

If `load_resources` is `true` (the default) then `resources_file` (which default to ".lambda-termrc" in the home directory) is loaded and the result is set to `w`.