XTkOps.mesa
Copyright Ó 1991, 1992, 1993 by Xerox Corporation. All rights reserved.
Christian Jacobi, March 8, 1991 3:12:12 pm PST
Christian Jacobi, February 23, 1993 11:18 pm PST
DIRECTORY
Xl USING [EventFilter, SetOfEvent, unspecifiedEvents],
XTk USING [TQ, Widget, WidgetNotifyProc];
XTkOps: CEDAR DEFINITIONS
~ BEGIN OPEN XTk;
A random collection of useful operators for XTk.
RegisterNotifierProcOnEvents:
PROC [widget: Widget, handles: Xl.EventFilter, tq:
TQ ¬
NIL, generate: Xl.SetOfEvent ¬ Xl.unspecifiedEvents, proc
--LX--: WidgetNotifyProc, registerData, callData:
REF ¬
NIL, temporary:
BOOL ¬
FALSE];
Adds a match which calls a particular XTk.WidgetNotifyProc.
Locking hint: Do not use protected procedures unless you protect it with tq yourself.
RegisterCallNotifiersOnEvents:
PROC [widget: Widget, handles: Xl.EventFilter, tq:
TQ ¬
NIL, generate: Xl.SetOfEvent ¬ Xl.unspecifiedEvents, notifierKey
--LX--:
REF, callData:
REF ¬
NIL, temporary:
BOOL ¬
FALSE];
Adds a match which calls all XTk Notifiers registered on notifierKey.
Locking hint: Do not use keys for protected procedures unless you protect it with tq yourself.
CallAndRegisterOnPostRealize:
PROC [widget: Widget, proc
--LX--: WidgetNotifyProc, registerData:
REF ¬
NIL];
Register proc permanently on postWindowCreationKey
If currently realized, this calls proc also directly
GetWidgetPropStar:
PROC [w: Widget, key:
REF]
RETURNS [val:
REF ¬
NIL, who: Widget ¬
NIL];
Searches widget and then ancestors and connection for a property until it is found; returns property value and ancestor where found.
SetupDestruction:
PROC [shell: Widget, trigger: Widget, triggerKey:
REF ¬
NIL];
Sets up destruction of shell for when event triggerKey is notified on trigger
END.