LessTif

LessTif Manual Page - Widget Classes

XmPushButton


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

Synopsis

Widget Class xmPushButtonWidgetClass
Public Header <Xm/PushB.h>
Private Header <Xm/PushBP.h>
Class Hierarchy Core:: XmPrimitive:: XmLabel:: XmPushButton


Description

Under Construction


Resources

Name Class Type Default Access
XmNactivateCallback XmCCallback XtCallbackList NULL CSG
XmNarmCallback XmCCallback XtCallbackList NULL CSG
XmNarmColor XmCArmColor Pixel _XmSelectColorDefault CSG
XmNarmPixmap XmCArmPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNdisarmCallback XmCCallback XtCallbackList NULL CSG
XmNfillOnArm XmCFillOnArm XmRFillOnArm True CSG
XmNshowAsDefault XmCShowAsDefault Dimension 0 CSG


XmNarmColor
The armColor is the background color that will be used when the XmNfillOnArm is set to True.
XmNfillOnArm
XmNfillOnArm will make the button fill with the current armColor when pressed
XmNshowAsDefault
XmNdefaultButtonShadowThickness needs to be added FIXME


Callbacks

Callback Resources

The Push Button widget defines the following callback resources:

XmNactivateCallback
The activateCallback specifies a list of callback functions that are called when the PushButton Widget is activated. This is when the Push 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 PushButton Widget is armed. This is when the Push 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 PushButton Widget is disarmed. This is when the Push 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;
} XmPushButtonCallbackStruct;


Inherited Resources

XmPushButton inherits resources from the following widget classes:


Actions

Arm()


Activate()


Disarm()


ArmAndActivate()


Help()


Enter()


Leave()


BtnDown()


BtnUp()


MultiArm()


MultiActivate()



Translations

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


Usage

An PushButton widget can be created using the standard Xt toolkit functions XtCreateWidget or XtCreateManagedWidget.

 
Widget push = XtCreateManagedWidget("Push",xmPushButtonWidgetClass,parent,args,n);


Public Functions

Widget XmCreatePushButton(Widget Parent,char *Name,Arg *arglist,Cardinal count);

Create an instance of an pushbutton widget with the name Name and a parent of Parent using the first count arguments of arglist


Code Example

See pushbutton/push1.c for an example of its usage.


See Also

Core, XmPrimitive, XmLabel, XmToggleButton, XmArrowButton, XmCascadeButton, XmDrawnButton,


Go Back to Index
Go Back to Main Index

Last Update:Fri 8 Dec 08:36:13 1995