package stk

  1. Overview
  2. Docs

A status is a label where messages can be stacked. Only the message at the top of the stack is displayed. Each message has an id, which can be used to remove the message even if not on top of the stack.

inherit label
method push : string -> Status_msg_id.t

s#push msg pushes new message msg and returns message id.

method pop : unit

v#pop pops message from the stack. If the stack is not empty, then the new message on top is displayed.

method remove : Status_msg_id.t -> unit

v#remove id removes message with given id from the stack.

method remove_all : unit

Removes all messages.

method flash : ?delay:int -> string -> unit

flash ?delay msg pushes msg to the stack and removes it after a given delay in seconds (default is 4).

OCaml

Innovation. Community. Security.