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

 -- Command: text ID/K, COMMAND/K, PORT/K, HELP/K, NODE/K, ICON/K,
          SPEC/K, PICT/K, TRANS/S, ATTRS/K/M, LABEL/K/F
     Text gadget objects are created with this command.  Text, button,
     switch, check, and image gadgets are essentially identical with
     the only differences being the base object class and the default
     appearance/action. All options are identical for these objects.

        * ID [I..] - an id can be assigned to a gadget for later
          reference. The id can be any combination of up to 5
          characters.  If the id is given without any other arguments,
          and the object has been previously created, then the label
          will be returned in RESULT (if OPTIONS RESULTS is specified
          in the script).

        * COMMAND [I..] - if given, the command will be executed
          whenever the gadget is pressed.  For a complete description
          of this option see Command-Port Options.  Note that the
          gadget label (see the LABEL argument description) will be
          used to replace a `%s' contained in the command string. 
          Additionally, if the gadget is an icon (specified by the ICON
          argument) and a command is not specified but a port is (see
          PORT argument description) then the command will be set to
          the default tool of the icon.  For example, if the icons
          default tool is `MultiView' then the command string will be
          set to `MultiView %s'.

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

        * HELP [I..] - with this argument help text may be defined
          which will be displayed as balloon help whenever the pointer
          is over the associated gadget.  Of course, this is dependant
          on whether the user set up balloon help in the MUI preference
          settings.

        * NODE [I..] - this argument is used to specify a node in the
          guide file given in the command line argument HELP for
          `MUIRexx'.  If the user positions the mouse pointer over the
          gadget and presses the help button on the keyboard then the
          guide file will be displayed at the node location.

        * ICON [I..] - the name of an icon may be specified with this
          argument. If given then the gadget image will be set to the
          icon image.  Note that the name of the icon should not be
          specified with a ".info".

        * SPEC [I..] - this argument is used to specify a MUI image
          specification (see MUI Image Specifications).  For `check'
          objects if not given then the image `MUII_CheckMark' will be
          used.

        * PICT [I..] - the name of a picture may be specified with this
          argument.  If given then the gadget image will be set to the
          picture content.  Any picture with an associated installed
          datatype may be used.

        * TRANS [I..] - if this flag is given then the background color
          of the picture (defined with the PICT option) will be
          transparent.

        * LABEL=LABELS [ISG] - the label for the gadget is given by this
          argument.  Note that the string may contain any of the
          special formatting sequences (see MUI Format Sequences). 
          Additionally, even though the label is not displayed for
          image gadgets it may still be used in the command string (see
          COMMAND argument above).  Also, for `switch' and `check'
          objects two strings may be given (separated by a comma) that
          will be returned depending on the select state of the gadget.
           The first defines the unselected string and the second
          defines the selected. If not specified then the unselected
          string will be set to 0 and the selected string will be set
          to 1.

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

     Some useful TAGs for use with this command are:

          TAG_Name =                        TAG_id          Flags Type
          
          Text_Contents =                   0x8042f8dc /* V4  isg STRPTR */
          Text_HiChar =                     0x804218ff /* V4  i.. char */
          Text_PreParse =                   0x8042566d /* V4  isg STRPTR */
          Text_SetMax =                     0x80424d0a /* V4  i.. BOOL */
          Text_SetMin =                     0x80424e10 /* V4  i.. BOOL */
          Text_SetVMax =                    0x80420d8b /* V11 i.. BOOL */
          ControlChar =                     0x8042120b /* V4  isg char */
          CycleChain =                      0x80421ce7 /* V11 isg LONG */
          Disabled =                        0x80423661 /* V4  isg BOOL */
          Draggable =                       0x80420b6e /* V11 isg BOOL */
          FixHeight =                       0x8042a92b /* V4  i.. LONG */
          FixHeightTxt =                    0x804276f2 /* V4  i.. STRPTR */
          FixWidth =                        0x8042a3f1 /* V4  i.. LONG */
          FixWidthTxt =                     0x8042d044 /* V4  i.. STRPTR */
          HorizDisappear =                  0x80429615 /* V11 isg LONG */
          HorizWeight =                     0x80426db9 /* V4  isg WORD */
          MaxHeight =                       0x804293e4 /* V11 i.. LONG */
          MaxWidth =                        0x8042f112 /* V11 i.. LONG */
          Selected =                        0x8042654b /* V4  isg BOOL */
          ShowMe =                          0x80429ba8 /* V4  isg BOOL */
          ShowSelState =                    0x8042caac /* V4  i.. BOOL */
          VertDisappear =                   0x8042d12f /* V11 isg LONG */
          VertWeight =                      0x804298d0 /* V4  isg WORD */
          Weight =                          0x80421d1f /* V4  i.. WORD */
          
          Note: Consult MUI:Developer/Autodocs/MUI_Text.doc, MUI_Image.doc,
                MUI_Area.doc and MUI:Developer/C/Include/libraries/mui.h

     Example use of this command:

          window ID MRX1 TITLE '"demo"' COMMAND '"window ID MRX1 CLOSE"' PORT DEMO
              text LABEL 'A demonstration of MUIRexx'
              button ID BUT COMMAND '"out %s"' HELP '"button 1"' LABEL 'button 1'
              switch ID SWCH LABEL 'switch'
              check ID CHK1 STRINGS '"no,yes"' ATTRS Selected TRUE
              image SPEC '"4:MUI:Images/WD/13pt/PopUp.mf0"'
              .
              .
              .
          endwindow
          
          switch ID SWCH ATTRS Selected
          say result