[OpenVMS documentation]
[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
Updated: 11 December 1998

DEC Text Processing Utility Reference Manual


Previous Contents Index


SET (FACILITY_NAME)


Format

SET (FACILITY_NAME, string)


Parameters

FACILITY_NAME

A keyword that indicates that the SET built-in procedure is being used to set the first item (the facility name) in a message generated by DECTPU.

string

The string that you specify as the facility name for messages. The maximum length of this name is 10 characters.

Description

The SET (FACILITY_NAME) procedure sets the facility name for messages. The facility name appears in messages if you have used the SET (MESSAGE_FLAGS) built-in procedure either to explicitly include the facility name in messages or to include the facility name only if enabled by the default message flags for your OpenVMS process.

Signaled Errors


Example

The following example causes "new_editor" to be used as the facility name in messages:

SET (FACILITY_NAME, "new_editor") 
      


SET (FIRST_INPUT_ACTION)


Format

SET (FIRST_INPUT_ACTION, )


Parameters

FIRST_INPUT_ACTION

A keyword that specifies that DECTPU is to implement the application's first input action routine.

NONE

A keyword that disables the current action routine.

program_source

Specifies the program or learn sequence that DECTPU executes when it gets the first key or button event.

Description

The SET (FIRST_INPUT_ACTION) procedure specifies the program or learn sequence that DECwindows DECTPU executes when it gets the first key or button event. DECwindows EVE uses FIRST_INPUT_ACTION to set an action routine that removes the copyright notice from the title bar when you first press a key or mouse button.

This built-in is valid only until DECTPU gets the first key or mouse event. After that first event, DECTPU signals TPU$_BUILTININV, "Built-in is invalid at this time."

Signaled Errors

TPU$_BUILTININV ERROR This indicates that the first key or button event has already occurred.
TPU$_REQUIRESDECW ERROR This built-in is valid on DECwindows only.
TPU$_TOOFEW ERROR This SET built-in requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR The second parameter is not of type string.

Example

The following example causes the procedure REMOVE_COPYRIGHT to be executed when you press the first key or mouse button in the DECwindows application. That procedure typically sets the "title" resource of the application's shell widget to be the name of the application, removing the original copyright notice in the title bar.

SET (FIRST_INPUT_ACTION, "remove_copyright") 
 
      


SET (FORWARD)


Format

SET (FORWARD, buffer)


Parameters

FORWARD

A keyword that specifies the direction of the buffer. FORWARD means to go toward the end of the buffer. The default direction for a buffer is forward.

buffer

The buffer whose direction you want to set.

Description

The SET (FORWARD) procedure sets the specified buffer's direction to forward. The editor uses this feature to keep track of direction for searching or movement.

Signaled Errors

TPU$_TOOFEW ERROR SET (FORWARD) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Example

The following example causes the direction of the buffer to be toward the end of the buffer:

SET (FORWARD, my_buffer) 
 
      


SET (GLOBAL_SELECT)


Format

[[ integer := ]] SET (GLOBAL_SELECT, SCREEN, ),


Parameters

GLOBAL_SELECT

A keyword that indicates that the SET built-in procedure is being used to request a global selection property.

SCREEN

A keyword used to preserve compatibility with future versions of DECTPU.

PRIMARY

A keyword that directs DECTPU to request ownership of the primary global selection.

SECONDARY

A keyword that directs DECTPU to request ownership of the secondary global selection.

selection_name

A string that names the global selection whose ownership DECTPU is to request.

GLOBAL_SELECT_GRAB

A keyword that tells DECTPU to grab the selection. This is the default.

GLOBAL_SELECT_UNGRAB

A keyword that tells DECTPU to relinquish the grab of the selection.

Return Value


Returns 1 if the global selection ownership request was granted; otherwise, returns 0.

Description

The SET (GLOBAL_SELECT) procedure requests ownership of the specified global selection property. SET (GLOBAL_SELECT) returns the integer 1 if the request for ownership of a global selection was granted; otherwise 0.

DECTPU is notified immediately if its request is granted. Therefore, DECTPU does not automatically execute the global selection grab routine when it encounters SET (GLOBAL_SELECT). DECTPU executes the routine only when it automatically grabs the primary selection after it receives input focus.

Applications can voluntarily relinquish global selections through the optional GLOBAL_SELECT_UNGRAB parameter.

For more information about the concept of global selection, see the OSF/Motif Style Guide.

Signaled Errors


Examples

The following example requests ownership of the primary global selection:
#1

SET (GLOBAL_SELECT, SCREEN, PRIMARY); 
 
      

The following example shows the use of the GLOBAL_SELECT_UNGRAB parameter. In this statement, global selection is relinquished.

#2

SET (GLOBAL_SELECT, SCREEN, PRIMARY, GLOBAL_SELECT_UNGRAB); 
                                          
      


SET (GLOBAL_SELECT_GRAB)


Format

SET (GLOBAL_SELECT_GRAB, SCREEN
[[, ]])


Parameters

GLOBAL_SELECT_GRAB

A keyword that indicates that the SET built-in procedure is being used to set the global select grab routine.

SCREEN

A keyword used to preserve compatibility with future versions of DECTPU.

buffer

The buffer that contains the grab routine.

learn_sequence

The learn sequence that specifies the grab routine.

program

The program that specifies the grab routine.

range

The range that contains the grab routine.

string

The string that contains the grab routine.

NONE

A keyword that directs DECTPU to delete the current global selection grab routine. This is the default if you do not specify the optional third parameter.

Description

The SET (GLOBAL_SELECT_GRAB) procedure specifies the program or learn sequence that DECTPU should execute whenever it automatically grabs ownership of the primary selection. For more information about DECTPU global selection support, see the Guide to the DEC Text Processing Utility.

If the optional parameter is not specified, NONE is the default. When NONE is specified or used by default, DECTPU deletes the current global selection grab routine. When no global selection grab routine is defined, your application is not informed when DECTPU grabs the primary global selection.

Signaled Errors


Example

The following example designates the procedure user_grab_global as a global selection read routine:

SET (GLOBAL_SELECT_GRAB, SCREEN, "user_grab_global");      
 
      


SET (GLOBAL_SELECT_READ)


Format

SET (GLOBAL_SELECT_READ,
[[, ]])


Parameters

GLOBAL_SELECT_READ

A keyword that indicates that the SET built-in procedure is being used to set the global select read routine.

buffer1

The buffer with which the global selection read routine is to be associated.

SCREEN

A keyword that indicates that the specified routine is to be the application's default global selection read routine.

buffer2

The buffer that contains the global selection read routine.

learn_sequence

The learn sequence that specifies the global selection read routine.

program

The program that specifies the global selection read routine.

range

The range that contains the global selection read routine.

string

The string that contains the global selection read routine.

NONE

A keyword that indicates that the global selection read routine should be deleted. If you do not specify the optional third parameter, NONE is the default.

Description

The SET (GLOBAL_SELECT_READ) procedure specifies the program or learn sequence that DECTPU should execute whenever it receives a selection request event on a global selection it owns. To specify a buffer-specific global selection read routine, use the buffer1 parameter. To specify a global selection read routine for the entire application, use the SCREEN keyword.

When DECTPU receives a request for information about a global selection it owns, it checks to see if the current buffer has a global selection read routine. If so, it executes that routine. If not, it checks to see if there is an application-wide global selection read routine. If so, it executes that routine. If not, it tries to respond to the request itself.

If the optional parameter is not specified, NONE is the default. When NONE is specified or used by default, DECTPU deletes the current global selection read routine.

Signaled Errors


Example

The following example designates the procedure user_read_global as a global selection read routine:

SET (GLOBAL_SELECT_READ, SCREEN, "user_read_global");      
      


SET (GLOBAL_SELECT_TIME)


Format

SET (GLOBAL_SELECT_TIME, SCREEN, )


Parameters

GLOBAL_SELECT_TIME

A keyword that indicates that the SET built-in procedure is directing DECTPU to set the expiration time for a global selection information request.

SCREEN

A keyword used to maintain compatibility with future versions of DECTPU.

integer

The number of seconds that DECTPU should wait.

string

A string that indicates how long DECTPU should wait. The format of the string is "dd hh:mm:ss.cc" where dd is the number of days (0-24), hh is the number of hours (0-23), mm is the number of minutes (0-59), ss is the number of seconds (0-59), and cc is the number of hundredths of seconds (0-99).

Description

The SET (GLOBAL_SELECT_TIME) procedure specifies how long DECTPU should wait before it assumes that a request for information about a global selection will not be satisfied. The default waiting time is set by DECwindows. The maximum waiting time you can set is 24 days, 20 hours.

Signaled Errors


Example

The following example sets the waiting time for a global selection response to 3 seconds:

SET (GLOBAL_SELECT_TIME, SCREEN, 3); 
      


SET (GLOBAL_SELECT_UNGRAB)


Format

SET (GLOBAL_SELECT_UNGRAB, SCREEN
[[, ]])


Parameters

GLOBAL_SELECT_UNGRAB

A keyword that indicates that the SET built-in procedure is being used to set the global select ungrab routine.

SCREEN

A keyword used to preserve compatibility with future versions of DECTPU.

buffer

The buffer that contains the global selection ungrab routine.

learn_sequence

The learn sequence that specifies the global selection ungrab routine.

program

The program that specifies the global selection ungrab routine.

range

The range that contains the global selection ungrab routine.

string

The string that contains the global selection ungrab routine.

NONE

A keyword that directs DECTPU to delete the current global selection ungrab routine. This is the default if you do not specify the optional third parameter.

Description

The SET (GLOBAL_SELECT_UNGRAB) procedure specifies the program or learn sequence that DECTPU should execute whenever it loses ownership of a selection. For more information about DECTPU global selection support, see the Guide to the DEC Text Processing Utility.

If the optional parameter is not specified, NONE is the default. When NONE is specified or used by default, DECTPU deletes the current global selection ungrab routine. When no global selection ungrab routine is defined, your application is not informed when DECTPU loses ownership of the primary global selection.

Signaled Errors


Example

The following example designates the procedure user_ungrab_global as a global selection ungrab routine:

SET (GLOBAL_SELECT_UNGRAB, SCREEN, "user_ungrab_global");      
 
      


Previous Next Contents Index

[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
[OpenVMS documentation]

Copyright © Compaq Computer Corporation 1998. All rights reserved.

Legal
6020PRO_027.HTML