This gadget is a specialized form of a string.gadget for entering positive or negative long integers. The user can type in the number or use the buttons to adjust the number up or down.
Advantages that this class provides:
-
Supports window relativity.
-
Optionally creates buttons for adjusting the value.
-
Definable minimum and maximum values as well as maximum number of characters.
-
Supports OS 3.0 BOOPSI Gadget HelpTest.
- 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)
- GA_BackFill (struct Hook *)
-
Backfill hook to be used when rendering the gadget.
Defaults to NULL.
Applicability is (OM_NEW, OM_SET, OM_UPDATE, 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_UPDATE, 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. Note that INTEGER_MaxChars must also be large enough. Eg. to allow numbers < -999999999, INTEGER_MaxChars must be increased to 11.
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 buttons be displayed for adjusting the number? The class is smart enough to not render buttons if the gadget becomes too small.
Defaults to TRUE.
Applicability is (OM_NEW, OM_SET, OM_GET)
- INTEGER_SkipVal (WORD)
-
The value to increase or decrease the number by each time one of the buttons is pressed. (V45)
Defaults to 1.
Applicability is (OM_NEW, OM_SET, OM_UPDATE, 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.
This does not take the cursor into account, so if you want the entire number and also the cursor to be always visible without scrolling, you will need to make this larger by 1 than would otherwise be the case.
Defaults to 0.
Applicability is (OM_NEW, OM_SET)
All strgclass and string.gadget 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.