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

NAME

6       XmArrowButton — The ArrowButton widget class
7

SYNOPSIS

9       #include <Xm/ArrowB.h>
10

DESCRIPTION

12       ArrowButton  consists  of  a  directional  arrow surrounded by a border
13       shadow. When it is selected, the shadow changes to give the  appearance
14       that the ArrowButton has been pressed in. When the ArrowButton is unse‐
15       lected, the shadow reverts to give the appearance that the  ArrowButton
16       is released, or out.
17
18       ArrowButton holds the XmQTactivatable trait.
19
20   Classes
21       ArrowButton  inherits behavior, resources, and traits from the Core and
22       XmPrimitive classes.
23
24       The class pointer is xmArrowButtonWidgetClass.
25
26       The class name is XmArrowButton.
27
28   New Resources
29       The following table defines a set of widget resources used by the  pro‐
30       grammer  to specify data. The programmer can also set the resource val‐
31       ues for the inherited classes to set attributes  for  this  widget.  To
32       reference  a  resource by name or by class in a .Xdefaults file, remove
33       the XmN or XmC prefix and use the remaining letters. To specify one  of
34       the  defined  values for a resource in a .Xdefaults file, remove the Xm
35       prefix and use the remaining letters (in either lowercase or uppercase,
36       but  include  any  underscores between words).  The codes in the access
37       column indicate if the given resource can be set at creation time  (C),
38       set by using XtSetValues (S), retrieved by using XtGetValues (G), or is
39       not applicable (N/A).
40
41       ┌───────────────────────────────────────────────────────────────────────────────────────────┐
42       │                         │      XmArrowButton Resour│ce Set           │            │        │
43Name                     Class                    Type           Default    Access 
44       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
45       │XmNactivateCallback      │ XmCCallback              │ XtCallbackList │ NULL       │ C      │
46       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
47       │XmNarmCallback           │ XmCCallback              │ XtCallbackList │ NULL       │ C      │
48       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
49       │XmNarrowDirection        │ XmCArrowDirection        │ unsigned char  │ XmARROW_UP │ CSG    │
50       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
51       │XmNdetailShadowThickness │ XmCDetailShadowThickness │ Dimension      │ 2          │ CSG    │
52       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
53       │XmNdisarmCallback        │ XmCCallback              │ XtCallbackList │ NULL       │ C      │
54       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
55       │XmNmultiClick            │ XmCMultiClick            │ unsigned char  │ dynamic    │ CSG    │
56       ├─────────────────────────┼──────────────────────────┼────────────────┼────────────┼────────┤
57       └─────────────────────────┴──────────────────────────┴────────────────┴────────────┴────────┘
58       XmNactivateCallback
59                 Specifies a list of callbacks that is called when the  Arrow‐
60                 Button  is  activated.   To  activate  the  button, press and
61                 release BSelect while the pointer is inside  the  ArrowButton
62                 widget. Activating the ArrowButton also disarms it.  The rea‐
63                 son sent by this callback is  XmCR_ACTIVATE.   This  callback
64                 uses the XmQTactivatable trait.
65
66       XmNarmCallback
67                 Specifies  a list of callbacks that is called when the Arrow‐
68                 Button is armed.  To arm this widget, press BSelect while the
69                 pointer  is  inside the ArrowButton.  The reason sent by this
70                 callback is XmCR_ARM.
71
72       XmNarrowDirection
73                 Sets the arrow direction.  The values for this resource are
74
75                    ·  XmARROW_UP
76
77                    ·  XmARROW_DOWN
78
79                    ·  XmARROW_LEFT
80
81                    ·  XmARROW_RIGHT
82
83       XmNdetailShadowThickness
84                 Specifies the thickness of  the  inside  arrow  shadows.  The
85                 default thickness is 2 pixels.
86
87       XmNdisarmCallback
88                 Specifies  a list of callbacks that is called when the Arrow‐
89                 Button is disarmed.  To disarm this widget, press and release
90                 BSelect  while  the  pointer  is inside the ArrowButton.  The
91                 reason for this callback is XmCR_DISARM.
92
93       XmNmultiClick
94                 If a button click is followed by another button click  within
95                 the time span specified by the display's multiclick time, and
96                 this resource is  set  to  XmMULTICLICK_DISCARD,  the  second
97                 click.   is not processed.  If this resource is set to XmMUL‐
98                 TICLICK_KEEP, the  event  is  processed  and  click_count  is
99                 incremented  in  the  callback structure.  When the button is
100                 not in a menu, the default value is XmMULTICLICK_KEEP.
101
102   Inherited Resources
103       ArrowButton inherits  behavior  and  resources  from  the  superclasses
104       described  in  the following table.  For a complete description of each
105       resource, refer to the reference page for that superclass.
106
107       ┌───────────────────────────────────────────────────────────────────────────────────────────────────┐
108       │                        │            XmPrimitiveResource Set      │                      │        │
109Name                    Class                 Type             Default              Access 
110       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
111       │XmNbottomShadowColor    │ XmCBottomShadowColor  │ Pixel            │ dynamic              │ CSG    │
112       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
113       │XmNbottomShadowPixmap   │ XmCBottomShadowPixmap │ Pixmap           │ XmUNSPECIFIED_PIXMAP │ CSG    │
114       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
115       │XmNconvertCallback      │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
116       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
117       │XmNforeground           │ XmCForeground         │ Pixel            │ dynamic              │ CSG    │
118       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
119       │XmNhelpCallback         │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
120       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
121       │XmNhighlightColor       │ XmCHighlightColor     │ Pixel            │ dynamic              │ CSG    │
122       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
123       │XmNhighlightOnEnter     │ XmCHighlightOnEnter   │ Boolean          │ False                │ CSG    │
124       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
125       │XmNhighlightPixmap      │ XmCHighlightPixmap    │ Pixmap           │ dynamic              │ CSG    │
126       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
127       │XmNhighlightThickness   │ XmCHighlightThickness │ Dimension        │ 2                    │ CSG    │
128       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
129       │XmNlayoutDirection      │ XmCLayoutDirection    │ XmDirection      │ dynamic              │ CG     │
130       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
131       │XmNnavigationType       │ XmCNavigationType     │ XmNavigationType │ XmNONE               │ CSG    │
132       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
133       │XmNpopupHandlerCallback │ XmCCallback           │ XtCallbackList   │ NULL                 │ C      │
134       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
135       │XmNshadowThickness      │ XmCShadowThickness    │ Dimension        │ 2                    │ CSG    │
136       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
137       │XmNtopShadowColor       │ XmCTopShadowColor     │ Pixel            │ dynamic              │ CSG    │
138       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
139       │XmNtopShadowPixmap      │ XmCTopShadowPixmap    │ Pixmap           │ dynamic              │ CSG    │
140       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
141       │XmNtraversalOn          │ XmCTraversalOn        │ Boolean          │ True                 │ CSG    │
142       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
143       │XmNunitType             │ XmCUnitType           │ unsigned char    │ dynamic              │ CSG    │
144       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
145       │XmNuserData             │ XmCUserData           │ XtPointer        │ NULL                 │ CSG    │
146       ├────────────────────────┼───────────────────────┼──────────────────┼──────────────────────┼────────┤
147       └────────────────────────┴───────────────────────┴──────────────────┴──────────────────────┴────────┘
148       ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
149       │                              │               Core Resource Se│t                │                      │        │
150Name                          Class                         Type           Default              Access 
151       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
152       │XmNaccelerators               │ XmCAccelerators               │ XtAccelerators │ dynamic              │ CSG    │
153       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
154       │XmNancestorSensitive          │ XmCSensitive                  │ Boolean        │ dynamic              │ G      │
155       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
156       │XmNbackground                 │ XmCBackground                 │ Pixel          │ dynamic              │ CSG    │
157       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
158       │XmNbackgroundPixmap           │ XmCPixmap                     │ Pixmap         │ XmUNSPECIFIED_PIXMAP │ CSG    │
159       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
160       │XmNborderColor                │ XmCBorderColor                │ Pixel          │ XtDefaultForeground  │ CSG    │
161       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
162       │XmNborderPixmap               │ XmCPixmap                     │ Pixmap         │ XmUNSPECIFIED_PIXMAP │ CSG    │
163       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
164       │XmNborderWidth                │ XmCBorderWidth                │ Dimension      │ 0                    │ CSG    │
165       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
166       │XmNcolormap                   │ XmCColormap                   │ Colormap       │ dynamic              │ CG     │
167       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
168       │XmNdepth                      │ XmCDepth                      │ int            │ dynamic              │ CG     │
169       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
170       │XmNdestroyCallback            │ XmCCallback                   │ XtCallbackList │ NULL                 │ C      │
171       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
172       │XmNheight                     │ XmCHeight                     │ Dimension      │ dynamic              │ CSG    │
173       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
174       │XmNinitialResourcesPersistent │ XmCInitialResourcesPersistent │ Boolean        │ True                 │ C      │
175       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
176       │XmNmappedWhenManaged          │ XmCMappedWhenManaged          │ Boolean        │ True                 │ CSG    │
177       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
178       │XmNscreen                     │ XmCScreen                     │ Screen *       │ dynamic              │ CG     │
179       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
180       │XmNsensitive                  │ XmCSensitive                  │ Boolean        │ True                 │ CSG    │
181       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
182       │XmNtranslations               │ XmCTranslations               │ XtTranslations │ dynamic              │ CSG    │
183       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
184       │XmNwidth                      │ XmCWidth                      │ Dimension      │ dynamic              │ CSG    │
185       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
186       │XmNx                          │ XmCPosition                   │ Position       │ 0                    │ CSG    │
187       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
188       │XmNy                          │ XmCPosition                   │ Position       │ 0                    │ CSG    │
189       ├──────────────────────────────┼───────────────────────────────┼────────────────┼──────────────────────┼────────┤
190       └──────────────────────────────┴───────────────────────────────┴────────────────┴──────────────────────┴────────┘
191   Callback Information
192       A pointer to the following structure is passed to each callback:
193
194       typedef struct
195       {
196               int reason;
197               XEvent * event;
198               int click_count;
199       } XmArrowButtonCallbackStruct;
200
201       reason    Indicates why the callback was invoked.
202
203       event     Points to the XEvent that triggered the callback.
204
205       click_count
206                 This value is valid only when the  reason  is  XmCR_ACTIVATE.
207                 It  contains  the  number  of  clicks  in the last multiclick
208                 sequence if the  XmNmultiClick  resource  is  set  to  XmMUL‐
209                 TICLICK_KEEP; otherwise it contains 1.  The activate callback
210                 is invoked for each click if XmNmultiClick is set  to  XmMUL‐
211                 TICLICK_KEEP.
212
213   Translations
214       XmArrowButton includes translations for XmPrimitive.  The following key
215       names are listed in the X standard key event translation table  syntax.
216       This format is the one used by Motif to specify the widget actions cor‐
217       responding to a given key.  A brief overview of the format is  provided
218       under  VirtualBindings(3).   For  a complete description of the format,
219       please refer to the X Toolkit Instrinsics Documentation.
220
221       <EnterWindow>:
222                 Enter()
223
224       <LeaveWindow>:
225                 Leave()
226
227       c<Btn1Down>:
228                 ButtonTakeFocus()
229
230       ∼c<Btn1Down>:
231                 Arm()
232
233       ∼c<Btn1Down>,∼c<Btn1Up>:
234                 Activate() Disarm()
235
236       ∼c<Btn1Down>(2+):
237                 MultiArm()
238
239       ∼c<Btn1Up>(2+):
240                 MultiActivate()
241
242       ∼c<Btn1Up>:
243                 Activate() Disarm()
244
245       :<Key><osfActivate>:
246                 PrimitiveParentActivate()
247
248       :<Key><osfCancel>:
249                 PrimitiveParentCancel()
250
251       :<Key><osfSelect>:
252                 ArmAndActivate()
253
254       :<Key><osfHelp>:
255                 Help()
256
257       ∼s ∼m ∼a <Key>Return:
258                 PrimitiveParentActivate()
259
260       ∼s ∼m ∼a <Key>space:
261                 ArmAndActivate()
262
263   Action Routines
264       The XmArrowButton action routines are
265
266       Activate():
267                 Draws the shadow in the unselected state.  If the pointer  is
268                 within  the ArrowButton, calls the callbacks for XmNactivate‐
269                 Callback.
270
271       Arm():    Draws the shadow in the selected state and  calls  the  call‐
272                 backs for XmNarmCallback.
273
274       ArmAndActivate():
275                 Draws  the  shadow  in the selected state and calls the call‐
276                 backs for XmNarmCallback.  Arranges  for  the  shadow  to  be
277                 drawn  in the unselected state and the callbacks for XmNacti‐
278                 vateCallback and XmNdisarmCallback to be called, either imme‐
279                 diately or at a later time.
280
281       ButtonTakeFocus():
282                 Causes   the   ArrowButton   to   take  keyboard  focus  when
283                 Ctrl<Btn1Down> is pressed, without activating the widget.
284
285       Disarm(): Draws the shadow in the unselected state and calls the  call‐
286                 backs for XmNdisarmCallback.
287
288       Help():   Calls  the  callbacks  for  XmNhelpCallback if any exist.  If
289                 there are no help callbacks  for  this  widget,  this  action
290                 calls  the  help  callbacks for the nearest ancestor that has
291                 them.
292
293       MultiActivate():
294                 If XmNmultiClick is XmMULTICLICK_DISCARD,  this  action  does
295                 nothing.
296
297                 If XmNmultiClick is XmMULTICLICK_KEEP, this action increments
298                 click_count in the callback structure and draws the shadow in
299                 the unselected state.  If the pointer is within the ArrowBut‐
300                 ton, this action calls the callbacks for  XmNactivateCallback
301                 and XmNdisarmCallback.
302
303       MultiArm():
304                 If  XmNmultiClick  is  XmMULTICLICK_DISCARD, this action does
305                 nothing.  If XmNmultiClick is XmMULTICLICK_KEEP, this  action
306                 draws  the  shadow  in the selected state and calls the call‐
307                 backs for XmNarmCallback.
308
309   Additional Behavior
310       This widget has the following additional behavior:
311
312       <EnterWindow>:
313                 Draws the ArrowButton shadow in its  selected  state  if  the
314                 pointer  leaves  and  re-enters  the  window  while <Btn1> is
315                 pressed.
316
317       <LeaveWindow>:
318                 Draws the ArrowButton shadow in its unselected state  if  the
319                 pointer leaves the window while <Btn1> is pressed.
320
321   Virtual Bindings
322       The  bindings  for  virtual  keys are vendor specific.  For information
323       about bindings for virtual buttons and keys, see VirtualBindings(3).
324
326       Core(3),  XmCreateArrowButton(3),  XmPrimitive(3),  XmVaCreateArrowBut‐
327       ton(3), and XmVaCreateManagedArrowButton(3).
328
329
330
331                                                   XmArrowButton(library call)
Impressum