[Contents] [Index] [Help] [Browse <] [Browse >]

 -- Command: item ID/K, COMMAND/K, PORT/K, ATTRS/K/M, LABEL/K/F
     This command defines a menu item.  This command is only valid
     between a `menu' and `endmenu' pair.

        * ID [I..] - an id can be assigned to a menu item for later
          reference. The id can be any combination of up to 5
          characters.

        * COMMAND [I..] - if given, the command will be executed
          whenever the menu item is selected.  For a complete
          description of this option see Command-Port Options.  Note
          that the menu item label (see the LABEL argument description)
          will be used to replace a `%s' contained in the command
          string.

        * PORT [I..] - a specific host port may be specified by this
          argument. For a complete description of this option see
          Command-Port Options.

        * LABEL [I..] - this is the text for the menu item (which must
          be given).

        * ATTRS [ISG] - with this option any MUIA attribute TAGs may be
          set or retrieved (see Attribute TAGs).

     Some useful TAGs for use with the item command are:

          TAG_Name =                        TAG_id          Flags Type
          
          Menuitem_Checked =                0x8042562a /* V8  isg BOOL */
          Menuitem_Checkit =                0x80425ace /* V8  isg BOOL */
          Menuitem_Enabled =                0x8042ae0f /* V8  isg BOOL */
          Menuitem_Exclude =                0x80420bc6 /* V8  isg LONG */
          Menuitem_Shortcut =               0x80422030 /* V8  isg STRPTR */
          Menuitem_Title =                  0x804218be /* V8  isg STRPTR */
          Menuitem_Toggle =                 0x80424d5c /* V8  isg BOOL */
          
          Note: Consult MUI:Developer/Autodocs/MUI_Menuitem.doc and
                MUI:Developer/C/Include/libraries/mui.h

     Example use of this command:

          window TITLE '"MUIRexx Demo"' COMMAND '"quit"' PORT DEMO
              menu LABEL '"Project"'
                  .
                  .
                  .
                  item ATTRS Menuitem_Title '-1'  /* item separator bar */
                  item COMMAND '"quit"' PORT DEMO LABEL 'Quit'
              endmenu
              .
              .
              .
          endwindow