For a more complete description of this Motif widget, consult "OSF/Motif Programmer's Reference."
drag_action is an action that is executed when the slider is being dragged.
increment_action is an action that is executed when an arrow is selected that increases the slider value by one.
page_decrement_action is an action that is executed when the slider value is decreased by one page increment.
page_increment_action is an action that is executed when the slider value is decreased by one page increment.
to_bottom_action is an action that is executed when the user selects <Shift> mouse button 1 down on the bottom arrow button.
to_top_action is an action that is executed when the user selects <Shift> mouse button 1 down on the top arrow button.
value_changed_action is an action that is executed when the slider is released while being dragged.
: 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 <colors
motif application=`Scroll Bar Example';
motif_form new: aForm parent=motif @ width : 256 @ height : 400 create! ; motif_scroll_bar new: horizontal parent=aForm @ width : 75 @ value : 20 @ orientation : XmHORIZONTAL @ `topAttachment' : XmATTACH_FORM @ `leftAttachment' : XmATTACH_FORM @ `rightAttachment' : XmATTACH_FORM
@ `troughColor' : red increment_action=`increment' decrement_action=`decrement' create! ; motif_scroll_bar new: vertical parent=aForm @ height : 75 @ value : 20 @ `bottomAttachment' : XmATTACH_FORM @ `topAttachment' : XmATTACH_WIDGET @ `topWidget' : [horizontal id?] @ `leftAttachment' : XmATTACH_FORM @ `rightAttachment' : XmATTACH_NONE @ `troughColor' : green increment_action=`increment' decrement_action=`decrement' create! ;
actions new: increment tick_actions=`!increment'; actions new: decrement tick_actions=`!decrement';
motif on! start!;