Stk.ObjectObjects.
Class o is the base class for widget and other classes which can trigger events and hold properties Props.props.
Introduce the Prop_changed property to register callbacks called when the value of a given property changed. Previous and current values of the property are passed to the callback.
An object. See Widget arguments for props arguments.
val add_mirror :
src:(o * 'a Props.prop) ->
dst:(o * 'b Props.prop) ->
map_to:('a -> 'b) ->
map_from:('b -> 'a) ->
Events.callback_id * Events.callback_idadd_mirror ~src:(object1,prop1) ~dst:(object2,prop2) ~map_to ~map_from registers event handlers to that a change on prop1 in object1 triggers a change of propery prop2 of object2, using map_to to map the new value of prop1 to the value given to prop2, and conversely (using map_from). The function returns the event handlers on object1 and object2, so that this mirror can be removed using object1#disconnect id1; object2#disconnect id2.
val add_mirror_id :
src:(o * 'a Props.prop) ->
dst:(o * 'a Props.prop) ->
Events.callback_id * Events.callback_idSame as add_mirror, using Fun.id as mappers, i.e. when both properties have the same time and meaning.
val app : oApplication object. Can be used to register callbacks on some global events. It is used to handle mouse motion and button release events for scrollboxes, ranges and paned, when we must track mouse motion event outside a widget until button is released.