Specifications
Athena Widget Set libXaw 1.0.7
3.1.2. Command Actions
The Command widget supports the following actions:
•Switching the button’sinterior between the foreground and background colors with set,
unset,and reset.
•Processing application callbacks with notify
•Switching the internal border between highlighted and unhighlighted states with highlight
and unhighlight
The following are the default translation bindings used by the Command widget:
<EnterWindow>: highlight( )
<LeaveWindow>: reset( )
<Btn1Down>: set( )
<Btn1Up>: notify( )unset( )
The full list of actions supported by Command is:
highlight(condition)Displays the internal highlight border in the color (foreground or back-
ground )that contrasts with the interior color of the Command widget.
The conditions WhenUnset and Always are understood by this action
procedure. If no argument is passed, WhenUnset is assumed.
unhighlight() Displays the internal highlight border in the color (foreground or back-
ground )that matches the interior color of the Command widget.
set() Enters the set state, in which notify is possible. This action causes the
button to display its interior in the foreground color.The label or bit-
map is displayed in the background color.
unset() Cancels the set state and displays the interior of the button in the back-
ground color.The label or bitmap is displayed in the foreground color.
reset() Cancels any set or highlight and displays the interior of the button in the
background color,with the label or bitmap displayed in the foreground
color.
notify() When the button is in the set state this action calls all functions in the
callback list named by the callback resource. The value of the call_data
argument passed to these functions is undefined.
Avery common alternative toregistering callbacks is to augment a Command’stranslations with
an action performing the desired function. This often takes the form of:
*Myapp*save.translations: #augment <Btn1Down>,<Btn1Up>: Save()
Note
When a bitmap of depth greater that one (1) is specified the set(), unset(), and reset()
actions have noeffect, since there are no foreground and background colors used in a
multi-plane pixmap.
3.2. Grip Widget
Application header file <X11/Xaw/Grip.h>
Class header file <X11/Xaw/GripP.h>
Class gripWidgetClass
Class Name Grip
Superclass Simple
22