DTHELPRETURNSELECTEDWIDGETID(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

🌸 NAME 🌸

okay so this page is DtHelpReturnSelectedWidgetId(3) β€” yes, it’s a library call, bestie β€” and its whole personality is: select a widget or gadget. That’s the name, that’s the mission, we love a clear queen. πŸ’…

✨ SYNOPSIS ✨

#include &<Dt/Help.h>
int DtHelpReturnSelectedWidgetId(
Widget parent,
String cursor,
Widget *widget);

πŸ¦‹ DESCRIPTION πŸ¦‹

The DtHelpReturnSelectedWidgetId function gives users an interface to select a component inside an application. It literally grabs the pointer and returns the widget within which a button press occurs. Pressing the escape key (ESC) aborts this function. 🫢

The parent argument specifies the widget ID to use as the basis of the interaction β€” usually a top level shell. Main character energy for the shell, honestly.

The cursor argument specifies the cursor to be used for the pointer during the interaction. If a NULL value is used, DtHelpReturnSelectedWidgetId uses a default cursor value. Cute, it has a backup plan. ✨

The widget argument is the return value (for example, the selected widget). A NULL value is returned on error.

The DtHelpReturnSelectedWidgetId function lets applications get the widget ID for any widget in their user interface that the user has selected via the pointer. The application can then directly display a help topic based on the selected widget, or dynamically construct some help information based on the current context of the selected item. Obsessed with the contextual help glow-up. πŸ”₯

At any point while the question mark cursor is displayed, the user can select the escape key to abort the function call, and a NULL value is returned. If the user selects any item outside the current application’s windows, an error status is returned along with a NULL value for the widget argument. Refer to XmTrackingLocate(3) for a similar function β€” sibling energy, iykyk.

escape key = abort hatch, bestie. very β€œexit stage left” of it. πŸ’€

πŸ’… RETURN VALUE πŸ’…

Upon successful completion, the DtHelpReturnSelectedWidgetId function returns one of the following status values:

  • DtHELP_SELECT_ERROR β€” an error occurred while attempting to process the function.
  • DtHELP_SELECT_INVALID β€” the user selected an invalid component that is not contained in the current widget hierarchy.
  • DtHELP_SELECT_ABORT β€” the user aborted the function (for example, pressed the escape key), and a NULL widget value is passed back.
  • DtHELP_SELECT_VALID β€” the user selected a valid component within the application, and the widget argument is the ID of the selected component.

πŸŽ€ SEE ALSO πŸŽ€


signing off from the library call corner: the footer marks this as DtHelpRetur...tedWidgetId(library call), and there’s no date listed on the page β€” mysterious, iconic, very β€œwe don’t do timestamps here.” byeee πŸ’–βœ¨

πŸ“¦ where this page comes from