LessTif

LessTif Manual Page - Widget Classes

XmToggleButton


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

Synopsis

Widget Class xmToggleButton
Public Header <Xm/ToggleB.h>
Private Header <Xm/ToggleBP.h>
Class Hierarchy Core:: XmPrimitive:: XmLabel:: XmToggleButton

Description

Under Construction

Resources

Name Class Type Default Access
XmNarmCallback XmCCallback XtCallbackListNULL CSG
XmNdisarmCallback XmCCallback XtCallbackListNULL CSG
XmNfillOnSelect XmCFillOnSelect BooleanTrue CSG
XmNindicatorOn XmCIndicatorOn BooleanTrue CSG
XmNindicatorSize XmCIndicatorSize DimensionXmINVALID_DIMENSION CSG
XmNindicatorType XmCIndicatorType XmRIndicatorType_XmToggleButtonIndicatorTypeDefault CSG
XmNselectColor XmCSelectColor Pixel_XmSelectColorDefault CSG
XmNselectPixmap XmCSelectPixmap PixmapXmUNSPECIFIED_PIXMAP CSG
XmNselectInsensitivePixmap XmCSelectInsensitivePixmap PixmapXmUNSPECIFIED_PIXMAP CSG
XmNset XmCSet BooleanFalse CSG
XmNspacing XmCspacing XmRHorizontalDimension4 CSG
XmNvalueChangedCallback XmCCallback XtCallbackListNULL CSG
XmNvisibleWhenOff XmCVisibleWhenOff BooleanFalse CSG

XmNfillOnSelect

XmNindicatorOn

XmNindicatorSize

XmNindicatorType

XmNselectColor

XmNselectPixmap

XmNselectInsensitivePixmap

XmNset

XmNspacing

XmNvisibleWhenOff


Callbacks

Callback Resources

The ToggleButton widget defines the following callback resources:

XmNvalueChangedCallback
The activateCallback specifies a list of callback functions that are called when the ToggleButton Widget is activated. This is when the Toggle Button is pressed and release. The reason field of the Callback structure has the values XmCR_VALUE_CHANGED.

XmNarmCallback
The armCallback specifies a list of callback functions that are called when the ToggleButton Widget is armed. This is when the Toggle 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 ToggleButton Widget is disarmed. This is when the Toggle 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 set;
} XmToggleButtonCallbackStruct;


Inherited Resources

XmToggleButton inherits resources from the following widget classes:

Actions

Arm()

ArmAndActivate()

Disarm()

Select()

Help()

BtnDown()

BtnUp()

Enter()

Leave()


Usage

An ToggleButton widget can be created using the standard Xt toolkit functions XtCreateWidget or XtCreateManagedWidget.
Widget toggle = XtCreateManagedWidget("Toggle",xmToggleButtonWidgetClass,parent,args,n);

Public Functions

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

Widget XmToggleButtonSetState();


Code Example

See testXm/togglebutton/toggle1.c for an example of its usage.

See Also

Core, XmPrimitive, XmLabel, XmPushButton, XmArrowButton, XmCascadeButton, XmDrawnButton,
Go Back to Index
Go Back to Main Index
Last Update:Fri 8 Dec 08:36:14 1995