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

xt_resource(xt) Xt Intrinsics xt_resource(xt)

NAME

xt_resource - collect a number of widget resources together

DESCRIPTION

The xt_resource class allows script programmers to collect multiple widget resources together. This is useful for a number of reasons. Grouping common resources together is a convenience to the programmer. If a default resource value must be changed, it only needs to be changed in one location. It is more efficient. When sending a set_values: message to an object that is subclassed from xt, all resources contained in the arguments to the message are set at once with a single XtSetValues call. It can provide better user interface behavior. For example, if a window's width and height must both be changed, using an xt_resource object to group them will cause them to change at the same time, instead of one at a time if they are sent directly to the widget object with @ and : messages.

SUPERCLASS

hash_table

INSTANCE VARIABLES

No new instance variables.

MESSAGES

@ name sets the current resource to name.

: value associates value with the current resource.

EXAMPLE

-- this is in .../scripts/motif/xt-resource.scr

xt_resource new: dimensions @ `width' : 250 @ `height' : 100 ;

xt_resource new: colors @ `background' : [motif_color color= "Aquamarine" pixel?] @ `foreground' : [motif_color color= "Plum" pixel?] ;

motif_font new: f font_name="9x15bold";

xt_resource new: fonts @ `fontList' : [f font?] ;

motif_push_button new: weird_button parent=motif set_values: (dimensions, colors, fonts)

@ `labelString' : `Whoa, baby!' activate_action=`quit' create! ;

actions new: quit tick_actions=` parser exit!; ' ;

motif on! start!;

SEE ALSO

xt, hash_table, motif, ui


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