Module Chamo.Gui

The main GUI module, defining windows and boxes used to split the windows.

More elements can be showed in interface if needed.

class gui_window : ?x:int -> ?y:int -> ?w:int -> ?h:int -> unit -> object ... end
class gui_paned : View.topwin -> Stk.Props.orientation -> unit -> object ... end
class gui_notebook : View.topwin -> unit -> object ... end
val init_view : View.topwin -> View.gui_view -> unit

This function inits a view with the given window.

type gui_windows = gui_window list
val gui_windows : gui_windows Stdlib.ref
val active_window : gui_window option Stdlib.ref
val on_last_window_close : (unit -> unit) Stdlib.ref

The default function does nothing. the referenced function is called when the last gui window is dsetroyed.

val create_window : ?x:int -> ?y:int -> ?w:int -> ?h:int -> unit -> gui_window
val in_new_window : string array -> unit

Code of the "in_new_window" command which creates a new window and use it as active window when evaluating the command represented by the given arguments: first argument is the command name, following ones are the arguments of the command to launch.

val on_active_window : (gui_window -> unit) -> unit -> unit

This function, on_active_window_lwt and on_active_window_args can be used to apply a function to the active window, if any. They are useful when creating commands to register.

val on_active_window_lwt : (gui_window -> unit Lwt.t) -> unit -> unit Lwt.t
val on_active_window_args : (gui_window -> string array -> unit) -> string array -> unit Lwt.t
val prompt_command_history : Minibuffer.minibuffer_history

The history associated to the "prompt_command" command.

val prompt_command : gui_window -> unit

This function uses the active window's minibuffer to prompt the user for a command.