1XtAddGrab(3)                     XT FUNCTIONS                     XtAddGrab(3)
2
3
4

NAME

6       XtAddGrab, XtRemoveGrab - redirect user input to a modal widget
7

SYNTAX

9       #include <X11/Intrinsic.h>
10
11       void XtAddGrab(Widget w, Boolean exclusive, Boolean spring_loaded);
12
13       void XtRemoveGrab(Widget w);
14

ARGUMENTS

16       exclusive Specifies whether user events should be dispatched exclu‐
17                 sively to this widget or also to previous widgets in the cas‐
18                 cade.
19
20       spring_loaded
21                 Specifies whether this widget was popped up because the user
22                 pressed a pointer button.
23
24       w         Specifies the widget to add to or remove from the modal cas‐
25                 cade.
26

DESCRIPTION

28       The XtAddGrab function appends the widget (and associated parameters)
29       to the modal cascade and checks that exclusive is True if spring_loaded
30       is True.  If these are not True, XtAddGrab generates an error.
31
32       The modal cascade is used by XtDispatchEvent when it tries to dispatch
33       a user event.  When at least one modal widget is in the widget cascade,
34       XtDispatchEvent first determines if the event should be delivered.  It
35       starts at the most recent cascade entry and follows the cascade up to
36       and including the most recent cascade entry added with the exclusive
37       parameter True.
38
39       This subset of the modal cascade along with all descendants of these
40       widgets comprise the active subset.  User events that occur outside the
41       widgets in this subset are ignored or remapped.  Modal menus with sub‐
42       menus generally add a submenu widget to the cascade with exclusive
43       False.  Modal dialog boxes that need to restrict user input to the most
44       deeply nested dialog box add a subdialog widget to the cascade with ex‐
45       clusive True.  User events that occur within the active subset are de‐
46       livered to the appropriate widget, which is usually a child or further
47       descendant of the modal widget.
48
49       Regardless of where on the screen they occur, remap events are always
50       delivered to the most recent widget in the active subset of the cascade
51       that has spring_loaded True, if any such widget exists.
52
53       The XtRemoveGrab function removes widgets from the modal cascade start‐
54       ing at the most recent widget up to and including the specified widget.
55       It issues an error if the specified widget is not on the modal cascade.
56

SEE ALSO

58       X Toolkit Intrinsics - C Language Interface
59       Xlib - C Language X Interface
60
61
62
63X Version 11                      libXt 1.2.1                     XtAddGrab(3)
Impressum