Events common to all widgets. Extend the Events.ev type so that callbacks can be registered to be called when a widget triggers an event.
Widget data
type wdata = ..
A widget can hold an optional value of the wdata extensible type. This is useful to store application specific data directly in some widgets rather than storing them in a map aside.
Widget class
classvirtualwidget : ?class_:string option->?name:string option->?props:Props.t option->
unit ->object ... end
The base widget class. It contains methods to be called by children widgets, event if the base class does not handle child widgets.
Widget arguments
All widget classes handle the following optional arguments, which are handled by the convenient functions provided to create widgets (like Bin.scrollbox):
class_ specifies the class name of the widget. This is used to retrieve its default properties. The default class_ of a widget is defined by its class. class_ for a widget class is usually set to the same name as the class; for example, Bin.scrollbox widgets have a default class_ set to "scrollbox".
name specifies the name of the widget. This is useful for debugging purposes and default properties can also be associated to names. Default name is equal to class_ value.
props specifies properties to use in addition to the default properties associated to class_ and name. Propertes props are merged with the default properties, with Props.merge. This is useful to override or add some properties at widget creation.
Convenient functions also handle a pack optional argument. It is a function called with the created widget coerced to widget type, and is usually used to pack or add the created widget to another one.
Utils
val pp_widget_tree : Stdlib.Format.formatter ->widgettree-> unit
pp_widget_tree ppf w pretty-prints widget w and its children to formatter ppf, with some properties. This is for debugging purpose.
val pp : Stdlib.Format.formatter ->< me : string.. >-> unit
pp ppf w prints w#me to formater ppf.
val may_pack : ?pack:(widget-> unit)->< coerce : widget.. >-> unit
may_pack ?pack w will apply the pack function if provided, to widget w. This is used by convenient functions, usually to pack a creatd widget, hence the name.
val widget_prop :
?after:widgetStk__Props.post_action list->?default:widget->?inherits:bool ->string ->widgetStk__Props.prop