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

ui_arrow(ui) HP Widgets ui_arrow(ui)

NAME

ui_arrow

SUPERCLASS

ui

DESCRIPTION

The ui_arrow object provides an interface to the HP XwarrowWidgetClass. It is basically a button with an arrow on it.

INSTANCE VARIABLES

arrow indicates which direction the arrow is pointing. Possible values are XwARROW_LEFT, XwARROW_RIGHT, XwARROW_UP and XwARROW_DOWN.

action is name of the actions object associated with the arrow. When the arrow is selected, a tick! message will be sent to the actions object.

MESSAGES

action? returns the value of the action instance variable.

action= sets the value of the action instance variable.

arrow? returns the value of the arrow instance variable.

arrow= sets the value of the arrow instance variable.

create! creates the arrow widget.

down! makes the arrow point downward.

left! makes the arrow point to the left.

right! makes the arrow point to the right.

up! makes the arrow point upward.

EXAMPLE

/* create ui and main window */

ui create!;

ui_control_panel new: my_panel parent= ui create! ;

/* set up arrows and actions */

ui_arrow new: left

parent= my_panel create! left! action= left_arrow_action ;

actions new: left_arrow_action tick_actions= "! you just selected the left arrow.";

ui_arrow new: up parent= my_panel create! up! action= up_arrow_action @ "xRefName" : left @ "xAddWidth" : 1 ;

actions new: up_arrow_action tick_actions= "! you just selected the up arrow.";

ui_arrow new: down parent= my_panel create! down! action= down_arrow_action @ "xRefName" : up @ "xAddWidth" : 1

;

actions new: down_arrow_action tick_actions= "! you just selected the down arrow.";

ui_arrow new: right parent= my_panel create! right! action= right_arrow_action @ "xRefName" : down @ "xAddWidth" : 1 ;

actions new: right_arrow_action tick_actions= "! you just selected the right arrow.";

/* add exit button */

ui_button new: ebutton parent= my_panel label= "exit" action= bye_bye create! @ "xRefName" : right @ "xAddWidth" : 1 @ "yRefName" : right @ "yAddHeight" : 1;

actions new: bye_bye tick_actions= "ui exit!";

/* run it! */

ui on! start!;

SEE ALSO

ui


Please send comments and suggestions to
consult@rpi.edu