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


     NAME
        integer_gc -- A numeric entry gadget with arrows.

     SUPERCLASS
        gadgetclass

    REQUIRES
        bevel.image

     DESCRIPTION
        This gadget is a special form of a strggclass gadget for entering
        positive or negative long integers.  The user can type in the number
        or use the arrows to adjust the number up or down.

        Advantages that this class provides:

         > Supports window relativity.

         > Optionally creates arrows for adjusting the value.

         > Definable minimum and maximum values as well as maximum number
           of characters.

         > Supports OS 3.0 BOOPSI Gadget HelpTest.

     METHODS
        OM_NEW -- Create the integer gadget.  Passed to superclass.

        OM_SET -- Set object attributes.  Passed to superclass first.

        OM_DISPOSE -- Cancels the integer menu before being passed onto
            superclass.

        OM_UPDATE -- Set object notification attributes.  Passed to superclass
            first.

        GM_RENDER -- Renders the gadget imagry.  Overrides the superclass.

        GM_GOACTIVE -- Handles activation, pops up the integer menu.  Overrides
            the superclass.

        GM_HANDLEINPUT -- Handles input events once active.  Overrides the
            superclass.

        GM_GOINACTIVE -- Closes the integer menu.  Overrides the superclass.

        All other methods are passed to the superclass.

     ATTRIBUTES
        GA_Disabled (BOOL)
            Set to TRUE to disable gadget, FALSE otherwise

            Defaults to FALSE.

            Applicability is (OM_NEW, OM_SET, OM_GET)

        GA_TextAttr (struct TextAttr *)
            Font to use for the gadget text.

            Defaults to the screen's font.

            Applicability is (OM_NEW, OM_SET, OM_GET)

        INTEGER_Number (LONG)
            The value for the integer gadget.  The class will adjust this
            number to fit into the range you define.  The current value for
            INTEGER_Number will be returned in IntuiMessage.Code on
            IDCMP_GADGETUP as a WORD.  Note that since the gadget handles
            values of size LONG, the value returned in IntuiMessage.Code
            will only be valid if the ranges you are allowing fit into a
            WORD value.  Otherwise you will have to use GetAttr().

            Defaults to 0.

            Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)

        INTEGER_MaxChars (WORD)
            Maximum number of characters you are allowing the number to be.
            This is including an optional negative sign (-).

            Defaults to 10.

            Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)

        INTEGER_Minimum (LONG)
            Minimum value the number can have.

            Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)

        INTEGER_Maximum (LONG)
            Maximum value the number can have.

            Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY)

        INTEGER_Arrows (BOOL)
            Should arrows be displayed for adjusting the number?  The class
            is smart enough to not render arrows if the gadget becomes too
            small.

            Defaults to TRUE.

            Applicability is (OM_NEW, OM_SET, OM_GET)

        INTEGER_MinVisible (UWORD)
            If set, this tag specifies the minimum number of numeric
            characters which should be visible at the gadgets minimum
            domain size. This tag effects GM_DOMAIN's result to tweak
            the display in a pleasing way.

            Defaults to 0.

            Applicability is (OM_NEW, OM_SET)

        All strggclass tags can be used with OM_NEW, OM_SET and OM_GET
        except for STRINGA_LongVal and STRINGA_MaxChars.  Use INTEGER_Number
        and INTEGER_MaxChars instead.