XTkSharedCell.mesa
Copyright Ó 1993 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, February 22, 1993
Christian Jacobi, July 2, 1993 9:58 pm PDT
Companion interface to SharedCell, displaying a cell using XTk widgets.
DIRECTORY
SharedCell USING [Cell],
XTk USING [Widget, WidgetNotifyProc];
XTkSharedCell: CEDAR DEFINITIONS ~
BEGIN
Binding a widget to a cell makes the widget track and display the value of the cell.
Memory ownership remark:
Cell's are considered longer lived then widgets: It is ok for a widget to contain the Cell in its property list.
Cell: TYPE = SharedCell.Cell;
Widget: TYPE = XTk.Widget;
Bind: PROC [cell: Cell, widget: Widget, notifyProc: XTk.WidgetNotifyProc, registerData: REF, initialCall: BOOL ¬ FALSE];
Notification of cell value changes are translated to widget notification.
callData: set to new value of the cell
If initialCall is TRUE the notifyProc is called with current cell contents, as if cell contents had changed.
BindText: PROC [cell: Cell, textWidget: Widget];
Notification of new cell values cause a SetText (for a small number of types, including Rope.ROPE).
END.