Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

MWAPI - Focus Events

Draft MDC Standard

9.1.4 Focus Events

Focus events are focus, unfocus and change events.

A focus event, indicated by an etype value equal to "FOCUS", occurs when, as a result of user action, a window or gadget has received focus. A single action can produce a focus event for both a window and a gadget.

For a window, an unfocus event, indicated by an etype value equal to "UNFOCUS", occurs when, as a result of user action, 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.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

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.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 14-Nov-2023, 22:11:44.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)