Stk.TreeSourceA tree widget. Interface is not stable yet.
type ('a, 'b) node_label = {create : Canvas.group -> 'b;update : selected:bool -> expanded:bool -> 'a -> 'b -> unit;remove : Canvas.group -> 'b -> unit;}val node_label :
create:(Canvas.group -> 'a) ->
update:(selected:bool -> expanded:bool -> 'b -> 'a -> unit) ->
remove:(Canvas.group -> 'a -> unit) ->
('b, 'a) node_labeltype ('a, 'b) node = {id : Id.t;parent : ('a, 'b) node option;mutable data : 'a;group : Canvas.group;fold_btn : Canvas.label option;label_group : Canvas.group;label : 'b;mutable selected : bool;mutable sub_group : Canvas.group option;mutable expanded : bool;mutable children : ('a, 'b) node list;}type Events.ev += | Node_collapsed : (('a * ('a, 'b) node) -> bool) Events.ev| Node_expanded : (('a0 * ('a0, 'b0) node) -> bool) Events.ev| Node_clicked : ((Widget.button_ev * 'a1 * ('a1, 'b1) node) -> bool) Events.ev| Node_selected : (('a2 * ('a2, 'b2) node) -> bool) Events.ev| Node_unselected : (('a3 * ('a3, 'b3) node) -> bool) Events.evclass ['a, 'b] tree : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata:
Widget.wdata
option -> 'a tree_spec -> ('a, 'b) node_label -> object ... endval tree :
?classes:string list ->
?name:string ->
?props:Props.t ->
?wdata:Widget.wdata ->
?pack:(Widget.widget -> unit) ->
?selection_mode:Props.selection_mode ->
'a tree_spec ->
('a, 'b) node_label ->
('a, 'b) tree