## lay-out-linearly.api
#
# Code for laying out widgets
# in lines or columns.
#
# This is essentially an internal API for
#
#
src/lib/x-kit/widget/old/layout/line-of-widgets.pkg# Compiled by:
#
src/lib/x-kit/widget/xkit-widget.sublib# This api is implemented in:
#
src/lib/x-kit/widget/old/layout/lay-out-linearly.pkgstipulate
package wt = widget_types; # widget_types is from
src/lib/x-kit/widget/old/basic/widget-types.pkg package g2d= geometry2d; # geometry2d is from
src/lib/std/2d/geometry2d.pkg package wg = widget; # Widget is from
src/lib/x-kit/widget/old/basic/widget.apiherein
api Lay_Out_Linearly {
Box_Item
= GEOMETRY { col_preference: wg::Int_Preference, # Should be GEOMETRY wg::Widget_Size_Preference XXX BUGGO FIXME
row_preference: wg::Int_Preference
}
| WIDGET wg::Widget
| HB (wt::Vertical_Alignment, List( Box_Item ))
| NAMED_VALUE (wt::Vertical_Alignment, List( Box_Item ))
;
compute_layout: (g2d::Box, Box_Item) -> (Bool, List( (wg::Widget, g2d::Box) ));
compute_size: Box_Item -> wg::Widget_Size_Preference;
};
end;