Module GUtil

Utility classes for programming with GTK objects

val print_widget : Stdlib.Format.formatter -> GObj.#widget -> unit

A nice function to use with #install_printer

class 'a memo : unit -> object ... end
The ML signal mechanism

It allows one to add GTK-like signals to arbitrary objects.

val next_callback_id : unit -> GtkSignal.id
class 'a signal : unit -> object ... end
class virtual ml_signals : (GtkSignal.id -> bool) list -> object ... end
class virtual add_ml_signals : 'a Gtk.obj -> (GtkSignal.id -> bool) list -> object ... end
Propagating state modifications

The variable class provides an easy way to propagate state modifications. A new variable is created by new variable init. The #set method just calls the set signal, which by default only calls real_set. real_set sets the variable and calls changed when needed. Deep equality is used to compare values, but check is only done if there are callbacks for changed.

class 'a variable_signals : set:'a signal -> changed:'a signal -> object ... end
class 'a variable : 'a -> object ... end