1XtAddGrab(3) XT FUNCTIONS XtAddGrab(3)
2
3
4
6 XtAddGrab, XtRemoveGrab - redirect user input to a modal widget
7
9 void XtAddGrab(Widget w, Boolean exclusive, Boolean spring_loaded);
10
11 void XtRemoveGrab(Widget w);
12
14 exclusive Specifies whether user events should be dispatched exclu‐
15 sively to this widget or also to previous widgets in the cas‐
16 cade.
17
18 spring_loaded
19 Specifies whether this widget was popped up because the user
20 pressed a pointer button.
21
22 w Specifies the widget to add to or remove from the modal cas‐
23 cade.
24
26 The XtAddGrab function appends the widget (and associated parameters)
27 to the modal cascade and checks that exclusive is True if spring_loaded
28 is True. If these are not True, XtAddGrab generates an error.
29
30 The modal cascade is used by XtDispatchEvent when it tries to dispatch
31 a user event. When at least one modal widget is in the widget cascade,
32 XtDispatchEvent first determines if the event should be delivered. It
33 starts at the most recent cascade entry and follows the cascade up to
34 and including the most recent cascade entry added with the exclusive
35 parameter True.
36
37 This subset of the modal cascade along with all descendants of these
38 widgets comprise the active subset. User events that occur outside the
39 widgets in this subset are ignored or remapped. Modal menus with sub‐
40 menus generally add a submenu widget to the cascade with exclusive
41 False. Modal dialog boxes that need to restrict user input to the most
42 deeply nested dialog box add a subdialog widget to the cascade with
43 exclusive True. User events that occur within the active subset are
44 delivered to the appropriate widget, which is usually a child or fur‐
45 ther descendant of the modal widget.
46
47 Regardless of where on the screen they occur, remap events are always
48 delivered to the most recent widget in the active subset of the cascade
49 that has spring_loaded True, if any such widget exists.
50
51 The XtRemoveGrab function removes widgets from the modal cascade start‐
52 ing at the most recent widget up to and including the specified widget.
53 It issues an error if the specified widget is not on the modal cascade.
54
56 X Toolkit Intrinsics - C Language Interface
57 Xlib - C Language X Interface
58
59
60
61X Version 11 libXt 1.0.7 XtAddGrab(3)