>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  XOPTION

XOPTION

XOPTION

Name


      XOPTION

Purpose


      Widget option selection panel.

Category


Calling Sequence


      opt = xoption(menu)

Inputs


      menu = string array, one element per option. in
        These are the option button titles (from top down).

Keyword Parameters


Keywords


        VALUES=val Array of values corresponding to each option.
          Default value is the menu element index (numeric).
        DEFAULT=n Button to use as default value (top is val(0)).
          Sets mouse to point at this element. If VALUES are
          given DEFAULT must be one of those values.
        TITLE=txt A scalar text string to use as title (def=none).
        COLORS=clr optional array of colors to display by buttons.
          Must be one for each button in menu, 24-bit color values.
          -1 means no color patch for that button.
        SENSITIVE=sens Optional array of 0s or 1s. 1 is sensitive,
          0 is grayed out. Same number of elements as menu.
        SUBOPTIONS=sopt Array of optional suboption names.
          If given this creates a new bank of buttons, one for
          each suboption name.
        /EXCLUSIVE means make the suboption buttons exclusive
          (only one active at a time), else non-exclusive.
        SUBSET=set Suboption initial settings, an array of
          0 (off) or 1 (on), one for each suboption button.
          The updated button status is returned here also.
          For exclusive buttons only the active button number
          is returned, -1 for none.
        SUB2OPTIONS=s2opt Optional second suboption menu.
        /EX2 Second suboption buttons are exclusive.
        SUB2SET=set2 Second suboption initial settings.
        XOFFSET=xoff, YOFFSET=yoff Widget position.

Outputs


      opt = returned option value. out

Common Blocks


Notes


      Notes: An example calls:
        opt = xoptions(['OK','Abort','Continue'])
        opt = xoptions(['A','B','C'],val=['a','b','c'],def='b')
        For suboptions use subset and sub2set to both set the
        initial settings and return final settings.

Modification History


      R. Sterner, 1994 Jan 10.
      R. Sterner, 1994 Jan 13 --- Added DEFAULT keyword.
      R. Sterner, 1994 Apr 12 --- Added TITLE keyword.
      R. Sterner, 1995 Dec 22 --- Added suboptions.
      R. Sterner, 1998 Jun 3 --- Added xoff, yoff.
      R. Sterner, 2002 Oct 23 --- Added COLORS=clr.
      R. Sterner, 2002 Oct 29 --- Fixed COLORS window bug.
      R. Sterner, 2005 Sep 13 --- Added SENSITIVE keyword.
      R. Sterner, 2010 Jun 09 --- Converted arrays from () to [].
  Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us