September 13, 2024
Release 0.2.0 of OCaml-stk is available from the
Download page.
Changes:
- Color.of_name replaced by
Color.of_string,
- Color.sdl_color_of_int32 replaced by
Color.to_sdl_color,
- one can now register colors by name, in addition to predefined ones,
using Color.register,
- Fix: closing last window make the app stops,
- Fix: menu windows now autoresize,
- New theming system, based on CSS,
- New Stk_ocf
package to build configuration boxes upon Ocf,
- Image: handle new
autosize property,
new method surface,
- Font:
- new font abstract type,
- use in-memory fonts rather than keeping open file descriptors,
- automatically unload fonts unused for some delay,
- look up for fonts in additional default directories,
- issue debug message rather than fail when a font directory does not exist,
- add Font.family_is_available,
- try harder to return a font when no italic or no bold is available,
- Improve memory management to avoid leaks,
- Callbacks attached to an object are now stored in the object rather
than in a global variable, so that the object can be garbage collected,
- New Table widget,
- Split class Container.container
to Container.container
and Container.container_list
Class container is a generic virtual class for containers, and
container_list specifies this class using a list to store children,
- Datetime module, including a calendar widget;
widgets for time will be added in the future,
- Add Props.PList
Props.PTriple functors to create
properties with 'a list or ('a,'b,'c) triple values,
- Clist: change definition of cell creation function,
- Widget: add missing ?delay and ?propagate parameters to some
set_XXX methods,
- Clist.clist:
honor max_height property of cells, fix handling of cell
resizing (for example when containing a textview),
- New Props.max_{width,max_heightheight} properties. Only max_height is used by now (by clist),
- Clist.clist: add hcovers_child
and vcovers_child optional parameters, specifying
whether child widget expands under horizontal and vertical scrollbars,
- Menu: fix alignment when unfolding menus,
- Dialog:
method #run does not use Lwt.async;
new method #run_async, like calling #run in Lwt.async,
- fix handling of reentrant need_resize,
- fix Text.{label,glyph}#min_height_ method,
- add ?label_classes to Button.text_ functions,
- New widget events: File_dropped, Text_dropped,
- Add ?wdata parameter for each widget,
- Props: add transitions to animate property changes
(new ?delay parameter for object#set_p method),
- new ?count parameter for Events.register
and Object.o#connect,
to automatically unregister event handlers after count calls,
- Button.radiobutton and
Button.text_radiobutton:
add a ?wdata parameter,
- Pack.box,
Pack.paned and
Pack.flex: ?pos argument to
#pack method can be negative to indicate a position from the end of the children list,
- Bin.scrollbox:
- new events HScrolled and VScrolled (in module Bin),
- new methods hscroll_range and vscroll_range,
- make g_child method public,
- Canvas: add new items Canvas.bin
and Canvas.bezier_curve.