include "dividers.m"; dividers := load Dividers Dividers->PATH; Divider: import dividers; init: fn(); Divider: adt { new: fn(win: ref Tk->Toplevel, w: string, wl: list of string, dir: int): (ref Divider, chan of string); event: fn(d: self ref Divider, e: string); };
Init must be called before anything else, to allow Dividers to initialise its internal state. Divider.new creates a new divider widget; it will be named w, and it will divide up the widgets named in the list wl. Dir can be Dividers->NS, to stack the widgets one on top of another, or Dividers->EW to stack the widgets left-right. Divider.new returns a new Divider adt, and a channel through which Divider events will be received. The application should arrange that events received on this channel be passed to the event() function.
A Divider widget must be informed if its size has changed by configuring its width and height appropriately; it does the same to the items it is dividing.
The event-based mechanism seems somewhat contrary to the preferred Limbo way of doing things.
DIVIDERS(2 ) | Rev: Thu Feb 15 14:43:27 GMT 2007 |