MRMFETCHWIDGETOVERRIDE(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

πŸ’– MRMFETCHWIDGETOVERRIDE(3) πŸ’–

okay bestie, gather round, because this one is a library call and it's lowkey the glow-up edition of a function you already know. we're in the MrmFetchWidgetOverride era and honestly? she ate. πŸŽ€


✨ NAME ✨

MrmFetchWidgetOverride β€” fetches any indexed (UIL named) application widget. and the whole point, the moment, the drama: it overrides the arguments specified for this application widget in UIL. no cap. πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ DESCRIPTION πŸ¦‹

so MrmFetchWidgetOverride is literally the extended version of MrmFetchWidget. same energy, same vibe, but with ✨extra✨. It is identical to MrmFetchWidget, except that it lets you override the widget's name and any arguments that MrmFetchWidget would otherwise retrieve from the UID file or one of the defaulting mechanisms. and bestie, that means the override argument list is not limited to those arguments in the UID file. you're free. you're unbothered. you're overriding. πŸ‘‘

heads up though: the override arguments apply only to the widget fetched and returned by this function. Its children (subtree) do not receive any override parameters. the kids are on their own, sorry not sorry πŸ™ˆ

now let's meet the parameters, one by one, main character by main character:

  • hierarchy_id β€” Specifies the ID of the UID hierarchy that contains the interface definition. and where did this value come from? It was returned in a previous call to MrmOpenHierarchyPerDisplay. so don't just make it up, bestie, you gotta earn it first. πŸ’œ
  • index β€” Specifies the UIL name of the widget to fetch. this is the one you're pulling out of the lineup.
  • parent_widget β€” Specifies the parent widget ID. every icon needs a support system fr fr 🫢
  • override_name β€” Specifies the name to override the widget name. Use a NULL value if you do not want to override the widget name. no notes, just vibes.
  • override_args β€” Specifies the override argument list, exactly as given to XtCreateWidget (conversion complete and so forth). Use a NULL value if you do not want to override the argument list. literally copy-paste energy, don't get creative with the format.
  • override_num_args β€” Specifies the number of arguments in override_args. count them. all of them. πŸ“
  • widget β€” Returns the widget ID of the created widget. this is your new baby, she's here. 🌈
  • class β€” Returns the class code identifying MRM's widget class. Literals identifying MRM widget class codes are defined in the include file Mrm/MrmPublic.h. iykyk.

πŸ’€ RETURN VALUE πŸ’€

this function returns one of the following status return constants, and bestie, you will be checking them:

  • MrmSUCCESS β€” The function executed successfully. slay. iconic. no notes. ✨
  • MrmBAD_HIERARCHY β€” The hierarchy ID was invalid. πŸ’€ not the hierarchy being fake.
  • MrmNOT_FOUND β€” The widget was not found in UID hierarchy. she's not here. she left. 😭
  • MrmFAILURE β€” The function failed. it's giving rough day, and honestly? we've all been there.


okay that's the whole page, you're welcome, go forth and override responsibly πŸ’– and just so you know, this whole thing is filed under MrmFetchWidgetOverride(library call) β€” that's the official stamp, keep it in your notes bestie, mwah πŸ’…βœ¨πŸŽ€πŸ¦‹