XMCREATESCROLLEDTEXT(3)
π XmCreateScrolledText π
okay bestie, gather round, because this is one of those <Xm/Text.h> library call girlies and she is so useful once you get her. this is the XmCreateScrolledText era and we're thriving.
β¨ NAME β¨
XmCreateScrolledText β the Text ScrolledText convenience creation function. yes she's a convenience function, she's doing the most so you don't have to π«Ά
β¨ SYNOPSIS β¨
#include <Xm/Text.h>
Widget XmCreateScrolledText(
Widget parent,
String name,
ArgList arglist,
Cardinal argcount);
β¨ DESCRIPTION β¨
so like, XmCreateScrolledText creates an instance of a Text widget that is contained within a ScrolledWindow. the ScrolledWindow parent? created managed, periodt. all the ScrolledWindow subarea widgets are automatically created by this function too, no cap, she handles it. π
now here's the plot twist you need to hear: the ID returned by this function is that of the Text widget, NOT the ScrolledWindow widget. not me almost confusing them π use this widget ID for all operations on the Text widget. and use the widget ID of the Text widget's parent for all operations on the ScrolledWindow. to obtain the ID of the ScrolledWindow widget associated with the Text widget, use the Xt Intrinsics XtParent function. iykyk. the name of the ScrolledWindow created by this function is formed by concatenating the letters SW onto the end of the name specified in the parameter list. iconic naming convention honestly.
the Text widget defaults to single-line text edit; therefore, no ScrollBars are displayed. so if you're sitting there like "where are my scrollbars bestie" β that's why. the Text resource XmNeditMode must be set to XmMULTI_LINE_EDIT to display the ScrollBars. π
β οΈ and listen, the results of placing a Text widget inside a ScrolledWindow when the Text'sXmNeditModeisXmSINGLE_LINE_EDITare undefined. undefined behaviour is not the vibe, do not do this. π
all arguments to either the Text or the ScrolledWindow widget can be specified at creation time with this function. changes to initial position and size are sent only to the ScrolledWindow widget. other resources are sent to the Text or the ScrolledWindow widget as appropriate. note that the result of providing the XmNdestroyCallback resource in the creation arglist is unspecified. π¨ the application should use the XtAddCallback function to add callbacks to the appropriate widget (Text or ScrolledWindow) after creating it. do it after, bestie, that's the move.
this function forces the following initial values for ScrolledWindow resources:
XmNscrollingPolicyis set toXmAPPLICATION_DEFINED.XmNvisualPolicyis set toXmVARIABLE.XmNscrollBarDisplayPolicyis set toXmSTATIC.XmNshadowThicknessis set to0(zero).
πΈ the arguments πΈ
parentβ specifies the parent widget ID. the parent, the origin story, the one who birthed you πnameβ specifies the name of the created widget. and remember,SWgets glued onto the end of this for the ScrolledWindow.arglistβ specifies the argument list.argcountβ specifies the number of attribute/value pairs in the argument list (arglist).
for a complete definition of Text and its associated resources, see XmText(3). π
β¨ RETURN β¨
returns the Text widget ID. that's it, that's the whole return value, she's simple like that β¨
β¨ RELATED β¨
XmScrolledWindow(3) and XmText(3). go read them, they're the supporting cast and they ate π
and that's the whole page babes! this was XmCreateScrolledText, a library call, and she's out here in the wild doing her thing. mwah, drink water, go create some scrolled text, slay ππ¦πΈ
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms