XMCREATESCROLLEDLIST(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ XmCreateScrolledList ✨

okay bestie, gather round, because today we're talking about XmCreateScrolledList from the library call section of the manual πŸ’… this is the List ScrolledList convenience creation function, and honestly? it's giving "I do two jobs so you don't have to" 🫢


🌸 SYNOPSIS 🌸

#include <Xm/List.h>
Widget XmCreateScrolledList(
Widget parent,
String name,
ArgList arglist,
Cardinal argcount);

πŸ¦‹ DESCRIPTION πŸ¦‹

So XmCreateScrolledList makes you an instance of a List widget, and β€” plot twist β€” that List is contained within a ScrolledWindow. Two widgets, one function call, main character energy ✨

The ScrolledWindow parent is created managed. And literally all the ScrolledWindow subarea widgets? Automatically created by this function. No cap. πŸ”₯

⚠️ listen up because this part is important: the ID returned by this function is the ID of the List widget β€” not the ScrolledWindow widget. Use this widget ID for all operations on the List widget. Use the widget ID of the List widget's parent for all operations on the ScrolledWindow. (iykyk πŸ™ˆ)

So how do you get the ID of the ScrolledWindow widget associated with the List widget? You hit up the Xt Intrinsics XtParent function. iconic behavior honestly πŸ‘‘

And the name of the ScrolledWindow that this function creates? It's formed by concatenating SW onto the end of the name you specified in the parameter list. Cute, predictable, we love a naming convention πŸŽ€


πŸ’– the args are flexible, bestie

All arguments to either the List or the ScrolledWindow widget can be specified at creation time using this function. Changes to initial position and size are sent only to the ScrolledWindow widget. Other resources get sent to the List or the ScrolledWindow widget as appropriate β€” it just knows where things go 😌

πŸ’€ warning bestie: 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 (List or ScrolledWindow) after creating it. fr fr, don't do it, just add your callbacks after 🫢

🌈 forced initial values

This function forces the following initial values for ScrolledWindow resources (no negotiating, the function decided):

  • XmNscrollingPolicy is set to XmAPPLICATION_DEFINED.
  • XmNvisualPolicy is set to XmVARIABLE.
  • XmNscrollBarDisplayPolicy is set to XmSTATIC. (and btw, no initial value is forced for the List's XmNscrollBarDisplayPolicy β€” that one's all yours 🌸)
  • XmNshadowThickness is set to 0 (zero).

🧚 the arguments, one by one

  • parent β€” Specifies the parent widget ID.
  • name β€” Specifies the name of the created widget.
  • arglist β€” Specifies the argument list.
  • argcount β€” Specifies the number of attribute/value pairs in the argument list (arglist).

For a complete definition of List and its associated resources, go peek at XmList(3) β€” it's the whole lore drop πŸ“–


⭐ RETURN ⭐

Returns the List widget ID. that's it, that's the tea πŸ“



okay that's the whole page bestie, you ate this πŸŽ€ this was XmCreateScrolledList from the library call manual section, straight out of the Xm library docs β€” go forth and create your scrolled lists, you gorgeous Unix gremlin πŸ’–βœ¨