package bogue

  1. Overview
  2. Docs

Put layouts on top of others

Warning: For all functions in this module, the destination layout must be a house, not a single resident.

Dependency graph
val add_screen : ?color:Draw.color -> Layout.t -> Layout.t

Add a screen on top of the layout. This can be useful to make the whole layout clickable as a whole.

  • returns

    the screen.

val attach : ?bg:Draw.color -> ?show:bool -> Layout.t -> Layout.t -> Layout.t

Generic modal type popup

attach house layout adds two layers on top of the house: one for the screen to hide the house, one for the layout on top of the screen.

  • returns

    the screen.

val info : ?w:int -> ?h:int -> ?button:string -> string -> Layout.t -> unit

Add to the layout a modal popup with a text and a close button. By default, button="Close".

val yesno : ?w:int -> ?h:int -> ?yes:string -> ?no:string -> yes_action:(unit -> unit) -> no_action:(unit -> unit) -> string -> Layout.t -> unit

Add to the layout a modal popup with two yes/no buttons. By default, yes="Yes" and no="No".

val two_buttons : ?w:int -> ?h:int -> label1:string -> label2:string -> action1:(unit -> unit) -> action2:(unit -> unit) -> content:Layout.t -> Layout.t -> unit
type position =
  1. | LeftOf
  2. | RightOf
  3. | Above
  4. | Below
  5. | Mouse
val tooltip : ?background:Layout.background -> ?position:position -> string -> target:Layout.t -> Widget.t -> Layout.t -> unit

tooltip text ~target widget layout adds a tooltip which will appear on layout, next to target (which should be a sublayout of layout), when the widget gets mouse focus and mouse is idle for some time on it. A tooltip it not a modal popup, it does not prevent from interacting with the rest of the layout.

OCaml

Innovation. Community. Security.