☜ | MWAPI - Focus Events1995 Version of ANSI (Equivalent to Current ISO Version) of Standard | ☞ |
Focus events are focus, unfocus and change events.
A focus event, indicated by an etype value equal to "FOCUS", occurs when a window or gadget has received focus.
For a window, an unfocus event, indicated by an etype value equal to "UNFOCUS", occurs when a window is about to lose focus to another window defined in ^$WINDOW. If a window W1 which is defined in ^$WINDOW has focus, then focus changes to one or more windows not defined in ^$WINDOW, and then focus changes to a window W2 which is defined in ^$WINDOW, an unfocus event occurs for W1 if W1 is a different window than W2 and no unfocus event occurs for W1 if W1 is a the same window as W2.
For a gadget, an unfocus event occurs when the gadget is about to lose focus to another gadget defined for the same window. If a gadget G in window W has focus, then focus changes to one or more other windows, and then focus changes to window W, an unfocus event occurs for gadget G when focus changes to window W but not to gadget G.
A change event, indicated by an etype value equal to "CHANGE", occurs for a gadget instead of an unfocus event if (a) change events are enabled for the gadget and (b) the value of the gadget’s CHANGED elattribute is equal to TRUE. If both change and unfocus events are enabled for a gadget and a change event occurs, then an unfocus event does not occur.
If, during call back processing for a change or unfocus event, an application removes the OK einfoattribute from ^$EVENT, the request to change focus is denied. If the action which produced the change or unfocus event also would produce a subsequent focus event, that focus event does not occur. In addition, any deferred events except timer events are discarded and, to the extent possible, visual and other effects of the attempt to change focus are prevented or reversed.
If an action yields both an unfocus or change event and a focus event, the unfocus or change event precedes the focus event.
Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.
This page most recently updated on 14-Nov-2023, 22:11:44.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)