1XmPushButton(library call)                          XmPushButton(library call)
2
3
4

NAME

6       XmPushButton — The PushButton widget class
7

SYNOPSIS

9       #include <Xm/PushB.h>
10

DESCRIPTION

12       PushButton  issues  commands  within  an application.  It consists of a
13       text label or pixmap surrounded by a border shadow.  When a  PushButton
14       is selected, the shadow changes to give the appearance that it has been
15       pressed in. When a PushButton is unselected, the shadow changes to give
16       the appearance that it is out.
17
18       The  default behavior associated with a PushButton in a menu depends on
19       the type of menu system in which it resides.  By default,  <Btn1>  con‐
20       trols the behavior of the PushButton.  In addition, <Btn3> controls the
21       behavior of the PushButton if it resides in a  PopupMenu  system.   The
22       actual mouse button used is determined by its RowColumn parent.
23
24       Thickness  for a second shadow, used when the PushButton is the default
25       button, may be specified with the XmNshowAsDefault resource. If it  has
26       a  nonzero  value, the Label's resources XmNmarginLeft, XmNmarginRight,
27       XmNmarginTop, and XmNmarginBottom may be modified  to  accommodate  the
28       second shadow.
29
30       If  an  initial  value is specified for XmNarmPixmap but not for XmNla‐
31       belPixmap, the XmNarmPixmap value is used for XmNlabelPixmap.
32
33       PushButton uses the XmQTmenuSystem and  XmQTspecifyRenderTable  traits,
34       and  holds  the  XmQactivatable,  XmQTmenuSavvy,  and  XmQTtakesDefault
35       traits.
36
37   Classes
38       PushButton inherits behavior, resources, and traits from Core, XmPrimi‐
39       tive, and XmLabel.
40
41       The class pointer is xmPushButtonWidgetClass.
42
43       The class name is XmPushButton.
44
45   New Resources
46       The  following table defines a set of widget resources used by the pro‐
47       grammer to specify data. The programmer can also set the resource  val‐
48       ues  for  the  inherited  classes to set attributes for this widget. To
49       reference a resource by name or by class in a .Xdefaults  file,  remove
50       the  XmN or XmC prefix and use the remaining letters. To specify one of
51       the defined values for a resource in a .Xdefaults file, remove  the  Xm
52       prefix and use the remaining letters (in either lowercase or uppercase,
53       but include any underscores between words).  The codes  in  the  access
54       column  indicate if the given resource can be set at creation time (C),
55       set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
56       not applicable (N/A).
57
58       ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
59       │                                │           XmPushButton Resource │Set              │                      │        │
60Name                            Class                           Type           Default              Access 
61       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
62       │XmNactivateCallback             │ XmCCallback                     │ XtCallbackList │ NULL                 │ C      │
63       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
64       │XmNarmCallback                  │ XmCCallback                     │ XtCallbackList │ NULL                 │ C      │
65       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
66       │XmNarmColor                     │ XmCArmColor                     │ Pixel          │ dynamic              │ CSG    │
67       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
68       │XmNarmPixmap                    │ XmCArmPixmap                    │ Pixmap         │ XmUNSPECIFIED_PIXMAP │ CSG    │
69       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
70       │XmNdefaultButtonShadowThickness │ XmCDefaultButtonShadowThickness │ Dimension      │ dynamic              │ CSG    │
71       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
72       │XmNdisarmCallback               │ XmCCallback                     │ XtCallbackList │ NULL                 │ C      │
73       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
74       │XmNfillOnArm                    │ XmCFillOnArm                    │ Boolean        │ True                 │ CSG    │
75       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
76       │XmNmultiClick                   │ XmCMultiClick                   │ unsigned char  │ dynamic              │ CSG    │
77       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
78       │XmNshowAsDefault                │ XmCShowAsDefault                │ Dimension      │ 0                    │ CSG    │
79       ├────────────────────────────────┼─────────────────────────────────┼────────────────┼──────────────────────┼────────┤
80       └────────────────────────────────┴─────────────────────────────────┴────────────────┴──────────────────────┴────────┘
81       XmNactivateCallback
82                 Specifies  the list of callbacks that is called when PushBut‐
83                 ton is activated.  PushButton  is  activated  when  the  user
84                 presses  and  releases  the  active  mouse  button  while the
85                 pointer is inside that widget. Activating the PushButton also
86                 disarms  it.  For this callback, the reason is XmCR_ACTIVATE.
87                 This callback uses the XmQTactivatable trait.
88
89       XmNarmCallback
90                 Specifies the list of callbacks that is called when  PushBut‐
91                 ton  is armed.  PushButton is armed when the user presses the
92                 active mouse button while the pointer is inside that  widget.
93                 For this callback, the reason is XmCR_ARM.
94
95       XmNarmColor
96                 Specifies  the  color  with  which  to fill the armed button.
97                 XmNfillOnArm must be set to True for this resource to have an
98                 effect.   The  default for a color display is a color between
99                 the background and the bottom shadow color. For a  monochrome
100                 display,  the default is set to the foreground color, and any
101                 text in the label appears in the background  color  when  the
102                 button is armed.
103
104                 This resource is also used when the button is armed in a menu
105                 and the XmNenableEtchedInMenu resource is True.
106
107       XmNarmPixmap
108                 Specifies the pixmap to be used as the button face if  XmNla‐
109                 belType  is XmPIXMAP or XmPIXMAP_AND_STRING and PushButton is
110                 armed.  This resource is disabled when the PushButton is in a
111                 menu.
112
113       XmNdefaultButtonShadowThickness
114                 This resource specifies the width of the default button indi‐
115                 cator shadow.  If this resource is 0 (zero), the width of the
116                 shadow comes from the value of the XmNshowAsDefault resource.
117                 If this resource is  greater  than  0,  the  XmNshowAsDefault
118                 resource  is  only used to specify whether this button is the
119                 default.  The default value is  the  initial  value  of  XmN‐
120                 showAsDefault.
121
122       XmNdisarmCallback
123                 Specifies  the list of callbacks that is called when PushBut‐
124                 ton is disarmed. PushButton is disarmed when the user presses
125                 and  releases  the  active  mouse button while the pointer is
126                 inside  that  widget.  For  this  callback,  the  reason   is
127                 XmCR_DISARM.
128
129       XmNfillOnArm
130                 Forces  the  PushButton  to fill the background of the button
131                 with the color specified by XmNarmColor when  the  button  is
132                 armed  and  when this resource is set to True. If False, only
133                 the top and bottom shadow  colors  are  switched.   When  the
134                 PushButton is in a menu, this resource is ignored and assumed
135                 to be False.
136
137       XmNmultiClick
138                 If a button click is followed by another button click  within
139                 the time span specified by the display's multiclick time, and
140                 this resource is set to XmMULTICLICK_DISCARD, do not  process
141                 the  second  click.   If  this  resource  is  set  to  XmMUL‐
142                 TICLICK_KEEP, process the event and increment click_count  in
143                 the  callback  structure.   When the button is in a menu, the
144                 default is XmMULTICLICK_DISCARD; otherwise, for a button  not
145                 in a menu, XmMULTICLICK_KEEP is the default value.
146
147       XmNshowAsDefault
148                 If  XmNdefaultButtonShadowThickness is greater than 0 (zero),
149                 a value greater than 0 in this  resource  specifies  to  mark
150                 this  button as the default button.  If XmNdefaultButtonShad‐
151                 owThickness is 0, a value greater than  0  in  this  resource
152                 specifies  to mark this button as the default button with the
153                 shadow thickness specified by this resource.  When  the  Dis‐
154                 play  resource  XmNdefaultButtonEmphasis has a value of XmEX‐
155                 TERNAL_HIGHLIGHT (the default), PushButton draws the location
156                 cursor  outside of the outer shadow. When this resource has a
157                 value of XmINTERNAL_HIGHLIGHT, the highlight is drawn between
158                 the  inner  and  outer shadows.  The space between the shadow
159                 and the default shadow is equal to the sum of  both  shadows.
160                 The  default  value is 0. When this value is not 0, the Label
161                 resources XmNmarginLeft,  XmNmarginRight,  XmNmarginTop,  and
162                 XmNmarginBottom  may  be  modified  to accommodate the second
163                 shadow.  This resource is disabled when the PushButton is  in
164                 a menu.
165
166   Inherited Resources
167       PushButton  inherits  behavior  and  resources  from  the  superclasses
168       described the following tables.  For a  complete  description  of  each
169       resource, refer to the reference page for that superclass.
170
171       ┌────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
172       │                          │                XmLabel Res│ource Set           │                        │        │
173Name                      Class                     Type              Default                Access 
174       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
175       │XmNaccelerator            │ XmCAccelerator            │ String            │ NULL                   │ CSG    │
176       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
177       │XmNacceleratorText        │ XmCAcceleratorText        │ XmString          │ NULL                   │ CSG    │
178       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
179       │XmNalignment              │ XmCAlignment              │ unsigned char     │ dynamic                │ CSG    │
180       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
181       │XmNfontList               │ XmCFontList               │ XmFontList        │ dynamic                │ CSG    │
182       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
183       │XmNlabelInsensitivePixmap │ XmCLabelInsensitivePixmap │ Pixmap            │ XmUNSPECIFIED_PIXMAP   │ CSG    │
184       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
185       │XmNlabelPixmap            │ XmCLabelPixmap            │ Pixmap            │ dynamic                │ CSG    │
186       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
187       │XmNlabelString            │ XmCXmString               │ XmString          │ dynamic                │ CSG    │
188       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
189       │XmNlabelType              │ XmCLabelType              │ unsigned char     │ XmSTRING               │ CSG    │
190       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
191       │XmNmarginBottom           │ XmCMarginBottom           │ Dimension         │ dynamic                │ CSG    │
192       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
193       │XmNmarginHeight           │ XmCMarginHeight           │ Dimension         │ 2                      │ CSG    │
194       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
195       │XmNmarginLeft             │ XmCMarginLeft             │ Dimension         │ dynamic                │ CSG    │
196       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
197       │XmNmarginRight            │ XmCMarginRight            │ Dimension         │ dynamic                │ CSG    │
198       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
199       │XmNmarginTop              │ XmCMarginTop              │ Dimension         │ dynamic                │ CSG    │
200       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
201       │XmNmarginWidth            │ XmCMarginWidth            │ Dimension         │ 2                      │ CSG    │
202       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
203       │XmNmnemonic               │ XmCMnemonic               │ KeySym            │ NULL                   │ CSG    │
204       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
205       │XmNmnemonicCharSet        │ XmCMnemonicCharSet        │ String            │ XmFONTLIST_DEFAULT_TAG │ CSG    │
206       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
207       │XmNpixmapPlacement        │ XmCPixmapPlacement        │ unsigned int      │ XmPIXMAP_LEFT          │ CSG    │
208       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
209       │XmNpixmapTextPadding      │ XmCSpace                  │ Dimension         │ 2                      │ CSG    │
210       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
211       │XmNrecomputeSize          │ XmCRecomputeSize          │ Boolean           │ True                   │ CSG    │
212       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
213       │XmNrenderTable            │ XmCRenderTable            │ XmRenderTable     │ dynamic                │ CSG    │
214       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
215       │XmNstringDirection        │ XmCStringDirection        │ XmStringDirection │ dynamic                │ CSG    │
216       ├──────────────────────────┼───────────────────────────┼───────────────────┼────────────────────────┼────────┤
217       └──────────────────────────┴───────────────────────────┴───────────────────┴────────────────────────┴────────┘
218       ┌───────────────────────────────────────────────────────────────────────────────────────────────────┐
219       │                        │            XmPrimitiveResource Set      │                      │        │
220Name                    Class                 Type             Default              Access 
221       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
222       │XmNbottomShadowColor    │ XmCBottomShadowColor  │ Pixel            │ dynamic              │ CSG    │
223       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
224       │XmNbottomShadowPixmap   │ XmCBottomShadowPixmap │ Pixmap           │ XmUNSPECIFIED_PIXMAP │ CSG    │
225       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
226       │XmNconvertCallback      │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
227       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
228       │XmNforeground           │ XmCForeground         │ Pixel            │ dynamic              │ CSG    │
229       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
230       │XmNhelpCallback         │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
231       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
232       │XmNhighlightColor       │ XmCHighlightColor     │ Pixel            │ dynamic              │ CSG    │
233       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
234       │XmNhighlightOnEnter     │ XmCHighlightOnEnter   │ Boolean          │ False                │ CSG    │
235       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
236       │XmNhighlightPixmap      │ XmCHighlightPixmap    │ Pixmap           │ dynamic              │ CSG    │
237       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
238       │XmNhighlightThickness   │ XmCHighlightThickness │ Dimension        │ 2                    │ CSG    │
239       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
240       │XmNlayoutDirection      │ XmCLayoutDirection    │ XmDirection      │ dynamic              │ CG     │
241       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
242       │XmNnavigationType       │ XmCNavigationType     │ XmNavigationType │ XmNONE               │ CSG    │
243       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
244       │XmNpopupHandlerCallback │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
245       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
246       │XmNshadowThickness      │ XmCShadowThickness    │ Dimension        │ 2                    │ CSG    │
247       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
248       │XmNtopShadowColor       │ XmCTopShadowColor     │ Pixel            │ dynamic              │ CSG    │
249       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
250       │XmNtopShadowPixmap      │ XmCTopShadowPixmap    │ Pixmap           │ dynamic              │ CSG    │
251       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
252       │XmNtraversalOn          │ XmCTraversalOn        │ Boolean          │ True                 │ CSG    │
253       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
254       │XmNunitType             │ XmCUnitType           │ unsigned char    │ dynamic              │ CSG    │
255       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
256       │XmNuserData             │ XmCUserData           │ XtPointer        │ NULL                 │ CSG    │
257       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
258       └────────────────────────┴───────────────────────┴──────────────────┴──────────────────────┴────────┘
259       ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
260       │                              │               Core Resource Se│t                │                      │        │
261Name                          Class                         Type           Default              Access 
262       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
263       │XmNaccelerators               │ XmCAccelerators               │ XtAccelerators │ dynamic              │ CSG    │
264       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
265       │XmNancestorSensitive          │ XmCSensitive                  │ Boolean        │ dynamic              │ G      │
266       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
267       │XmNbackground                 │ XmCBackground                 │ Pixel          │ dynamic              │ CSG    │
268       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
269       │XmNbackgroundPixmap           │ XmCPixmap                     │ Pixmap         │ XmUNSPECIFIED_PIXMAP │ CSG    │
270       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
271       │XmNborderColor                │ XmCBorderColor                │ Pixel          │ XtDefaultForeground  │ CSG    │
272       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
273       │XmNborderPixmap               │ XmCPixmap                     │ Pixmap         │ XmUNSPECIFIED_PIXMAP │ CSG    │
274       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
275       │XmNborderWidth                │ XmCBorderWidth                │ Dimension      │ 0                    │ CSG    │
276       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
277       │XmNcolormap                   │ XmCColormap                   │ Colormap       │ dynamic              │ CG     │
278       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
279       │XmNdepth                      │ XmCDepth                      │ int            │ dynamic              │ CG     │
280       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
281       │XmNdestroyCallback            │ XmCCallback                   │ XtCallbackList │ NULL                 │ C      │
282       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
283       │XmNheight                     │ XmCHeight                     │ Dimension      │ dynamic              │ CSG    │
284       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
285       │XmNinitialResourcesPersistent │ XmCInitialResourcesPersistent │ Boolean        │ True                 │ C      │
286       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
287       │XmNmappedWhenManaged          │ XmCMappedWhenManaged          │ Boolean        │ True                 │ CSG    │
288       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
289       │XmNscreen                     │ XmCScreen                     │ Screen *       │ dynamic              │ CG     │
290       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
291       │XmNsensitive                  │ XmCSensitive                  │ Boolean        │ True                 │ CSG    │
292       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
293       │XmNtranslations               │ XmCTranslations               │ XtTranslations │ dynamic              │ CSG    │
294       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
295       │XmNwidth                      │ XmCWidth                      │ Dimension      │ dynamic              │ CSG    │
296       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
297       │XmNx                          │ XmCPosition                   │ Position       │ 0                    │ CSG    │
298       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
299       │XmNy                          │ XmCPosition                   │ Position       │ 0                    │ CSG    │
300       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
301       └──────────────────────────────┴───────────────────────────────┴────────────────┴──────────────────────┴────────┘
302   Callback Information
303       A pointer to the following structure is passed to each callback:
304
305       typedef struct
306       {
307               int reason;
308               XEvent * event;
309               int click_count;
310       } XmPushButtonCallbackStruct;
311
312       reason    Indicates why the callback was invoked.
313
314       event     Points to the XEvent that triggered the callback.
315
316       click_count
317                 This  value  is  valid only when the reason is XmCR_ACTIVATE.
318                 It contains the number  of  clicks  in  the  last  multiclick
319                 sequence  if  the  XmNmultiClick  resource  is  set to XmMUL‐
320                 TICLICK_KEEP, otherwise it contains 1.  The activate callback
321                 is  invoked  for each click if XmNmultiClick is set to XmMUL‐
322                 TICLICK_KEEP.
323
324   Translations
325       XmPushButton includes translations from Primitive.
326
327       Note that altering translations in #override or #augment mode is  unde‐
328       fined.
329
330       Additional  XmPushButton  translations  for XmPushButtons not in a menu
331       system are described in the following list.
332
333       The following key names are listed in the X standard key event transla‐
334       tion table syntax.  This format is the one used by Motif to specify the
335       widget actions corresponding to a given key.  A brief overview  of  the
336       format  is  provided under VirtualBindings(3).  For a complete descrip‐
337       tion of the format, please refer to the X Toolkit Instrinsics  Documen‐
338       tation.
339
340       c<Btn1Down>:
341                 ButtonTakeFocus()
342
343       ∼c<Btn1Down>:
344                 Arm()
345
346       ∼c<Btn1Down>,∼c<Btn1Up>:
347                 Activate() Disarm()
348
349       ∼c<Btn1Down>(2+):
350                 MultiArm()
351
352       ∼c<Btn1Up>(2+):
353                 MultiActivate()
354
355       ∼c<Btn1Up>:
356                 Activate() Disarm()
357
358       ∼c<Btn2Down>:
359                 ProcessDrag()
360
361       :<Key><osfActivate>:
362                 PrimitiveParentActivate()
363
364       :<Key><osfCancel>:
365                 PrimitiveParentCancel()
366
367       :<Key><osfSelect>:
368                 ArmAndActivate()
369
370       :<Key><osfHelp>:
371                 Help()
372
373       ∼s ∼m ∼a <Key>Return:
374                 PrimitiveParentActivate()
375
376       ∼s ∼m ∼a <Key>space:
377                 ArmAndActivate()
378
379       XmPushButton  inherits menu traversal translations from XmLabel.  Addi‐
380       tional XmPushButton translations for PushButtons in a menu  system  are
381       described  in  the following list.  In a Popup menu system, <Btn3> also
382       performs the <Btn1> actions.
383
384       The following key names are listed in the X standard key event transla‐
385       tion table syntax.  This format is the one used by Motif to specify the
386       widget actions corresponding to a given key.  A brief overview  of  the
387       format  is  provided under VirtualBindings(3).  For a complete descrip‐
388       tion of the format, please refer to the X Toolkit Instrinsics  Documen‐
389       tation.
390
391       <Btn2Down>:
392                 ProcessDrag()
393
394       c<Btn1Down>:
395                 MenuButtonTakeFocus()
396
397       c<Btn1Up>:
398                 MenuButtonTakeFocusUp()
399
400       ∼c<BtnDown>:
401                 BtnDown()
402
403       ∼c<BtnUp>:
404                 BtnUp()
405
406       :<Key><osfSelect>:
407                 ArmAndActivate()
408
409       :<Key><osfActivate>:
410                 ArmAndActivate()
411
412       :<Key><osfCancel>:
413                 MenuEscape()
414
415       :<Key><osfHelp>:
416                 Help()
417
418       ∼s ∼m ∼a <Key>Return:
419                 ArmAndActivate()
420
421       ∼s ∼m ∼a <Key>space:
422                 ArmAndActivate()
423
424   Action Routines
425       The XmPushButton action routines are
426
427       Activate():
428                 This  action  draws  the shadow in the unarmed state.  If the
429                 button is not in a menu and if XmNfillOnArm is set  to  True,
430                 the background color reverts to the unarmed color.  If XmNla‐
431                 belType is XmPIXMAP or XmPIXMAP_AND_STRING, XmNlabelPixmap is
432                 used for the button face.  If the pointer is still within the
433                 button, this action calls the callbacks for  XmNactivateCall‐
434                 back.
435
436       Arm():    This  action arms the PushButton.  It draws the shadow in the
437                 armed state.  If the button is not in a menu and  if  XmNfil‐
438                 lOnArm  is  set  to  True, it fills the button with the color
439                 specified by XmNarmColor.  If  XmNlabelType  is  XmPIXMAP  or
440                 XmPIXMAP_AND_STRING,  the XmNarmPixmap is used for the button
441                 face.  It calls the XmNarmCallback callbacks.
442
443       ArmAndActivate():
444                 In a menu, unposts all  menus  in  the  menu  hierarchy  and,
445                 unless  the button is already armed, calls the XmNarmCallback
446                 callbacks.  This action  calls  the  XmNactivateCallback  and
447                 XmNdisarmCallback callbacks.
448
449                 Outside  a  menu, draws the shadow in the armed state and, if
450                 XmNfillOnArm is set to True, fills the button with the  color
451                 specified  by  XmNarmColor.   If  XmNlabelType is XmPIXMAP or
452                 XmPIXMAP_AND_STRING, XmNarmPixmap  is  used  for  the  button
453                 face.  This action calls the XmNarmCallback callbacks.
454
455                 Outside  a  menu, this action also arranges for the following
456                 to happen, either immediately or at a later time: the  shadow
457                 is  drawn in the unarmed state and, if XmNfillOnArm is set to
458                 True, the background color reverts to the unarmed color.   If
459                 XmNlabelType   is  XmPIXMAP  or  XmPIXMAP_AND_STRING,  XmNla‐
460                 belPixmap is used for the button face.  The  XmNactivateCall‐
461                 back and XmNdisarmCallback callbacks are called.
462
463       BtnDown():
464                 This action unposts any menus posted by the PushButton's par‐
465                 ent menu, disables  keyboard  traversal  for  the  menu,  and
466                 enables mouse traversal for the menu.  It draws the shadow in
467                 the armed state and, unless  the  button  is  already  armed,
468                 calls the XmNarmCallback callbacks.
469
470       BtnUp():  This action unposts all menus in the menu hierarchy and acti‐
471                 vates the PushButton.  It calls the XmNactivateCallback call‐
472                 backs and then the XmNdisarmCallback callbacks.
473
474       ButtonTakeFocus():
475                 Causes   the   PushButton   to   take   keyboard  focus  when
476                 Ctrl<Btn1Down> is pressed, without activating the widget.
477
478       Disarm(): Calls the callbacks for XmNdisarmCallback.
479
480       Help():   In a Pulldown or Popup MenuPane, unposts  all  menus  in  the
481                 menu hierarchy and, when the shell's keyboard focus policy is
482                 XmEXPLICIT, restores keyboard focus to the  widget  that  had
483                 the  focus  before  the menu system was entered.  This action
484                 calls the callbacks for XmNhelpCallback  if  any  exist.   If
485                 there  are  no  help  callbacks  for this widget, this action
486                 calls the help callbacks for the nearest  ancestor  that  has
487                 them.
488
489       MenuShellPopdownOne():
490                 In  a top-level Pulldown MenuPane from a MenuBar, unposts the
491                 menu, disarms the MenuBar CascadeButton and the MenuBar; and,
492                 when   the  shell's  keyboard  focus  policy  is  XmEXPLICIT,
493                 restores keyboard focus to the  widget  that  had  the  focus
494                 before the MenuBar was entered.  In other Pulldown MenuPanes,
495                 it unposts the menu.
496
497                 In a  Popup  MenuPane,  this  action  unposts  the  menu  and
498                 restores keyboard focus to the widget from which the menu was
499                 posted.
500
501       MultiActivate():
502                 If XmNmultiClick is XmMULTICLICK_DISCARD,  this  action  does
503                 nothing.
504
505                 If XmNmultiClick is XmMULTICLICK_KEEP, this action increments
506                 click_count in the callback structure and draws the shadow in
507                 the  unarmed  state.   If  the button is not in a menu and if
508                 XmNfillOnArm is set to True, the background color reverts  to
509                 the  unarmed  color.  If XmNlabelType is XmPIXMAP, the XmNla‐
510                 belPixmap is used for the button face.   If  the  pointer  is
511                 within  the  PushButton, calls the callbacks for XmNactivate‐
512                 Callback and XmNdisarmCallback.
513
514       MultiArm():
515                 If XmNmultiClick is XmMULTICLICK_DISCARD,  this  action  does
516                 nothing.
517
518                 If  XmNmultiClick is XmMULTICLICK_KEEP, this action draws the
519                 shadow in the armed state.  If the button is not  in  a  menu
520                 and  if  XmNfillOnArm  is  set to True, this action fills the
521                 button with the color specified by XmNarmColor.  If XmNlabel‐
522                 Type  is  XmPIXMAP,  the  XmNarmPixmap is used for the button
523                 face.  This action calls the XmNarmCallback callbacks.
524
525       ProcessDrag():
526                 Drags the contents of a  PushButton  label,  identified  when
527                 BTransfer is pressed.  This action sets the XmNconvertProc of
528                 the DragContext to a function that calls the  XmNconvertCall‐
529                 back procedures, possibly multiple times, for the _MOTIF_DROP
530                 selection.  This action is undefined for PushButtons used  in
531                 a menu system.
532
533   Additional Behavior
534       This widget has the following additional behavior:
535
536       <EnterWindow>:
537                 In a menu, if keyboard traversal is enabled, this action does
538                 nothing.  Otherwise, it draws the shadow in the  armed  state
539                 and calls the XmNarmCallback callbacks.
540
541                 If  the PushButton is not in a menu and the cursor leaves and
542                 then reenters the PushButton's window  while  the  button  is
543                 pressed, this action draws the shadow in the armed state.  If
544                 XmNfillOnArm is set to True, it also fills  the  button  with
545                 the  color  specified  by  XmNarmColor.   If  XmNlabelType is
546                 XmPIXMAP or XmPIXMAP_AND_STRING, XmNarmPixmap is used for the
547                 button face.
548
549       <LeaveWindow>:
550                 In a menu, if keyboard traversal is enabled, this action does
551                 nothing.  Otherwise, it draws the shadow in the unarmed state
552                 and calls the XmNdisarmCallback callbacks.
553
554                 If  the PushButton is not in a menu and the cursor leaves the
555                 PushButton's window while the button is pressed, this  action
556                 draws  the  shadow  in the unarmed state.  If XmNfillOnArm is
557                 set to True, the background  color  reverts  to  the  unarmed
558                 color.   If  XmNlabelType is XmPIXMAP or XmPIXMAP_AND_STRING,
559                 the XmNlabelPixmap is used for the button face.
560
561   Virtual Bindings
562       The bindings for virtual keys are  vendor  specific.   For  information
563       about bindings for virtual buttons and keys, see VirtualBindings(3).
564
566       Core(3),  XmCreatePushButton(3),  XmLabel(3), XmPrimitive(3), XmRowCol‐
567       umn(3), XmVaCreatePushButton(3), and XmVaCreateManagedPushButton(3).
568
569
570
571                                                    XmPushButton(library call)
Impressum