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

πŸ’– NAME πŸ’–

XmGetPostedFromWidget β€” a RowColumn function that returns the widget from which a menu was posted. yes bestie, that's literally the whole job description πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/RowColumn.h>
Widget XmGetPostedFromWidget(
Widget menu);

okay so it takes one argument, returns a Widget, and you have to include Xm/RowColumn.h first. that's the whole vibe. πŸ’…


🌸 DESCRIPTION 🌸

So XmGetPostedFromWidget returns the widget from which a menu was posted. that's it. that's the function. 🫢

And for torn-off menus, it returns the widget from which the menu was originally torn. iconic behavior honestly β€” it remembers where the menu came from even after it's been ripped off and is living its own independent life. main character energy fr.

An application can use this routine during the activate callback to determine the context in which the menu callback should be interpreted. lowkey the whole point: you're in a callback, a menu got activated, and you need to know whose menu this actually is. this function tells you. no cap. ✨

  • menu β€” Specifies the widget ID of the menu. just hand it the menu widget ID and it does its thing πŸ’œ
For a complete definition of RowColumn and its associated resources, see XmRowColumn(3). go read that one too, bestie, it's giving essential context πŸ¦‹

πŸ”₯ RETURN πŸ”₯

Returns the widget ID of the widget from which the menu was posted. let's break it down because the details matter:

  • If the menu is a Popup Menu, the returned widget is the widget from which the menu was popped up. πŸ’₯
  • If the menu is a Pulldown Menu, the returned widget is the MenuBar or OptionMenu from which the widget was pulled down. 🌈

so like... it always hands you back the origin story of the menu. periodt. πŸ‘‘



and that's the page!! πŸ’– XmGetPostedFromWidget(library call) β€” straight from the library call docs, signed, sealed, delivered. mwah. πŸ’…βœ¨