<<<<<<<<<<<<<<<<

xt(x) Xlib xt(x)

NAME

xt - X Intrinsics class

DESCRIPTION

Xt is an abstract class that corresponds functionally to the X11 Intrinsics. Widget wrapper classes such as Motif and UI (HP widgets) are subclassed from xt.

SUPERCLASS

object

INSTANCE VARIABLES

application is the name of the application. This will appear on the application's window border. The application name can be used in specifying resources in an window manager start up file such as .mwmrc .

display is the X11 display for the application. The default display is xdisplay.

enter_action is an action that is executed when the cursor enters the widget.

exit_action is an action that is executed when the cursor leaves the widget.

parent is the name of the parent of the widget. This must be set before a widget is created. record_filename is the name of the prefix (*) of a pair of files (*.e and *.w) which contain a recorded session.

MESSAGES

application[=?]string sets or gets the application name.

application_context? returns a pointer to the application context. This message is not useful to the script writer - it is intended to be used by subclasses of xt.

create! creates a widget. If the parent is null or the widget has already been created, return. Then, ask the parent for its id. If this is null, return. Then create a managed widget, add callbacks, and tell the widget's parent to add this widget as a child.

current_widget? is the name of the last widget know to LYMB

entered.

display[=?] sets or gets the display (string) of the widget.

display_id? the id (an object pointer) of the X display of the widget.

dump_widgets! prints the widget hierarchy (like the widget_tree! message) interleaved with the widget resources (like the resources! message).

exit! exits the application.

id= sets the id of the widget. This is an alternative to create!. Some composite widgets (widgets comprising other widgets) return through their resources id's of their components. This message allows a user to control these widgets. For example, the dialog shells return as resources the id's of their buttons. This message can be used to turn these buttons on and off.

id? is the id (object pointer) of the widget. It can be as a resource argument any place a widget id can be used.

input_mask[=+](list) sets or augments the input mask for the widget. Each element of the list is a LYMB scalar, representing the event mask values defined in /usr/include/X11/X.h. A set of LYMB scalars representing the possible event mask values is in the LYMB script, xinit.

manage! manages a widget. This adds the widget to the geometry-managed (and hence displayable) subset of its composite parent.

off! turns off a widget.

on! turns on a widget.

parent[=?] set or gets the parent (string) of the widget.

parent_id? returns (as an object pointer) the id of a widget's parent. This method calls XtParent to get the widget's parent.

playback! Plays back a recorded session (from file indicated by record_filename instance variable).

playback_pause! Pause a playback session already in progress

playback_continue! Resume playing back a paused session.

playback_stop! Terminate playing back a session.

record_start! Start recording a user interface session

record_stop! Terminate recording a user interface session

record_pause! Suspend recording events to the file.

Resume recording after a "record_pause!"

resources! prints, in parsable form, each resource and its current setting. The following resource types are omitted: Callback , Pointer , WidgetList , Colormap , FontList , TranslationTable , Function , and Screen .

resources? returns (as a list of ASCII strings) the resources understood by a widget. If the widget is a child of a constraint widget (like a Motif form widget), its constraint resource values are printed as well. (Constraint resources are currently printed only on Sun-4, DECstation, and SGI).

resource_types? returns (as a list of ASCII strings) the types of resources. This list is the same length as that returned by resources?.

screen_id? the id (an object pointer) of the X screen of the widget.

set_values: (name, name,...) sets a group of resources from the list of xt_resource object names given.

translations+string augments the widget's translation table. Refer to "X Toolkit Intrinsics - C Language Interface, X

Window System, X Version 11, Release 4", Appendix B, for an explanation of translation string syntax and semantics. A LYMB extension to translations is the LymbAction() translation action. If you pass string arguments to LymbAction when you define the translation, LymbAction will assume that you gave it object names and will send the tick! message to those objects when the translation is triggered. If you do not supply arguments to LymbAction(), it will do nothing.

start! cont! starts (or continues) the event processing loop. Use stop!orpause! to stop processing events.

stop! pause! interupts the event processing loop. Use start!orcont! to continue processing events.

translations=string sets the widget's translation table. Refer to "X Toolkit Intrinsics - C Language Interface, X Window System, X Version 11, Release 4", Appendix B, for an explanation of translation string syntax and semantics. A LYMB extension to translations is the LymbAction() translation action. If you pass string arguments to LymbAction when you define the translation, LymbAction will assume that you gave it object names and will send the tick! message to those objects when the translation is triggered. If you do not supply arguments to LymbAction(), it will do nothing.

unmanage! unmanages the widget. This removes the widget from the parent's managed list. Unmanaged children are not displayed, nor are their geometries used by container widgets during widget layout.

widget_tree! recursively prints the name of the widget and its children, indented so that parent/child relationships are evident.

window_id? returns (as an object pointer) the X window id of the widget.

INTERNAL MESSAGES

add_callbacks! adds callbacks to a widget. The callbacks are available to the script writer via _actions, where the action name is derived from the motif callback as follows: each word is separated by underscores.

For example, valueChangedCallback becomes value_changed_action .

add_child is an internal message that adds a child widget to a parent widget.

add_enter_callback is an internal message that adds the enter callback to a widget.

add_exit_callback is an internal message that adds the exit callback to a widget.

print_resource is an internal message that prints the name and value of a single widget resource.

event[=+](list) sets, or adds one or more objects to the list of objects that will receive events. Typically, these objects are xeventcontroller, ui_mouse, or motif_mouse objects. They must respond to an "event:" message that expects an XEvent as an argument.

event! prints the list of objects that are currently receiving events.

event[-](list) removes one or more objects from the list of objects that will receive events.

event? returns the list of objects that are currently receiving events.

EXAMPLE

There are numerous sample scripts in scripts/motif.

SEE ALSO

motif ui xeventcontroller ui_mouse motif_mouse


Last Updated On: Fri Mar 10 15:38:51 1995

Please send comments and suggestions to

its-documentation@rpi.edu

Keyword Search of RPInfo Consulting Pages and NewsCache