LessTif Manual Page
- Widget Classes
XmPushButton
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:
- XmLabel
Resources
Name |
Class |
Type |
Default |
Access |
XmNaccelerator |
XmCAccelerator |
XmString | XmUNSPECIFIED |
CSG |
XmNacceleratorText |
XmCAcceleratorText |
XmString | XmUNSPECIFIED |
CSG |
XmNalignment |
XmCAlignment |
unsigned char | XmALIGNMENT_CENTER |
CSG |
XmNfontList |
XmCFontList |
XmRFontlist | XmUNSPECIFIED |
CSG |
XmNlabelInsensitivePixmap |
XmCLabelInsensitivePixmap |
XmRPixmap | XmUNSPECIFIED_PIXMAP |
CSG |
XmNlabelPixmap |
XmCLabelPixmap |
XmRPixmap | XmUNSPECIFIED_PIXMAP |
CSG |
XmNlabelString |
XmCLabelString |
XmString | XmUNSPECIFIED |
CSG |
XmNlabelType |
XmCLabelType |
XmRLabelType | XmSTRING |
CSG |
XmNmarginBottom |
XmCMarginBottom |
XmRDimension | 0 |
CSG |
XmNmarginHeight |
XmCMarginHeight |
XmRDimension | 2 |
CSG |
XmNmarginLeft |
XmCMarginLeft |
XmRDimension | 0 |
CSG |
XmNmarginRight |
XmCMarginRight |
XmRDimension | 0 |
CSG |
XmNmarginTop |
XmCMarginTop |
XmRDimension | 0 |
CSG |
XmNmarginWidth |
XmCMarginWidth |
XmRDimension | 2 |
CSG |
XmNmnemonicCharSet |
XmCMnemonicCharSet |
XmString | XmFONTLIST_DEFAULT_TAG |
CSG |
XmNrecomputeSize |
XmCRecomputeSize |
XmRBoolean | True |
CSG |
XmNstringDirection |
XmCStringDirection |
XmStringDirection | NULL |
CSG |
XmNtraversalOn |
XmCTraversalOn |
Boolean | False |
CSG |
XmNhighlightOnEnter |
XmCHighlightOnEnter |
Boolean | False |
CSG |
- XmPrimitive
XmPrimitive Resources
Name |
Type |
Default |
Access |
XmNforeground |
Pixel | _XmForegroundColorDefault |
CSG |
XtNbackground |
Pixel | _XmBackgroundColorDefault |
CSG |
XmNbottomShadowColor |
Pixel | _XmBottomShadowColorDefault |
CSG |
XmNbottomShadowPixmap |
Pixmap | XmUNSPECIFIED_PIXMAP |
CSG |
XmNtopShadowColor |
Pixel | _XmTopShadowColorDefault |
CSG |
XmNtopShadowPixmap |
Pixmap | XmUNSPECIFIED_PIXMAP |
CSG |
XmNshadowThickness |
Dimension | 2 |
CSG |
XmNhighlightColor |
Pixel | _XmHighlightColorDefault |
CSG |
XmNhighlightOnEnter |
Boolean | False |
CSG |
XmNhighlightPixmap |
Pixmap | XmUNSPECIFIED_PIXMAP |
CSG |
XmNhighlightThickness |
Dimension | 2 |
CSG |
XmNnavigationType |
XmNavigationType | XmNONE |
CSG |
XmNtraversalOn |
Boolean | True |
CSG |
XmNunitType |
unsigned char | 0 |
CSG |
XmNuserData |
XtPointer | NULL |
CSG |
XmNhelpCallback |
XtCallbackList | NULL |
C |
- Core
Core Resources
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