'\" t .\" CreOpt.sgm /main/9 1996/09/08 20:34:08 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 "XmCreateOptionMenu" 3 .SH "NAME" \fBXmCreateOptionMenu\fP \(em A RowColumn widget convenience creation function "XmCreateOptionMenu" "creation functions" "XmCreateOptionMenu" .SH "SYNOPSIS" .PP .nf #include \fBWidget \fBXmCreateOptionMenu\fP\fR( \fBWidget \fBparent\fR\fR, \fBString \fBname\fR\fR, \fBArgList \fBarglist\fR\fR, \fBCardinal \fBargcount\fR\fR); .fi .SH "DESCRIPTION" .PP \fBXmCreateOptionMenu\fP creates an instance of a RowColumn widget of type \fBXmMENU_OPTION\fP and returns the associated widget ID\&. .PP It is provided as a convenience function for creating a RowColumn widget configured to operate as an OptionMenu and is not implemented as a separate widget class\&. .PP The OptionMenu widget is a specialized RowColumn manager composed of a label, a selection area, and a single Pulldown menu pane\&. When an application creates an OptionMenu widget, it supplies the label string and the Pulldown menu pane\&. In order for the operation to be successful, there must be a valid \fBXmNsubMenuId\fP resource set when this function is called\&. The LabelGadget and the selection area (a CascadeButtonGadget) are created by the OptionMenu\&. .PP The OptionMenu\&'s Pulldown menu pane must not contain any ToggleButtons or ToggleButtonGadgets\&. The results of including CascadeButtons or CascadeButtonGadgets in the OptionMenu\&'s Pulldown menu pane are undefined\&. .PP An OptionMenu is laid out with the label displayed on one side of the widget and the selection area on the other side when \fBXmNorientation\fP is \fBXmHORIZONTAL\fP\&. The layout of the label with respect to the selection area depends on the \fBXmNlayoutDirection\fP resource in the horizontal orientation\&. If the value is \fBXmVERTICAL\fP, the label is above the selection area\&. The selection area has a dual purpose; it displays the label of the last item selected from the associated Pulldown menu pane, and it provides the means for posting the Pulldown menu pane\&. .PP The OptionMenu typically does not display any 3-D visuals around itself or the internal LabelGadget\&. By default, the internal CascadeButtonGadget has a visible 3-D shadow\&. The application may change this by getting the CascadeButtonGadget ID using \fBXmOptionButtonGadget\fP, and then calling \fBXtSetValues\fP using the standard visual-related resources\&. .PP The Pulldown menu pane is posted when the mouse pointer is moved over the selection area and a mouse button that is defined by OptionMenu\&'s RowColumn parent is pressed\&. The Pulldown menu pane is posted and positioned so that the last selected item is directly over the selection area\&. The mouse is then used to arm the desired menu item\&. When the mouse button is released, the armed menu item is selected and the label within the selection area is changed to match that of the selected item\&. By default, \fBBSelect\fP is used to interact with an OptionMenu\&. The default can be changed with the RowColumn resource \fBXmNmenuPost\fP\&. .PP The OptionMenu also operates with the keyboard interface mechanism\&. If the application has established a mnemonic with the OptionMenu, pressing \fB\fP with the mnemonic causes the Pulldown menu pane to be posted with traversal enabled\&. The standard traversal keys can then be used to move within the menu pane\&. Pressing \fB\fP or typing a mnemonic or accelerator for one of the menu items selects that item\&. .PP An application may use the \fBXmNmenuHistory\fP resource to indicate which item in the Pulldown menu pane should be treated as the current choice and have its label displayed in the selection area\&. By default, the first selectable item in the Pulldown menu pane is used\&. .IP "\fIparent\fP" 10 Specifies the parent widget ID .IP "\fIname\fP" 10 Specifies the name of the created widget .IP "\fIarglist\fP" 10 Specifies the argument list .IP "\fIargcount\fP" 10 Specifies the number of attribute/value pairs in the argument list (\fIarglist\fP) .PP The user can specify resources in a resource file for the automatically created widgets and gadgets of an OptionMenu\&. These widgets (or gadgets) and the associated OptionMenu areas are .IP "Option Menu Label Gadget" 10 \fBOptionLabel\fP .IP "Option Menu Cascade Button" 10 \fBOptionButton\fP .PP 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 \fBXmCascadeButtonGadget\fP(3), \fBXmCreatePulldownMenu\fP(3), \fBXmCreateSimpleOptionMenu\fP(3), \fBXmLabelGadget\fP(3), \fBXmOptionButtonGadget\fP(3), \fBXmOptionLabelGadget\fP(3), \fBXmRowColumn\fP(3), and \fBXmVaCreateSimpleOptionMenu\fP(3)\&. .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:20