package lambda-term

  1. Overview
  2. Docs
On This Page
  1. Actions
  2. Widgets
Legend:
Library
Module
Module type
Parameter
Class
Class type

Text edition

Actions
type action =
  1. | Zed of Zed_edit.action
    (*

    A zed action.

    *)
  2. | Start_macro
    (*

    Start a new macro.

    *)
  3. | Stop_macro
    (*

    Ends the current macro.

    *)
  4. | Cancel_macro
    (*

    Cancel the current macro.

    *)
  5. | Play_macro
    (*

    Play the last recorded macro.

    *)
  6. | Insert_macro_counter
    (*

    Insert the current value of the macro counter.

    *)
  7. | Set_macro_counter
    (*

    Sets the value of the macro counter.

    *)
  8. | Add_macro_counter
    (*

    Adds a value to the macro counter.

    *)
  9. | Custom of unit -> unit

Bindings. These bindings are used by LTerm_read_line and by edition widgets.

val bind : LTerm_key.t list -> action list -> unit

bind seq actions associates actions to the given sequence.

val unbind : LTerm_key.t list -> unit

unbind seq unbinds seq.

val actions : (action * string) list

List of actions with their names, except Zed.

val doc_of_action : action -> string

doc_of_action action returns a short description of the action.

val action_of_name : string -> action

action_of_name str converts the given action name into an action. Action name are the same as variants name but lowercased and with '_' replaced by '-'. It raises Not_found if the name does not correspond to an action. It also recognizes zed actions.

val name_of_action : action -> string

name_of_action act returns the name of the given action.

Widgets
val clipboard : Zed_edit.clipboard

The global clipboard.

val macro : action Zed_macro.t

The global macro recorder.

class edit : ?clipboard:Zed_edit.clipboard -> ?macro:action Zed_macro.t -> ?size: LTerm_geom.size -> unit -> object ... end

Class of edition widgets. If no clipboard is provided, then the global one is used.

OCaml

Innovation. Community. Security.