You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lablgtk has a very nice object layer on top of gtk; its main drawback is that it is handwritten. It would be nice if we could identify patterns in the lablgtk api that could be autogenerated, so that code could be ported to ocaml-gtk easily.
Some examples:
widget#get_foo becomes widget#foo throughout (e.g. Widget_.get_height -> widget#height)
Method arguments are labelled; this is probably hard to do automatically in every case, but there are some common cases like every signal connector having a ~callback argument that could be added to the code generator.
Widget constructors have a ~packing argument that autogenerates the packing to add them to their parents (e.g. let btn = GButton.button ~label:"Get Targets" ~packing:window#add ()) which is extremely nice to use and eliminates a lot of boilerplate.
The text was updated successfully, but these errors were encountered:
lablgtk has a very nice object layer on top of gtk; its main drawback is that it is handwritten. It would be nice if we could identify patterns in the lablgtk api that could be autogenerated, so that code could be ported to ocaml-gtk easily.
Some examples:
widget#get_foo
becomeswidget#foo
throughout (e.g.Widget_.get_height
->widget#height
)widget#signal_connect_foo
becomeswidget#connect#foo
(e.g.button#connect#clicked
)~callback
argument that could be added to the code generator.~packing
argument that autogenerates the packing to add them to their parents (e.g.let btn = GButton.button ~label:"Get Targets" ~packing:window#add ()
) which is extremely nice to use and eliminates a lot of boilerplate.The text was updated successfully, but these errors were encountered: