XMVACREATESIMPLEPOPUPMENU(3)
π XmVaCreateSimplePopupMenu π
okay bestie, so you know how we've been talking about XmVaCreateSimplePopupMenu? It lives in the library call section of the manual, and honestly? she's that girl. A RowColumn widget convenience creation function. periodt.
β¨ NAME β¨
XmVaCreateSimplePopupMenu β A RowColumn widget convenience creation function π
πΈ SYNOPSIS πΈ
#include <Xm/RowColumn.h>
Widget XmVaCreateSimplePopupMenu(
Widget parent,
String name,
XtCallbackProc callback);
π¦ DESCRIPTION π¦
okay so XmVaCreateSimplePopupMenu creates an instance of a RowColumn widget of type XmMENU_POPUP and hands you back the associated widget ID. and like. the way it does it? this routine uses the ANSI C variable-length argument list (varargs) calling convention. very demure, very varargs π
This routine creates a Popup menu pane and its button children. and now for the naming lore, which is honestly so cute:
- each button gets named
button_n, where n is an integer from0(zero) up to the number of buttons in the menu minus1 - each separator gets named
separator_n, where n is an integer from0(zero) up to the number of separators in the menu minus1 - each title gets named
label_n, where n is an integer from0(zero) up to the number of titles in the menu minus1
Buttons, separators, and titles are named and created in the order in which they are specified in the variable portion of the argument list. no skipping, no reordering, the order is the order fr fr β¨
the arguments, bestie:</purpose>
parentβ Specifies the widget ID of the parent of the MenuShellnameβ Specifies the name of the created widgetcallbackβ Specifies a callback procedure to be called when a button is activated or when its value changes. This callback function is added to each button after creation. For aCascadeButtonGadgetor aPushButtonGadget, the callback is added as the button'sXmNactivateCallback, and it is called when the button is activated. For aToggleButtonGadget, the callback is added as the button'sXmNvalueChangedCallback, and it is called when the button's value changes. The button number is returned in theclient_datafield. π
π§ the varargs situation π§
The variable portion of the argument list is made up of groups of arguments. The first argument in each group is a constant or a string, and that's what determines which arguments follow in that group. The last argument in the list must be NULL. like, mandatory. do not forget it. π
The following list describes the possible first arguments in each group of varargs:
XmVaCASCADEBUTTONβ This is followed by two additional arguments. The set specifies one button in the PopupMenu and some of its resource values. The button created is aCascadeButtonGadget. Following are the additional two arguments, in order:labelβ The label string, of typeXmStringmnemonicβ The mnemonic, of typeKeySym
XmVaPUSHBUTTONβ This is followed by four additional arguments. The set specifies one button in the PopupMenu and some of its resource values. The button created is aPushButtonGadget. Following are the additional four arguments, in order:labelβ The label string, of typeXmStringmnemonicβ The mnemonic, of typeKeySymacceleratorβ The accelerator, of typeStringaccelerator_textβ The accelerator text, of typeXmString
XmVaRADIOBUTTONβ This is followed by four additional arguments. The set specifies one button in the PopupMenu and some of its resource values. The button created is aToggleButtonGadget. Following are the additional four arguments, in order:labelβ The label string, of typeXmStringmnemonicβ The mnemonic, of typeKeySymacceleratorβ The accelerator, of typeStringaccelerator_textβ The accelerator text, of typeXmString
XmVaCHECKBUTTONβ This is followed by four additional arguments. The set specifies one button in the PopupMenu and some of its resource values. The button created is aToggleButtonGadget. Following are the additional four arguments, in order:labelβ The label string, of typeXmStringmnemonicβ The mnemonic, of typeKeySymacceleratorβ The accelerator, of typeStringaccelerator_textβ The accelerator text, of typeXmString
XmVaTITLEβ This is followed by one additional argument. The pair specifies a titleLabelGadgetin the PopupMenu. Following is the additional argument:titleβ The title string, of typeXmString
XmVaSEPARATORβ This is followed by no additional arguments. It specifies one separator in the PopupMenu.XmVaDOUBLE_SEPARATORβ This is followed by no additional arguments. It specifies one separator in the PopupMenu. The separator type isXmDOUBLE_LINE. (double the line, double the drama π )resource_nameβ This is followed by one additional argument, the value of the resource, of typeXtArgVal. The pair specifies a resource and its value for the RowColumn widget.XtVaTypedArgβ This is followed by four additional arguments. The set specifies a resource and its value for the RowColumn widget. A resource type conversion is performed if necessary. Following are the additional four arguments, in order:nameβ The resource name, of typeStringtypeβ The type of the resource value supplied, of typeStringvalueβ The resource value (or a pointer to the resource value, depending on the type and size of the value), of typeXtArgValsizeβ The size of the resource value in bytes, of typeint
XtVaNestedListβ This is followed by one additional argument of typeXtVarArgsList. This argument is a nested list of varargs returned byXtVaCreateArgsList.
For more information on variable-length argument lists, see the X Toolkit Intrinsics documentation. π
A number of resources exist specifically for use with this and other simple menu creation routines. For a complete definition of RowColumn and its associated resources, see XmRowColumn(3). iykyk π«Ά
π RETURN π
Returns the RowColumn widget ID. that's it, that's the gift π
π RELATED π
and that's the whole page, bestie!! this one's from the library call manual, and the footer's just the page name again β XmVaCreateSimplePopupMenu(library call) β sitting there all iconic at the bottom. go build ur popup menu, ur gonna slay πβ¨π
π¦ where this page comes from
- alpine 3.24: motif-doc 2.5.2-r0 Β· LGPL-2.1-or-later
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms