LessTif

LessTif Manual Page - Widget Classes

XmArrowButton


[Resources] [Callbacks] [Inherited Resources] [Actions] [Translations] [Public Functions] [Usage] [Example] [See Also]

Synopsis

Widget Class xmArrowButtonWidgetClass
Public Header <Xm/ArrowB.h>
Private Header <Xm/ArrowBP.h>
Class Hierarchy Core:: XmPrimitive:: XmArrowButton

Description

A arrow shaped version of a push button type widget

Resources

Name Class Type Default Access
XmNactivateCallback XmCCallback XtCallbackListNULL CSG
XmNarmCallback XmCCallback XtCallbackListNULL CSG
XmNarrowDirection XmCArrowDirection unsigned charXmARROW_UP CSG
XmNdisarmCallback XmCCallback XtCallbackListNULL CSG
XmNarmColor XmCArmColor Pixel_XmSelectColorDefault CSG

XmNarrowDirection
The XmNarrowDirection resource can be used to set or get the current arrow direction. The possible values for this resource are:
XmNarmColor
A non Motif1.2 resource FIXME

Callbacks

Callback Resources

The ArrowButton widget defines the following callback resources:

XmNactivateCallback
The activateCallback specifies a list of callback functions that are called when the ArrowButton Widget is activated. This is when the arrow Button is pressed and release. The reason field of the Callback structure has the values XmCR_ACTIVATE.

XmNarmCallback
The armCallback specifies a list of callback functions that are called when the ArrowButton Widget is armed. This is when the arrow Button is Pressed. The reason field of the Callback structure has the values XmCR_ARM.

XmNdisarmCallback
The armCallback specifies a list of callback functions that are called when the ArrowButton Widget is disarmed. This is when the arrow Button is pressed and release. The reason field of the Callback structure has the values XmCR_DISARM.

Callback Structure

typedef struct
{
int reason;
XEvent *event;
int	click_count;
} XmArrowButtonCallbackStruct;


Inherited Resources

XmArrowButton inherits resources from the following widget classes:

Actions

Activate()

Arm()

ArmAndActivate()

Cancel()

Disarm()

Enter()

Help()

Leave()

MultiActivate()

MultiArm()

PrimitiveParentActivate()

PrimitiveParentCancel()


Translations

<Btn1Down>: Arm()
<Btn1Down>,<Btn1Up>: Activate() Disarm()
<Btn1Down>(2+): MultiArm()
<Btn1Up>(2+): MultiActivate()
<Btn1Up>: Activate() Disarm()
<EnterWindow>: Enter()
<LeaveWindow>: Leave()
:<Key>osfActivate: PrimitiveParentActivate()
:<Key>osfCancel: PrimitiveParentCancel()
:<Key>osfSelect: ArmAndActivate()
:<Key>osfHelp: Help()
<Key>Return: PrimitiveParentActivate()
<Key>space: ArmAndActivate()

Usage

An ArrowButton widget can be created using the standard Xt toolkit functions XtCreateWidget or XtCreateManagedWidget.
	
Widget arrow = XtCreateManagedWidget("Arrow",xmArrowButtonWidgetClass,parent,args,n);

Public Functions

Widget XmCreateArrowButton(Widget Parent,char *Name,Arg *arglist,Cardinal count)
Create an instance of an arrowbutton widget with the name Name and a parent of Parent using the first count arguments of arglist

Code Example

See testXm/arrowbutton/arrow1.c for an example of its usage.

See Also

Core, XmPrimitive,
Go Back to Index
Go Back to Main Index
Last Update:Fri 8 Dec 08:36:09 1995