beautypg.com

2 input focus support – Compaq DEC Text Processing Utility AA-PWCBD-TE User Manual

Page 105

background image

DEC Text Processing Utility Program Development

5.2 Programming in DECwindows DECTPU

Menu_bar

Popup_attached_db

Popup_dialog_box

Popup_menu

Pulldown_entry

Pulldown_menu

Push_button

Scroll_bar (vertical and horizontal)

Separator

Simple_text

Toggle_button

5.2.2 Input Focus Support

In DECwindows, at most one of the applications on the screen can have the input
focus; that is, only one application can accept user input from the keyboard. For
more information about the input focus, see the Motif documentation.

DECwindows DECTPU automatically grabs the input focus whenever you cause
an unmodified M1DOWN event (that is, an event not modified by Shift, Ctrl,
or other modifying key) while the pointer cursor is in either of the following
locations:

DECTPU’s main window widget

DECTPU’s title bar

DECwindows assigns input focus to DECTPU only if and when it is possible to
do so. To make sure that DECwindows can assign input focus, your application
should use the GET_INFO (SCREEN, ‘‘input_focus’’) built-in procedure.

If assignment of input focus to DECTPU is enabled, DECTPU can receive input
focus in the following circumstances:

DECwindows DECTPU grabs input focus

The DECwindows session manager assigns input focus to DECTPU

An application layered on DECTPU requests input focus

In the Motif environment, DECTPU supports both implicit and explicit focus
policies.

Compaq recommends that you use only a DECwindows section file with
DECwindows DECTPU. (All versions of EVE shipped with OpenVMS Version
5.1 or higher are compatible with DECwindows and are suitable for building
DECwindows section files, as well as DECTPU Version 3.0 or higher.) However,
if you do not follow this recommendation, DECTPU’s automatic grabbing of the
input focus enables your layered application to interact with other DECwindows
applications.

DEC Text Processing Utility Program Development 5–5