For a more complete description of this Motif widget, consult "OSF/Motif Programmer's Reference."
: value sets the current resource to value. Since most resources have mixed case, you should enclose any resource name in quotes. Resource names are the Motif names with the XmN prefix removed. Some resources can only be set before the widget is created. For efficiency, set as many resources as you can before creation.
scalar_value? returns the value of the current resource whose type is integer.
string_value? returns the value of the current resource whose type is string.
pointer_value? returns the value of the current resource whose type is a pointer of any kind.
create! creates an instance of the widget. Any resources that have been specified prior to the create! will be set. An id? message also sends a create!.
on! realizes the widget. Realizing a widget creates its windows and displays it when it is managed.
<motifinit
environment new: arch variable=`ARCH'; environment new: lymb_man_path variable=`LYMB_MAN_PATH';
string new: mancommand; switch new: select_man @ `mips' actions=` mancommand string_format = `/usr/ucb/man -P $LYMB_MAN_PATH 1'; ' @ `sun4' actions=` mancommand string_format = `man -M $LYMB_MAN_PATH 1'; ' @ `sun3' actions=` mancommand string_format = `man -M $LYMB_MAN_PATH 1'; ' @ `4d' actions=` mancommand string_format = `man -d $LYMB_MAN_PATH/catl/1.l'; ' -- @ `hp9000s700' actions=` -- mancommand string_format = `man 1'; -- environment new: manpath -- variable=`MANPATH' -- value=[lymb_man_path value?] -- ; -- ' @ `hp9000s700' actions=` mancommand string_format = `cat $LYMB_MAN_PATH/catl/1.l'; ' @ `default' actions=` mancommand string_format = `man 1'; ' switch: [arch value?] ;
motif application="Lymb Manual Sections" create! ;
motif_form new: aform parent=motif create! ;
motif_command new: man parent= aform @ "promptString" : "Enter any class name"
@ "textColumns" : 80 command_entered_action= doman create! ; string new: command_line; shell new: doaman;
scalar new: XC_left_ptr = 68; scalar new: XC_watch = 150;
xfont_cursor new: wait_cursor shape=XC_watch create! ;
xfont_cursor new: ok_cursor shape=XC_left_ptr create! ;
logic new: if;
actions new: doman tick_actions=` if defined:(form_win) false:` xwindow new: form_win id=[aform window_id?] xset_window_attributes=form_att ; xset_window_attributes new: form_att; ' ;
form_att cursor=wait_cursor; form_win change_window_attributes!; xdisplay sync!; mancommand = [man command?]; command_line = mancommand + `| col -b'; doaman command=command_line;
atext off! @ `value' : [doaman do!] on! ;
form_att cursor=ok_cursor; form_win change_window_attributes!; xdisplay sync!; ' ;
motif_scrolled_text new: atext parent=aform @ "topAttachment" : XmATTACH_WIDGET @ "topWidget" : [man id?] @ "leftAttachment" : XmATTACH_FORM @ "rightAttachment" : XmATTACH_FORM @ "bottomAttachment" : XmATTACH_FORM @ "editable" : 0 @ `rows' : 40 @ `columns' : 66 @ `editMode' : XmMULTI_LINE_EDIT create! ; motif on! start!;