package chamo

  1. Overview
  2. Docs

Multi-contents clipboards. The Multiclip_gui module contains material to create graphical interface for these clipboards.

type multiclip
type id
val id_wrapper : id Ocf.wrapper
val string_of_id : id -> string
val id_of_string : string -> id
val create_multiclip : ?abst_len:int -> unit -> multiclip

Create a multiclip.

  • parameter abst_len

    is the length of the abstract string displayed in the list.

val add : multiclip -> ?id:id -> ?abs:string -> string -> id

Add a string to the multiclip.

  • parameter abs

    can be used to force the abstract. By default, it is obtained by chopping the given string at the abstract length abst_len specified at the multiclip creation.

val elements : multiclip -> (id * string * string) list

The list of elements in the multiclip, as a list of triples (id, abstract, string).

val ids : multiclip -> id list

The sorted list of ids in the multiclip.

val get : multiclip -> id -> (string * string) option

Retrieve the abstract and string associated to the given id, if present.

val remove : multiclip -> id -> unit

Remove an element, by giving its id.

Storable multiclips

These multiclips can be stored to a file given at creation time.

type storable_multiclip
val create_storable_multiclip : ?abst_len:int -> string -> storable_multiclip

create_storable_multiclip file creates a new multiclip, stored and read from the given file.

val read_multiclip : storable_multiclip -> unit

Reload the contents of the multiclip from its file.

val write_multiclip : storable_multiclip -> unit

Write the contents of the multiclip into its file.

val storable_get_multiclip : storable_multiclip -> multiclip

Get the raw multiclip.

val storable_get_file : storable_multiclip -> string

Get the file use by the given multiclip.

OCaml

Innovation. Community. Security.