MRMFETCHWIDGET(3)

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

πŸŽ€ NAME πŸŽ€

MrmFetchWidget β€” she fetches and creates an indexed (aka UIL named) application widget and all its children 🫢 (yes this is the library-call one, iykyk)


🌸 SYNOPSIS 🌸

#include <Mrm/MrmPublic.h>
Cardinal MrmFetchWidget(
MrmHierarchy hierarchy_id,
String index,
Widget parent_widget,
Widget *widget,
MrmType *class);

✨ DESCRIPTION ✨

okay so bestie, MrmFetchWidget fetches and creates an indexed application widget plus its entire lil subtree of children πŸ’– An "indexed application widget" is literally just any widget that's named in UIL, no cap. And here's the tea: in fetch operations, the fetched widget's subtree gets fetched and created right along with it πŸ¦‹

but listen β€” this widget must not appear as the child of a widget within its own subtree. like that's a hard no, do not do it πŸ™ˆ

Also MrmFetchWidget does not execute XtManageChild for the newly created widget. So she makes it, she does not manage it. periodt πŸ’…

And one more thing you need to know: all widgets fetched by a call to MrmFetchWidget are not managed at the time of their creation callbacks πŸ’€ (yes, fr fr, that's the vibe)


🧚 the arguments, bestie 🧚

  • hierarchy_id β€” the ID of the UID hierarchy that's holding your interface definition. You got this value back from a previous call to MrmOpenHierarchyPerDisplay. ✨
  • index β€” the UIL name of the widget you want to fetch. like, her government name 🌸
  • parent_widget β€” the parent widget ID. that's the momma πŸ‘‘
  • widget β€” returns the widget ID of the created widget. congrats, it's a widget πŸŽ€
  • class β€” this one is very serious: it must be set to an actual pointer, it cannot be a NULL pointer. MrmFetchWidget sets this argument to an implementation dependent value. so don't pass her nothing or she'll be upset 😭

okay so what can you actually do with her? An application can fetch any named widget in the UID hierarchy using MrmFetchWidget ✨ MrmFetchWidget can be called at any time to fetch a widget that was not fetched at application startup. She can be used to defer fetching pop-up widgets until they are first referenced (presumably in a callback), and then used to fetch them once. main character energy tbh πŸ’…

MrmFetchWidget can also create multiple instances of a widget (and its subtree) 🌈 In this case, the UID definition functions as a template; a widget definition can be fetched any number of times. An application can use this template to make multiple instances of a widget, for example, in a dialog box box or menu. slay πŸ’–

The index (UIL name) that identifies the widget must be known to the application. so like, memorize her name bestie 🫢


⭐ RETURN ⭐

This function returns one of the following status return constants:

  • MrmSUCCESS β€” the function executed successfully. ate and left no crumbs πŸ‘‘
  • MrmBAD_HIERARCHY β€” the hierarchy ID was invalid. she doesn't know her πŸ’€
  • MrmNOT_FOUND β€” the widget was not found in UID hierarchy. she's not here bestie 😭
  • MrmFAILURE β€” the function failed. it's giving tragedy πŸ™ˆ


and that's the whole page bestie 🫢 this was MrmFetchWidget(library call) β€” yeah, the library call section of the manual, that's the one πŸ’… go forth and fetch responsibly βœ¨πŸŽ€πŸ¦‹πŸŒΈ