DIRECTORY Xl USING [currentTime, TimeStamp], XTk USING [Widget]; XTkInputFocus: CEDAR DEFINITIONS ~ BEGIN OPEN XTk; SetFocus: PROC [w: Widget, time: Xl.TimeStamp ¬ Xl.currentTime]; GiveUpFocus: PROC [w: XTk.Widget, time: Xl.TimeStamp ¬ Xl.currentTime]; FirstFocusTarget: PROC [w: XTk.Widget, searchLimit: INT ¬ 5] RETURNS [XTk.Widget ¬ NIL]; NextFocusTarget: PROC [w: XTk.Widget, searchLimit: INT ¬ 5] RETURNS [XTk.Widget ¬ NIL]; Implement: PROC [w: XTk.Widget, bool: BOOL ¬ TRUE]; Delegate: PROC [w: XTk.Widget, using: XTk.Widget ¬ NIL]; SetNext: PROC [w: XTk.Widget, using: XTk.Widget ¬ NIL]; END. ` XTkInputFocus.mesa Copyright Σ 1992 by Xerox Corporation. All rights reserved. Christian Jacobi, February 4, 1992 12:51 pm PST Christian Jacobi, February 5, 1992 10:43 am PST Input focus procedures may result in no-ops if widget is not realized (or NIL). Setting focus (Directly) sets the input focus the ICCCM way (good for either globally or locally active mode). It is up to the shell's input focus mode whether this actively sets the input focus, or, whether this only sets the target for WM_TAKE_FOCUS protocol. If the caller wants to enable delegation, he must do so himself. ICCCM does NOT allow to give up focus. However: there has to be a way to set focus back just in case there would be no window manager running. Navigation Procedures useful to implement a NEXT key. searchLimit limits levels of delegation and nesting to limit damage on circular delegations. Returns w or its first child which is capable of taking the input focus Returns first sibling of w, or, child of a sibling capable of taking the input focus. Denotes whether w implements the input focus. Note that the input focus capability is enabled when either the widget instance or the widget class supports it. Denotes that "using" should be substituted for "w" on calls of FirstFocusTarget or NextFocusTarget. This is mainly useful for widget class implementors delegating focus operations to a particular child. NIL establishes default behaviour. Sets the target of the "next" operation. This is mainly useful for navigation within composed widgets to implement fancy "next" behaviour. NIL establishes default behaviour. ΚΤ•NewlineDelimiter –(cedarcode) style™codešΟc™Kšœ Οeœ1™