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

motif_cascade_button(motif) Motif motif_cascade_button(motif)

NAME

motif_cascade_button - button used to implement pull-right menus

DESCRIPTION

A CascadeButton is used as the button in a menu that implements a pull-right or walking menu.

For a more complete description of this Motif widget, consult "OSF/Motif Programmer's Reference."

SUPERCLASS

motif_label

INSTANCE VARIABLES

activate_action is an action that is executed when mouse button 1 is released.

cascading_action is an action that is executed just prior to the mapping of the sub menu associated with the CascadeButton.

MESSAGES

@ resource selects resource for a subsequent set or query.

: 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.

EXAMPLES

/* Cascade Button Example */ /* In: scripts/motif/cascadebutton.scr */

actions new: activate_action tick_actions=`!activate' ;

actions new: cascading_action tick_actions=`!cascading' ;

motif_menu_bar new: aMenuBar parent=motif; motif_pulldown_menu new: Pulldown1 parent=aMenuBar create!; motif_cascade_button new: Cascade1 parent=aMenuBar activate_action=`activate_action' cascading_action=`cascading_action' @ "labelString" : "File" @ "subMenuId" : [PullDown1 id?] create!; motif_push_button new: Button11 parent=PullDown1 @ "labelString" : "Create" create!; motif_push_button new: Button12 parent=PullDown1 @ "labelString" : "Save" create!; motif_pulldown_menu new: PullDown2 parent=aMenuBar create!; motif_cascade_button new: Cascade2 parent=aMenuBar activate_action=`activate_action' cascading_action=`cascading_action' @ "labelString" : "Tools" @ "subMenuId" : [PullDown2 id?] create!; motif_pulldown_menu new: PullDown3 parent=PullDown2 create!; motif_cascade_button new: Cascade3 parent=PullDown2 activate_action=`activate_action' cascading_action=`cascading_action' @ "subMenuId" : [PullDown3 id?] @ "labelString" : "House" create!; motif_push_button new: Button21 parent=PullDown3 @ "labelString" : "Saw" create!; motif_push_button new: Button22 parent=PullDown3 @ "labelString" : "Hammer" create!; motif_pulldown_menu new: PullDown4 parent=PullDown2 create!; motif_cascade_button new: Cascade4 parent=PullDown2 activate_action=`activate_action'

cascading_action=`cascading_action' @ "subMenuId" : [PullDown4 id?] @ "labelString" : "Car" create!; motif_push_button new: Button23 parent=PullDown4 @ "labelString" : "Wrench" create!; motif_push_button new: Button24 parent=PullDown4 @ "labelString" : "Tire Iron" create!; motif_cascade_button new: Cascade5 parent=aMenuBar activate_action=`activate_action' cascading_action=`cascading_action' @ "labelString" : "Other" create!;

aMenuBar widget_tree!; motif on! start!;

SEE ALSO

motif, motif_label, motif_menubar, motif_pulldown


Please send comments and suggestions to
consult@rpi.edu