


XmCreateOptionMenu(3X)				       XmCreateOptionMenu(3X)
OSF/Motif							    OSF/Motif



NAME
  XXmmCCrreeaatteeOOppttiioonnMMeennuu - A RowColumn widget convenience creation function

SYNOPSIS


  ##iinncclluuddee <<XXmm//RRoowwCCoolluummnn..hh>>
  WWiiddggeett XXmmCCrreeaatteeOOppttiioonnMMeennuu ((_p_a_r_e_n_t, _n_a_m_e, _a_r_g_l_i_s_t, _a_r_g_c_o_u_n_t))
       WWiiddggeett	 _p_a_r_e_n_t;;
       SSttrriinngg	 _n_a_m_e;;
       AArrggLLiisstt	 _a_r_g_l_i_s_t;;
       CCaarrddiinnaall	 _a_r_g_c_o_u_n_t;;

DESCRIPTION
  XXmmCCrreeaatteeOOppttiioonnMMeennuu creates an	instance of a RowColumn	widget of type
  XXmmMMEENNUU__OOPPTTIIOONN	and returns the	associated widget ID.

  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.

  The OptionMenu widget	is a specialized RowColumn manager composed of a
  label, a selection area, and a single	Pulldown MenuPane.  When an applica-
  tion creates an OptionMenu widget, it	supplies the label string and the
  Pulldown MenuPane.  In order to succeed, there must be a valid XXmmNNssuubbMMeennuuIIdd
  resource set when calling this function.  When the OptionMenu	is created,
  the Pulldown MenuPane	must have been created as a child of the OptionMenu's
  parent and must be specified.	 The LabelGadget and the selection area	(a
  CascadeButtonGadget) are created by the OptionMenu.

  The OptionMenu's Pulldown MenuPane must not contain any ToggleButtons	or
  ToggleButtonGadgets.	The results of including CascadeButtons	or Cascade-
  ButtonGadgets	in the OptionMenu's Pulldown MenuPane are undefined.

  An OptionMenu	is laid	out with the label displayed on	one side of the
  widget and the selection area	on the other side when XXmmNNoorriieennttaattiioonn is
  XmHORIZONTAL.	 If the	value is XmVERTICAL, 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 MenuPane, and	it provides
  the means for	posting	the Pulldown MenuPane.

  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	Cas-
  cadeButtonGadget ID using XXmmOOppttiioonnBBuuttttoonnGGaaddggeett, and then calling XXttSSeett--
  VVaalluueess using the standard visual-related resources.

  The Pulldown MenuPane	is posted by moving the	mouse pointer over the selec-
  tion area and	pressing a mouse button	defined	by OptionMenu's	RowColumn
  parent.  The Pulldown	MenuPane 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,	BBSSeelleecctt	is used	to interact
  with an OptionMenu.  The default can be changed via the RowColumn resource
  XXmmNNmmeennuuPPoosstt.


  The OptionMenu also operates by using	the keyboard interface mechanism.  If
  the application has established a mnemonic with the OptionMenu, typing Alt
  with the mnemonic causes the Pulldown	MenuPane to be posted with traversal
  enabled.  The	standard traversal keys	can then be used to move within	the
  MenuPane.  Selection can occur as the	result of pressing the Return key or
  typing a mnemonic or accelerator for one of the menu items.

  An application may use the XXmmNNmmeennuuHHiissttoorryy resource to	indicate which item
  in the Pulldown MenuPane should be treated as	the current choice and have
  its label displayed in the selection area.  By default, the first item in
  the Pulldown MenuPane	is used.

  _p_a_r_e_n_t Specifies the parent widget ID

  _n_a_m_e	 Specifies the name of the created widget

  _a_r_g_l_i_s_tSpecifies the argument	list

  _a_r_g_c_o_u_n_t
	 Specifies the number of attribute/value pairs in the argument list
	 (_a_r_g_l_i_s_t)

  The user can specify resources in a resource file for	the automatically
  created widgets and gadgets of an OptionMenu.	 The following list identi-
  fies the names of these widgets (or gadgets) and the associated OptionMenu
  areas.

    oo++  Option Menu Label Gadget-"OptionLabel"

    oo++  Option Menu Cascade Button-"OptionButton"

  For a	complete definition of RowColumn and its associated resources, see
  XXmmRRoowwCCoolluummnn((33XX)).

RETURN VALUE
  Returns the RowColumn	widget ID.

RELATED	INFORMATION
  XXmmCCaassccaaddeeBBuuttttoonnGGaaddggeett((33XX)), XXmmCCrreeaatteePPuullllddoowwnnMMeennuu((33XX)),
  XXmmCCrreeaatteeSSiimmpplleeOOppttiioonnMMeennuu((33XX)),	XXmmLLaabbeellGGaaddggeett((33XX)), XXmmOOppttiioonnBBuuttttoonnGGaaddggeett((33XX)),
  XXmmOOppttiioonnLLaabbeellGGaaddggeett((33XX)), XXmmRRoowwCCoolluummnn((33XX)), and
  XXmmVVaaCCrreeaatteeSSiimmpplleeOOppttiioonnMMeennuu((33XX)).
























