XtSetSensitive(3)
β¨ XtSetSensitive(3) β XT FUNCTIONS β¨
okay bestie, pull up a chair π«Ά this one's from the XT FUNCTIONS corner of the X world, and it's literally just about turning widgets on and off like a little light switch. no cap.
πΈ NAME πΈ
XtSetSensitive, XtIsSensitive β set and check a widget's sensitivity state π
like... can this widget receive your keyboard and pointer love, or is it in its silent era? that's the whole vibe.
π SYNTAX π
#include <X11/Intrinsic.h>
void XtSetSensitive(Widget w, Boolean sensitive);
Boolean XtIsSensitive(Widget w);
π¦ ARGUMENTS π¦
sensitiveβ aBooleanvalue that says whether the widget should receive keyboard and pointer events. yes ma'am or no ma'am, that's the whole question β¨wβ specifies the widget. the main character in question π
π DESCRIPTION π
so, XtSetSensitive first calls XtSetValues on the current widget with an argument list specifying that the sensitive field should change to the new value. then it recursively propagates that new value down the managed children tree by calling XtSetValues on each child to set the ancestor_sensitive to the new value β but only if the new values for sensitive and the child's ancestor_sensitive are not the same. it's giving generational trauma but make it a widget tree π
XtSetSensitive calls XtSetValues to change sensitive and ancestor_sensitive. therefore, when one of these changes, the widget's set_values procedure should take whatever display actions are needed β for example, greying out or stippling the widget. the widget's gotta do its own glam, that's not Xt's job π
XtSetSensitive maintains the invariant that if parent has either sensitive or ancestor_sensitive False, then all children have ancestor_sensitive False. periodt. π
the XtIsSensitive function returns True or False to indicate whether or not user input events are being dispatched. if both core.sensitive and core.ancestor_sensitive are True, XtIsSensitive returns True; otherwise, it returns False. it's a two-key check, both have to be slaying or it's a no β¨
π lowkey the whole thing in one line: sensitivity flows downward, and a child is only truly sensitive if both its owncore.sensitiveand itscore.ancestor_sensitiveareTrue.
π SEE ALSO π
- X Toolkit Intrinsics - C Language Interface
- Xlib - C Language X Interface
and that's the tea, bestie π go forth and grey out some widgets responsibly. this little page came to you courtesy of X Version 11, libXt 1.3.1 β mwah, stan ππ§β¨
π¦ where this page comes from
- alpine 3.22: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.23: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.24: libxt-doc 1.3.1-r0 Β· MIT
- arch rolling: libxt 1.3.1-1 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- Copyright 1993 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms