XTkButtons.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, July 2, 1991 1:58 pm PDT
Christian Jacobi, April 7, 1992 11:21 am PDT
Implements a button widget class.
A button is a label with a callback procedure.
DIRECTORY
Rope USING [ROPE],
Xl USING [TQ],
XTk USING [Class, Widget, WidgetNotifyProc, WidgetSpec],
XTkCommon USING [StyleSpec];
XTkButtons: CEDAR DEFINITIONS
~ BEGIN
Client accessible functions
TextWidget: TYPE = XTk.Widget; --actually it IS a XTkLabels.TextWidget
StyleSpec: TYPE = XTkCommon.StyleSpec;
CreateButton: PROC [widgetSpec: XTk.WidgetSpec ¬ [], text: Rope.ROPE ¬ NIL, style: StyleSpec ¬ [], hitProc: XTk.WidgetNotifyProc ¬ NIL, registerData, callData: REF ¬ NIL, hitTQ: Xl.TQ ¬ NIL, help: Rope.ROPE ¬ NIL] RETURNS [TextWidget];
Creates a button.
A button is a piece of text which can not be edited, but which calls hitProc [on hitTQ]
when interactively poked at. [A NIL hitTQ causes the hitProc to fork.]
SetButtonTQ: PROC [button: XTk.Widget, hitTQ: Xl.TQ ¬ NIL];
Resets hitTQ; [A NIL hitTQ causes the hitProc to fork.]
SetButtonHelp: PROC [button: XTk.Widget, help: Rope.ROPE ¬ NIL];
Resets help information
SetButtonCallback: PROC [button: XTk.Widget, hitProc: XTk.WidgetNotifyProc ¬ NIL, registerData, callData: REF ¬ NIL];
Resets call-back information.
Functions which allow subclassing.
buttonClass: READONLY XTk.Class;
END.