'\" t .\" VaCreC.sgm /main/9 1996/09/08 21:21:17 rws $ .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed -e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "XmVaCreateSimpleOptionMenu" 3 .SH "NAME" \fBXmVaCreateSimpleOptionMenu\fP \(em A RowColumn widget convenience creation function "XmVaCreateSimpleOption\\%Menu" "creation functions" "XmVaCreateSimpleOption\\%Menu" .SH "SYNOPSIS" .PP .nf #include \fBWidget \fBXmVaCreateSimpleOptionMenu\fP\fR( \fBWidget \fBparent\fR\fR, \fBString \fBname\fR\fR, \fBXmString \fBoption_label\fR\fR, \fBKeySym \fBoption_mnemonic\fR\fR, \fBint \fBbutton_set\fR\fR, \fBXtCallbackProc \fBcallback\fR\fR); .fi .SH "DESCRIPTION" .PP \fBXmVaCreateSimpleOptionMenu\fP creates an instance of a RowColumn widget of type \fBXmMENU_OPTION\fP and returns the associated widget ID\&. This routine uses the ANSI C variable-length argument list (\fIvarargs\fP) calling convention\&. .PP This routine creates an OptionMenu and its Pulldown submenu containing PushButtonGadget or CascadeButtonGadget children\&. The name of each button is \fBbutton_\fP\fIn\fP, where \fIn\fP is an integer from 0 (zero) to the number of buttons in the menu minus 1\&. The name of each separator is \fBseparator_\fP\fIn\fP, where \fIn\fP is an integer from 0 (zero) to the number of separators in the menu minus 1\&. Buttons and separators are named and created in the order in which they are specified in the variable portion of the argument list\&. .IP "\fIparent\fP" 10 Specifies the parent widget ID .IP "\fIname\fP" 10 Specifies the name of the created widget .IP "\fIoption_label\fP" 10 Specifies the label string to be used on the left side of the OptionMenu\&. .IP "\fIoption_mnemonic\fP" 10 Specifies a keysym for a key that, when pressed by the user, posts the associated Pulldown menu pane\&. .IP "\fIbutton_set\fP" 10 Specifies which PushButtonGadget is initially set\&. The value is the integer \fIn\fP that corresponds to the \fIn\fPth PushButtonGadget specified in the variable portion of the argument list\&. Only a PushButtonGadget can be set, and only PushButtonGadgets are counted in determining the integer \fIn\fP\&. The first PushButtonGadget is number 0 (zero)\&. .IP "\fIcallback\fP" 10 Specifies a callback procedure to be called when a button is activated\&. This callback function is added to each button after creation as the button\&'s \fBXmNactivateCallback\fP\&. The callback function is called when a button is activated, and the button number is returned in the \fIclient_data\fP field\&. .PP The variable portion of the argument list consists of groups of arguments\&. The first argument in each group is a constant or a string and determines which arguments follow in that group\&. The last argument in the list must be NULL\&. Following are the possible first arguments in each group of \fIvarargs\fP: .IP "\fBXmVaPUSHBUTTON\fP" 10 This is followed by four additional arguments\&. The set specifies one button in the OptionMenu\&'s Pulldown submenu and some of its resource values\&. The button created is a PushButtonGadget\&. Following are the additional four arguments, in order: .RS .IP "\fIlabel\fP" 10 The label string, of type \fBXmString\fR .IP "\fImnemonic\fP" 10 The mnemonic, of type \fBKeySym\fP .IP "\fIaccelerator\fP" 10 The accelerator, of type \fBString\fR .IP "\fIaccelerator_text\fP" 10 The accelerator text, of type \fBXmString\fR .RE .IP "\fBXmVaSEPARATOR\fP" 10 This is followed by no additional arguments\&. It specifies one separator in the OptionMenu\&'s Pulldown submenu\&. .IP "\fBXmVaDOUBLE_SEPARATOR\fP" 10 This is followed by no additional arguments\&. It specifies one separator in the OptionMenu\&'s Pulldown submenu\&. The separator type is \fBXmDOUBLE_LINE\fP\&. .IP "\fIresource_name\fP" 10 This is followed by one additional argument, the value of the resource, of type \fBXtArgVal\fP\&. The pair specifies a resource and its value for the Pulldown submenu\&. .IP "\fBXtVaTypedArg\fP" 10 This is followed by four additional arguments\&. The set specifies a resource and its value for the Pulldown submenu\&. A resource type conversion is performed if necessary\&. Following are the additional four arguments, in order: .RS .IP "\fIname\fP" 10 The resource name, of type \fBString\fR .IP "\fItype\fP" 10 The type of the resource value supplied, of type \fBString\fR .IP "\fIvalue\fP" 10 The resource value (or a pointer to the resource value, depending on the type and size of the value), of type \fBXtArgVal\fP .IP "\fIsize\fP" 10 The size of the resource value in bytes, of type \fIint\fP .RE .IP "\fBXtVaNestedList\fP" 10 This is followed by one additional argument of type \fBXtVarArgsList\fP\&. This argument is a nested list of \fIvarargs\fP returned by \fBXtVaCreateArgsList\fP\&. .PP The user can specify resources in a resource file for the automatically created widgets and gadgets of an OptionMenu\&. The following list identifies the names of these widgets (or gadgets) and the associated OptionMenu areas: .IP "Option Menu Label Gadget" 10 \fBOptionLabel\fP .IP "Option Menu Cascade Button" 10 \fBOptionButton\fP .PP For more information on variable-length argument lists, see the X Toolkit Intrinsics documentation\&. .PP 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 \fBXmRowColumn\fP(3)\&. .SH "RETURN" .PP Returns the RowColumn widget ID\&. .SH "RELATED" .PP \fBXmCreateOptionMenu\fP(3), \fBXmCreateRowColumn\fP(3), \fBXmCreateSimpleOptionMenu\fP(3), and \fBXmRowColumn\fP(3)\&. .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:36